Determine whether a device is a bulb/ outlet/ ... #504
Replies: 2 comments 39 replies
-
Look at the "category" key in devices.json. Most smart bulbs are going to be "dj" while most smart plugs are going to be "cz." A list of some of the more common codes can be found at https://github.com/0x5e/homebridge-tuya-platform/blob/develop_1.7.0/SUPPORTED_DEVICES.md |
Beta Was this translation helpful? Give feedback.
-
Many thanks for the help. The debug did show (as I expected from the output without debug) that I can connect to all devices. Does this throw any light on the issue? Many thanks, |
Beta Was this translation helpful? Give feedback.
-
Being fairly new to Python and especially the TinyTuya API, I am struggling to determine something.
I have some outlets, and some bulbs.
Programmatically, I can get information on each device, including its MAC address, ... and yet I cannot seem to find a way to determine if the device is an outlet or a bulb!
I know I can deduce manually which is which, but it would be nice if I could determine in software and only revert to some kind of manual intervention when I am really stuck (rather than being stuck immediately!).
Many thanks for your help.
Kind Regards,
Beta Was this translation helpful? Give feedback.
All reactions