-
Notifications
You must be signed in to change notification settings - Fork 575
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 becoming unavailable #223
Comments
I think you're describing the issue that many are experiencing. Hopefully a resolution will be along soon. I'm not aware that there is any workaround, save to return to your slow 'normal integration' or to use the original localtuya custom component from 'mileperhour' which I think is no longer supported (and you'll have to configure your configuration.yaml manually). |
@c0m3r Many of the tuya devices cannot handle two connections at the same time, please ensure that you do not use the tuya app at the same time as this integration. |
Yes have seen that. Not using the app at the same time though. |
I am seeing this same issue, though it seems to just be one of my devices having the issue. I get this in the main log: `Logger: custom_components.localtuya.pytuya [616...04b] Heartbeat failed (), disconnecting And this would be a segment of the debug log:
|
Havinng the same thing in #207 |
Btw guys, are you blocking the devices on your network? I mean blocking them through your routers or another way to avoid them sending info on the internet? |
Not that I'm aware of. I'm able to use the Tuya Smart app (I close it and restart my phone after to make sure it isn't still running) and if I go to the Tuya developer website, it shows the device as Online. In my case, it is always the same one, so I'm trying to move the router around to make sure it is not an issue, but that doesn't seem to be helping. |
The issue in #207 is a little different as I'm not able to click on the LED icon (lightning bolt since it's an outlet in my case) to change the status and get it working. That just brings up the Entity screen, which tells me that the device is unavailable. On a rare occasion, if I go to the Integration and select the Reload option, the device will come back. But I would say that works maybe 10% of the time. One thing I've noticed in the logs is that once it gets marked as unavailable, nothing seems to try again. For example, the divce went unavailable at 8am yesterday, and there were no messages for the past 24 hours of even an attempt to try again. I have the debug level turned on, so I see the heartbeat request and response for the other devices, but nothing for the one that isn't working. Is this normal? Wouldn't it make sense to at least attempt to talk to it again? |
@jsbrich can you check your logs, what are the latest logs before it became unavailable? |
The log I posted 6 comments up was the last messages I got that included anything about that device. |
I have installed the 'passive' branch which has atleast partially resolved the issue. Disconnections still happen but reconnects pretty much immediately. Can cause an issue if your automations run whilst disconnected but much better than before. |
i've got the same issue. I've switch to localtuya a couple of week ago and i found this issue very anoying. |
I too am seeing this issue with my Sylvania bulbs. I havent found any difference if I block outbound internet or not. |
Why does the older 'localtuya' integration from @mileperhour not exhibit these same disconnect issues? I'm not experienced enough to know the differences between how they worked, but with my same SmartPlugs connected on exactly the same wall outlets and WiFi signals, the older integration worked without any issues, whereas with the newer one loses connection to one or two devices and the number losing connection increases over time. Just doing a device update on the integration seems to fix the problem for a short while, but soon afterwards it loses the connection again. |
@smithbill17 the integration on which this one is based was using a non persistent connection, in this one the connection should be persistent, for the moment, it seems that we have issues with this connection but we are working on it. |
same problem. LSC bulb works perfectly and then...unavailable. "Disable" and "Enable" fixes the problem. HA restart seems to do the trick as well. Not a durable solution. |
Found the same problem. |
this is still a probleme.....a big probleme =/ |
Yes it is big problem for me, too. I must back to the official Tuya integration :/ |
Hello, can you check the PR #171 , some new changes may fix the unavailability problem. |
Hello all, can you check latest master version, PR has been merged. |
Been testing this for the last week or so. Devices still become unavailable regularly but quickly come back and for the most part, it resolves the issues I was experiencing. Occasionally if a script or automation runs at the exact second the device is unavailable then can be annoying but this is very rare now. |
i have been using master for a few days and i have now had the disconnected device issue at all. i have not seen the heart issues in logs. Will update when i got more info |
Have continued to monitor but noticed devices are becoming unavailable very regularly. They do usually come back quickly but monitored my devices in developer tools and must have seen 20-30 appear unavailable in 30 seconds or so, sometimes the same device appeared multiple times |
That’s interesting i have not had any issues at all for the last few days since i have been using masters (updated last week) what version of ha are you using also are there any logs from when they become unavailable? |
are we saying the fix for this is to sever the connection for each device(endpoint) to the internet will fix this issue? I am losing 3 devices at least a day and not always the same device. If I remove them from the localtuya integration, restart HA I get them back, sometimes for a day, sometimes 2, but never for too long. I have 8, 3.1 firmware devices this happens with. I never lose connection to the 3.3 FW devices, just the 3.1 FW ones. I like the products and I like the integration (after a LONG time playing with them to get them to work) but I am almost over this and going to go to Zigbee lights. Restarting my HA also screws with my Zigbee mesh as I'm taking the coordinator offline every time I restart... |
Have to tried the master? Not the November release |
I'm still pretty new to HA and GitHub in general.. how does one do that? (assuming that comment was directed at me?) |
@ShaneSpina Welcome, it is great to have new blood. As for HA side. you go into Side note: I have been using HA for 2 years or so and I don't have a background in cs. so take everything i say with a grain of salt. i am still trying to figure out how to contribute to the wiki page for known devices. PS. Do you guys know why there has not been a new release since the November one? I am pretty sure the patches from 10days ago are significant enough to warrant a release or at least a beta. |
Thanks for the Welcome! copied and restarting HA now. |
Can the 'master' version not be released so people using this integration via HACS can pick it up? Given the issues with the constant disconnects, is it not possible to revert the code back to the original 'mileperhour' version (which didn't seem to have any issues) but make it HACS compatible? I'm not a coder, so no idea on just how difficult or time consuming that could be. |
seems stable to me now.. I just copied the master code over the code in the localtuya folder in the custom components and rebooted HA |
A release is coming any day now, @rospogrigio is preparing for it. |
Any news on this update so we could install it via HACS? @postlund @rospogrigio Thank you. |
v3.2.0 was released 6days ago and it's a vast improvement in terms of reliability. You can update the integration in HACS. |
Tested localtuya v. 3.2.0 (zip download) and devices now appear as unavailable a few times a day, but only for few second or a minute. So I reworked all my automations to add a waiting for device state != unavailable before issueing a turn-on or turn-off command, just to be sure not to miss the device activation/deactivation if at the automation's scheduled running time the device is temporarily unavailable. Thanks! |
I just installed v 3.2.0 via HACS. I removed all of my tuya devices in HA so the slate is clear. I also removed all the devices in the Tuya App. I have DNS blocked via AdGuard on my tuya devices. When I try to add one of my devices with the local tuya integration, I get the the following error after the name/local key/host submission:
The log shows:
Any thoughts on how to resolve this? |
I had 2 devices become unresponsive a few days ago, but I didn't have a chance to do anything about it and then magically they started working again.. weird right? or not? |
See if this can be the case: Edit: I see that you already know that issue! :) |
I have been getting a similar issue the worse happen last night a plug was unavailable for 7 hours. It only started working after i turned it on from the tuya app. |
For some reason, i've found the same thing, the tuya app is able to make the switch work again...even with no internet. |
Been using the localtuya integration and it worked excellently. Managed to add all of my devices including bulbs, switches etc. and response was instant. However, I have noticed that over the course of the day the vast majority of the devices will become unavailable. Some will still show as 'on' or 'off' but cannot be toggled. All still work in the tuya app when this happens.
Have tried a few things such as removing the default tuya integration and have noticed that a restart of HA resolves the issue temporarily. Have checked wifi but all have excellent signal and can see them connected to my network when they appear unavailable.
Any suggestions as is driving me mad and really dont want to revert to the slow performance of the normal integration. Have a number of different brands of each item and happening on all of them. Happy to provide logs if someone tells me what they need. Thanks in advance.
The text was updated successfully, but these errors were encountered: