i have installed 2.0-20180322 on a NodeMCU.
I have two devices, a led and a relay.
I control the led from mqtt, if i turn off the led the relay turns on for a second, then after five seconds the led turns on.
Everything is working except when i reboot the board and connects to the mqtt server, the led turns off and the relay board turns on.
I tried to disable the first command with system variables but without success.
Code: Select all
On System#Boot do
gpio,2,0
Endon
On led#state do
If %uptime%>2
If [led#state]=1
LongPulse_mS,5,0,500
timerSet,1,5
else
gpio,5,1
Endif
Endif
Endon
On Rules#Timer=1 do
gpio,2,0
gpio,5,1
Endon
The %uptime%>2 does not seems to work.
Someone have any idea how to disable the first switch after the reoot ?
Thank you.