Mode switch for TRV

Im running openHAB 2.5.5 on pi

I have some TRVs I need to add via ZigBee2mqtt there are the ones

I’ve added the temperature reading and getting with ease but stumped with the mode setting because there is more than one two options so standard switch doesn’t work
modes:
- “off”
- “auto”
- “heat”
- “manual”

Edit: Here’s potentially a better way of doing this, without using transforms. The final implementation depends heavily on what the MQTT message looks like that you send to and get from the TRV.

Thing

This configuration will need changing depending on how you have setup your MQTT bridge, what the topics are, and what the MQTT message is.

Thing mqtt:topic:TRV "TRV" (mqtt:broker:MosquittoMqttBroker) {
    Channels:
        Type string : mode "TRV Mode" [
            stateTopic="zigbee2mqtt/trv/mode",
            commandTopic="zigbee2mqtt/trv/mode/set"
        ]
}

Item

String strTRVMode "TV Mode" {channel="mqtt:topic:TRV:mode"}

Sitemap

image

Switch item=strTRVMode label="Mode []" icon="heating" mappings=[off="OFF", auto="AUTO", heat="HEAT", manual="MANUAL"]

There’s other ways of doing this, but this should get you started.

thanks I set the other bits up really rough and ready in paper ui
I will have a play with these rater in the week as on the road this next few days very little chance to play unfortunately

Good morning, have you been able to configure the valve? I have a Moes Model HY368 valve. Zegbee2mqtt recognizes it as “TS0601_thermostat - TuYa Radiator valve with thermostat”.

debug
Received Zigbee message from ‘Pare_Radiador’, type ‘commandGetData’, cluster ‘manuSpecificTuyaDimmer’, data ‘{“status”:2,“transid”:139,“dp”:515,“fn”:0,“data”:{“type”:“Buffer”,“data”:[0,0,0,245]}}’ from endpoint 1 with groupID 0

INFO
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/local_temperature’, payload ‘24.5’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/linkquality’, payload ‘94’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/system_mode’, payload ‘manual’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/child_lock’, payload ‘UNLOCKED’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/local_temperature_calibration’, payload ‘-1.0’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/window_detection_params-valve’, payload ‘OFF’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/boost_time’, payload ‘300’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/window_detection_params-temperature’, payload ‘5’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/force’, payload ‘normal’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/window_detection_params-minutes’, payload ‘10’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/comfort_temperature’, payload ‘20’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/eco_temperature’, payload ‘15’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/position’, payload ‘0’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/week’, payload ‘5+2’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/workdays’, payload ‘[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/holidays’, payload ‘[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/preset_temperature’, payload ‘15’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/auto_lock’, payload ‘MANUAL’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/preset’, payload ‘1’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/current_heating_setpoint’, payload ‘19.5’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/min_temperature’, payload ‘5’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/max_temperature’, payload ‘35’
info MQTT publish: topic ‘zigbee2mqtt/Pare_Radiador/last_seen’, payload ‘2020-09-24T10:28:10+02:00’

I cannot send the data and it persists, as well as I cannot configure days and hours. Do you have an example? Thank you