Jethro wrote: ↑16 May 2020, 13:30
Obviously you'll need to amend based on your switch names/values, MQTT topics and if you're using other timers. If you don't want MQTT I'm sure other actions/rules could be worked into this.
Hope this is helpful for someone!
hi, thanks for sharing, i tested using monitor to save tasks on devices webpage, but it now works
Code: Select all
on System#Boot do
monitor,pcf,73
monitor,pcf,74
monitor,pcf,76
monitor,pcf,77
monitor,pcf,78
endon
on pcf#74=0 do
timerSet,1,1
endon
On Rules#Timer=1 do
//single press
Publish cmnd/tasmota_156/power2,'2' // tasmota toggle pcf0 relay2
timerSet,1,0
endon
on pcf#74=3 do
//double press
Publish cmnd/tasmota_156/power3,'2' // tasmota toggle pcf0 relay3
timerSet,1,0
EndOn
on pcf#74=11 do
//long press
Publish cmnd/tasmota_156/power4,'2' // tasmota toggle pcf0 relay4
timerSet,1,0
EndOn
but it not work
attached the log
can someone help?
thanks
single press:
1291085: EVENT: PCF#74=0
1291128: ACT : timerSet,1,1
1291129: Command: timerSet
1291484: EVENT: PCF#74=1
1292368: WD : Uptime 22 ConnectFailures 0 FreeMem 18720 WiFiStatus 3
1292812: EVENT: Rules#Timer=1
1292845: ACT : Publish cmnd/tasmota_156/power2,'2'
1292847: Command: Publish
1292882: ACT : timerSet,1,0
1292883: Command: timerSet
doublepress:
1330284: EVENT: PCF#74=0
1330311: ACT : timerSet,1,1
1330312: Command: timerSet
1330684: EVENT: PCF#74=1
1330984: EVENT: PCF#74=0
1331009: ACT : timerSet,1,1
1331010: Command: timerSet
1331284: EVENT: PCF#74=1
1332812: EVENT: Rules#Timer=1
1332841: ACT : Publish cmnd/tasmota_156/power2,'2'
1332842: Command: Publish
1332878: ACT : timerSet,1,0
1332879: Command: timerSet
longpress:
1352367: WD : Uptime 23 ConnectFailures 0 FreeMem 16048 WiFiStatus 3
1353940: EVENT: PCF#74=0
1353990: ACT : timerSet,1,1
1353990: Command: timerSet
1355812: EVENT: Rules#Timer=1
1355840: ACT : Publish cmnd/tasmota_156/power2,'2'
1355842: Command: Publish
1355880: ACT : timerSet,1,0
1355881: Command: timerSet
1359540: EVENT: PCF#74=1