Replies: 1 comment 2 replies
-
Hi @takigama ! Thanks for the note. This seems like a flaw in the firmware on the kettle. I have seen some Tuya devices not respond with all of their DPS values but haven't found any that didn't report power DPS if that is controllable. I suspect if you set up an async monitoring loop like the one below, the device would send "changes" and an event would show up when you power on/off the kettle. import tinytuya
d = tinytuya.OutletDevice('DEVICEID', 'DEVICEIP', 'DEVICEKEY')
d.set_version(3.3)
d.set_socketPersistent(True)
print(" > Send Request for Status < ")
payload = d.generate_payload(tinytuya.DP_QUERY)
d.send(payload)
print(" > Begin Monitor Loop <")
while(True):
# See if any data is available
data = d.receive()
print('Received Payload: %r' % data)
# Send keyalive heartbeat
print(" > Send Heartbeat Ping < ")
payload = d.generate_payload(tinytuya.HEART_BEAT)
d.send(payload) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a tuya based kettle that i've been trying to figure out how to make work. It was originally only displaying one DP:
The dp (5) is actually the temperature of the water (id 5), i tried sending random data to it on dp 5, but that didnt really do much (it does have a "hold this temperature" control so I thought maybe it might be a way to tell it to do that but even the tuya app seems to have no ability to do that anyway).
After manually turning it on (power cycling it then hitting the button to make it boil), then it starts returning DP 1 as the switch:
If i just leave the kettle alone, at some random point, DP 1 will disappear again for no apparent reason.
Even weirder, if I reboot it, it goes back to only showing one DP and if I then tell it to switch on from python, the DP suddenly turns up again:
I've since figured out it doesn't really matter if it reports on the existence of DP 1 or not, sending true for DP 1 turns the kettle on.
Not an issue or anything like that, just quite odd.
Beta Was this translation helpful? Give feedback.
All reactions