Dietmar_42
(Dietmar Czekay)
April 22, 2023, 7:31pm
1
Platform information: raspberry Pi 4
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
Ap15e
(BK)
April 22, 2023, 7:47pm
2
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
Dietmar_42
(Dietmar Czekay)
April 22, 2023, 9:28pm
3
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
Dietmar_42
(Dietmar Czekay)
April 23, 2023, 6:41am
4
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?
Dietmar_42
(Dietmar Czekay)
April 23, 2023, 10:47am
6
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.
Dietmar_42
(Dietmar Czekay)
April 24, 2023, 12:32pm
7
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’
Hello openHAB community.
Recently I made the mistake of updating my working openHAB setup to the latest version, and then nothing worked. Instead of trying to figure out what went wrong, I decided to start again from scratch, documenting each step to make it easier the next time or for the next person.
Before deciding to use openHAB for my home automation setup, I was not familiar with Linux, Java, MQTT, and many other pre-requisites. For noobs like me, the site Linux Journey is definitely a g…