Hello,
For my ventilation control project I need to be able to access the ESP using APmode after boot/power on .
(My wifi network is not strong enough to reach the ESP which is in a ceiling and I do not need constant link)
But once it is running and rules are OK, I would like to disable all wifi connections and APmode.
Say after 30 minutes, the ESP should be muted, but not sleeping as it needs to keep on monitoring Humidity
to activate the relay as soon as a treshsold is met. (In real conditions this is working as expected! It switches
on and off the connection "N123" wich is in theory ment for a toilet switch when humidity is > 70 and during 10 minutes
more after humidity is back below the threshold. But the APMode stays visible...)
Using rules with Timer, and WifiDisconnect, I thought I was not far away from a solution...
But - as I searched quite extensively - I think there is no "WIFIAPMODEOFF" command (or similar). But perhaps there is another solution I'm not aware of?
My idea was a rule like this one:
on System#Boot do
timerSet,2,1800
EndOn
On Rules#Timer=2 do
??? WIFIAPMODEOFF ???
WifiDisconnect
endon
If you have a suggestion I would be glad to test it.
Thanks all for sharing all this: I've learned a lot!
Regards,
How to disable wifi AND APmode with a delay after boot
Moderators: Voyager, BertB, grovkillen, Stuntteam, LisaM
How to disable wifi AND APmode with a delay after boot
DavidC
Current project:
Ventilation control : Espeasy (on esp8266 nodemcu v3) + relay + BME280 (to replace broken dht22) (to control Ducobox)
Current project:
Ventilation control : Espeasy (on esp8266 nodemcu v3) + relay + BME280 (to replace broken dht22) (to control Ducobox)
Re: How to disable wifi AND APmode with a delay after boot
Hmm apparently the "wifimode" command isn't documented in the RTD.
See the code:
https://github.com/letscontrolit/ESPEas ... p#L88-L119
See the code:
https://github.com/letscontrolit/ESPEas ... p#L88-L119
Code: Select all
wifimode,off
wifimode,sta
wifimode,ap
wifimode,ap+sta
[code]
"sta" = Station mode => Connect to another access point
"ap" = Access point => Run an access point on the ESP
"ap+sta" = Run access point and be connected to another access point.
Only thing I'm not sure about is whether ESPEasy may turn on the WiFi again after you turn it off.
That's probably not working well right now.
Re: How to disable wifi AND APmode with a delay after boot
Thanks! I will try that by the end of the month (I'm not at the right place for the moment).
I do not need the ESPEasy to turn the wifi back on at some time.
What I expect is that it will turn on again if I switch the device off and then on.
Or do I need to add a rule at startup?
Any way I will make some tests and let you know (might take some time)
I do not need the ESPEasy to turn the wifi back on at some time.
What I expect is that it will turn on again if I switch the device off and then on.
Or do I need to add a rule at startup?
Any way I will make some tests and let you know (might take some time)
DavidC
Current project:
Ventilation control : Espeasy (on esp8266 nodemcu v3) + relay + BME280 (to replace broken dht22) (to control Ducobox)
Current project:
Ventilation control : Espeasy (on esp8266 nodemcu v3) + relay + BME280 (to replace broken dht22) (to control Ducobox)
Re: How to disable wifi AND APmode with a delay after boot
Hello, back here after being silent for a while; the unit is in a holiday home... So now that it has been rainy when I was there I have been able to make some tests at last.
I added the following code, but it did not work: the wifi AP stays alive even hours after it was turned on. In theory it should stop emiting about 30 minutes after the unit was powered on (tha's my aim)... Any idea what could go wrong?
Thanks again for your patience, I'm not sure when I would be abele to make new tests...
On System#Boot Do
GPIO,2,0
Timerset,2,3600
EndOn
On Rules#Timer=2 Do
Wifimode,Off
Endon
I added the following code, but it did not work: the wifi AP stays alive even hours after it was turned on. In theory it should stop emiting about 30 minutes after the unit was powered on (tha's my aim)... Any idea what could go wrong?
Thanks again for your patience, I'm not sure when I would be abele to make new tests...
On System#Boot Do
GPIO,2,0
Timerset,2,3600
EndOn
On Rules#Timer=2 Do
Wifimode,Off
Endon
DavidC
Current project:
Ventilation control : Espeasy (on esp8266 nodemcu v3) + relay + BME280 (to replace broken dht22) (to control Ducobox)
Current project:
Ventilation control : Espeasy (on esp8266 nodemcu v3) + relay + BME280 (to replace broken dht22) (to control Ducobox)
Who is online
Users browsing this forum: No registered users and 0 guests