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).
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).