OH4 Generic MQTT Thing need help

  • Platform information:
    • Hardware: Raspberry Pi 4 4M RAM
    • OS: Openhabian
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version:
  • Issue of the topic:
    I’m trying to connect through MQTT a generic device in my basement, it sends the temperature and humidity, I’m migrating manually from OH2 so I know it works because I’m still using in parallel on another Pi OH2
    Right now I made 2 items, humidity and temperature, I’ve connected it to the Generic thing channels, it is online but the field on the right always says “NULL” I’ve tried subscribing to the post (guitar/humidity) with MQTT fx with my Mac and I see the message coming trough.
    Persistence on items are set to default.
    Anything I have to change to my items so I can see the values?
    I don’t really see anything on the log as it ain’t a problem, I was able to connect my HUE bridge and HUE Lights so I’m not way out on connection but could need help regarding MQTT.

Without seeing your channel definition and the message coming from your device, we ain’t be able to help.

Post your code tab contents from the generic mqtt thing.

Here it is:
UID: mqtt:topic:MQTTBroker:Guitar_Sensor
label: Guitar Sensor
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:MQTTBroker
location: Studio
channels:

  • id: Guitar_Temperature
    channelTypeUID: mqtt:number
    label: Guitar Temperature
    description: “”
    configuration:
    retained: true
    min: 0
    stateTopic: guitar/temperature
    max: 100
  • id: Guitar_Humidity
    channelTypeUID: mqtt:number
    label: Guitar Humidity
    description: “”
    configuration:
    retained: true
    min: 0
    stateTopic: guitar/humidity
    max: 100

What does the message payload coming in look like?
That was asked for previously.

1 Like

So right now I’m subscribing to “guitar/humidity” with MQTT fx and the message I received is:
44.50

But what doe it look like?
The whole topic and pay load.
Something like this for example":

stat/brilliantcolour1/RESULT {"POWER":"ON","Dimmer":5,"Color":"040D0000","HSBColor":"100,99,5","White":0,"Channel":[2,5,0,0]}

OK I think I know where the problem is.
As I’m running 2 OH in parallel, (old system OH2.5 and new OH4) I have 2 Mosquito server running but on different IP address… I will have to flash my humidity/temperature ESP8266 to talk to the new or I’ll force my new OH4 to the same IP address of the old system (by powering down my old OH2.5).

you can use more than one broker.

just add another broker to talk to old mqtt server