Openhab as a broker

I am absolutely new to openhab, so I might be on the wrong planet, so please forgive me if I’m asking a stupid question.

Is it possible to configure openhab as a broker, so I can publish information from different sensors and read it from my RPi using the broker?

I have installed openhab on a dedicated RPi, and will be accessing it using Node-Red and the MQTT module. Node-Red is installed on a separate RPi

If this is possible, can someone please tell me where I can find this documented?

Best regards


it’s quite simple; Just add the MQTT Binding (i think it is an “Legacy Binding” and then configure mqtt-eventbus.cfg in the services-Directory to push all Commands and States to MQTT.

With regards,

Thank you so much Johannes.

As I told you I’m not familiar with setting up the system, so I don’t know the syntax of the mqtt-eventbus.cfg. Maybe this is documented in the file - have to check after I have finished the installation.
Would it be better just to install a clean MQTT-server?

Best regards

It is hard to tell exactly what you are asking because I’m not sure you are using the nomenclature correctly.

OH does not implement an MQTT Broker. It is only a client. You will need to install an MQTT broker. Mosquitto is a popular choice.

I’m sure you are right, Rich. It’s my lack of knowledge!

I’ll try to describe what I want to achieve:

I have some DTH22 sensors I need to be able to read, and they are hooked up to ESP8266 Devices. These devices will post information about temperature and humidity using OpenHab MQTT, and I want to have a RPi working as a MQTT broker, so I can pull iformation from it via another RPi using Node-Red and the MQTT Add-On.

If I get you right, the best solution would be just to install MQTT on the dedicated RPi, but then I need to know how to configure it. Looks like this is another cup of tea, and has nothing to do with the OpenHab server.

Please correct me if I’m wrong, thoug I don’t know how to configure MQTT to read information from the Device sending information via OpenHab MQTT,

Sorry about my lack of understanding

Best regards