-
Notifications
You must be signed in to change notification settings - Fork 565
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
Devices become unavailable #1117
Comments
I have same issue with garage door. They use cover device type.
|
have the same. after enabling debug logs i get this
|
where do you find this ? I enabled the logs but where is this ? |
I had the same issue and (finally) I was able to fix it: I used tinytuya to scan my local network for Tuya devices and I noticed that the local keys for the unavailable ones have been changed!. Here are the steps for the solution:
Your device is now alive! |
@yassineselmi I'm familiar with tinytuya, but I have this issue with newly added device. Anyway, I have checked my local key with tinytuya and with HA, they are same. here are some more logs::
|
Nope. To me is not the local key. After restart it works for a little while. |
I rolled back 2 versions. It seems this happens constantly with various devices of mine but not always the same devices. |
@fotis3d Is it working with a prior version? |
I have the same issue described, and I was just able to see it as an error in the logs.
|
reading though this and yeah im getting some issues. I restart HA and its fine for a bit. I have added the device a few times, will try again |
@tefracky as expected since yesterday the 4.0.2 version works just fine. I think I will stick to that long before I upgrade. 😉 |
I also rolled back to 4.0.2 and so far so good - connection to devices is much better. FWIW, I still see errors in the HA logs, but they don't seem to matter. Disconnects actually do seem to still be happening, but they only last briefly, and then the device becomes available again.
|
Maybe a stupid question, but how did you disabled the automatic update in HACS? |
its not automatic. When an update is available you have the option to update or skip |
@tefracky as @cloudbr34k84 said it is not automatic. I just skip Local Tuya update. |
Okay, I was very confuesd. I used HACS --> Localtuya --> Ddownload again --> Version 4.0.2 |
Downgrading to version 4.0.2 didn't help for me. Half of my devices are working fine. Other half are not accessible. What I noticed is that those that I can't add does not respond to DP test.py and drops error message: Even if I get local key from cloud and add manually, DPs are still unavailable. All those devices work perfectly fine with Smart life app, default Tuya integration and cloud commands. It just seems that some local port or socket was closed for some devices so they are not accessible through LAN anymore. Also if I go to Smart life app, device -> edit -> Check Device Network -> Check Now, it fails. All other devices that does not fail works perfectly fine. Edit: After a lot of hassle I managed to fix. I used iot cloud to factory reset devices and then added them with Tuya app (not Smart life) and after that devices were discovered so for some I have to manually add DPs. |
Any movement on this? Whole setup is fucked |
@bobloadmire nothing yet. Latest working version for most of us is 4.02. Roll back to that. At least until this is fixed. |
Like others here I was consistently having serious issues with devices becoming unavailable when using the latest release. Using 4.02 seems to have cured them. |
I have the strangest issue. I rolled back to 4.02, things are better, but now the wall dimmers won't dim. Either by app or the physical buttons on the wall. I have 8 in my house, every single one stopped dimming. what the hell happened? my physical controls broke?? |
I am also having issues with my Feit lightbulbs. I turn them off via HA and then they seem to drop off the network and go unresponsive within minutes. Turning them off and on by the switch seems to resolve it. |
I found this solution below from https://community.home-assistant.io/t/localtuya-entity-is-showing-as-unavailable/275438/7 evgeny.bachevsky " I’ve resolved the issue by using automatization on homeassistant - start trigger with action homeassistant.reload_config_entry for a group of Tuya devices. As I was losing devices only when HA restart, it was the trigger.
And in ‘groups.yaml’ something like that:
" |
@bursa I do not think you need a solution. Furthermore to me happened without restarting HA. It is clearly this version's bug. With 4.0.2 everything works like a charm. |
i having same issue. 3 out of 8 switches are unavailable. edit setup in localtuya one of them then everything go back normal |
This is not a solution, it's a workaround, I've used something similar for a while now. I hope it gets actually fixed. |
I went into my app setting in my andriod phone, opened SMARTLIFE settings, went into mobile data and turned off "allow background data usage" I have to admit, I have still had some issues with lights becoming unavailable and then turning on or off but it has not been as frequent as before. |
So I went through the entire thread and fixed the issue after some hours of experimenting. Funny that this was mentioned before by someone, but seemingly most people ignored the comment(s). FIX FOR LOCALTUYA DEVICES BECOMING UNAVAILABLE follows: You need to be sure that nothing else tries to connect to your registered device but LocalTuya. Otherwise it (either immediately or after a few occasions) corrupts LocalTuya's connection to the device until the whole HA is restarted. I am pretty sure if LocalTuya device becoming unavailable or starts to "act funny" like providing the sensor data , but your commands are not recognized, then something tried to connect to it through Tuya Cloud or locally. |
What if we also use Official Tuya along with Local Tuya ? Why is this happening ? I use quite some time Local Tuya and I did not have disconnections before. Now they are constant. |
switch to tuya local instead. I am using that and no offline issue so far. I use the tuya integration and tuya app too, no problem |
Honestly I don't know what else to do here. Other smart plugs I have, same issue. After few hours they become unavailable. Reload of localtuya might bring one back to life, but not all. I need to take out the plug from the wall, wait a few hours and restart HA and the work again for some minutes or hours. When this happens, it was still possible to control those devices from the Tuya/Smart life apps. I'm not blocking any connections on my router (tp link deco) and I neither have any other software for DNS, routing, etc. Getting out of ideas here :( Cheers |
This solved my problem, tks ! |
My devices even have no access to the internet or DNS and with all these changes, they still get unavailable and a restart of HA and making the device powerless doesn't solve the problem. |
Is there any way to get back to version 4.0.2? The list of previous versions only shows last 5 of them and I have no clue how to get back to an older one. |
I am sure that there is still something trying to connect. Think what apps / solutions did you use in the past to connect. Do you have other family members who might use Tuya/Smart life? Do you have any polling set up anywhere by anything? Do you have schedules set up in Tuya cloud or anywhere? |
I am using this fork and all my devices work without any error: https://github.com/xZetsubou/hass-localtuya |
Two devices came back to life for 1, almost 2 days but then they went back to unavailable. |
The README docs state in bold "NOTE: The Cloud API account configuration is not mandatory (LocalTuya can work also without it) but is strongly suggested" - is this erroneous? |
1, the easiest way is to do a "config round": add devices to the cloud/TuyaApp, then configure in localtuya/HA , then close TuyaApp, restart HA, and all will be ok. If I recall correctly someone posted the procedure how to add devices without app, search for it if you really want. Regarding README - see answer 1, (not required, but makes your life significantly easier) Note: if anything "wakes up" Tuya Cloud (like opening the TuyaApp or triggering a schedule or anything. literally anything), then it will break localtuya for sure. best is not letting the devices communicate outside once configured completely. |
@yeowan I think we can all agree that is an awful user experience and detrimental to the uptake of HA/LocalTuya to expect users to go through this journey. LocalTuya is fundamentally broken if we think this is an acceptable UX. I appreciate your effort though, you clarified a lot and presented an option for people who are okay with a shoddy UX. |
Been stumbling over this issue for last couple of weeks. Gave up and used official Tuya HA integration. Which as a Newbie to HA is good enough for now. But will look at this again sometime |
Hi, I'm new to the HA and the localTuya. I thought that the HA would resolve the issues with the Tuya App (cloud), but I saw that after the device got "reset" (long press or such), the localTuya not recognize it. |
I've found this thread and went through all the hints on checking keys etc, but ultimately what worked was shutting down the Tuya smartphone app + disabling the background data usage + closing the Tuya cloud website + restart HA. Unavailable devices suddenly all worked. I had no need to downgrade the LocalTuya integration in HACS. |
My solution was to flash all of my Tuya devices using tuya-cloudcutter and move everything over to ESPHome. |
Yep, looks like the right direction. After my above post last week, I already lost connection to my Tuya wifi device from HA and the only solution that helped was a full reboot of HA + manual refresh of LocalTuya settings. Completely unreliable. |
You can see my changes in this link (I will update a few more changes I've made for stability). |
How to download the LocalTuya extension with your changes into HA? |
I need to check, no idea, maybe someone knows. |
Thank you! I closed the Tuya smart app on my phone (swiped back twice to exit) and all my Tuya devices came back to life within a minute on homeassistant! |
I just tried the 5.2.1 update after sticking with 4.0.2 for almost 2 years, and it seems to be working fine. Time to close this ticket? |
Everything has been very stable for a long while here. I used to have lots of problems of devices going unavailable intermittengly, but I can't remember the last time it happened now. Thanks ! |
It's happening randomly. My setup has been stable for months, and just last week suddenly lost access to devices. They stopped reporting any properties. Needed to re-register the devices and do several reboots. Finally, I'm not really sure what has helped. It's crazy. In my new house, I'm going to stay away from Tuya's Wifi devices for good. |
I have latest HA and latest local tuya and it is happening randomly for me. I restart and the devices are back online. |
I have Piranha lightbulbs attached to my desktop lamp. I just integrated it with HA and although it works fine and fast for some time, it becomes unavailable within a few hours of no use. I have to restart things to make it available back again. This is kind of the same with both Tuya and Local Tuya integrations. Honestly not sure about using other tuya integrations. Maybe I should not use tuya devices at all? 😞 |
Just do this guys |
Suddenly devices become unavailable forever.
Tuya bulbs and plugs. In Tuya they work just fine.
Reloading Local Tuya does not help.
To fix it I have to :
BUT these work only for a short time. After a while the same thing happens.
Environment
The text was updated successfully, but these errors were encountered: