clach04 / python-tuya

Python interface to ESP8266MOD WiFi smart devices from Shenzhen Xenon. NOTE I'm not using any devices with this library so I can't test :-(
MIT License
239 stars 54 forks source link

Get Device Local Key #70

Open dharichandan opened 4 years ago

dharichandan commented 4 years ago

Hi,

I got a new smart bulb socket from manufacturer 'Hoteon'. And I want to use the pytuya library for controlling the device.

My ask is - Is the productKey same as device localkey?? Cause I am unable to use the functionalities of pytuya library on it.

If anyone knows how to extract one please let me know.

Thanks in Advance.

SDNick484 commented 4 years ago

It's not. I have a couple devices with the same productKey so I assume it's some sort of identifier for what the device. As to getting the local key, there's a couple ways to do it, but nothing graceful. See the wiki of Tuyapi for one approach. Another possibility is extracting it from whatever app you use to control the device. I don't think you can do that with the main Tuya or Jinvoo Smart Lie apps, but other third party ones might.