rospogrigio / localtuya

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

tuyadebug fails to retrieve #824

Open HrGaertner opened 2 years ago

HrGaertner commented 2 years ago

The problem

I can not get a DP dump of a tuya device using the tutorial and links provided in the HOWTO. It is a Rainpoint hub which is also a smart plug. It also translates between wifi and 433 MHz for devices outside. The id and local key are both from the described and recommended method using tuya-cli wizard. The IP comes from the autorecognized device by localtuya but the setup failed with an unkown error. It was verified by making a port scan then plugging out the device and rerunning it. The logs where not helpful because of which i tried it the DP dump

Environment

I used the newest tuyadebug package as described in the HOWTO

Steps to reproduce

  1. Get a "Rainpoint Bewässerungscomputer"
  2. Try to dump its DPs using the HOWTO from the wiki

Provide tuyadebug test.py taceback/logs

./test.py bfeb8d3366e4ada2f7vzpy ip key protocol

INFO:localtuya:localtuya version 1.0.0
INFO:localtuya:Python 3.10.4 (main, Mar 25 2022, 00:00:00) [GCC 12.0.1 20220308 (Red Hat 12.0.1-0)] on linux
INFO:localtuya:Using pytuya version '8.1.0'
INFO:localtuya:Detecting list of available DPS of device bfeb8d3366e4ada2f7vzpy [192.168.178.52], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"bfeb8d3366e4ada2f7vzpy","devId":"bfeb8d3366e4ada2f7vzpy"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b"\x06\x8b8\xe1/\xe6\x18!|\x8a*'\xf6\xc7(u"
DEBUG:localtuya.pytuya:decrypted result='devid not found'
DEBUG:localtuya.pytuya:Failed to connect to 192.168.178.52. Raising Exception.
WARNING:localtuya.pytuya:Failed to get status: Expecting value: line 1 column 1 (char 0)
INFO:localtuya:Detecting list of available DPS of device bfeb8d3366e4ada2f7vzpy [192.168.178.52], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"bfeb8d3366e4ada2f7vzpy","devId":"bfeb8d3366e4ada2f7vzpy"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b"\x06\x8b8\xe1/\xe6\x18!|\x8a*'\xf6\xc7(u"
DEBUG:localtuya.pytuya:decrypted result='devid not found'
DEBUG:localtuya.pytuya:Failed to connect to 192.168.178.52. Raising Exception.
WARNING:localtuya.pytuya:Failed to get status: Expecting value: line 1 column 1 (char 0)
INFO:localtuya:Detecting list of available DPS of device bfeb8d3366e4ada2f7vzpy [192.168.178.52], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"bfeb8d3366e4ada2f7vzpy","devId":"bfeb8d3366e4ada2f7vzpy"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b"\x06\x8b8\xe1/\xe6\x18!|\x8a*'\xf6\xc7(u"
DEBUG:localtuya.pytuya:decrypted result='devid not found'
DEBUG:localtuya.pytuya:Failed to connect to 192.168.178.52. Raising Exception.
WARNING:localtuya.pytuya:Failed to get status: Expecting value: line 1 column 1 (char 0)
INFO:localtuya:TIMEOUT: No response from device bfeb8d3366e4ada2f7vzpy [192.168.178.52] after 2 attempts.

I tried both protocol version 3.3 and 3.1 the error messages are (despite the version number) equal

Additional information

HrGaertner commented 2 years ago

Thanks a lot in advance!