mirror of https://github.com/arendst/Tasmota.git
added tuyamcu and any #Data trigger explanation
parent
6efc2a93a1
commit
cfa84412bf
12
Rules.md
12
Rules.md
|
@ -15,7 +15,7 @@ Rules perform actions based on triggers (e.g., switch state change, temperature
|
||||||
## Rule Syntax
|
## Rule Syntax
|
||||||
**Nested rules are not supported.**
|
**Nested rules are not supported.**
|
||||||
|
|
||||||
- Optional ["IF/ELSE/ELSEIF" and "AND/OR"](Rules---IF-ELSE-ELSEIF-and-AND-OR-Support) support **6.6.0.11**
|
- Optional [`IF / ELSE / ELSEIF` and `AND / OR`](Rules---IF-ELSE-ELSEIF-and-AND-OR-Support) support **6.6.0.11**
|
||||||
- Optional [use of expressions](Expressions-in-Rules) support **6.4.1.14**
|
- Optional [use of expressions](Expressions-in-Rules) support **6.4.1.14**
|
||||||
|
|
||||||
Rule definition statement:
|
Rule definition statement:
|
||||||
|
@ -58,7 +58,7 @@ Comparison operators:
|
||||||
|`<=`| lesser than or equal to|
|
|`<=`| lesser than or equal to|
|
||||||
|`\|`| used for [modulo operation](https://en.wikipedia.org/wiki/Modulo_operation) with remainder = 0 (exact division)|
|
|`\|`| used for [modulo operation](https://en.wikipedia.org/wiki/Modulo_operation) with remainder = 0 (exact division)|
|
||||||
|
|
||||||
Some of available triggers:
|
#### Some of available triggers:
|
||||||
|
|
||||||
Trigger|When it occurs
|
Trigger|When it occurs
|
||||||
:-|:-
|
:-|:-
|
||||||
|
@ -90,6 +90,11 @@ Var\<x>#State<a id="VarState"></a>|when the value for Var\<x> is changed
|
||||||
Wifi#Connected<a id="WifiConnected"></a>|when Wi-Fi is connected
|
Wifi#Connected<a id="WifiConnected"></a>|when Wi-Fi is connected
|
||||||
Wifi#Disconnected<a id="WifiDisconnected"></a>|when Wi-Fi is disconnected
|
Wifi#Disconnected<a id="WifiDisconnected"></a>|when Wi-Fi is disconnected
|
||||||
|
|
||||||
|
Every [command](Commands) with a one level JSON response has the #Data trigger.
|
||||||
|
|
||||||
|
Trigger | When it occurs |
|
||||||
|
------------------|----------------|
|
||||||
|
|\<command>#Data|A response such as {"Fanspeed":3} has the Fanspeed#Data trigger.<br>A response like {"PulseTime2":{"Set":0,"Remaining":0}} does NOT have the #data trigger as the triggers are PulseTime2#Set and PulseTime2#Remaining.
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
@ -107,10 +112,11 @@ Trigger | When it occurs |
|
||||||
------------------|----------------|
|
------------------|----------------|
|
||||||
|Tele-AM2301#Temperature|sensor AM2301 Temperature value when the TelePeriod JSON payload is output|
|
|Tele-AM2301#Temperature|sensor AM2301 Temperature value when the TelePeriod JSON payload is output|
|
||||||
|
|
||||||
Hardware and software serial interface, RF, or IR are also supported based on their [JSON](JSON-Status-Responses) status message:
|
Hardware and software serial interface, RF, IR and TuyaMCU are also supported based on their [JSON](JSON-Status-Responses) status message:
|
||||||
|
|
||||||
Trigger | When it occurs |
|
Trigger | When it occurs |
|
||||||
------------------|----------------|
|
------------------|----------------|
|
||||||
|
|TuyaMcuReceived#Data=\<hex_string><a id="SerialReceivedData"></a>| whenever \<hex_string> is received with [TuyaMCU](tuyamcu) component|
|
||||||
|SerialReceived#Data=\<string><a id="SerialReceivedData"></a>| 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<a id="IrReceivedData"></a>| 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|
|
||||||
|
|
Loading…
Reference in New Issue