Skip to content

HOWTO get a DPs dump

rospogrigio edited this page Oct 22, 2020 · 9 revisions

It is possible to get the dump of all DPs with 2 different methods.

Note: with both methods, the device might be able to accept only one connection at a time. If this is the case, close all Tuya apps (and/or disconnect the mobile phones running them) before trying these methods.

Using tuyadebug.tgz package

Download the tuyadebug.tgz package from the main repository page, extract it and run the test.py script passing it the correct parameters. The script will detect all the available DPs of the device and report their current values (i.e., the "DPs dump"). See the example below for an example of execution of the script and the expected output:

./test.py <deviceID> <IPaddress> <localKey> 

INFO:localtuya:localtuya version 0.0.19
INFO:localtuya:Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
[...]
DEBUG:localtuya.pytuya:decrypted result='{"devId":"<deviceID>","dps":{"1":false,"7":true,"9":0,"15":0,"18":0,"19":0,"20":2218,"26":0}}'
AVAILABLE DPS ARE [{'1': False, '7': True, '9': 0, '15': 0, '18': 0, '19': 0, '20': 2218, '26': 0}]
INFO:localtuya:COMPLETE response from device <deviceID> [<IPaddress>].

**** deviceInfo returned OK ****

TuyaPower (Tuya Power Stats) [0.0.19]

Device <deviceID> at <IPaddress> key <localKey> protocol 3.3 dev_type type_0a:
    DPS [1] VALUE [False]
    DPS [7] VALUE [True]
    DPS [9] VALUE [0]
    DPS [15] VALUE [0]
    DPS [18] VALUE [0]
    DPS [19] VALUE [0]
    DPS [20] VALUE [2218]
    DPS [26] VALUE [0]

Using the config flow "debug option"

This section will be updated soon, when this option will be merged into the main branch.

Clone this wiki locally