(local)Tuya Smart Plug goes 'unavailable' for 7min once or twice a day

Also always 7min (± 30s) of downtime?
3-10 times per day is definitely a lot more than mine. Here it’s mostly 1-2 times per 24h. The 3 times in the attached log was an exception.

Did not analyse all, mostly 30s… exceptional up to 1.5 min but this may also be due to restarts of HA

I just checked the Tuya app when it went ‘unavailable’ again in HA. In the Tuya app it showed “offline” during that time. So I guess it’s Tuya-related. Correct?

I donot have this info, did check all my devices and only one has a large amount of unavailable, yst 20+ times. When the app provides the same info then it is at least not HA, if it is Tuya or the router to which it is connected to, I cannot tell. For me, the powerplugs are ‘unavailable’ but still ‘on’ (else my HA machine would die)

The device is often offline, the device or device indicator keeps flashing, and the device cannot be controlled. What should I do? (tuya.com)

What is the reason for offline offline heartbeat in the background? (tuya.com)

What is the device offline rule? (tuya.com)

Yesterday evening I changed the dhcp leasetime on my router from 1 day to 7days. And knock on wood today is the first day it has not gone unavailable in the past 24h.

But its weird, because if that’s the problem, I’d expect it to go offline exactly once per day. And not sometimes once, sometimes twice, and sometimes trice.

Indeed… why would I have one that changes 20+ times and 3 others (same make) 1-2 and sometimes not…same router too

I have a similar problem with 4 GU10 light bulbs, but the odd thing is that in the Tuya app, they are online, but via local Tuya, one 3 out of the 4 or sometimes 2 out of the 2 or none will be online. At times restarting Home Assistant sorts that out. I personally think it is an issue with the Local Tuya integration. I haven’t really sat down to assess the logs in HA or not, but I cannot think otherwise.

I should’ve knocked the wood harder. It went unavailable 3x again. Once yesterday at 2307. Then again at 0021. And again at 0730.

I think (in my case) I can rule out HA or localtuya. Since the same happens in the official Tuya app in the same timeframes. On the other hand. The only time it came back online after 3min instead of 7min, was when I “reloaded” the localtuya integration.
So sunmerized, I still have no clue what’s going on. Maybe when it goes offline, localtuya doesn’t check in real-time if it’s back online. But perhaps every 5min or when you reload the integration.

I tried to make an automation to send me a android notification when the state changes from ON to unavailable. But for some reason its not triggering.

Careful conclusion for me would be to stop buying the absolute cheapest Tuya stuff on aliexpress. xD
Would it be a good idea to move over to zigbee? Or could that have the same problem since it still works via a Tuya hub?

Regardless of all this, my devices work but I fully agree… dump Tuya, I never liked the need to be connected to Chinese stuff (and neither would I be with other countries, let’s not kid ourselves)

Yesterday I learned that the iot account for Tuya, required for e.g. localtuya, changed to run with monthly free renewals (I had a 1 year), all other subscriptions are expensive beyond words. The expiration will hit me in 4 days and if this indeed brings down the devices then for me the choice is clear…
Zigbee has always been OK for me but you will also find many people favorizing zwave, I just donot want yet another dongle dangling :slight_smile:

I bought another (WiFi) Tuya smart plug a couple days ago. This time not from aliexpress but from the local “Action” store. LSC Smart Connect branding.

I noticed this plug does NOT go unavailable. At least not in the past 4 days.

So I guess we can carefully conclude it is a device/firmware problem, and not HA or even Tuya.

I tried to “remove and wipe” the plug from the Tuya app and added it again.
The behaviour now changed. It still goes unavailable in HA, but no longer for 7min but for 1s. I guess that’s a large improvement and a non-issue now.

Sigh…
I just don’t have luck with these smart plugs…

The second smart plug I bought (LSC Smart Connect) seems to have a different problem. And this one does seem more LocalTuya related:

The plug stays online in the Tuya app and I can still control it from there. But it goes “unavailable” in Home Assistant. And stays that way for hours. It does not come back online. Reloading the localtuya integration does not fix it. The only way it comes back is when I unplug, and replug it into the power socket. I did not try to restart Home Assistant yet to see if that fixes it aswell.
Another difference is it does not leave a “smart plug 2 became unavailable” in the HA Logbook like the first smart plug does.

This is almost even more annoying than the first plug that goes offline in both Tuya app and HA, because I use it to turn my bedroom heater on/off with the HA generic thermostat. So last night I woke up all sweaty in a fricking sauna because it went “unavailable” while it was turned on. So the generic thermostat could not turn it off to keep a stable temperature.

Which logs should I check to find out what is happening and where can I find them?

Thanks!

Local tuya disconnects devices but cloud is working. This tuya seems to be something that I shouldnt add to my smarthome anymore.

I would 100% agree with that.
Recently I added 2 more tuya bulbs to my home that I bought years ago. They also keep going unavailable. So it’s definitely the end of Tuya for me. Zigbee only from now on. It’s just unfortunate the zigbee products are 2-3x more expensive. A Tuya (WiFi) lightbulb costs €3,50 at Action, while I can’t find a Zigbee equivalent cheaper than 8-10 euro/piece.
Thankfully the 2 old Tuya bulbs are old enough to still be based on a esp8266 IC, so I’ll try to flash them to Tasmota with Tuya Convert when I find out where I put my RPi. It’s unfortunate that is not possible with newer Tuya products.

It’s kinda hit and miss. Other Tuya bulbs I bought at Action more recently do work flawlessly. Both cloud and localtuya. But overall its just too much headache. A smart home is supposed to work for me, not the other way around.

I have a large collection of Tuya devices. The plugs are crap, but not always, depending on the chip and manufacturer. The Wi-Fi bulbs are crap in my experience, and so are the projectors and some switch modules. The IR+RF receiver, wall switches, light dimmers, curtain motors and curtain modules are rock solid. All the Zigbee sensors work great too. The same complaints are raised about Sonoff too, which makes me think it’s the hardware and not the company. Specific chips are to blame. Beken chips are being named and shamed, be it Tuya or Sonoff.

1 Like

Local Tuya does no work and also cloud Tuya is not working.

This is so frustrating to see both NEDIS and DENVER Tuya capable power plugs showing like this. Those “entity not available” are from cloud tuya. After few latest HA updates entities are gone. Well at least it shows power on and off status.
Those lower two entities are from local Tuya and after few minutes they are offline. What a waste of time and money.

It is very frustrating indeed. Even within the same brand. I have 4 Tuya “LSC Smart Connect” bulbs. 4 of them work (almost) flawlessly with localtuya. 2 (older ones) of them are a constant headache and are more ‘unavailable’ than they are working. Pretty much unusable.

With Smart Plugs it’s also hit and miss.

Here was how I fixed mine. I noticed that even with the smart plug very close to the wifi AP, it was periodically unavailable. I noticed that these devices run on 2.4GHz but are very unstable on what channel it is running on. Turns out that every time the device goes unavailable, my wifi AP changes the 2.4 GHz wifi channel, for example, channels 4 to 6. How I fixed my problem was setting the router to constantly stay at channel 1 of tf the 2.4ghz band, it seem to work the best. I can think of other solutions as well, such as making a separate 2.4 GHz network assuming the router supports it and making it stay at a specified channel, that separate network is then only used to connect “smart” devices.

Ps. If you are having a range/stability issue, channel 1 of the 2.4 GHz seems to work the best for some reason.

1 Like

I was facing a similar issue. Both my devices were frequently getting disconnected every 5 mins or so. Tried creating and deleting tuya iot projects, even kept a separate wifi router for the tuya devices, still getting the frequent disconnection issue. This was on home assistant 2023.8.1 using local Tuya v 5.2.1. finally found a perfect fix for this issue. I downgraded to local Tuya 4.1.1 and while configuring the devices I set the scan interval to 1 second and manually the dps points separated by commas and bam. Everything is working fine and not a single disconnection. It’s been 36 hours and the connection is very very stable without a single disconnection.

I hope this helps other users put there. I wasted nearly 4 days behind resolving this issue on my Home Assistant setup

I will give this a try. I sort off just learned to live with it by now and started getting zigbee instead of wifi for all new devices I buy. But it would be nice if my old tuya wifi plugs and bulbs would stop going offline for a while constantly. Usually it’s not when I need them. But every now and then I get a shout from a housemate “my light isn’t turning on (or off)”.