-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Tasmota devices fail to reconnect to network after they are power cycled #7770
Comments
Probably your router is too blame. It stores leases (in arp table) which are not valid anymore. |
Why should this be an Tasmota only issue? No other devices experience the same issues. Further more all my tasmota devices are outside of my DHCP range and have static ips configured in the router |
There has been some wifi changes lately. Please try with the latest firmware and report if reconnection works. Also try |
@s-hadinger the used version from @Fettkeewl is release v.8.1.0. Without a analysis of the network traffic (via wireshark for example) we cant help because May you give the development version a try, and try the latest development version with (stable!) |
Static IP in router DOES mean you still use DHCP! |
I will try the dev version and get back to you. In the meantime this is from my routers logs.
|
Alright, I've tested 8.1.0.9. Sad to say I still have the same issues.. |
Seems to be an ARP issue. Some settings in your router are conflicting with the config in your Tasmota device. Do you have this issue if you delete the static IP entry from your router AND you set DHCP in your Tasmota device? ( to set DHCP in Tasmota use command |
As Tasmota uses MQTT there is no real need for a fixed or static IP. And if you need to access the webui and you don't use mDNS, Tasmota is also reporting its IP by MQTT, so you can see the actual IP on your home automation software. For example, if you use Home Assistant and autodiscovery, your Tasmota IP is populated automatically on the device properties. |
I will try it, I have removed the bindings. Will evaluate and return with results :) thank you for your time |
What a bummer.. Undoing my bindings did nothing.
Edit: |
After updating to 8.1.0.9 I faced similar issues, all devices where acting like an AP instead of connecting to one. I’ve reset my AP’s and Router (UniFi AP-AC-Pro and Unifi Dream Machine) and gave all my devices a power cycle (switched the main circuit breaker in the home). After an unsuccessful attempt I remove the IP assignment from several devices (all devices are DHCP enabled) and did the same thing yet again. After that unsuccessful attempt I connected to the Tasmota devices, entered my WiFi settings and pulled an all-nighter to set things up again. That’s why I commented earlier that the 8.1.0.9 was the best factory reset ever. The best thing that came from this update is that I’ve now documented and automated my settings. If your troubles came after updating to 8.1.0.9 I can agree that power cycling your AP’s, router and removing IP assignments doesn’t help getting the devices online again. I haven’t opened up my devices to retrieve logging, for that I have to apologize. |
Give this version a try. Arduino Core! wifi handling changed. NO change in Tasmota code. |
Guys, as there are many wifi related configuration options within Tasmota it's no use to reply here with remarks as
Provide at least your SSID, Wificonfig, Setoption56 and SetOption57 settings to shine a constructive light over your issues. For what it's worth, my Unifi AP's are perfectly able to re-connect to any power cycled device without issues with my settings of |
Alright! Post flashing with Tasmotizer I have not done any special Wifi-related settings other than use the configurations available on the device website. My AP's name is simple with no special characters: Siblin wificonfig was default 4. I even had to revert those options as it was causing my Sonoff S55 to behave strange. I set the highest level serial logging and turned of my device untill I saw the deauth messages in my routers syslog. After that I booted my device with serial monitoring and below is the result, never connecting.
|
@Fettkeewl have you tried the version i have uploaded? |
Sorry Jason, have not had the time, been away most of the day since my last post! Will give it a go either tonight or tomorrow depending on my kid 😛 |
Alright @Jason2866 , I've been trying it out, the version you provided. No dice. The reason this is a problem, is that I'm thinking of using a 2 device setup. 1 Sonoff S55 to controll the power to my cars engineheater, which in turn is also connected to an outlet inside the car for the coupé heater. The Coupé heater I want to put an Sonoff Basic R3 on and have it only power up when I turn the engine heater(s55) on, this is to controll and monitor temperature inside of the car itself. This will never be possible if the R3 with tasmota can't reconnect to my wifi It's not desired to be force to: Turn S55 on -> reboot router, only to gain control of the R3 inside the car. |
No other things I can try? Been waiting for a reply |
Take a look in your router docs if there is something you can do how ARP is handeled |
Just to tell you that I have the same issue with my Tasmota SonOff devices on ASUS RT86U. |
@miazza99 Doing that will probably erase DHCP ARP entrys too. You cant try lowering the DHCP lease time to 5 minutes. |
OK. I will try when back home next week. In any case I'm still wondering why the issue seems onlt related to Tasmota devices while all other wifi devices are well connecting. |
Other Asus routers had already issues before. See #2643 (comment) |
Can you post a screenshot from the Professional settings page and the IPTV settings page |
Heres mine, printed as pdf, since I'm not home, this was the easiest way through team viewer on my phone :P Edit: |
Unless you self compiled to set such a password, default tasmota own SSID is password less |
This is out of this topic. Anyhow you can flash all the divices at the same time with the Tasmota massive upgrade tool. |
@arendst There is a new release of ESP8266/Arduino ver.3.1.1 (and 3.1.0) https://github.com/esp8266/Arduino/releases/tag/3.1.1 which uses the new ESPRESSIF/ESP8266_NONOS_SDK v3.0.5 library. This library supports the WMM/WME functionality so it should solve all the Wi-Fi connection problems with all routers as reported above. |
@1d4rk Tasmota is Open Source. If you want to test something just do it. If you have promising results you are welcome to present. |
@Jason2866 @arendst I tested the new ESP8266 Arduino core 3.1.1 (based on nonos_SDK v3.0.5) with a nodeMCU ESP8266 12E board. I inserted a webServer just to check the correct functionality during these days. |
@1d4rk What platformio setup have you used for your test Sketch? |
I used Arduino IDE 1.8.19. |
Yes, it is possible to use Gitpod to compile Tasmota. Using latest Arduino core with NonOs SDK is probably not a 5 minutes job. One thing i know what has changed is the use of |
@Jason2866 you created a test build with Arduino 3.0.3 in 2021: Can that setup not be used with v3.0.5? |
Yes, that's the one to be used and add the settings to use the NonOs SDK 3.0.5 |
@1d4rk @drrossum This branch has the setup to use latest Arduino Core with NonOs SDK 3.0.5 |
Just for others (who may have not read this whole thread): tl;dr: I am running a ASUS RT-AC86U w/ Merlin firmware (WMM on, fwiw, and older firmware -- 384.19, because I saw stability problems with the newer firmware). I have experienced this flapping problem with Tasmota devices for what seems like forever (it's ... probably after I switched to using the ASUS, tho). I was setting up some new Teckin SP20 devices (bought in 2019 and never flashed) today and was having the same flapping problem: every restart, the device will show up on the Wireless Log on the ASUS for about 15 seconds, then vanish and reconnect. Generally this happens for 20 - 30 minutes before it hits a stable connection and you can continue configuring it. I ran across this thread again (I think I've seen it earlier), and noticed the suggestion to use |
Just to add my 2 cents on this recurring discussion... I got sonoff basic switches. When upgrading from tasmota 12.2 to upper version, half of my switches never reconnected to wifi AP. I had to connect to serial console, and even this was frustrating as I could see the "Couldn't connect to AP" messages in loop for hours, but couldn't interact with firmware as input command line simply wasn't working. Only solution left was to reflash tasmota to 12.2 version, and regain normal control on the switch. Even emergency reset of parameters wouldn't change anything, and the tasmota wifi on 192.168.4.1 never delivers an address when connecting on it. As I'm having a bit of obstination, I couldn't find the link between failing and non failing switches after upgrade, until I noticed finally that all basic switches with ESP8266EX were failing to upgrade and behave properly, and all others work as usual with 12.3 or 12.4. Of course, the sonoff Zigbee gateway with an ESP8266EX inside works like a charm with 12.4.0(zbbridge) version. So... if a genious has an idea ... |
I just encountered similar problems with multiple tasmota and esphome devices suddenly having connectivity problems and spewing out a wide range of wi-fi errors. After trying a bunch of troubleshooting steps to no avail, I saw my router had automatically started broadcasting on channel 11, at the end of the frequency range in NA. So I tried changing this to 5, closer to the middle and everything seems to be working again. Might be that there's some extra interference at this range, or the ESP chips don't handle the slightly higher frequencies well. |
What channel works best will typically depend on congestion of channels, more than the actual frequency. At least with Android devices, I find it beneficial to run a Wifi Analyzer app graphically showing which AP you have nearby on which part of the band, including ones not owned by you. |
I agree, though looking at the |
I know that if you have multiple esp next to each other and some in softap mode it is enough to cause connection issues.. |
Hi,
We need a litle bit of more insight on the matter.You need to identify which end initiates a disconnect. Check logs on your netgear for any disconnects on ESP32 mac address. Second, you say you have an ESP32 dev board. What board model is it? All dev boards have USB to serial consoles and Tasmota writes to serial console so that you can easily check for logs with PuTTY in serial mode for example. Post all logs mentioned above. My guess is you were looking at the console messages from Tasmota GUI that only works if you are connected to wifi.Third, i would recommend opening a new issue on Git so that more people will see it and may give you feedback. Posting here will have limited visibility to the community.
Sent from Yahoo Mail for iPhone
On Wednesday, March 15, 2023, 02:52, LucidEye ***@***.***> wrote:
I apologize for jumping in on this thread, but I am having this problem now as well.
I have been running Tasmota on several ESP32 dev boards with no issues whatsoever connecting to my D-Link routers (2 of them), both running latest stable DD-WRT firmware.
But now I am trying to connect to my main router which is a Netgear R7000 also running the latest stable version of DD-WRT firmware and the ESP32 running Tasmota will not stay connected to the router.
The Tasmota ESP32 will connect on a power-cycle, but after a few seconds it drops it's connection and stays disconnected randomly for several seconds to several minutes and then reconnects, only to get dropped again a few seconds later.
I don't know how to view any logs since I can't stay connected to the ESP32. When it is connected long enough to view the Information page, it says I have a 80% signal strength to the router, which I can also verify on the router when it unit is connected.
I have now tried 3 different ESP32 units all with fresh installs of Tasmota, they connect and stay connected to my D-link routers with no issues, they will not stay connected to the Netgear R7000 no matter what settings I try.
Clearly there is some kind of compatibility issue either between the ESP32 and the Netgear radio hardware or WiFi protocols, or there is a bug in the Tasmota firmware.
The Router WiFi settings are exactly the same on the D-Link routers and the Netgear router except for the broadcast channel:
SSIDs have no spaces or special characters.
ESP32 Hostname has no spaces or special characters.
Router is set to WiFi channel that has least interference from surrounding APs
Router has 5G radio disabled... WiFi is set to NG-Mixed and 2.4 GHz only.
WiFi channel is set to 20MHz spread.
WiFi security is set to WPA2-PSK CCMP-128 (AES)
WMM support is disabled.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
My apologies again.. please disregard my previous post. I had deleted it, but you apparently answered as I was deleting it. The problem I was having was my own fault. The ESP and Tasmota were doing exactly what I programmed them to do. The cause was actually that I had used the backlog command to perform all of my settings at once, and I forgot to disable DeepSleepTime... so the unit was going into deepsleep mode for 5 minutes and then waking up for 15 seconds. This obviously gave the outward appearance of the same disconnect problem mentioned in the original post. Again, my apologies for such a silly mistake, but it is something others might want to double check when they see this behavior. |
Exactly what was happening with me. Everything went back to normal once I downgraded my EXP8266EX devices to 12.2.0 |
I'm at peace with all my ESP devices on manual IP asignment. The're running like this for more than a year with no problems whatsoever.after reset they connect seamlessly. Have stopped trying to figure out the root cause long time ago. It's not a tasmota problem, but somewhere deep in the arduino core. |
Wifi 3 and MAC wifi blacklisting does the job for me.
…On Fri, 7 Apr 2023, 19:55 rolupusoru, ***@***.***> wrote:
I'm at peace with all my ESP devices on manual IP asignment. The're
running like this for more than a year with no problems whatsoever.after
reset they connect seamlessly. Have stopped trying to figure out the root
cause long time ago. It's not a tasmota problem, but somewhere deep in the
arduino core.
—
Reply to this email directly, view it on GitHub
<#7770 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACR3V57H7WPOIPOITXRWLITXABII7ANCNFSM4KZPF62A>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
what "wifi 3" do you mean? By "on device" I assume it was meant the tasmota device, but I found only the entry for the secondary Wifi connection but otherwise no other settings, e.g. no way (in webui at least) to assign static IP/netmask. edit: found this Q&A #13623 (comment) which mentions that Also "MAC wifi blacklisting" makes little sense - don't we want the "device" to be connected and not blacklisted? |
|
Is there any resolution for this problem? I am having the same problem with my sonoff tasmota. At the moment I am using the latest version 13.4.0. The devices connect after rebooting the router. |
The summary of the discussion is that the reason is not fully undrstood.
|
Wifi 3 should work. And I think there was a discussion about the particular version of the library used if you read around. It's probably not going to be fixed for a while. Use the wifi 3 command. |
I forgot this Wifi 3 command: |
thanks. I will try Wifi 3 with one device and then I will campare the results with the rest :) |
Had the same problem but setting wifi 3 command did the trick. Had to set the Asus 2.4ghz wireless mode from "Auto" to "Legacy" for the initial connection and then used console to set wifi 3. After wifi 3 is set, change "Legacy" back to "Auto". My Martin Jerry Smart Plugs don't seem to support Wireless Mode N even with Tasmota 13.4. |
PROBLEM DESCRIPTION
Sonoff devices with Tasmota firmware refuse to reconnect after power cycling them. As evident by serial output the devices just says "fails to connect to AP".
The only remedy is to reboot router, then all my tasmota devices that are stuck in a loop will connect instantly.
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
:(Please use
weblog 4
for more debug information)TO REPRODUCE
Power cycle any connected device
EXPECTED BEHAVIOUR
I expect the device to reconnect to my network after a powercycle, without having to reboot my router.
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
ADDITIONAL CONTEXT
Router: ASUS RT-AC2900
Stock firmware: 3.0.0.4.384_81351
Theese issues are never a problem when I flash ESP devices with my own custom firmware
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: