New MQTT Connection

Hi all, I have a mqtt conundrum. I have setup a Wemos D1 with a water sensor. Tied it to wifi and mqtt. And have not been able to get it connected into openhab. This is what I have…

These are the mqtt results from mqtt explorer, sorry, dont know how to embed these…

It shows the topic etc.


In openhab I created a generic mqtt thing, and added this as the topic:

That connects just fine.

I then added a channel and this is where I get sideways. I created the channel with the following code:

UID: mqtt:topic:mqttbroker:waterflow_sensor
label: Water Meter
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:mqttbroker
  - id: waterflow
    channelTypeUID: mqtt:number
    label: Farm Water Flow
    description: ""
      stateTopic: tele/waterflow_sensor/water

Created an item with the following name:


That stays null and does not update in the log. Also, I did not add any json transform.

As I mentioned, I had the value coming in at one point but now cannot duplicate it. But I am sure there is an issue with the channel.


Well, you say that with MQTT Explorer your topic is:

But then in your Thing Channel you’ve got your topic as

Which doesn’t match.

1 Like

Welcome to the fun of home automation

I assume nothing are your running TASMOTA?

Press the windows key + shift + s
to use sniping tool then when curser is in text box on forum press ctrl + v

Now to your topic structure

What value is in the purple space is it one space or 10 spaces.

You probably need a transformation pattern depending on what it says in messages

This is an example of a temperature sensor.I have with tasmota

      stateTopic: tele/Bedroom/SENSOR
      transformationPattern: JSONPATH:$.DHT11.Temperature
1 Like

thanks @hafniumzinc you are correct on the tele. This was not tasmota and it uses tele.


worked great.

now i have problem with the unit not recording water coming through it. oh boy…

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