Closed n00b12345 closed 1 year ago
Bulbs should use tinytuya.BulbDevice(...)
instead of tinytuya.OutletDevice(...)
. Most bulbs use DP 21 as the on/off, not 1 like outlets, which is probably why it's not working. For most common bulbs, BulbDevice(...)
takes care of figuring out which DPs are needed. See https://github.com/jasonacox/tinytuya/blob/master/examples/bulb.py for a few examples of bulb-specific commands.
Fantastic! That worked perfectly. Thank you so much. Really appreciate the help.
This is my code. It's a simple few lines of Python.
import tinytuya
d = tinytuya.OutletDevice("device ID", "device IP", "device key")
d.set_version(3.3)
d.turn_on(switch=1)
Even though all the plugs work perfectly, none of the bulbs work. I tried debugging but what I am receiving are "DEBUG:received null payload" and "DEBUG:set_status received data=None" messages on running it.
(Also, thank you so much for creating this Tiny Tuya. It's beautiful! 👍 )