How to show mqtt topic values?


I am trying to migrate my MQTT 2.1 Item to 2.4 with a great frustration. (Yes, i read the tutorial in Migrating MQTT1 items to MQTT2.4 items and the doc without succes).

My platform: Hardware: Raspberry Pi 3B+; OS: raspbian stretch (openhabianpi); openHAB version: 2.4

Im paperUI i configured the mqtt-binding and some channels to read the temperature from ESPeasy sensors. This work without problems, as see from events.log:

2019-04-10 08:59:33.064 [vent.ChannelTriggeredEvent] - mqtt:broker:3eb37756:Accu_temp_top triggered 35.81

2019-04-10 08:59:34.112 [vent.ChannelTriggeredEvent] - mqtt:broker:3eb37756:Accu_temp_down triggered 29.31

2019-04-10 08:59:55.039 [vent.ChannelTriggeredEvent] - mqtt:broker:3eb37756:Cellar_temp triggered 13.13

The ‘default.sitemap’

sitemap default label="Main Menu"
 Frame label="Boiler" {
 Text item=Accu_temp_top label="Temperature Top [%.1f °C]"
 Text item=Accu_temp_down label="Temperature Down [%.1f °C]"
Frame label="Cellar" {
 Text item=Cellar_temp label="Temperature Cellar [%.1f °C]"

and the default.items:

Group All

Number Accu_temp_top {channel="mqtt:broker:3eb37756:Accu_temp_top"}
Number Accu_temp_down {channel="mqtt:broker:3eb37756:Accu_temp_down"}
Number Cellar_temp {channel="mqtt:broker:3eb37756:Cellar_temp"}

But in ‘http://openhabianpi3:8080/basicui/app’ I don’t see any temperature values. What i missing?

BTW, im paperui control tab i don’t see the right values, only channels with NaN as value. I can’t attach the screen shot.

Any help is appreciated.

Hi Can we have your MQTT Things info also.
I am also busy with the is tedious but going.
I use ESPeasy and Tasmota. so can help on some of the problems.

@allen thanks for your answer. If you mean the file default.things i don’t have such file. I configured the channel in the paperui interface

have you looked with mqtt Exlorer if you do get the msg. from the espeasy (node)

Not, but in the htttp://openhabianpi3:9001 I see the right values from ESPeasy sensor, for example: ‘mqtt:broker:3eb37756:Accu_temp_down triggered 29.31’ This means, i think, the true values comes from espeasy, every minute.

ok so the coms is working. on the site map you get Nan ?
My setup I did everything with files . have everything setup in the items and things files.
not on UI. I am just loving in to my home system . not close to it currently. will see what I see on my system.

You configured the needed channels on the broker thing. This one does ONLY connect openhab to the mqtt broker, no channels needed here.
Create a generic MQTT thing with those channels.

Your configuration based on files is the right way, imho.

That is what i see on the site map:

And that is on the control tab:

this could be the way to go.
I did mine via the files as I am use to doing it that way. and with vs code it is a lot easier to fault find.

I tried this way, with the Generic MQTT Thing, but then i got communication error:

The configuration of generic MQTT thing is simple:

@allen do you can share the configuration files to evaluate this way?

with pleasure .

my Test rig .


Group    test                   "test"                                 <bath>                           (Home)

Number TestTemp                   "Temperature [%.1fC]"                                                 (test)                                {channel="mqtt:topic:mosquitto:test:test_temp"}
Number Ping                        "Ping [%.2fms]"                                                      (test)
Number Download                    "Download [%.2f Mbit/s]"                                             (test)
Number Upload                       "Upload [%.2f Mbit/s]"                                              (test)

my Mqtt.things

Bridge mqtt:broker:mosquitto "MQTT Broker"              [ host="", port=1883, clientid="openhab", secure=false]
Thing topic mything "test"{
     Type number : test_temp                  "Test_Temp"                        [ stateTopic="test/Test-Temp/Temp" ]


Revers to a group called text.

I will upload images tonight of my readings

Thanks @allen, i will try this way tonight.

I’d try a restart of openHAB with that (could be the known problem of MQTT2.4).

Great! Some openHAB restarts and added new things to generic MQTT things and i can see the temperature values on the control tab

But the http://openhabianpi3:8080/basicui/app is not working yet.

I will try to configure the files as @allen suggested.

If the things and items are working, I would leave it. The BasicUI problems might only be related to the sitemap file. Look there first!
Are you using VSCode as an editor for those files? Syntax problems would be highlighted there.