mirror of https://github.com/arendst/Tasmota.git
Updated Rules (markdown)
parent
ec3dd58d94
commit
f5244683c6
12
Rules.md
12
Rules.md
|
@ -187,13 +187,13 @@ VARx#State | when a the value for a Variable is changed
|
||||||
MEMx#State | when a the value for a Persistent Variable is changed | 6.4.1.14
|
MEMx#State | when a the value for a Persistent Variable is changed | 6.4.1.14
|
||||||
|
|
||||||
#### Sensors
|
#### Sensors
|
||||||
All connected sensors can be a trigger in the form as they are represented in the teleperiod or Status 8 JSON message. The format is:
|
All connected sensors can be a trigger in the form as they are represented in the TelePeriod or Status 8 JSON message. The format is:
|
||||||
```
|
```
|
||||||
[SensorName]#[ValueName]
|
[SensorName]#[ValueName]
|
||||||
```
|
```
|
||||||
Example triggers are:
|
Example triggers are:
|
||||||
|
|
||||||
- ``Tele-AM2301#Temperature``triggers on the Teleperiod time for the sensor AM2301.
|
- ``Tele-AM2301#Temperature``triggers on the TelePeriod time for the sensor AM2301.
|
||||||
- ``Dsb18b20#Temperature<20`` whenever the temperature of sensor DSB18B20 is below 20 degrees
|
- ``Dsb18b20#Temperature<20`` whenever the temperature of sensor DSB18B20 is below 20 degrees
|
||||||
- ``AM2301-12#Humidity=55.5`` whenever the hunidity of sensor AM2301-12 equals 55.5 %
|
- ``AM2301-12#Humidity=55.5`` whenever the hunidity of sensor AM2301-12 equals 55.5 %
|
||||||
- ``INA219#Current>0.100`` whenever the current drawn is more than 0.1A
|
- ``INA219#Current>0.100`` whenever the current drawn is more than 0.1A
|
||||||
|
@ -204,7 +204,7 @@ Devices using RfReceived (Sonoff Bridge) or IrReceived are also supported based
|
||||||
- ``IrReceived#Data=801`` whenever an IR signal for a RC5 remote control button 1 is received (6.1.0)
|
- ``IrReceived#Data=801`` whenever an IR signal for a RC5 remote control button 1 is received (6.1.0)
|
||||||
- ``RfReceived#RfKey=4`` whenever the Sonoff Bridge receives a recognized Rf signal (6.1.0)
|
- ``RfReceived#RfKey=4`` whenever the Sonoff Bridge receives a recognized Rf signal (6.1.0)
|
||||||
|
|
||||||
To trigger on a sensor at Teleperiod time only you may prefix the sensor with the word ``tele-`` to distinguish it from the above shown trigger. See example 5 below.
|
To trigger on a sensor at TelePeriod time only you may prefix the sensor with the word ``tele-`` to distinguish it from the above shown trigger. See example 5 below.
|
||||||
|
|
||||||
|
|
||||||
[BackToTop](https://github.com/arendst/Sonoff-Tasmota/wiki/Rules#summary)
|
[BackToTop](https://github.com/arendst/Sonoff-Tasmota/wiki/Rules#summary)
|
||||||
|
@ -606,7 +606,7 @@ Inital config on console:
|
||||||
* `SwitchMode1 3` <- Use the switch1 as pushbutton (It will allow us to disable the link between the button and the relay by inserting a rule to dictate what the pushbutton will do - **NOTE: Until rules are created the pushbutton will still control the relay!**)
|
* `SwitchMode1 3` <- Use the switch1 as pushbutton (It will allow us to disable the link between the button and the relay by inserting a rule to dictate what the pushbutton will do - **NOTE: Until rules are created the pushbutton will still control the relay!**)
|
||||||
* `Rule 1 ` <- turn on rules
|
* `Rule 1 ` <- turn on rules
|
||||||
* `Rule 4` <- turn off one-shot rule
|
* `Rule 4` <- turn off one-shot rule
|
||||||
* `teleperiod 60` <- check temp every minute
|
* `TelePeriod 60` <- check temp every minute
|
||||||
* `SetOption26 1` <- use power1 on mqtt messages
|
* `SetOption26 1` <- use power1 on mqtt messages
|
||||||
* `SetOption0 0` <- dont save relay status on eeprom
|
* `SetOption0 0` <- dont save relay status on eeprom
|
||||||
* `poweronstate 0` <- start all relays off
|
* `poweronstate 0` <- start all relays off
|
||||||
|
@ -658,9 +658,9 @@ To get the status:
|
||||||
|
|
||||||
Everything together:
|
Everything together:
|
||||||
|
|
||||||
INITIAL CONFIG: (To note RuleTimer1 must be greater that teleperiod for expected results)
|
INITIAL CONFIG: (To note RuleTimer1 must be greater that TelePeriod for expected results)
|
||||||
|
|
||||||
`backlog SwitchMode1 3; Rule 1; Rule 4; teleperiod 60; SetOption26 1; SetOption0 0; poweronstate 0; mem1 0; mem2 25; mem3 23; var1 0`
|
`backlog SwitchMode1 3; Rule 1; Rule 4; TelePeriod 60; SetOption26 1; SetOption0 0; poweronstate 0; mem1 0; mem2 25; mem3 23; var1 0`
|
||||||
|
|
||||||
RULES:
|
RULES:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue