added tuyamcu and any #Data trigger explanation

blakadder 2019-10-22 12:24:20 +02:00
parent 6efc2a93a1
commit cfa84412bf
1 changed files with 9 additions and 3 deletions

@ -15,7 +15,7 @@ Rules perform actions based on triggers (e.g., switch state change, temperature
## Rule Syntax
**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**
Rule definition statement:
@ -58,7 +58,7 @@ Comparison operators:
|`<=`| lesser than or equal to|
|`\|`| 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
:-|:-
@ -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#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.
@ -107,10 +112,11 @@ Trigger | When it occurs |
------------------|----------------|
|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 |
------------------|----------------|
|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|
|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|