MQTT not sure about Transformation Values

Hallo,
Hardware: RaspberryPi 4
OS: Openhabian
openHAB version: 3.1.0
Also using Sonoff Zigbee Bridge flashed with Tasmota software.

For no i just want to see the Tempreture in the webbrowser, but it only says “Null” in the browser.
I am not sure if something with the Broker is not working properly or just my translation values not working.

So i set up Mosquitto as Broker and i got it all connected also can see traffic in mqttexplorer.

state topic : tele/tasmota/SENSOR

Value :{“ZbReceived”:{“0xD8AF”:{“Device”:“0xD8AF”,“Temperature”:8.55,“Endpoint”:1,“LinkQuality”:107}}}

The Generic thing i created.

UID: mqtt:topic:MQTTBroker:SonoffBridge
label: Generic MQTT Thing
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: Offline
  availabilityTopic: tele/tasmota/LWT
  payloadAvailable: Online
bridgeUID: mqtt:broker:MQTTBroker
channels:
  - id: TemperaturBuero
    channelTypeUID: mqtt:number
    label: Temperatur Büro
    description: ""
    configuration:
      stateTopic: tele/tasmota/SENSOR
      transformationPattern: JSONPATH:$.Temperature
      unit: °C

I am tottaly new to like creating posts like this, i hope you can understand me. I am lost have been strugling with setting this up for quiet some time now.

The Broker Thing will show online if it’s connecting to the MQTT Broker successfully. That will tell you whether the Broker is the problem.

To determine if your transformation is a problem, create a String Channel without a transformation at all. Link that to an Item and see what you are getting from the device. If that remains NULL maybe you’ve subscribed to the wrong topic or there is something wrong with the device’s ability to publish.

If you do get a message, then you know that the problem is the transformation so focus your debugging there.

Your JSON is nested.
The path to “Temperature” is ZbReceived.0xD8AF.Temperature

2 Likes