Internal MQTT broker - how to set-up and use?

There’s a new internal MQTT broker add-on available under “Misc”, but I couldn’t find any documentation.
Are there any directions on how to set-up and use this?

Would be great to use an openHAB-internal broker!

Take a look at the source code :slight_smile:

Well, that’s not easy to find…

1 Like

Hmm ok. That much was kind of self-explanatory.

I did not really find a way to actually “Start” the broker. Or does it auto-start?

I could not connect to it using mqtt.fx on windows (connects fine to mosquitto). I did use different ports and restarted my RasPi but no luck.

Hi David,

It seems it auto starts, I have seen in the log

Can't find the session for client <TEST_NODE>

TEST_NODE is the client ID of my Node-Red
I’m not sure how to get an item to subscribe to the topic though, I have had a quick browse through the source code and can’t find where the items are detailed. It seems like we can also subscribe to another MQTT service using “MQTT system broker connection” but I can’t find any details on that one either.

Cheers

I would like to configure internal MQTT-broker file based. I think the file should be stored in services directory? Is there somewhere a hint about the properties and file name? I haven’t found something. Only something to refer to existing external broker.

1 Like

I would like to know this, too.

Starting the internal broker is only possible through PaperUI:

Go To Configuration -> Services -> MQTT Embedded Broker -> there you can configure it.

Then you can make a thing to connect to the internal broker, described here:

And then you use the MQTT Generic binding to connect to your other devices (which are connected to the embedded broker):

1 Like