Once configured, the Tasmota firmware defaults to searching for the wireless access point, attempting to associate and if the association fails, then the Tasmota firmware instructs the device to restart.
When a Sonoff device restarts, the line power fluctuates for a split second and this is enough to upset some devices such as UPS arrays. In case the wireless access point is powered by the Sonoff, then this can lead to multiple restarts or, in the worst case, restart loops.
To address this issue, the Tasmota firmware can be configured to either retry to connect to the same access point or to retry connecting to the secondary access point without restarting the device.
The official documentation hints the following configuration values for the Wifi component:
Command | Parameter | Description |
---|---|---|
WifiConfig | Show current config tool | |
WifiConfig | 0 | Disable wifi config but restart (used with alternate AP) |
WifiConfig | 1 | Start smart config for 1 minute and set as current config tool |
WifiConfig | 2 | Start wifi manager (web server at 192.168.4.1) and set as current config tool |
WifiConfig | 3 | Start WPS config for 1 minute and set as current config tool |
WifiConfig | 4 | Disable wifi config but retry other AP without restart |
WifiConfig | 5 | Disable wifi config but retry same AP without restart and flash writes |
To get the current state, navigate via a browser to the URL (GET HTTP request):
http://SONOFF_DEVICE_IP/cm?user=admin&password=PASSWORD&cmnd=WifiConfig
where:
SONOFF_DEVICE_IP
is the IP of the device on the network,PASSWORD
is the configured device passwordThis will display (document body) a configuration state such as:
RESULT = {"WifiConfig":"5 (Wait)"}
To switch the Wifi configuration to 5
, issue:
http://SONOFF_DEVICE_IP/cm?user=admin&password=PASSWORD&cmnd=WifiConfig%205
where:
SONOFF_DEVICE_IP
is the IP of the device on the network,PASSWORD
is the configured device password