MQTT in OH3, things offline, items do not refresh

Hello, I’m fighting 3rd day with migration from OH2.5 to OH3. As not everything was working properly after just update, I’ve decided to make all from scratch. I am struggling now with MQTT and zigbee integration.
In general, I was following this tutorial.
Shortly what was done:

  1. Installed Mosquito by openhab -config
  2. Installed Zigbee2MQTT and running properly, devices paired
  3. Installed MQTT broker, paired.

When I add generic MQTT thing it stays constantly offline in OH3 despite the fact I have set up everything according to manual mentioned on the beginning.

UID: mqtt:topic:MyMQTTBroker:c392eafebe
label: Generic MQTT Thing
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: offline
  availabilityTopic: zigbee2mqtt/SensorDzieci/availability
  payloadAvailable: online
bridgeUID: mqtt:broker:MyMQTTBroker
location: Dzieci
channels:
  - id: Temperature
    channelTypeUID: mqtt:number
    label: Temperatura
    description: ""
    configuration:
      stateTopic: zigbee2mqtt/SensorDzieci/temperature
      min: 0.02

Also added channel and linked with item is not refreshing.
In Zigbee2mqtt I can see changes properly:

Probably I’ve made some stupid mistake. I was trying to search similar topics on forum but nothing helped. I would be really grateful for help.

Best Regards
Robert

Are you sure that your device is sending these payloads in the first place via zigbee2mqtt? I understand that some devices don’t/won’t have an availability topic…

You are right. They are not sending this in that way, I wasn’t aware that it is needed. MQTT is not well understandable for me, starting to catch up.
So, how can I check status of zigbee device in that way? I remember that in OH2.5 with txt added things, they were showing their status correctly.

Well, if you don’t have an availability topic then you would never had that status shown correctly. Note that the Thing Online/Offline does not mean your device is online/offline - it just means that the openHAB Generic MQTT Thing is correctly connected via the openHAB Broker Thing to your MQTT broker.

1 Like