First of all I want to THANK for those who wrote this great software.
In tasmota its hard to switch to AP mode.
This is a idea what would be great in tasmota. This part of the software is critical and must be raliable.
Some devices does not have external button or switch - for these devices is hard to change the WIFI. For these devices you can just plug and unpuld the device (switch the power ON/OFF ) 5 times and the ESP goes in AP mode and not return from this mode until you do not saved the WIFI config.
If you plug the device increments a counter (AP_counter), after 5 seconds this counter (AP_counter) set to zero, if you repeat this (AP_counter =5) 5 times automaticaly goes to AP mode, and remain in this state until you do not saved the WIFI config, even if you unplug the device and plug it again.
SwitchTOAP = 0 - (default) - if the button pressed 4 times goes in AP mode and not return from this mode until you do not saved the WIFI config or if you switch the power ON/OFF 5 time goes in AP mode and not return from this mode until you do not saved the WIFI config
SwitchTOAP = 1 - if the button pressed 4 times goes in AP mode and not return from this mode until you do not saved the WIFI config
SwitchTOAP = 2 - if you switch the power ON/OFF 5 time goes in AP mode and not return from this mode until you do not saved the WIFI config
I have some concesrns about the AP mode. Let me describe.
- If the router is break or goes off the wifi the ESP goes in AP mode - in this case there is a vourneability - somebody can connect to it and can do anyithing.
- If the ESP has weak WIFI strehngt and semetimes can not see the reouter - ESP goes in AP mode - in this case there is a vourneability - somebody can connect to it and can do anyithing.
- If I have chaged the router and I have different SSID, I just can not set easiliy the new WIFI. Not allways goes in AP mode.
- If I bring the ESP to my freind, I just can not set easiliy the new WIFI. Not allways goes in AP mode.
If WifiConfig = 1 = set SmartConfig (Android/iOS) as the current configuration tool, start SmartConfig for 3 minutes, and then reboot and try to connect to your Wi-Fi network again
SetOption13 = 1 = only single press action for immediate response (i.e., disable multipress detection). Disable by holding for 4 x button hold time (see SetOption32).
I use thsi config because immediate response - but in this case. But if I do not have button ?
If plug and unpuld the device (switch the power ON/OFF ) 5 times - now its resetting the SONOFF_BASIC; Its not clear for me why this setting- this (RtcReboot.fast_reboot_count ) should be using only for AP mode, all other config can be done form the web interface.
What do you think ?
if (RtcReboot.fast_reboot_count > 4) { // Restarted 5 times
Settings.module = SONOFF_BASIC;