jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
1.01k stars 179 forks source link

TinyTuya based devices stop responding after years of working. #559

Open yuuzhan opened 4 days ago

yuuzhan commented 4 days ago

I believe this might be the same issue as #556 but I dont want to hijack their thread

History: I have about 20 devices, mostly Feit style light switches. When I set them up years ago, tinytuya was working with them, and then I migrated to using Home assistant Local Tuya to control them. No major issues for years.

Current: Some time last week a few of my devices stopped responding and I didnt think much about it - as that happens from time to time and usually resolves itself. Instead of resolving this got worse and worse, eventually getting to the point where no devices were responding. I tried a bunch of things but nothing seemed to get the devices back up and running. Unfortunatly the logs for LocalTuya are quite minimal, so I disabled that and fired up TinyTuya to see if I can debug the problem better.

I can run the wizard without any issues, it seems to download the details for all the devices, however when doing a local polling nothing seems to be working (It also cant seem to get an IP address for most of the devices). Even when I manually edit the devices.json file to put in the device IP Address I get a No Response issue. The two devices that automatically return IPs are a tuya switch (like a white box, not a light switch) and a zigbee hub.

I have not made any changes to the network that I know of... I have tried rebooting the network, and the PC that is doing the polling with no luck.

Here is the debug log: https://pastebin.com/JdYzWSzb

Any thoughts?

Poil commented 4 days ago

Hi,

Strange, I had the same problem you describe but since the major update of Tuya Smart last week, my devices are now always working locally, and more strange is that I didn't need to unplug them to reset them and have them working.

I didn't see any firmware update on my device but perhaps I miss some because I'm in automatic update.

Regards

yuuzhan commented 3 days ago

Hmm, I have auto update turned off on my devices - but going in to manually check on them I can see that it says there are no updates available.

Main Module Version: v3.1.4 MCU Module: v1.1.12

Poil commented 3 days ago

My problematic devices were

All other Socket were working without any issue

It doesn't look like I had firmware update, so I think they change something on "Tuya Smart App" that were locking my devices on LAN (via cloud API it was always working)

I just saw my IOT Core license on Tuya Cloud expired in september, just to be sure I have renewed it, w&s

yuuzhan commented 3 days ago

Hmm, My IOT Core License is good until January. I havent seen any notice about a Tuya Smart change last week, do you have a news blast about that?

Is there any settings in the tuya smart app other then the basic setup?

Poil commented 3 days ago

Tuya Smart App has been updated the 8 November (v6) on Android App Store

no other settings :/

uzlonewolf commented 2 days ago

Have you tried rebooting the devices? Do they respond at all to the Smart Life app?

yuuzhan commented 2 days ago

I have not tried rebooting the devices yet, as they are light switches in the wall without a power button to see. I would have to kill power to the whole house to reboot them lol.

They do respond to smart life app as well as the google home integration.

uzlonewolf commented 2 days ago

Well, at least that makes it easy to reboot them all at the same time :rofl: If they're v3.4 devices, well, I'd say a few years without needing a reboot is really good, I have a couple that need to be rebooted every few days/weeks.

Poil commented 2 days ago

This morning I have some v3.3 devices that were working for years without any issue that stop to work again on LAN. In Smart App, they are responding (monitor & control) but the network check give an error

Edit, this morning more and more devices become unreachable ... I kill Smart App to see if it's better or not

yuuzhan commented 1 day ago

I suspect mine were 3.3 devices as well, but I am not fully sure.