rospogrigio / localtuya

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

Entity light.spotlight_1 is requesting unknown DPS index 4 #266

Closed olibuijr closed 3 years ago

olibuijr commented 3 years ago

[071...ecb] Entity light.spotlight_1 is requesting unknown DPS index 4

Trying to use localtuya. Have added the following configuration

localtuya:

If i use the GUI method, i am unable to map an id to a value. I don't seem top see what's used for id.

Any ideas? or just throw them lights in the trash? :)

ultratoto14 commented 3 years ago

Id is usually 1 or 20 for lights, it's the on/off setting. Can you do a DP dump ?

edit: you can also take a look of already known devices

olibuijr commented 3 years ago

Oh that's brilliant, it was my misunderstanding.

I've now got them lights working brillantly with home assistant.

Thank you for your pointers.

eldstado commented 2 years ago

Hi, I also get this unknown dps index 4, also tried 20.

This is result from DPs dump, I see payload is shorter than other similar lights running different firmware:

C:\temp\tuyadebug>python -m test.py *****10.200.90.2 * INFO:localtuya:localtuya version 1.0.0 INFO:localtuya:Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] on win32 INFO:localtuya:Using pytuya version '8.1.0' INFO:localtuya:Detecting list of available DPS of device [10.200.90.2], protocol 3.3. DEBUG:localtuya.pytuya:Sending command status (device type: type_0a) DEBUG:localtuya.pytuya:paylod=b'{"gwId":"","devId":""}' DEBUG:localtuya.pytuya:DATA RECEIVED! DEBUG:localtuya.pytuya:decode payload=b'%\x8b\xbf \x81\x88\x1b\xbf\xb0\xa4\x1e\x8e\xb9?\xebr\x91\x9e^P\x8fW8\x99\xa5\xfc~<P\xf8\x83t' DEBUG:localtuya.pytuya:'data unvalid' error detected: switching to dev_type 'type_0d' DEBUG:localtuya.pytuya:Re-send status due to device type change (type_0a -> type_0d) DEBUG:localtuya.pytuya:Sending command status (device type: type_0d) DEBUG:localtuya.pytuya:paylod=b'{"devId":"","uid":"","t":"1640264093","dps":{"1":null,"2":null,"3":null,"4":null,"5":null,"6":null,"7":null,"8":null,"9":null,"10":null}}' DEBUG:localtuya.pytuya:DATA RECEIVED! DEBUG:localtuya.pytuya:READING AGAIN! DEBUG:localtuya.pytuya:Failed to connect to 10.200.90.2. Raising Exception. WARNING:localtuya.pytuya:Failed to get status: timed out INFO:localtuya:Detecting list of available DPS of device [10.200.90.2], protocol 3.3. DEBUG:localtuya.pytuya:Sending command status (device type: type_0a) DEBUG:localtuya.pytuya:paylod=b'{"gwId":"","devId":""}' DEBUG:localtuya.pytuya:DATA RECEIVED! DEBUG:localtuya.pytuya:decode payload=b'%\x8b\xbf \x81\x88\x1b\xbf\xb0\xa4\x1e\x8e\xb9?\xebr\x91\x9e^P\x8fW8\x99\xa5\xfc~<P\xf8\x83t' DEBUG:localtuya.pytuya:'data unvalid' error detected: switching to dev_type 'type_0d' DEBUG:localtuya.pytuya:Re-send status due to device type change (type_0a -> type_0d) DEBUG:localtuya.pytuya:Sending command status (device type: type_0d) DEBUG:localtuya.pytuya:paylod=b'{"devId":"","uid":"","t":"1640264100","dps":{"1":null,"2":null,"3":null,"4":null,"5":null,"6":null,"7":null,"8":null,"9":null,"10":null}}' DEBUG:localtuya.pytuya:DATA RECEIVED! DEBUG:localtuya.pytuya:READING AGAIN! DEBUG:localtuya.pytuya:Failed to connect to 10.200.90.2. Raising Exception. WARNING:localtuya.pytuya:Failed to get status: timed out INFO:localtuya:Detecting list of available DPS of device [10.200.90.2], protocol 3.3. DEBUG:localtuya.pytuya:Sending command status (device type: type_0a) DEBUG:localtuya.pytuya:paylod=b'{"gwId":"","devId":""}' DEBUG:localtuya.pytuya:DATA RECEIVED! DEBUG:localtuya.pytuya:decode payload=b'%\x8b\xbf \x81\x88\x1b\xbf\xb0\xa4\x1e\x8e\xb9?\xebr\x91\x9e^P\x8fW8\x99\xa5\xfc~<P\xf8\x83t' DEBUG:localtuya.pytuya:'data unvalid' error detected: switching to dev_type 'type_0d' DEBUG:localtuya.pytuya:Re-send status due to device type change (type_0a -> type_0d) DEBUG:localtuya.pytuya:Sending command status (device type: type_0d) DEBUG:localtuya.pytuya:paylod=b'{"devId":"","uid":"","t":"1640264107","dps":{"1":null,"2":null,"3":null,"4":null,"5":null,"6":null,"7":null,"8":null,"9":null,"10":null}}' DEBUG:localtuya.pytuya:DATA RECEIVED! DEBUG:localtuya.pytuya:READING AGAIN! DEBUG:localtuya.pytuya:Failed to connect to 10.200.90.2. Raising Exception. WARNING:localtuya.pytuya:Failed to get status: timed out INFO:localtuya:TIMEOUT: No response from device [10.200.90.2] after 2 attempts.