Zigbee trv tuya TS0601 (Avatto ME167)

  • Platform information: raspberry Pi 4
    • openHAB version: 3.4.3

Hi,
i have zigbee2mqtt running on my Raspi. Connection to openhab works, connected trv Avatto ME 167 (Tuya TS0601) is seen by openhab.
MQTT State Topic: zigbee2mqtt/TRV1
MQTT Command Topic: zigbee2mqtt/TRV1/set
the information JSON string comes in, but the JSONPATH transformation “JSONPATH:$.local_temperature” did not work.

JSON: {“color_mode”:“xy”,“current_heating_setpoint”:9,“linkquality”:196,“local_temperature”:21,“local_temperature_calibration”:1,“running_state”:“idle”,“system_mode”:“auto”}

And how can I send a payload {“current_heating_setpoint”:19}

Thanks
Dietmar

Use https://jsonlint.com/ and https://jsonpath.com/ to check your setup.
AFAICT JSONPATH:$.local_temperature should work (without quotes).

Use command topic zigbee2mqtt/TRV1/set/current_heating_setpoint

See Use case: Integrating IKEA Starkvind air purifier into openHAB for a worked example.

Just for reference: TuYa TS0601_thermostat_3 control via MQTT | Zigbee2MQTT

I checked the JSON on https://jsonpath.com/ and it worked for $.local_temperature.
But the item did not show any value.
The code looks like

UID: mqtt:topic:b057c46a13:TRV1
label: TRV1
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:b057c46a13
location: room one
channels:
  - id: TRV1_temperature
    channelTypeUID: mqtt:number
    label: TRV1 Temperatur
    description: ""
    configuration:
      commandTopic: zigbee2mqtt/TRV1/set/current_heating_setpoint
      stateTopic: zigbee2mqtt/TRV1
      transformationPattern: JSONPATH:$.local_temperature

but no positive result

the log shows incoming values:

openhab/items/Heizung_1_komplett/statechanged
ItemStateChangedEvent
{"type":"String","value":"{\"child_lock\":\"UNLOCK\",\"color_mode\":\"xy\",\"current_heating_setpoint\":16,\"linkquality\":188,\"local_temperature\":21,\"local_temperature_calibration\":1,\"running_state\":\"idle\",\"system_mode\":\"auto\"}","oldType":"String","oldValue":"{\"child_lock\":\"UNLOCK\",\"color_mode\":\"xy\",\"current_heating_setpoint\":15,\"linkquality\":172,\"local_temperature\":21,\"local_temperature_calibration\":1,\"running_state\":\"idle\",\"system_mode\":\"auto\"}"}

Do you have the JSONPath Transformation Service installed in openHAB?

:roll_eyes:
I had with the last version from branch2. Going to 3 disabled this and i didn’t find the entry.
Now it work’s. The mistake is between the chair and the screen.
Many thanks.

for sending the commands your hint showed the way. With Javascript transformation (has to be enabled separately) I was able to change the ‘state’ payload to ‘child_lock’ and the ‘ON/OFF’ to ‘LOCK/UNLOCK’