jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
1.01k stars 177 forks source link

Additional Data Points when scanning for data points for Wipro 16Amp Smart plug #132

Closed manj9501 closed 2 years ago

manj9501 commented 2 years ago

Hi @jasonacox

Great work, this library!

So I'm based in India and I recently purchased this particular 16 Amp Smart Plug, which is based on Tuya protocol version 3.3. I'm using it with Smart Life app and it's working without any hiccups.

Now when I poll for local devices using the scan command with tiny tuya, the following status is returned: Status: {'1': False, '9': 0, '17': 1, '18': 0, '19': 0, '20': 2295, '21': 1, '22': 552, '23': 35482, '24': 18486, '25': 1850, '26': 0, '38': 'memory', '39': True, '40': 'on', '41': False, '42': '', '43': '', '44': ''}

As you can see, we get a few additional Data Points which aren't listed in the readme for the library. If we click on the 'setting' option in the app after setting up the device, as shown in the following picture,

Screenshot_20220519-204359_Smart Life

we land on page in the Smart Life app: Screenshot_20220519-204103_Smart Life

Now, I've already mapped the extra Data Points(in red) to their respective settings as can be seen in the second image above.

Here's a summary:

DP ID Function Point Type Range
38 Power-on state setting enum off, on, memory
39 Overcharge Switch bool True/False
40 Indicator status setting enum none, on, relay, pos
41 Child Lock bool True/False
42 UNKNOWN NA NA
43 UNKNOWN NA NA
44 UNKNOWN NA NA

Can you please add this info to the readme? Please let me know if any concerns.

Thanks!

jasonacox commented 2 years ago

Hi @manj9501 - Thanks for great information! Would you want to submit a pull request for the README.md change so you get credit for this contribution? If not, I can add it.

manj9501 commented 2 years ago

Submitted PR #133, please take a look.

jasonacox commented 2 years ago

Thank you @manj9501 ! Changes merged.

manj9501 commented 2 years ago

Thanks much @jasonacox !