This PR adds a new variable %timestamp% to be used in a rule to allow the user to include the Time Stamp as Tasmota has for Status, Sensors, etc, for example:
Command:
publish stat/topic/sensor {"Time":"%timestamp%","mysensor":"%var1%"}
Output:
{"Time":"2018-12-27T12:52:57","mysensor":"1"}
(https://github.com/arendst/Sonoff-Tasmota/issues/4734)
RULES: Added BREAK as an alternative ENDON that will stop the execution of the following rules.
If a rule that ends with BREAK, is triggered, then the following rules of that set will not be executed. This is useful for cases like: https://github.com/arendst/Sonoff-Tasmota/issues/4477
To make it possible to trigger a rule at boot time with the state of the switches or relays (in order to take decisions), 2 new trigger types has been added:
* SWITCH1#BOOT
to be used like:
ON SWITCH1#BOOT DO ... %value% ENDON
ON SWITCH1#BOOT=0 DO .... ENDON
ON SWITCH1#BOOT=1 DO .... ENDON
and
* POWER1#BOOT
to be used like:
ON POWER1#BOOT DO ... %value% ENDON
ON POWER1#BOOT=0 DO .... ENDON
ON POWER1#BOOT=1 DO .... ENDON
* Change pinmode for no-pullup defined switches to pullup when configured as switchmode PUSHBUTTON (=3 and up) (#3896)
* Add delay after restart before processing rule sensor data (#3811)
6.2.1.3 20180907
* Change web Configure Module GPIO drop down list order for better readability
* Fix showing Period Power in energy threshold messages
* Fix ButtonRetain to not use default topic for clearing retain messages (#3737)
* Add optional MQTT_TELE_RETAIN to Energy Margins message (#3612, 3614)
* Add Individual HSBColorX commands (#3430, #3615)
* Add RuleX debug options 8,9,10 (StopOnError) to control RuleX execution status after an exception restart (#3607)
Added %sunrise%, %sunset%, %uptime% and %time% to be used in rules comparison like:
on Time#Initialized do backlog event checksunrise=%time%; event checksunset=%time% endon
on event#checksunset>%sunset% do power3 1 endon
on event#checksunrise<%sunrise% do power3 1 endon
6.1.1.9
* Allow user override of define MAX_RULE_TIMERS (#3561)
* Allow user override of define MAX_RULE_VARS
* Add GPIO options ButtonXn, SwitchXn and CounterXn to select INPUT mode instead of INPUT_PULLUP (#2525)
* Fix OtaMagic when file path contains a dash (-) (#3563)
6.0.0a
* Add time in minutes to rule Time#Initialized, Time#set and Time#Minute
(#2669)
* Add rule variables %time% for minutes since midnight, %uptime%,
%sunrise% and %sunset% giving time in minutes (#2669)
New Arithmetic commands to be used with VARs:
ADD1 to ADD5: Add a value to VAR[x]
Usage: ADD1 15
Result: VAR1 = VAR1 + 15
SUB1 to SUB5: Substract a value from VAR[x]
Usage: SUB1 15
Result: VAR1 = VAR1 - 15
MULT1 to MULT5: Multiply a value to VAR[x]
Usage: MULT1 15
Result: VAR1 = VAR1 * 15
SCALE1 to SCALE5: Scale a value from a low and high limit to another low and high limit and store it in VAR[x] (directly equivalent to MAP arduino command)
Syntax:
SCALEx value, fromLow, fromHigh, toLow, toHigh
Parameters
value: the number to scale
fromLow: the lower bound of the value’s current range
fromHigh: the upper bound of the value’s current range
toLow: the lower bound of the value’s target range
toHigh: the upper bound of the value’s target range
(omitted values are taken as zero)
Usage: SCALE1 15, 0, 100, 0, 1000
Result: VAR1 = 150
6.0.0a
* Add support for uploading Sonoff Bridge firmware found in
tools/fw_efm8bb1 folder build by Portisch using Web Gui File Upload
(#2886)
* Add command RfRaw to control Portisch firmware features
5.14.0a
* Add rules %mem1% to %mem5% variable names storing data in flash
(#2780)
* Add rules test on %varx% or %memx% (#2780)
* Fix anomalies in rules (#2778)