Wifidisconnect command
Posted: 11 Aug 2018, 20:13
I'm trying to see if I can turn off the WiFi to reduce power usage at night time, using the following:
On System#Boot do
gpio,12,0
WifiConnect
endon
on Clock#Time=All,06:00 do
reboot
endon
On wifioff do
delay 8000
WifiDisconnect
endon
on Clock#Time=All,17:50 do
WifiConnect
endon
on Clock#Time=All,22:00 do
WifiDisconnect
endon
This is on a NodeMCU v3, which i've just installed in my car to trigger an alarm siren (either by WiFi or by proximity sensor) to deter young children playing near it, throwing things at it, scraping bike pedals down the side of it. I plan to add more functionality later.......
It's taking 35-40mA and i'm hoping that WiFi off will save a few more mA.
BUT, what is happening is I turn the WiFi off by the above (direct command or a timer), it disconnects as it should, but then 60s later it's back on again.
Any idea about this problem?
On System#Boot do
gpio,12,0
WifiConnect
endon
on Clock#Time=All,06:00 do
reboot
endon
On wifioff do
delay 8000
WifiDisconnect
endon
on Clock#Time=All,17:50 do
WifiConnect
endon
on Clock#Time=All,22:00 do
WifiDisconnect
endon
This is on a NodeMCU v3, which i've just installed in my car to trigger an alarm siren (either by WiFi or by proximity sensor) to deter young children playing near it, throwing things at it, scraping bike pedals down the side of it. I plan to add more functionality later.......
It's taking 35-40mA and i'm hoping that WiFi off will save a few more mA.
BUT, what is happening is I turn the WiFi off by the above (direct command or a timer), it disconnects as it should, but then 60s later it's back on again.
Any idea about this problem?