Updated Timers (markdown)

blakadder 2019-10-27 23:03:04 +01:00
parent 0b7871ebe0
commit 6f7f6176f2
1 changed files with 6 additions and 4 deletions

@ -1,4 +1,4 @@
  » v5.13.1 **» v5.13.1**
To control a device locally 16 timers are programmable. They can be configured with the `Timer<x>` command followed by a JSON payload with optional parameters. For example: To control a device locally 16 timers are programmable. They can be configured with the `Timer<x>` command followed by a JSON payload with optional parameters. For example:
@ -17,13 +17,15 @@ When `Mode 1` or `Mode 2` is used, `Latitude` and `Longitude` become available.
Timer1 {"Arm":1,"Mode":2,"Time":"-2:23","Window":0,"Days":"11TW11S","Repeat":1,"Output":1,"Action":1} Timer1 {"Arm":1,"Mode":2,"Time":"-2:23","Window":0,"Days":"11TW11S","Repeat":1,"Output":1,"Action":1}
``` ```
### Commands
Command|Parameters Command|Parameters
:---|:--- :---|:---
Latitude<a id="Latitude"></a>|`<value>` = set latitude Latitude<a id="Latitude"></a>|`<value>` = set latitude
Longitude<a id="Longitude"></a>|`<value>` = set longitude Longitude<a id="Longitude"></a>|`<value>` = set longitude
Timers<a id="Timers"></a>|Timers control<BR>&emsp; » v6.2.0<BR>`0` = disable all timers<BR>`1` = enable all timers<BR>`2` = toggle all timers<BR> Timers<a id="Timers"></a>|Timers control<br>`0` = disable all timers&emsp; » v6.2.0<BR>`1` = enable all timers<BR>`2` = toggle all timers<BR>
Timer\<x\><a id="Timer"></a>|Parameters for Timer\<x\> where x = `1..16`<BR>&emsp; » v6.2.0<BR>`0` = clear parameters for Timer\<x\><BR>`1..16` = copy Timer\<y\> parameters to Timer\<x\><BR>`{ "name":value ; .. }` = set all or individual parameters using JSON payload with names and values of data pairs from the table below Timer\<x\><a id="Timer"></a>|Parameters for Timer\<x\> where x = `1..16`<BR>`0` = clear parameters for Timer\<x\>&emsp; » v6.2.0<BR>`1..16` = copy Timer\<y\> parameters to Timer\<x\><BR>`{ "name":value ; .. }` = set all or individual parameters using JSON payload with names and values of data pairs from the table below
### JSON payload anatomy
JSON Name|JSON Value JSON Name|JSON Value
:---|:--- :---|:---
Arm|`0` = disarm or disable timer<BR>`1` = arm or enable timer Arm|`0` = disarm or disable timer<BR>`1` = arm or enable timer
@ -33,4 +35,4 @@ Window|`0..15` = add or subtract a random number of minutes to `Time`
Days|`SMTWTFS` = set day of weeks mask where `0` or `-` = OFF and any different character = ON Days|`SMTWTFS` = set day of weeks mask where `0` or `-` = OFF and any different character = ON
Repeat|`0` = allow timer only once<BR>`1` = repeat timer execution Repeat|`0` = allow timer only once<BR>`1` = repeat timer execution
Output|`1..16` = select an output to be used if no rule is enabled Output|`1..16` = select an output to be used if no rule is enabled
Action|`0` = turn output OFF<BR> `1` = turn output ON<BR>`2` = TOGGLE output<BR>`3` = RULE/BLINK<ul><li>If the Tasmota [Rules](#rules) feature has been activated by compiling the code (activated by default in all pre-compiled Tasmota binaries), a rule with `Clock#Timer=<timer>` will be triggered if written and turned on by the user.</li><li>If Rules are not compiled, BLINK output using [BlinkCount](#BlinkCount) parameters.</li></ul> Action|`0` = turn output OFF<BR> `1` = turn output ON<BR>`2` = TOGGLE output<BR>`3` = RULE/BLINK<br>If the Tasmota [Rules](#rules) feature has been activated by compiling the code (activated by default in all pre-compiled Tasmota binaries), a rule with `Clock#Timer=<timer>` will be triggered if written and turned on by the user.<br>If Rules are not compiled, BLINK output using [BlinkCount](#BlinkCount) parameters.