I have been wanting to upgrade to OH3 for some time and tried to upgrade to this version.
I’ve used OH2 so far and haven’t had many problems.
This time, because I decided to additionally run zigbee communication on Sonoff bridge with the Tasmot version,
I was able to run everything correctly in the Tasmot range, I can see the sensors, I can see MQTT communication but OH does not read the sensor data in any way.
On Tasmota, I have the topic / tasmota2mqtt / Salon / SENSOR and the following data:
{“ZbReceived”: {“Salon”: {“Device”: “0x3740”, “Name”: “Salon”, “Humidity”: 61.03, “Endpoint”: 1, “LinkQuality”: 97}}}
I created things with this code:

UID: mqtt:topic:615f38407a:9cf1f8f55e
label: Salon Temperatura
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:615f38407a
location: Salon

  • id: SalonTemp
    channelTypeUID: mqtt:number
    label: Temperatura w salonie
    description: “”
    stateTopic: /tasmota2mqtt/Salon/SENSOR
    unit: “‘°C’”
  • id: SalonWilgotnosc
    channelTypeUID: mqtt:number
    label: Wilgotność w salonie
    description: “”
    stateTopic: /tasmota2mqtt/Salon/SENSOR
    unit: “%”
  • id: update
    channelTypeUID: mqtt:datetime
    label: lastUpdate
    description: “”
    stateTopic: /tasmota2mqtt/STATE

and JSON transformation:
Unfortunately, I can’t read anything, in addition, I can’t find the logs in OH3? Is there no web log version here?

Leading slash is unusual.

JSONPATH is an installable add-on

First priority here though. You’ll stumble from one problem to another with no log access.

the slash may be unusual but it shouldn’t cause problems, I have other devices with themes (not zibgee) and here it works
I have the JSONPATH add-on installed but for some reason it doesn’t transform my data
There was a nice version of the logs on the website in OH2, now there’s only a file or data in the console?

No, there wasn’t. Did you use openhabian perhaps, or otherwise install a log viewer add-on? Fronttail is popular for this use.

Maybe it’s not getting any data to transform. No mention of transformation in your channels config, are you trying to use a profile instead?
Note that you cannot pass a JSON message to a profile through a number or datetime type channels, they’ll only pass numbers or datetimes.
If you must pass the whole message to a profile, you’ll need a string channel.

I ran my sara installation with MQTT1.x binding and this configuration:
Number TempSalon "Salon [%.2f °C]"<video>(Temperatura, TempParter, Salon) {mqtt="<[home:/tasmota2mqtt/Salon/SENSOR:state:JSONPATH($.ZbReceived.Salon.Temperature)]"}

And it works.
I don’t know why it doesn’t work in OH3

I found a solution
Transformations should be done in Things, not in Item

…to be precise, it should be done in CHANNELS, not in items

Yes, in Chanels


  • id: SalonTemp
    channelTypeUID: mqtt:number
    label: Temperatura Salon
    description: “”
    stateTopic: /tasmota2mqtt/Salon/SENSOR
    transformationPattern: JSONPATH:$.ZbReceived.Salon.Temperature
    unit: °C’

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.