Strange (Recent) Behavour with Tasmota - Reboots every 3 hours

Well, I figured there would be something better out there, and there is:

I use Ansible a lot, so this is great!

Unfortunately, most of my Tasmota devices are still dying, and the WAF suggests I am going to have to replace all my Shelly 1’s with Lutron’s and my Sonoff S31’s with Zwaves. :frowning:

Well, I think I am going to have to stop using Tasmota for the time being, the devices have become so unstable as to be useless. :frowning:

I was able to get them up to a maximum uptime of 4 hours in some cases, but they have basically become paperweights at this point. It sucks, because a lot of the key automations I have developed are based off of Tasmota.

When the Z-Wave Plugs arrive, I will use those for the key automations that make the wife happy.

I am going to try to keep testing to figure out why - next step is to dust off a very old Linksys WRT54G and put it in AP mode with DD-WRT to see if having a completely non-unifi network lets the tasmota devices function. That at least, will let me isolate if it is Home Assistant triggering the issues, or Unifi.

I am also going to dig up some of my older Shelly 1 and Sonoff S31 devices that I flashed a few years ago, but ended up not using. They are on very old versions of Tasmota, so that is another test.

Next step after that, will be to install Home Assistant on a spare Raspberry Pi, and use a seperate MQTT instance to see if it is something in my HA systems causing the issues.

Which is very strange and seems to be kind of unique to your particular setup.

Many users on this forum use UniFi gear together with Tasmota flashed devices and I’m assuming that probably none of them is experiencing such problems with their setup (judging from the little feedback your OP generates).

As for my setup at home as long as I stay on fw v.6.0.21 (for now) with all APs, using a couple of Tasmota flashed 1-Gang, 2-Gang and 3-Gang switches (Athom) and 6 smart plugs (Gosund SP111), all running with Tasmota v.12.1.1, no problems whatsoever occur:

Network:

  • CloudKey Gen 2+: fw v.2.5.11
  • Network: 7.2.92 (reluctant to upgrade to 7.2.94)
  • USG Pro 4: fw v.4.4.56
  • 1 x US48 750W: fw 6.2.14 (reluctant to upgrade to v.6.3.13)
  • 3 x UAP AC IW: fw v.6.0.21 (reluctant to upgrade)
  • 3 x UAP AC Pro: fw v.6.0.21 (reluctant to upgrade)
  • 1 x UAP nanoHD: fw v.6.0.21 (reluctant to upgrade)

HA installation:

  • Host: Debian 11
  • Supervised with core-2022.10.4 on amd64
  • Supervisor-Version: 2022.10.0
  • Agent-Version: 1.4.1
  • Docker-Version: 20.10.19
  • HA status: Supported and Healthy
  • MQTT broker installed through host-os, not using HA’s Mosqitto broker Add-on.

Not to dissimilar from what I have - I have been using Mosquito with Home Assistant for the last 3 years, and all my Tasmota/MQTT/ESPHome Devices have been rock-solid. Thats why I built so many key automations off of them because they just worked.

Then all of a sudden, they stopped working, and hit this reboot loop. The worst part was that there a number of changes all very close to each other:

  • Home Assistant Upgrade
  • Change MQTT configs in YAML because old method is deprecated
  • Re-add MQTT according to new standards
  • Unifi automatic upgrade

Latest test - I dragged out my Linksys WRT-54G router from a dusty box. I turned it into an AP, and connected it to the network as a net-new SSID.

Just as a sanity check, I removed the MQTT settings, so they would not be able to talk to Home Assistant:

And they still don’t stay up longer than a little over 3 hours. So at this point, I don’t think the Wifi is the problem.

Since you have tried it all, even updating all your Tasmota devices from versions 6,7,8,9,10 all to 12.1.1 I am out of ideas. As a last resort me personally would rebuild the whole HA system from scratch and restoring all from a backup but not the Tasmota related stuff.

Ik, it’s painful and sucks … :woozy_face:

So far I have tried:

  • Using the old WRT54GL router as an AP - no change
  • pulling some old Sonoff’s Shelly’s out of storage - connect to WRT AP - not enabling MQTT - no change.

Looking at github it seems that I may have some sort of issue either with ARP or DHCP on my network (I have played with many settings, including moving from a USG to OPNsense as a router) ESP8266 devices are not very good at handling certain routing issues apparently.

Seems to be an issue with your particular HA installation since even changing APs does not make a difference.

I don’t think it is an issue with HA, because I uninstalled MQTT entirely and left it disabled so that the devices where unable to communicate with it, and the new devices I tested I did not populate the MQTT settings.

I think it is lower network layer issues, perhaps DHCP or similar. I adjusted my DCHP leases to be very short, and that seems to have improved things (slightly) devices disconnect still, but don’t go offline and stay offline. They come back eventually.

For my mission-critical tasks, I have ordered some ESP82’s with Network Jacks, to try to manage those components without needing wifi. Other places I can use z-wave plugs.

I have had the exact same problem over the last few months.
I thought the problem was with the tasmota devices (esp32) but it turns out it probably was the unifi network.
I updated to 6.2.41 on all wifi APs and it does seem to be much better now! My backup plan was to downgrade to 6.0.21 but I’ve held of on that now that things seem to be better again.

I have been able to get the Tasmota OS stable now, as seen here:

The network is still sideways - something is causing most of my IOT devices to have connection issues - its not just Tasmota.

I learned a lot about scripting with the “backlog” command for Tasmota, which has been really helpful. The strange thing is that Ubiquiti shows the devices as connected to the network, but the devices themselves are not - which again points to some other component of the network than just the base Wifi.

I have just purchased 32 Martin Jerry S01 pre flashed switches. To replace KULED which started to give me problems.
I have managed to get them all setup with an IP address.
I created a seperate SSID on my unifi system just for these devices.
All the devices show up as being connected but I can only access less then 1/2 of them when I enter the IP address to setup the configuration. They do work as a switch.
If I enter an IP address the config screen shows up in a few seconds, some can take 30 to 60 minutes and then only part of the config is displayed. Others will not come up when I enter the IP.
They have v 12.2.0 installed.
All are on a 2.4 network. And all my AP (3) are on 6.2.44
What is happening, what can I try to resolve this.
BTW my regular esp devices are doing the same thing. Show connect to unifi but offline in esphome.

I tried downgrading my AP’s as suggested above, but mine are still broken.

At this point, I am beginning to think it is something to do not with the AP’s but rather the Unifi Switches I am using, as those also got some updates. Its like the underlying TCP/IP stack is broken for these devices, but only these devices.

It is impacting most of my 2.4 Ghz devices - but not all of them - but any one that runs with an ESP chip; like for example my Chamberlin garage door openers.

Sounds similar to what is happening with mine.
Almost everything was working well for over 2 years until about a month ago and then it is like sticking a finger in the dike. Which device goes off line next.

I have been grabbing PCAPs from the devices, and I can’t see anything particular standing out. One change that has caused a minor improvement after reading many forums is this:

I set the Group Key Retry interval to 24 hours. This causes the encryption keys to generate less often, and some similar devices have had issues with the keys being generated too often.

It isn’t foolproof. But it has caused a slight improvement. My hosts go up and down now - instead of going down and staying down for days.

General stability of Tasmota is good - it is just the wifi disconnects causing issues.

More PCAP hunting I guess.

Good news is that my Tasmota devices are now stable from an OS perspective:

Bad news is that Wifi is still broken. I have migrated one of my most critical Tasmota devices over to an WT32-ETH01, so I can use Ethernet. This one never disconnects as it is hard wired.

Hi Mr_Flibble,

Are all your Tasmota devices still running stable?

I have 4 Tasmota devices where the two of them are the “Athom Smart Home Preflashed TASMOTA Wi-Fi Plug Works” (PG01V2).

While the two other Tasmota devices have been running stable all the time, the two Athoom devices restarted now and then. One of them was never online more than an hour before it restarted but the other one could run several hours before it restarted.

I have googled to find a solution and stumbled over this link

In that thread the following is mentioned:

Running TasmoAdmin all the time is not a good idea. It will result what you have seen.
TasmoAdmin is doing non stop web queries, after a while this results in a restart.
Stop TasmoAdmin

I have now tried to disable the TasmotaAdmin I had running on my Home Assistant and it seems that my two Athom devises have been running stable ever since.

I can see that you are using TasmotaAdmin as well so it could be a similar problem for you for specific devices.

Best Regards

Forsmark

I can second this.

I’ve only just started using tasmota devices, 10 Athom pre-flashed TASMOTA AU plugs. They arrived this morning. I had 2 up and running fine for about 2 hours, then I came across TasmoAdmin and started using it to set up the other 8. Since deploying them around the house they have been randomly rebooting, the longest uptime was under 17 minutes. I came across the same solution linked to by @Forsmark. I’ve turned TasmoAdmin off and my tasmota devices now have uptimes over 3 hours on each.

Sadly, I have pretty much abandoned Tasmota. With one exception - I have a hard-wired device that runs a much-needed integration to open my gate.

That system is rock solid - but this is because it is using Ethernet, and not Wi-Fi.

Most of my systems using 2.4ghz have gone sideways - running Tasmota or otherwise. Things running in the 5ghz band are fine, things running wired are fine, things running 2.4ghz are paperweights.

So, sadly, I have replaced most of my Tasmota devices with other kinds that don’t depend on Wifi.

What power supply were you using for your d1 minis? Back in the day when I started making my own “poor man sonoffs” I purchased the cheapest USB chargers. The tasmotas were driving me crazy, and I couldn’t figure out what was going on.

By accident I noticed if I used a better power supply the tasmotas worked perfectly. I am now trying to supply DC to my whole house (24 v), and use stepdown/buc converters to bring volts to 5v. As soon a I made the change my tasmota went crazy! Did a bit of research and seems since step downs use coils they create much noise.