I am using ESP8266 with 20112 - Mega.
I do have a relay for output and a switch for input.
I can activate the relay with the Switch on Rules 1.
The switch is for a lamp "on" or "auto" mode.
Code: Select all
on System#Boot do
gpio,4,0
timerSet,1,10
endon
on Switch#Switch=1 do
if [Relay#Relay]=1
gpio,4,0
else
gpio,4,1
endif
endon
on Switch#Switch=0 do
if [Relay#Relay]=0
gpio,4,1
else
gpio,4,0
endif
endon
Code: Select all
on Clock#Time=%sunrise% do // sunrise.
event,Off // turn off relay
endon
on Clock#Time=%sunset% do // sunset...
event,On // turn on relay
endon
on Clock#Time=All,01:00 do // 01:00 Uhr aus
event,Off // turn off relay
endon
on Clock#Time=All,05:00 do // 05:00 Uhr aus
event,On // turn on relay
endon
on On do
gpio,4,1
endon
on Off do
gpio,4,0
endon
But ther is no reaction.
where do I do the error of this thinking?
THX