rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.91k stars 557 forks source link

Heartbeat failed #199

Open smithbill17 opened 3 years ago

smithbill17 commented 3 years ago

I have a range of Tuya based smart plugs (mainly Teckin) which work fine with the SmartLife app. They've been working fine using the original 'mileperhour' version of localtuya but I decided to change to this one as it seems to be being maintained and is now integrated into HACS. However, the same two smart plugs keep resulting in this error:

Logger: custom_components.localtuya.pytuya Source: custom_components/localtuya/pytuya/init.py:439 Integration: LocalTuya integration (documentation, issues) First occurred: 16:16:04 (1 occurrences) Last logged: 16:16:04

[bfd...dcr] Heartbeat failed ('NoneType' object has no attribute 'write'), disconnecting Traceback (most recent call last): File "/config/custom_components/localtuya/pytuya/init.py", line 379, in heartbeat_loop await self.heartbeat() File "/config/custom_components/localtuya/pytuya/init.py", line 468, in heartbeat return await self.exchange(HEARTBEAT) File "/config/custom_components/localtuya/pytuya/init.py", line 439, in exchange self.transport.write(payload) AttributeError: 'NoneType' object has no attribute 'write'

If I edit/save the device integration, it seems to fix them, but only for a while, then they fail again (but I can still go into SmartLife and control them).

GeorgeBark commented 3 years ago

I'm getting the same error, any ideas?

FriendlyGuy commented 3 years ago

I'm getting the same error, any ideas?

The same