OH3+MQTTBroker+CC2531 problem

Raspberry pi 3
Openhab latest sdcard image

I have been trying to get openhabian to work for three days now.
Openhabian3 works, the UI works etc. No problems there.
Mqtt broker is installed on oh3 and broker/hostname is localhost
I have installed zigbee2mqtt.service and its running and found a smart plug.
I have installed mosquitto.service and its also running.
And now the problem. Zigbee usb stick detects new devices but they wont show up in the
OH3 inbox.

Also, i noticed that if i restart “mosquitto.service” in terminal, OH3 log shows that MQTT Broker goes Online → Offline → Online

What to do? Im almost at the point that i will stop trying and cry myself to sleep.
Please, help me.
I’m very new to linux/rasp, but im good at reading instructions. Did everything like the instructions says.

Thanks.

What have you setup to make this work automatically? By default, using zigbee2mqtt means you have to manually add your devices into openHAB.

Here’s how I setup a ZigBee bulb into openHAB 3 via zigbee2mqtt:

And here is a switch into openHAB 2 via zigbee2mqtt:

Zigbee2mqtt now also has a web interface so setup of zigbee2mqtt is even easier than shown in those tutorials, but they should get you the basics.

I highly recommend installing MQTT Explorer and connect it to your MQTT Broker so that you can see all the messages that are published.

I would like this to work automatically. But like i said, im very new to this. And linux.
Im starting to think that my zigbee stick has wrong firmware or something.

Why?

You said that you’d successfully paired your device with your stick already - sounds like it works to me!

If you want to continue with zigbee2mqtt, and want automatic discovery in openHAB, you need to make sure:

  • You have a working MQTT Broker (like Mosquitto, outside of openHAB).
  • You have successfully configured an MQTT Bridge Thing in openHAB to connect to the MQTT Broker.
  • Modify your zigbee2mqtt configuration to turn on the homeassistant feature.

But even then, limitations in openHAB’s implementation of the homeassistant protocol may mean you don’t get all the features you expect.

OH YES! Thank you!!! Now it works!
Awesome!

You said “if you want to continue with zigbee2mqtt”, is there better option?

The other option (not necessarily better - that’s down to personal circumstances) is using the native ZigBee binding for openHAB. But you must read the documentation carefully, and take note of the setup instructions for your specific controller. The binding follows a strict implementation of the ZigBee protocol, and is heavily tested on Ember chipset controllers, which your CC2531 does not use. However, read the documentation and decide for yourself - there’s a section on the CC2531, and I’m certain others are using it with that controller.

I use a CC2531 and zigbee2mqtt, which for me gives me ultimate flexibility by ensuring that I’m not tied to openHAB for controlling my ZigBee devices.

Ok thank you. More questions. I cant link anything in openhab because i dont have profiles for things.
Been investigating this for a while now and i just cant figure it out.

Not sure what that means?
The hierarchy -

  • Things (roughly representing real world devices)
  • Channels (individual data elements of devices e.g. temperature, humidity, on/off)
  • link (with optional profile modifier)
  • Items (openHABs internal idealized representation of the data e.g. Number, Switch)

If profiles are involved at all, they attach to the link to modify the channel<->Item interchange.