Read and show data from MQTT Server not on localhost

I have running openHAB on raspberry3 with 2 ESP8266 NodeMCUs they send data to my MQTT and data is show in openhab “Great and it works”!
I use this lines in items:

Number TestTemperature "Temperatur Schuppen [%.1f C]" <temperature> (GF_Living) {mqtt="<[broker:home/temperaturewz:state:default]"} Number TestTemperature2 "Temperatur Dachgeschoss [%.1f C]" <temperature> (GF_Living) {mqtt="<[broker:home/temperatureoben:state:default]"}

Now i have installed weewx mqtt extension on my weather raspberry2, i can subscribe to the topic from my raspberry3 with:
mosquitto_sub -h -v -t '/home/#'

that gives me an output every 5 minutes:
/home/weather/barometer_inHg 29.7709589813 /home/weather/outHumidity 81.0 /home/weather/windGust_mph 2.2369362912 /home/weather/interval_minute 5.0 /home/weather/dewpoint_F 41.5937551087 /home/weather/rain_in 0.0 /home/weather/ptr 30528.0 /home/weather/dayRain_in 0.20078740137 /home/weather/heatindex_F 47.12 /home/weather/outTempBatteryStatus 0.0 /home/weather/altimeter_inHg 29.761940599 /home/weather/delay 5.0 /home/weather/windrun_mile 35.8618169751 /home/weather/inDewpoint 54.0255021751 /home/weather/outTemp_F 47.12

i have definied this mqtt broker in openhab.config with:

mqtt:broker.url=tcp://localhost:1883 mqtt:weatherbroker.url=tcp://

and both to:
mqtt:broker.retain=true mqtt:weatherbroker.retain=true

now i want the data showing in my items, i use in items for outTemp_F:
Number TestTemperature3 "Temperatur WetterStation [%.1f C]" <temperature> (GF_living){mqtt="<[brokerweather:home/weather/out_Temp_F:state:default]"}

my default sitemap is also correct:
/opt/openhab/configurations/sitemaps/default.sitemap 180/180 100% sitemap default label="Haus" { Frame label="Temperaturen" { Text item=TestTemperature Text item=TestTemperature2 Text item=TestTemperature3 } }

The Data from weatherbroker is not showing :frowning:
My question is how to include my weaterstation data to openHAB.
Is this a beginner question? :slight_smile:

In your openhab.cfg you have “weatherbroker” but your Items refer to “brokerweather”. They must match.

I have corrected this issue, but still no data showing up.
More ideas?

Make sure the topic the data is sent to are identical to those you have in your Items. For example, I notice in your working Items the topics start with “home/” whereas your not working Items start with “/home/”. That leading slash is important and the current MQTT best practice is to not use a leading slash.

I don’t know if mosquitto_sub is more flexible in this regards than OH is.

Another problem could be that there might be leading or trailing spaces in the values being published. If that is the case OH will be unable to convert the received value to a Number.

Beyond that I’m not help.

OK i am not use a / before, but was correct. i use now:

Number TestTemperature3 "Temperatur WetterStation [%.1f C]" <temperature> (GF_living){mqtt="<[brokerweather:home/weather/out_Temp_F:state:default]"}

But i still get not the value from
home/weather/outTemp_F 47.12
I checked all twice, another one have weewx running and have data like me?
I mean, i am sure that i only need to read the right position?!

my output is exactly:
home/weather/outTemp_F 44.06

maybe a issue here: :state:default]"}`?


in your configuration you state “home/weather/out_Temp_F” as a topic, but the output you want is from another topic “home/weather/outTemp_F” (notice the underscore).

Super! I ll check this tonight.
This must be the problem.

It works now Super! Thank you all!:slight_smile: