mirror of https://github.com/arendst/Tasmota.git
Added "Two-way light switches without MQTT" section
parent
2c6ddc7dab
commit
52d2ed2ea8
|
@ -1406,3 +1406,36 @@ Rule1 1
|
|||
```
|
||||
|
||||
[Back To Top](#top)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
#### Two-way light switches without MQTT
|
||||
|
||||
Two Sonoff T1 3-gang light switches can be used at either end of a room by setting up one the master and the other as the slave. The master performs the switching of the power to the lights, while the slave just asks the master to toggle the power state. The master also turns the slave's relays on and off so that the LED indicators follow the master's state.
|
||||
|
||||
Using the ```WebSend``` command, the two switches can talk to each other - no need for an MQTT broker. It remains to be seen how reliable this is.
|
||||
|
||||
Starting with the slave, the rule to toggle the master is pretty simple:
|
||||
|
||||
```
|
||||
Rule1 ON Button1#State DO WebSend [192.168.0.74] POWER1 TOGGLE ENDON
|
||||
ON Button2#State DO WebSend [192.168.0.74] POWER2 TOGGLE ENDON
|
||||
ON Button3#State DO WebSend [192.168.0.74] POWER3 TOGGLE ENDON
|
||||
Rule1 1
|
||||
```
|
||||
|
||||
Note that having a rule for the Button#State disables the power toggling of the slave's relay(s). This is desirable because we want the master to control the slave's relay state(s) according to its own as follows:
|
||||
|
||||
```
|
||||
Rule1 ON Power1#state=1 DO WebSend [192.168.0.144] POWER1 1 ENDON
|
||||
ON Power1#state=0 DO WebSend [192.168.0.144] POWER1 0 ENDON
|
||||
Rule2 ON Power2#state=1 DO WebSend [192.168.0.144] POWER2 1 ENDON
|
||||
ON Power2#state=0 DO WebSend [192.168.0.144] POWER2 0 ENDON
|
||||
Rule3 ON Power3#state=1 DO WebSend [192.168.0.144] POWER3 1 ENDON
|
||||
ON Power3#state=0 DO WebSend [192.168.0.144] POWER3 0 ENDON
|
||||
Rule1 1
|
||||
Rule2 1
|
||||
Rule3 1
|
||||
```
|
||||
|
||||
[Back To Top](#top)
|
||||
|
|
Loading…
Reference in New Issue