mirror of https://github.com/arendst/Tasmota.git
Anchors
parent
bcddd5ecaf
commit
abda2b0e73
65
Rules.md
65
Rules.md
|
@ -65,34 +65,35 @@ Comparison operators:
|
||||||
|
|
||||||
Some of available triggers:
|
Some of available triggers:
|
||||||
|
|
||||||
Trigger | When it occurs |
|
Trigger|When it occurs
|
||||||
------------------|----------------|
|
:-|:-
|
||||||
Analog#A0div10 | when the `A0` input changes by more than 1% it provides a value between 0 and 100
|
Analog#A0div10<a id="Analog"></a>|when the `A0` input changes by more than 1% it provides a value between 0 and 100
|
||||||
Button2#State | when a button changes state:<br>`0` = OFF<BR>`1` = ON<BR>`2` = TOGGLE<BR>`3` = HOLD
|
Button2#State<a id="ButtonState"></a>|when a button changes state:<br>`0` = OFF<BR>`1` = ON<BR>`2` = TOGGLE<BR>`3` = HOLD
|
||||||
Clock#Timer=3 | when global `Timer3` is activated
|
Clock#Timer=3<a id="ClockTimer"></a>|when global `Timer3` is activated
|
||||||
Dimmer#Boot | occurs after Tasmota starts<a id="ADC0"></a>
|
Dimmer#Boot<a id="DimmerBoot"></a>|occurs after Tasmota starts<a id="ADC0"></a>
|
||||||
Dimmer#State | when the value for Dimmer is changed
|
Dimmer#State<a id="DimmerState"></a>|when the value for Dimmer is changed
|
||||||
Event#eventName | when command `Event eventName` is executed. You can define your own event values and trigger them with the [`Event`](commands#event) command.
|
Event#eventName<a id="EventeventName"></a>|when command `Event eventName` is executed. You can define your own event values and trigger them with the [`Event`](commands#event) command.
|
||||||
Mem<x>#State | when the value for Mem\<x> is changed
|
Mem\<x>#State<a id="MemState"></a>|when the value for Mem\<x> is changed
|
||||||
Http#Initialized
|
Http#Initialized<a id="HttpInitialized"></a>|
|
||||||
Mqtt#Connected | when MQTT is connected
|
Mqtt#Connected<a id="MqttConnected"></a>|when MQTT is connected
|
||||||
Mqtt#Disconnected | when MQTT is disconnected
|
Mqtt#Disconnected<a id="MqttDisconnected"></a>|when MQTT is disconnected
|
||||||
Power1#Boot | `Relay1` state before Wi-Fi and MQTT are connected and before Time sync but after `PowerOnState` is executed. Power#Boot triggers before System#Boot.<BR>This trigger's value will be the last state of `Relay1` if [`PowerOnState`](Commands#poweronstate) is set to its default value (`3`).
|
Power1#Boot<a id="PowerBoot"></a>|`Relay1` state before Wi-Fi and MQTT are connected and before Time sync but after `PowerOnState` is executed. Power#Boot triggers before System#Boot.<BR>This trigger's value will be the last state of `Relay1` if [`PowerOnState`](Commands#poweronstate) is set to its default value (`3`).
|
||||||
Power1#State | when a power output is changed<br>use `Power1#state=0` and `Power1#state=1` for comparison, not =off or =on<br>Power2 for Relay2, etc.
|
Power1#State<a id="PowerState"></a>|when a power output is changed<br>use `Power1#state=0` and `Power1#state=1` for comparison, not =off or =on<br>Power2 for Relay2, etc.
|
||||||
Rules#Timer=1 | when countdown `RuleTimer1` expires
|
Rules#Timer=1<a id="RulesTimer"></a>|when countdown `RuleTimer1` expires
|
||||||
Switch1#Boot | occurs after Tasmota starts
|
Switch1#Boot<a id="SwitchBoot"></a>|occurs after Tasmota starts
|
||||||
Switch1#State | when a switch changes state:<br>`0` = OFF<BR>`1` = ON<BR>`2` = TOGGLE<BR>`3` = HOLD<BR>(`SwitchTopic 0` must be set for this to trigger)
|
Switch1#State<a id="SwitchState"></a>|when a switch changes state:<br>`0` = OFF<BR>`1` = ON<BR>`2` = TOGGLE<BR>`3` = HOLD<BR>(`SwitchTopic 0` must be set for this to trigger)
|
||||||
System#Boot | occurs once after MQTT is initialized. Due to the command execution order it cannot occur earlier than that.
|
System#Boot<a id="SystemBoot"></a>|occurs once after MQTT is initialized. Due to the command execution order it cannot occur earlier than that.
|
||||||
System#Save | executed just before a planned restart
|
System#Save<a id="SystemSave"></a>|executed just before a planned restart
|
||||||
Time#Initialized | once when NTP is initialized and time is in sync
|
Time#Initialized<a id="TimeInitialized"></a>|once when NTP is initialized and time is in sync
|
||||||
Time#Initialized>120 | once, 120 seconds after NTP is initialized and time is in sync
|
Time#Initialized>120|once, 120 seconds after NTP is initialized and time is in sync
|
||||||
Time#Minute | every minute
|
Time#Minute<a id="TimeMinute"></a>|every minute
|
||||||
Time#Minute\|5 | every five minutes
|
Time#Minute\|5|every five minutes
|
||||||
Time#Minute==241 | every day once at 04:01 (241 minutes after midnight)
|
Time#Minute==241|every day once at 04:01 (241 minutes after midnight)
|
||||||
Time#Set | every hour when NTP makes time in sync
|
Time#Set<a id="TimeSet"></a>|every hour when NTP makes time in sync
|
||||||
Var\<x>#State | when the value for Var\<x> is changed
|
Var\<x>#State<a id="VarState"></a>|when the value for Var\<x> is changed
|
||||||
Wifi#Connected | when Wi-Fi is connected
|
Wifi#Connected<a id="WifiConnected"></a>|when Wi-Fi is connected
|
||||||
Wifi#Disconnected | when Wi-Fi is disconnected
|
Wifi#Disconnected<a id="WifiDisconnected"></a>|when Wi-Fi is disconnected
|
||||||
|
|
||||||
|
|
||||||
Connected sensors can be a trigger in the form as they are represented in the `TelePeriod` and `Status 8` JSON payloads.
|
Connected sensors can be a trigger in the form as they are represented in the `TelePeriod` and `Status 8` JSON payloads.
|
||||||
|
|
||||||
|
@ -114,12 +115,12 @@ Hardware and software serial interface, RF, or IR are also supported based on th
|
||||||
|
|
||||||
Trigger | When it occurs |
|
Trigger | When it occurs |
|
||||||
------------------|----------------|
|
------------------|----------------|
|
||||||
|SerialReceived#Data=\<string>| whenever \<string> is received via hardware serial|
|
|SerialReceived#Data=\<string><a id="SerialReceivedData"></a>| whenever \<string> is received via hardware serial|
|
||||||
|SSerialReceived#Data=\<string>| whenever \<string> is received via software serial|
|
|SSerialReceived#Data=\<string>| whenever \<string> is received via software serial|
|
||||||
|IrReceived#Data=801| whenever an IR signal for a RC5 remote control button 1 is received|
|
|IrReceived#Data=801<a id="IrReceivedData"></a>| whenever an IR signal for a RC5 remote control button 1 is received|
|
||||||
|IrReceived#Data=0x00FF9867|whenever an IR signal with hex code 0x00FF9867 is received|
|
|IrReceived#Data=0x00FF9867|whenever an IR signal with hex code 0x00FF9867 is received|
|
||||||
|RfReceived#RfKey=4| whenever the [RF Bridge](Sonoff-RF-Bridge-433) receives a recognized RfKey 4 signal
|
|RfReceived#RfKey=4<a id="RfReceivedRfKey"></a>| whenever the [RF Bridge](Sonoff-RF-Bridge-433) receives a recognized RfKey 4 signal
|
||||||
|RfReceived#Data=0xE8329E|whenever an RF signal with hex code 0xE8329E is received|
|
|RfReceived#Data=0xE8329E<a id="RfReceivedData"></a>|whenever an RF signal with hex code 0xE8329E is received|
|
||||||
|
|
||||||
[Back To Top](#top)
|
[Back To Top](#top)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue