OpenHAB first config with mqtt

So my tasmota reset itself for some reason and lost my settings?? So I started over.
I shut of autodiscovery,
now unless I am truly lost MQTT is not so complicated

Now correct me if Im wrong: my OpenHAB available topic would be “tele/ESPDHT11/SENSOR”
and JSONPATH would be DHT11.Temperature, so “JSONPATH:$.DHT11.Temperature”
Question: with MQTT I should normally be able to subscribe to topic “Temperature” and get that value, no JSON parsing necessary. What am I missing?

What makes you think this? This is not true for Tasmota defaults, at least - that will always publish a JSON payload.

Looks correct based on the MQTT Explorer screenshot. Make sure to put the topic into the MQTT State Topic field of the MQTT Channel, and the JSONPATH stuff into Incoming Value Transformations (click the Advanced checkbox to show this field).

Make sure to have the JSONPATH Transformation Service installed - it’s not by default.

1 Like

I do have JSONPATH transformations installed, as well as Jinga Transformations.
under things/configuration, i change nothing.
under things.channel.configuration: i place @MQTTstatetopic the topic ‘/tele/ESPDHT11/SENSOR’
under JSONPATH transformation i place: JSONPATH:$.DHT11.Temperature

EDIT:
…and it WORKS!
Among other problems, that last hiccup, as written above, I had an extra “/” at the beginning of my topic string that had gone unnoticed :roll_eyes:

THANKS for the help and patience :slight_smile:

It is also necessary to place the same JSONpath under JSONPath expression in the item link? OpenHAB would not allow the link without it, I assume that is the correct config as everything works.

Are you talking now about a ‘profile’ applied to your channel-to-Item link? (We can’t see what you are looking at)
No, you should not be needing JSONPATH there.

yes. under things:channel:link to item, profile. I should leave it as “default” and not “JSONPATH” What would profile “JSONPATH” we used for then? Time to read the Docs! :wink:
I only selected it without looking/understanding what is was; JSONPATH I only assumed was what I was going for, but I guess that would be redundant.