rospogrigio / localtuya

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

Cannot connect switch #333

Closed tjengbudi closed 3 years ago

tjengbudi commented 3 years ago

today, 2 of my device just got this error

INFO:localtuya:localtuya version 1.0.0
INFO:localtuya:Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
INFO:localtuya:Using pytuya version '8.1.0'
INFO:localtuya:Detecting list of available DPS of device eb3e015125389ba1ff06ls [192.168.1.129], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"eb3e015125389ba1ff06ls","devId":"eb3e015125389ba1ff06ls"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b'\x0c\xaa\xe8\xaf\xa7\xc7\x846\xb1{t\xe6p\x06\xc4#k\xc2n\x0b\xf3m\x1c\x08\xea-\xf6[\x87I\xee!'
DEBUG:localtuya.pytuya:Failed to connect to 192.168.1.129. Raising Exception.
WARNING:localtuya.pytuya:Failed to get status: a bytes-like object is required, not 'str'
INFO:localtuya:Detecting list of available DPS of device eb3e015125389ba1ff06ls [192.168.1.129], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"eb3e015125389ba1ff06ls","devId":"eb3e015125389ba1ff06ls"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b'\x0c\xaa\xe8\xaf\xa7\xc7\x846\xb1{t\xe6p\x06\xc4#k\xc2n\x0b\xf3m\x1c\x08\xea-\xf6[\x87I\xee!'
DEBUG:localtuya.pytuya:Failed to connect to 192.168.1.129. Raising Exception.
WARNING:localtuya.pytuya:Failed to get status: a bytes-like object is required, not 'str'
INFO:localtuya:Detecting list of available DPS of device eb3e015125389ba1ff06ls [192.168.1.129], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"eb3e015125389ba1ff06ls","devId":"eb3e015125389ba1ff06ls"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b'\x0c\xaa\xe8\xaf\xa7\xc7\x846\xb1{t\xe6p\x06\xc4#k\xc2n\x0b\xf3m\x1c\x08\xea-\xf6[\x87I\xee!'
DEBUG:localtuya.pytuya:Failed to connect to 192.168.1.129. Raising Exception.
WARNING:localtuya.pytuya:Failed to get status: a bytes-like object is required, not 'str'
INFO:localtuya:TIMEOUT: No response from device eb3e015125389ba1ff06ls [192.168.1.129] after 2 attempts.

the device is working ok a weeks ago. today i accidently change the devid and reboot. after knowing problem i change the correct devid and it stop working

tjengbudi commented 3 years ago

change IP, reset the device, pairing again, get localkey again and noticed the localkey changed. input once again and working properly