Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace aambiguous = sign by : in rules #1317

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,17 +293,17 @@ See also|[`SetOption3`](#setoption3) - Disable//Enable MQTT<BR>[`SetOption4`](#s

Command|Parameters
:---|:---
Add<x\><a class="cmnd" id="add"></a>|`<value>` = add value to Var<x\> ([example](Rules#arithmetic-commands-used-with-var))
CalcRes<a class="cmnd" id="calcres"></a>|Current calculation resolution<BR>`0..7` = set number of decimal places to be used in `Add`, `Sub`, `Mult` and `Scale`
Add<x\><a class="cmnd" id="add"></a>|`<value>` : add value to Var<x\> ([example](Rules#arithmetic-commands-used-with-var))
CalcRes<a class="cmnd" id="calcres"></a>|Current calculation resolution<BR>`0..7` : set number of decimal places to be used in `Add`, `Sub`, `Mult` and `Scale`
Event<a class="cmnd" id="event"></a>|Execute an event to trigger a rule as [documented](Rules#rule-trigger)&emsp;
Mem<x\><a class="cmnd" id="mem"></a>|Manage up to 16 variables stored on flash (x = `1..16`)<BR>`Mem` returns all current values. `Mem<x>` returns the variable's current value.<BR>`<value>` = store a string value in a variable<BR>`"` = clear stored value in Mem<x\>
Mult<x\><a class="cmnd" id="mult"></a>|`<value>` = multiply value to Var<x\> ([example](Rules#arithmetic-commands-used-with-var))<BR>
Rule<x\><a class="cmnd" id="rule"></a>|Rules. [Read more...](Rules)<BR>`0` = disable Rule<x\><BR>`1` = enable Rule<x\><BR>`2` = toggle Rule<x\><BR>`4` = disable one-shot detection (perform commands as long as trigger is met)<BR>`5` = enable one-shot (e.g., sometimes used for slow changing sensors like temperature) detection<BR>`6` = toggle one-shot detection<BR>`8` = disable stop-on-error after exception restart<BR>`9` = enable stop-on-error after exception restart<BR>`10` = toggle stop-on-error after exception restart<BR>`<value>` = define Rule<x\><BR>`+<value>` = append to Rule<x\><BR>`"` = clear Rule<x\><BR><BR>Rule set one-shot: Each rule within the rule set will trigger only once until the trigger condition returns to a false condition. For example, `ON Energy#Power<3`: Without one-shot enabled, it will trigger anytime `Energy#Power` gets an update (i.e., the `Power` telemetry value changes) and the value is `<3`. This can potentially trigger that rule multiple times. With one-shot enabled, the rule will trigger only the on the first transition to `<3` and not again until the trigger value goes `>=3`. In other words, the rule will trigger again, but it has to cross the conditional "boundary" before it will trigger again.
Mem<x\><a class="cmnd" id="mem"></a>|Manage up to 16 variables stored on flash (x = `1..16`)<BR>`Mem` : returns all current values. `Mem<x>` : returns the variable's current value.<BR>`Mem<x> <string/value>` : store a string/value in a variable. Exemple: `Mem3 3.2` or `Mem4 this is a string`<BR>`Mem<x> "` : clear stored value in Mem<x\>. Exemple: `Mem5 "`
Mult<x\><a class="cmnd" id="mult"></a>|`<value>` : multiply value to Var<x\> ([example](Rules#arithmetic-commands-used-with-var))<BR>
Rule<x\><a class="cmnd" id="rule"></a>|Rules. [Read more...](Rules)<BR>`0` : disable Rule<x\><BR>`1` : enable Rule<x\><BR>`2` : toggle Rule<x\><BR>`4` : disable one-shot detection (perform commands as long as trigger is met)<BR>`5` : enable one-shot (e.g., sometimes used for slow changing sensors like temperature) detection<BR>`6` : toggle one-shot detection<BR>`8` : disable stop-on-error after exception restart<BR>`9` : enable stop-on-error after exception restart<BR>`10` : toggle stop-on-error after exception restart<BR>`<value>` : define Rule<x\><BR>`+<value>` : append to Rule<x\><BR>`"` : clear Rule<x\><BR><BR>Rule set one-shot: Each rule within the rule set will trigger only once until the trigger condition returns to a false condition. For example, `ON Energy#Power<3`: Without one-shot enabled, it will trigger anytime `Energy#Power` gets an update (i.e., the `Power` telemetry value changes) and the value is `<3`. This can potentially trigger that rule multiple times. With one-shot enabled, the rule will trigger only the on the first transition to `<3` and not again until the trigger value goes `>=3`. In other words, the rule will trigger again, but it has to cross the conditional "boundary" before it will trigger again.
Rule0<a class="cmnd" id="rule0"></a>|Same functionality as Rule<x\> but affects all rulesets at once
RuleTimer<x\><a class="cmnd" id="ruletimer"></a>|Up to eight timers to be used as countdown event (x = `1..8`)&emsp; <BR>`0..65535` = set countdown rule timer in seconds<BR>`RuleTimer0 0` = stops and clear all timer simultaneously
Scale<x\><a class="cmnd" id="scale"></a>|Scale value from a low and high limit to another low and high limits and save in Var<x\> ([example](Rules#arithmetic-commands-used-with-var))<BR>`v` = value: the number to scale<BR>`fl` = fromLow: the lower bound of the value’s current range<BR>`fh` = fromHigh: the upper bound of the value’s current range<BR>`tl` = toLow: the lower bound of the value’s target range<BR>`th` = toHigh: the upper bound of the value’s target range
Sub<x\><a class="cmnd" id="sub"></a>|`<value>` = subtract value to Var<x\> ([example](Rules#arithmetic-commands-used-with-var))
Var<x\><a class="cmnd" id="var"></a>|Manage up to 16 variables stored in memory (x = `1..16`)<BR>`Var` returns all current values. `Var<x>` returns the variable's current value.<BR>`<string>` = store a string value in a variable<BR>`"` = clear stored value in Var<x\>
RuleTimer<x\><a class="cmnd" id="ruletimer"></a>|Up to eight timers to be used as countdown event (x = `1..8`)&emsp; <BR>`0..65535` : set countdown rule timer in seconds<BR>`RuleTimer0 0` : stops and clear all timer simultaneously
Scale<x\><a class="cmnd" id="scale"></a>|`<value>,<fl>,<fh>,<th>,<th>` : Scale value from a low and high limit to another low and high limits and save in Var<x\> ([example](Rules#arithmetic-commands-used-with-var))<BR>`value` : the number to scale<BR>`fl` : fromLow = the lower bound of the value’s current range<BR>`fh` : fromHigh = the upper bound of the value’s current range<BR>`tl` : toLow = the lower bound of the value’s target range<BR>`th` : toHigh = the upper bound of the value’s target range
Sub<x\><a class="cmnd" id="sub"></a>|`<value>` : subtract value to Var<x\> ([example](Rules#arithmetic-commands-used-with-var))
Var<x\><a class="cmnd" id="var"></a>|Manage up to 16 variables stored in memory (x = `1..16`)<BR>`Var` : returns all current values.<BR>`Var<x>` : returns the variable's current value.<BR>`Var<x> <string/value>` : store a string/value value in a variable. Exemple: `Var3 3.2` or `Var4 this is a string`<BR>`Var<x> "` : clear stored value in Var<x\>. Exemple: `Mem5 "`

### Timers

Expand Down