-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
physical buttons not working when wifi is down #14394
Comments
If it can help someone more expert than me: I was experiencing a similar problem with 9.X version (but it looks like it's fixed with 10.X). The real problem was that in case of wifi failure the device was losing the template config, resetting to "generic" so GPIO were misconfigured and wall button did not work. |
I have a similar problem with a Sonoff Basic with a button attached to Rx pin. When my MQTT/Syslog/Influx server is down, the button is inoperative. Wifi and dhcp is available, unit has a static address in any case. |
I have the same issue with Sonoff mini and gosund light switch. I have tried all the 10.x versions. |
I have the same issue on some Touch wall devices, I change the WifiConfig to 5 (Wait) and hope it will fix this issue. I Still track on it |
Same problem here with some sonoff mini R2's This is a real dealbreaker, as I don't want to rely on a WiFi connection as a single point of failure to be able to switch my lights |
This is a recurring bug from the Arduino core. It has been fixed several times but it shows up in newer versions. Just for reference: #9886, #7533, #1992, esp8266/Arduino#6454 We have to look into it again. |
I got my Sonoff Mini R2 to work as expected. I've configured it via a template. It seems like it is necessary to select the created template in |
If you configure an R2 as basic it should work every other button click. |
This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions. |
@ascillato2 any news? |
I haven't time to look into it. As soon as I can, I will do it. |
This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions. |
Bump |
Hello, Today I have internet downtime again, and apparently it will take until tomorrow evening to fix this. So there goes my national holiday surfing the web. But the strange thing is that the behavior varies. [edit] |
This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions. |
Any update on this one? |
Nope. |
I see no |
- Increase wifi retry time (#14394) - Remove 1 second system hang on wifi re-connect (retry) - Try to limit the number of seconds unresponsiveness due to wifi reconnect
Did some testing today and, as expected, cannot reproduce but that's not that strange. From your latest comment I gather by internet you mean the outside connection to the world while your modem/router keeps providing wifi. I tested wifi down and saw no issues with delayed button control, especially with the latest changes adding longer retry time to connect to the router (which is the tricky part as this will hang the device during trying to find a connection and therefor unable to handle any keypress). Also devicegroups seized to work but were still able to switch using the local buttons. I can think off issues introduced by your ziggo modem trying to re-connect to the outside world and hampering local intranet/wifi. You might want to consider to add a local router connected to the ziggo modem providing your wifi (instead of the ziggo modem). This way when the modem hicksup you're wifi should stay active. |
Did tests by using a dedicated router with it's own wifi network. All works well as long as the wifi is active. When router is powered off all still works well but device groups won't as wifi is gone. Local control is still possible so no bad things to report. It get's weird when the router is still up but I remove the network cable from it. Wifi is still up but MQTT drops connection and devices try to reconnect to MQTT. ESP8266 based device detect quick no connection possible and retry. ESP32 based devices seem to hang for over 12 seconds not allowing any button action. This is strange as they both use the same library. I will dive into the ESP32/MQTT issue. Do you use ESP32 based devices which show this behaviour? |
since the beginning of may I added my own router, and I haven't had issues since. I'm using Home Assistant to connect to using MQTT on the same server as HA I was just planning to Comment and see your response: |
In their infinite wisdom the ESP32 core designers decided to change function Bugger! Making a workaround in Tasmota fixing this. Hold on. UPDATE: It's not that simple. The complete function as currently implemeneted is useless. See espressif/arduino-esp32#6835 |
Thanks. But that wouldn’t explain why I had the issue initially on esp8266 devices. |
- Reduce blocking by adding WifiPollDns before resolving NTP and/or MQTT server names (#14394) - Fix ESP32 Arduino Core WiFi timeout is changed from msec to seconds
What initially happens is that both NTP and MQTT fail to resolve their names when access to the DNS server is lost. For the NTP server(s) this adds up to 3 * 10 seconds blocking during every minute once NTP needs to be updated after every hour. For ESP8266 MQTT there is almost no blocking. For the ESP32 MQTT there was major blocking as in the meantime the Arduino Core library changed function setTimout from accepting msecs into seconds resulting in major blocking as it is default set to 200. A workaround is using a local NTP server and local MQTT server both with stored IP addresses instead of names. This way no DNS is needed. Latest change tries to connect to the DNS server BEFORE resolving a name. This reduces lost connections to 1 second blocking. |
That would make sense, One question about DNS. |
I recommend installing an ntp server that uses a pool to sync itself (eg install along with your dns and mqtt servers). Then let your local clients use this local server. Easy and robust |
That is what I am going for, |
I use the second option. Sorry, misleading. I configure only my local ntp on tasmota. |
The NTP servers are used as follows:
You'll notice the search for DNS even if you use a fixed ip address for your NTP server. This is a choice I had to made based on the current sequence of resolving up to three ntp servers before bailing out. I use another approach for the MQTT server as that's only one host. There I first check if it's a hard ip address. If not check for DNS access and then used resolved ip address. If I did this for the three ntp servers it would take 3 x 1 second for not finding the DNS server. In hindsight I might change the search for NTP server to do it only one per minute using the MQTT approach. |
Try latest release v12.0.2. This should solve most longer lasting blocking when wifi or DNS is unavailable. |
Closing since it is fixed. Please reopen if you still encounter the problem |
PROBLEM DESCRIPTION
When My wifi is down I cannot use the physical buttons to turn on or off switches.
I have several different sonoff devices. This morning there was an issue with the wifi. Wifi was available, but I think the DHCP server failed to lease addresses.
The ugly think was that I was unable to turn on or off any of the lights.
Is it possible to have the inputs still working when there is a hickup with the wifi or internet?
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
disable DHCP server,
reboot the sonoff,
button fails to work
EXPECTED BEHAVIOUR
when there is no wifi, phisical buttons should still work
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: