mirror of https://github.com/arendst/Tasmota.git
Deleted example of a very particular usecase and with wrong syntax
parent
d6b0e6eb1f
commit
e9ef1117f0
|
@ -28,12 +28,11 @@
|
|||
25. [Arithmetic Commands to be used with VARs](#25-arithmetic-commands-to-be-used-with-vars)
|
||||
- [Sending the value of a sensor to MQTT only when a delta is reached](#sending-the-value-of-a-sensor-to-mqtt-only-when-a-delta-is-reached)
|
||||
- [Adjust the value of a sensor and send it by MQTT](#adjust-the-value-of-a-sensor-and-send-it-by-mqtt)
|
||||
26. [Timer-triggered Low frequency blink (intermittent timer)](#26-Timer-triggered-low-frequency-blink)
|
||||
27. [Switch relays via serial interface](#27-Switch-relays-via-serial-interface)
|
||||
28. [Using BREAK to simulate IF..ELSEIF..ELSE..ENDIF](#28-Using-BREAK-to-simulate-IFELSEIFELSEENDIF)
|
||||
29. [Adjust PowerDelta according to current Power values](#29-adjust-powerdelta-according-to-current-power-values)
|
||||
30. [Simple solar heater control](#30-simple-solar-heater-control)
|
||||
31. [IR Forward](#31-ir-forward)
|
||||
26. [Switch relays via serial interface](#27-Switch-relays-via-serial-interface)
|
||||
27. [Using BREAK to simulate IF..ELSEIF..ELSE..ENDIF](#28-Using-BREAK-to-simulate-IFELSEIFELSEENDIF)
|
||||
28. [Adjust PowerDelta according to current Power values](#29-adjust-powerdelta-according-to-current-power-values)
|
||||
29. [Simple solar heater control](#30-simple-solar-heater-control)
|
||||
30. [IR Forward](#31-ir-forward)
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
#### 1. Use long press action on a switch
|
||||
|
@ -1005,33 +1004,8 @@ on event#sendtemp do publish stat/sonoff/temp %var1% endon
|
|||
[Back To Top](#top)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
#### 26 Timer-triggered Low Frequency Blink
|
||||
|
||||
This example uses a rule timer to call itself to allow the power to be switched on and off within a set time period. The rule timer is triggered by Global timers - one to set it going, the other to turn it off.
|
||||
|
||||
To set the whole period of operation, set the ON timer1 through the web interface to trigger a rule. Set the OFF timer2 through the web interface to trigger a rule.
|
||||
|
||||
Write the following rules:
|
||||
|
||||
`rule1 on Clock#Timer=1 do backlog power 1; ruletimer#1 10 endon`
|
||||
|
||||
This rule is triggered by global timer 1 and switched the device on then sets the timeout at 10 seconds
|
||||
|
||||
`rule2 on RuleTimer=1 do backlog power 2; rules#timer=1 10 endon`
|
||||
|
||||
This rule is called on the ruletimer timeout and toggles the power then resets the timer for another 10 seconds
|
||||
|
||||
`rule3 on Clock#Timer=2 do backlog power 0; rules#timer=1 0 endon`
|
||||
|
||||
At the end of the desired period of operation, the clocktimer times out and runs rule3 which turns power off and sets the ruletimer to zero so it does not run. The device remains off.
|
||||
|
||||
These rules were used to run a heater intermittently to keep a room warm in the absence of a thermostat.
|
||||
|
||||
[Back To Top](#top)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
#### 27. Switch relays via serial interface
|
||||
#### 26. Switch relays via serial interface
|
||||
|
||||
This example switches a connected relays over the software serial on and off.<br>
|
||||
Write the following rules:
|
||||
|
@ -1055,7 +1029,7 @@ MQT: stat/sonoff-1585B3/POWER = OFF
|
|||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
#### 28. Using BREAK to simulate IF..ELSEIF..ELSE..ENDIF
|
||||
#### 27. Using BREAK to simulate IF..ELSEIF..ELSE..ENDIF
|
||||
|
||||
``BREAK`` is an alternative to ``ENDON``. ``BREAK`` will stop the execution for the triggers that follow. If a trigger that ends with ``BREAK`` fires, then the following triggers of that rule will not be executed. This allows to simulate ``IF..ELSEIF..ELSE..ENDIF``
|
||||
|
||||
|
@ -1133,7 +1107,7 @@ Which will result in the following output:
|
|||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
#### 29. Adjust PowerDelta according to current Power values
|
||||
#### 28. Adjust PowerDelta according to current Power values
|
||||
Power sensor reporting thresholds are set by a percentage change in the Power value by setting [PowerDelta](Commands#powerdelta). Power changes from 10W to 11W (10%) may not be very interesting. But power changes from 1000W to 1100W (also 10%) could be very important. To avoid getting reports for small changes but ensuring that larger power swings are reported, a rule set can be used to create a gradient threshold based on the absolute power values.
|
||||
|
||||
This rule also uses the [one-shot feature of rules](#4-usage-of-one-shot-once) to avoid reporting of every small change within a threshold window. The rule (a ON/DO/ENDON rule in this the set) will trigger only once when a threshold is crossed.
|
||||
|
@ -1167,7 +1141,7 @@ ELSE // ENERGY#Power changed (i.e. LE 5)
|
|||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
#### 30. Simple solar heater control
|
||||
#### 29. Simple solar heater control
|
||||
|
||||
In a swimming pool, a filter pump and a solar panel is installed. When the sun is shining, the pump should push water through the solar panel, to heat the pool. When it's night or cloudy, the pump should be off, to avoid cooling the pool water through the solar panel. The pump is controlled by a Sonoff TH10 with 2x DS18B20 sensors connected.
|
||||
|
||||
|
@ -1238,7 +1212,7 @@ Please note that this example does not support manual override or handle missing
|
|||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
#### 31. IR Forward
|
||||
#### 30. IR Forward
|
||||
|
||||
Using one IR receiver and one sender (or both extender) you can simply forward signals from one to another using the following rule
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue