Added missing commands

Adrian Scillato 2019-05-29 17:56:25 -03:00
parent 609e7019ab
commit 7c419ee0f3
1 changed files with 4 additions and 0 deletions

@ -35,6 +35,8 @@ Configure the module as described above but omit the GPIO12 = Relay1 setting (le
Then go to console in the webinterface and add a rule that sends a MQTT message if the PIR is triggered: Then go to console in the webinterface and add a rule that sends a MQTT message if the PIR is triggered:
Switchmode1 1
Switchtopic 0
Rule1 on switch1#state=1 do publish stat/sonoff/PIRSENSOR1 ON endon on switch1#state=0 do publish stat/sonoff/PIRSENSOR1 OFF endon Rule1 on switch1#state=1 do publish stat/sonoff/PIRSENSOR1 ON endon on switch1#state=0 do publish stat/sonoff/PIRSENSOR1 OFF endon
Rule1 4 Rule1 4
Rule1 1 Rule1 1
@ -43,6 +45,8 @@ Note: the webinterface (obviously) won't show the relay state as "ON" or "OFF" a
If you want to attach a second PIR to another GPIO (e.g. D1 / GPIO5), configure it as Switch2 and add another rule via console: If you want to attach a second PIR to another GPIO (e.g. D1 / GPIO5), configure it as Switch2 and add another rule via console:
Switchmode1 1
Switchtopic 0
Rule2 on switch2#state=1 do publish stat/sonoff/PIRSENSOR2 ON endon on switch2#state=0 do publish stat/sonoff/PIRSENSOR2 OFF endon Rule2 on switch2#state=1 do publish stat/sonoff/PIRSENSOR2 ON endon on switch2#state=0 do publish stat/sonoff/PIRSENSOR2 OFF endon
Rule2 4 Rule2 4
Rule2 1 Rule2 1