I''m using 4 electrodragon dual switch which is esp8266 based : https://www.electrodragon.com/product/w ... d-esp8266/
(of course I've flashed espeasy on it)
For each of them, I'm monitoring gpio 5 in the from of value in the variable th_low#state
I'have the following rule for each:
Code: Select all
on th_low#state do
If [th_low#state]=1 and [relay1#state]=0
gpio,13,1
else
gpio,13,0
endif
endon
it could look like this at the end:
Code: Select all
on th_low#state do
totalstate=th_low#state_1 + th_low#state_2 +th_low#state_3 + th_low#state_4
If [th_low#state]=1 and [relay1#state]=0 and totalstate>3
gpio,13,1
else
gpio,13,0
endif
endon