With global sync enabled, two ESP8266 seeing each other the rulesets are the following:
ESP num 1:
Code: Select all
on bell#Switch do
if [bell#Switch]>0
sendto 2,event,pulse_siren2
endif
endon
Code: Select all
on System#Boot do
event,stop_siren
endon
on pulse_siren do
pulse,12,1,2500
endon
on pulse_siren2 do
pulse,12,1,2000
endon
on stop_siren do
GPIO,12,0
endon
If I try to change "sendto 2,event,pulse_siren" on the 1st ESP - only one character difference, than the pulse command never executed. If i change it back to "sendto 2,event,pulse_siren2" than it works again. I simply do not understand.
Also sometimes "on bell#Switch>0 do" not works, this is the reason i changed it to "on bell#Switch do" and inserted an if instead.