Saturday, 12 September 2020

Tuya ZigBee TRVs proving tricky to control.

The first three I bought work fine on my Raspberry Pi Zigbee2MQTT set-up but the second three need to be woken up before they will hear a command.

But I've sniffed the comms over Wireshark when using their app so I should be able to crack it.

 

TUYA Zigbee TRV Thermostat Valve Thermostatic Radiator ...

This command worked!

pi@tola-smarthome-v2:~ $ date; mosquitto_pub -h localhost -p 1883 -u ***USERNAME*** -P ***PASSWORD*** -t zigbee2mqtt/Tonys\ Bedroom\ TRV/set/force -m "open"
Mon 23 Nov 2020 08:10:56 PM GMT

Nov 23 20:10:56 tola-smarthome-v2 npm[30279]: Zigbee2MQTT:debug 2020-11-23 20:10:56: Received MQTT message on 'zigbee2mqtt/Tonys Bedroom TRV/set/force' with data 'open'
Nov 23 20:10:56 tola-smarthome-v2 npm[30279]: Zigbee2MQTT:debug 2020-11-23 20:10:56: Publishing 'set' 'force' to 'Tonys Bedroom TRV'

Nov 23 20:10:57 tola-smarthome-v2 npm[30279]: Zigbee2MQTT:debug 2020-11-23 20:10:57: Received Zigbee message from 'Tonys Bedroom TRV', type 'commandSetDataResponse', cluster 'manuSpecificTuyaDimmer', data '{"data":{"data":[1],"type":"Buffer"},"dp":1130,"fn":0,"status":54,"transid":122}' from endpoint 1 with groupID 0

Nov 23 20:10:57 tola-smarthome-v2 npm[30279]: Zigbee2MQTT:info  2020-11-23 20:10:57: MQTT publish: topic 'zigbee2mqtt/Tonys Bedroom TRV', payload '{"auto_lock":"MANUAL","away_preset_days":1,"away_preset_temperature":15,"boost_time":300,"child_lock":"UNLOCKED","comfort_temperature":20,"current_heating_setpoint":"5.0","eco_temperature":15,"force":"open","holidays":[{"hour":6,"minute":0,"temperature":20},{"hour":8,"minute":0,"temperature":15},{"hour":11,"minute":30,"temperature":15},{"hour":12,"minute":30,"temperature":15},{"hour":17,"minute":30,"temperature":20},{"hour":22,"minute":0,"temperature":15}],"linkquality":60,"local_temperature":"15.0","local_temperature_calibration":"0.0","max_temperature":35,"min_temperature":5,"position":0,"preset":"manual","system_mode":"manual","week":"7","window_detection":"OFF","window_detection_params":{"minutes":10,"temperature":5},"workdays":[{"hour":11,"minute":0,"temperature":20},{"hour":11,"minute":1,"temperature":15},{"hour":11,"minute":30,"temperature":15},{"hour":12,"minute":30,"temperature":15},{"hour":17,"minute":30,"temperature":20},{"hour":150,"minute":0,"temperature":15}]}'