Closed prgrobots closed 1 year ago
Hi @prgrobots - I recommend setting up a monitoring loop similar to the example code here: https://github.com/jasonacox/tinytuya/blob/master/examples/zigbee_gateway.py
Use the app to control the valve and notice which DPS values change. Mimic that with the set_value()
calls.
'false'
is a string and evaluates to True. Try zigbee1.set_value('108', False)
Thanks for the suggestion, I've re-tried that and the dps value at 108 (like you have previously said) is inverted.
trying to turn off the valve with :
zigbee1.set_value('108', 'true')
or
payload=zigbee1.generate_payload(tinytuya.CONTROL, {108: 'true'})
does not work.
Also, the example may need to be checked, shouldn't line 27:
payload = gw.generate_payload(tinytuya.HEART_BEAT)
be payload = zigbee1.generate_payload(tinytuya.HEART_BEAT)
?
If you need to set it to true then it should be zigbee1.set_value('108', True)
No, heartbeats are directed at the gateway to keep the TCP connection open, individual devices do not need them. Since those packets do not have a payload then sending them to a sub-device would still work however.
Ha! finally got it I had to use set_status
zigbee1.set_status(on=False, switch=108, nowait=True) time.sleep(3) zigbee1.set_status(on=True, switch=108, nowait=True)
This issue is for the Holman WX1 WiFi hub with moisture sensor and wireless irrigation control valve.
I've been able to turn the valve on but have no idea why it won't turn off?
I turn it on with
zigbee1.set_value('108', 'false')
but setting it to true the same way doesn't turn it off. I've also tried to set 125, high moisture to true, setting the timer on 107 to 0 and setting 106 status to 0 for stop.What am I missing?
My code is below, I am not running it in a loop, maybe thats it?