First time setup of MQTT [solved]

Just install mqtt1 again and everything is back :slight_smile:
And yes OH2 is a different product compared to OH1. It required more steps if you do it by text. The idea is that you just don’t to it by textual configuration anymore. HomeAssistant is not easier in this regard, they have “components” and “entities” which is like our Things and (auto linked) Items.

Hi David,
thanks for your suggestion but what do you mean for mqtt1? I mean that I do not choose the version when I install mqtt by the config tool. As you understand, I’m a beginner.

I expected you are a long time user, because you mentioned OH1.8 (which is quite dusty). Since OH2.4 there is a new MQTT binding. If you have used mqtt before, you were using mqtt1. That required a config file, the new approach don’t. mqtt1 was automatically uninstalled with OH2.4.

Please also understand that this forum is about openHAB itself mostly. It is expected that you read up on MQTT yourself and to understand what a broker does, what an mqtt topic is and so on.

Hello, I’m not a GUI-open-minded guy, and I like text based configuration. Once you understand the scripts, it is easier and faster to edit than click, click & more clicks. So my question is: in future OH versions do we still have the text configuration option?

I recommend reading Directions for openHAB 3. And I mean the entire 80 min read time thread. Everything, every argument is covered in there.

1 Like

Hello David,
I am following your tutorial. I have installed the MQTT embedded Broker and then the MQTT binding. As you could see attached I have MQTT broker online but when I create a channel it appears under systemBroker. Is that normal?


You did everything correct so far, except the last step with adding channels. The broker thing is really only to configure the broker (and for trigger channels, but that might confuse you atm). You will need to add a “Generic MQTT Thing” and add channels there.

Cheers, David

Thanks for your quick reply. I want to use MQTT between openhab and my “the Home Remote” ( UI design so that I could extend features on both side.

As a first step to better understand how mqtt works I am trying to create a virtual mqtt “switch” and a virtual mqtt “lamp” in openHab. I thought that the MQTT Binding was meant for that?

If not should I just create by hand these two MQTT in a .thing file or is there a way to create them in Paper UI?

That’s an interesting project of yours.

Regarding MQTT: It’s for the other way round actually. You have mqtt topics on your broker and the binding allows you bind those topics to Things->Channels->Items.

If you are looking for exporting Things and Channels to MQTT: That’s what an IO Service is for in openHAB. Unfortunately I haven’t written that part. I revamped the Hue Emulation IO service instead recentenly.

Is there a step by step tutorial of Video you could refer me to to understand better how to use MQTT in openhab?

I don’t use .thing and .item files. I think it’s a pest tbh and there are long community arguments topics and posts about technical aspects, the syntax and all that jazz and a little civil war even that I accidentally started here when I proposed to remove those files completely.

That’s why I can’t help you in this regard, and it is dead simple with Paper UI, I guess you do not need any help on that. And if so, my blog post (openHAB Blog Website) about that topic might help :slight_smile:

1 Like

i’ve made a video tutorial how to install and setup new OpenHAB MQTT binding, maybe it’ll help you, russian language video, but i hope you understand without words))


Hi David,

I followed the tutorial on installing the Embedded broker… I got the MQTT Broker in my Inbox and added it, but nothing can connect to it. When I look at the ‘thing’ i see ‘Offline - Configuration Error’ . I didn’t change anything (as far as i’m aware!) i just added the thing from my inbox.

I’m running OH on Synology NAS. Any suggestions on what i’m doing wrong? Thank you!!

The embedded broker is no longer supported and this topic is a bit old.

I would recommend you uninstall the embedded broker, remove the thing and install mosquitto broker and mqtt binding in PaperUI under binding section.

OK. I’m a bit confused…

I’ve removed the thing.

Under Add-ons>Misc I see “MQTT Broker Moquette” installed. (This was the one i always had installed, sorry, thought that was the embedded broker?).

Under Config>Services>MQTT I see " MQTT Embedded Broker (org.eclipse.smarthome.mqttembeddedbroker)" and only the option to ‘Configure’, nothing to remove this? Do i need to remove that as well?


Yes that is the embedded broker.

After you remove the binding this should disappear automagically.

BTW how did you install OH and what are you running it on?

I’m running on Synology NAS, I just installed via the Synology GUI and click to install the app. This is the issue for me, not sure how to install another MQTT broker on my NAS.

I’ve never used Synology so excuse any dumb questions.
Do you have a command line? If so does sudo openhabian-config open the confg tool?