OpenHAB's Future Is Web UI
42sOpenHAB's shift from file-based config to a full web UI sparks strong opinions in the smart home community.
▶ Play Clip"Delivers exactly what the title promises: a genuinely complete, actionable migration guide."
This video is a complete walkthrough of migrating OpenHAB from the old MQTT 1.0 binding to the new MQTT 2.4 binding, including the embedded broker. The presenter removes the legacy configuration, installs the new binding, tests the broker, and connects a real MQTT blinds control device, ending with sitemap integration.
OpenHAB's MQTT binding 2.4 is the first step toward a fully web UI-based configuration, allowing everything to be done from a browser.
SSH into the OpenHAB server, update the Raspberry Pi with apt-get update and upgrade, then remove the Mosquitto broker using 'sudo apt-get remove mosquitto -y'.
In Paper UI, go to Add-ons > Bindings, search for MQTT, and uninstall the 1.0 binding.
Install the MQTT 2.4 binding from Add-ons > Bindings, and the Embedded MQTT Broker from Add-ons > Miscellaneous.
In the Inbox, search for MQTT things. For the embedded broker, click the checkmark next to 'MQTT broker' and add it as a Thing. External brokers can be added manually with IP address.
Under Configuration > Services > MQTT Embedded Broker, keep port 1883 by default, optionally set a username/password, and save. The presenter keeps local connections open.
Use MQTT.fx to create a connection to the OpenHAB server (e.g., 192.168.0.120), subscribe to '#', publish a test message, and verify it appears in the subscription.
Each MQTT device becomes a Thing. Channels represent inputs/outputs, and items are linked to channels. The demo device is an MK Smart blinds control unit with custom PCB.
In Inbox, press 'Add manually', choose 'Generic MQTT Thing', name the device (e.g., MK Blinds Control 1), select the embedded MQTT broker bridge, and save.
Create channels such as Number (dimmer) and Rollershutter. Set the MQTT state and command topics from the device's web config, adjust min/max values, then link items to channels with appropriate names and categories.
If a channel shows offline communication, restart OpenHAB with 'sudo systemctl restart openhab.service'.
Edit /etc/openhab/sitemaps/home.sitemap using 'sudo nano', add the item names (matched from Configuration > Items), add mappings for the roller shutter, and save. Basic UI then shows the controls.
By the end of the video, the new MQTT 2.4 binding is fully set up with an embedded broker, a real device is connected, and controls are available in the OpenHAB UI. This guide is expected to remain applicable to future 2.x versions of OpenHAB.
What is the default port for the OpenHAB embedded MQTT broker?
1883
05:59
What command removes the old Mosquitto broker?
sudo apt-get remove mosquitto -y
02:38
What command restarts OpenHAB?
sudo systemctl restart openhab.service
14:39
What is the difference between a state topic and a command topic in MQTT?
The state topic receives data from the device, and the command topic receives commands sent to the device.
11:12
In OpenHAB MQTT 2.4, what does each MQTT device become?
A Thing, with channels representing inputs/outputs and items linked to those channels.
08:50
Which tool does the presenter use to test the MQTT broker?
MQTT.fx
06:56
What should you do if a newly linked channel shows 'offline communication'?
Restart OpenHAB with 'sudo systemctl restart openhab.service'.
14:39
Which channel type is used for a roller shutter in this tutorial?
Roller shutter channel type.
13:34
MQTT 2.4 is the first step to web UI only
Signals the future direction of OpenHAB: full web UI configuration, with MQTT at the leading edge.
00:29Thing-Channel-Item model
Clearly explains the core relationship between devices, channels, and items, which is essential for all MQTT devices.
08:50State vs command topics
A foundational MQTT concept that users must understand to correctly configure any device.
11:12Restart fixes offline communication
A simple, practical troubleshooting step that resolves a common issue after initial broker setup.
14:39Sitemap integration made easy
Shows how to go from software configuration to visible UI controls by editing the sitemap file.
15:34[00:02] this video we're going to be talking about the MQTT binding version 2.4 for openhab the future of open hat is to go
[00:29] fully web UI base so that way you can do everything from the web browser and the you MQTT binding version 2.4 is the first step to that in this video i'll show you how to remove your old MQTT 1.0 configuration how to get the full mq dt
[00:44] 2.4 configuration running and we're going to connect an NG TT device to that going to connect an NG TT device to that nqt e 2.4 set up the MQTT device we will be connecting today is in the appliance control device from M case my house and
[00:58] this blinds control device is made on a custom PCB and I like to get my PCBs from PCB way PCB way is a company that specializes in PCB prototyping PCB assembly and SMD stencil PCB way is currently celebrating their 5 year
[01:14] anniversary so they are giving way over 5000 plus gifts plus coupons the link to PCB way and all their information on their promotion is in the description the screen you can get five dollars off your order
[01:28] and I think PCB way for sponsoring this video now let's get into the guide so we're going to be following the guide that is on em case marcom the link is in the description to the guide right now I have it in a Google Doc but it'll be on
[01:41] the website and I recommend having it open as you go through so that way you can just copy and paste commands as needed so at this point if you have MQTT 1.0 it installed then continue watching and if you do not have MQTT at all on
[01:54] your open app server then skip to this timestamp on the screen so the first thing that we're gonna do is ssh into our open app server to remove the broker that's already been there when for the 1.0 binding because we don't have the
[02:09] embedded broker so just ssh into your open app server if you're on Mac use terminal and on Windows use putty alright once you are
[02:22] SSH we're going to first make sure that our Raspberry Pi is up-to-date so just our Raspberry Pi is up-to-date so just do SSH apt-get update and upgrade type in your admin password alright mine looks like it is up to date now we're
[02:38] looks like it is up to date now we're going to remove the mosquito broker so just type in to app get - apt-get remove mosquito and it's gonna say and you want to type in - y and press Enter because you do want to continue all
[02:56] because you do want to continue all right the mosquito broker is removed so we are done with we are done with terminal for now or SSH now we're going to go into our web administration portal
[03:10] for openhab so you want to go to the IP address of your open app server colon 8080 bring you to the star page now go to paper UI now we're gonna go into
[03:23] add-ons then we're gonna go into bindings and we're going to search n QT bindings and we're going to search n QT T and simply press uninstall and next to T and simply press uninstall and next to the 1.0 sometimes if you press refresh
[03:37] and type in be binding again it'll show you that it has been indeed removed all right now to install the new MQTT binding you want to first go into
[03:49] add-ons then you want to go into bindings and type in MQTT and press bindings and type in MQTT and press install next to the 2.4 and QT t binding
[04:01] and then you will also want to go into miscellaneous M is C type in mqtt here miscellaneous M is C type in mqtt here and then you want to press install next
[04:13] and then you want to press install next to the embedded MQTT broker all right now if we press refresh and then search for it again
[04:27] then search for it again I'm qtt it is ready and it says it's installed now let's make sure the MQTT one installed the mqtt binding installed
[04:44] installed those are the only things we need to install all right so next we are in inbox you want to press search for things mqtt binding and then if you have if you want to use the embedded broker then press the checkmark connect to the
[04:59] MQTT broker but if you have an external MQTT broker then you want to press add MQTT broker then you want to press add manually MQTT broker and then here you would type in the IP address of your external MQTT of a server and then there
[05:14] are also more things that you configure if you press show more and if you have a custom MQTT server you would know but we're going to be using the built-in MQTT embedded broker so we're just going to go back to inbox and press the
[05:30] to go back to inbox and press the checkmark next to MQTT broker and just leave it as is and press add as thing so now let's go ahead and look a little bit deeper into the MQTT broker so we're gonna go into configuration services and
[05:45] gonna go into configuration services and MQTT embedded broker and click configure so these are all need different things that you can possibly configure for the embedded broker if you want you can choose a different port the default one
[05:59] is 1883 which is what I like to keep at and you can also choose if you want the secure connection but most devices don't really use that so I wouldn't change that and then here you can choose a username and a password so if you want
[06:16] to make all of your connections to the mqtt broker password-protected and username and secured then you can provide a username and password that devices that connect to this MPC broker need to provide but me personally I
[06:32] don't need the connections because all my local Wi-Fi anyway and if we press expert mode you can just see it differently but I like to keep it at
[06:44] settings are just press save so the mqtt server is now fully configured and ready on our openhab servers so let's go ahead and test it
[06:56] out and make sure it all works I like to use a program called MQTT dot effects I'll leave a link to it on the guide on my website so we're going to create a new connection to our openhab server so press the gear in the top and then we're
[07:12] going to press the plus button in the bottom left we're going to call this bottom left we're going to call this open have embedded broker and then the
[07:25] address this is the same address for your open app server so mine is your open app server so mine is 192.168.0.1 20 the port if you changed it then change it here and then user credentials I didn't do any and you can
[07:41] leave everything else and then just press apply and then press cancel and press apply and then press cancel and now press connect boom and if you see the little green circle right here that means your embedded broker on your open
[07:54] app server is ready and good to go and can accept connections let's go ahead and send a couple messages back and forth so in the SUBSCRIBE type in V pound symbol or hashtag depending on what generation you're from and press
[08:08] subscribe now in the publish you can type in whatever topic you want I'm type in whatever topic you want I'm sorry hi then I'm gonna say hello world sorry hi then I'm gonna say hello world and press publish now if we go to the
[08:21] SUBSCRIBE topic we should see it and there we do so there we go we there we do so there we go we successfully received a message and sent a message using MQTT now that we confirmed MQTT works on our open app
[08:35] server let's connect an MQTT device to it the device will be connecting is the blinds control device from MK smart comm link be able to control blinds now an MK smart slack ops I shop we also
[08:50] have a variety of different and QT devices that you can connect to open em the way this all works is for each mqtt device you create a thing for and for each thing there are channels which are different inputs and outputs of mqtt
[09:04] different inputs and outputs of mqtt device then each channel has an item so you can control or read the channel so if that didn't make sense you let me show you how that works with this blinds control device and in the future I'll
[09:16] make remake all the MK smarts account /op devices different tutorial videos for them but the concept is the same so we're gonna go back to our openhab web
[09:29] configuration portal and we're gonna go to inbox then we're gonna press search to inbox then we're gonna press search for things MQTT binding and then we're gonna press add manually and now we're gonna press generic mqtt thing and then
[09:46] you want to give the device a name so I'm gonna call this MK lines control one and you don't need to fill out the thing ID or location then you want to select a
[09:58] bridge you want to select your embedded MQTT broker and then press the check mark so we just created a thing so this blinds control device is a thing now we
[10:11] items so we're going to go into configuration then things and then we want to edit the MK blinds control one thing so press the little pencil okay so now we're going to create the channels for the MK blinds control device we're
[10:27] going to be the number type because it's going to be a dimmer and then we're also type because it's gonna be a roller shutter so let's get to it you're gonna press the plus button next to channel so first we're gonna do the number value
[10:41] and then we're going to give it a channel ID so I'm going to call it MK channel ID so I'm going to call it MK blinds control 1 and then we're going to do underscore dimmer and then we're gonna label it MK blinds dimmer so the
[10:59] so you can keep track of the channels and label is the label that's attached to it and what you can see so now we're going to do the you can see so now we're going to do the MQTT State topic and command topic so
[11:12] the state topic is what you receive from the device and the command topic is what I should mention I've already set up the device meaning that I went through the configuration using my phone and Wi-Fi so I connected my phone to its Wi-Fi
[11:27] network and it connected it to my main home Wi-Fi network and I also pointed as set its MQTT a server IP address to this server that were configuring now I topic so basically I did what's in my m'kay blinds patrol version to firmware
[11:42] videos so if you want to know how to do that watch that video but let's go ahead that watch that video but let's go ahead and hop over to its hostname so I created the hostname of test dot local this is what I set it to hostname to
[11:56] this is what I set it to hostname to we're going to go HTTP colon slash slash test dot local it'll normally ask you for user and password but I already authenticated it before so here we go we have the command
[12:11] before so here we go we have the command topic so we're gonna copy this put it here and we're going to grab the stay topic and put it here and then we're also going to set the absolute minimum to 0 and maximum to a hundred and that's
[12:27] it so now we're just gonna press save so the absolute minimum is the value range that can be sent to the device all right and press save and now that we have a channel let's link an item to this channel so that we way we can control it
[12:43] press the little circle right here item to link we're going to create a new item so I'm going to change the name to underscore dimmer so this is the name of label so this is what's going to show up in the UIs and then we're going to
[13:00] create the category we're gonna write dimmer and as the type number and the dimension and the rest we don't need to worry about now press the link and is created all right now we're gonna create another channel so this is going
[13:17] actually let me show you guys all the different channel types that you have so you can have a text value system will be like a string value a number value a percentage value you're gonna have an on/off switch so that's on or off you
[13:34] have an open closed color value and a color value HSB date and time image location and roller shutter which is what we're going to be doing we're gonna give it a channel ID give it a label then grab the state topic from here
[13:50] again from our device configuration portal and press save and now again we're gonna be linking this channel to an item so we can control it name it like that so we're gonna give it this name what I like to do is have the
[14:07] name of the thing and then the name of the channel slash item because the channel and item are basically the same thing so we're going to give it this label and category we're gonna give it roller shutter and the rest you need to
[14:22] worry about and press link so it's giving me this offline communication I'm guessing it's because it's the first time the broker has been set up so I'm just gonna give go back to my SSH window and give open have a quick reboot and
[14:39] those of you that don't know to restart openhab you juice sudo systemctl restart openhab you juice sudo systemctl restart open em to da service and press enter
[14:51] and it'll restart open up all right guess that solved it so if you get that error just simply restart openhab I'm gonna put that command for you guys in the docs that way on the guide if you guys run into that error - you just
[15:06] reached our open app but anyway now if we go into control and there we go we we go into control and there we go we can see the controls for this device so there we go it moved press the UP button it also
[15:22] moved and we can also set the number to we wanted to press the little checkmark and it moves to 50 but how do we add
[15:34] and it moves to 50 but how do we add these items into our sitemap file so we're gonna go ahead and open up our ssh window go to sudo nano slash etc' slash
[15:46] window go to sudo nano slash etc' slash openhab - slash sitemaps slash home dot sitemap enter and it loads up our segment so I have created these two items right here one of them is for the roller shutter and one of them is for
[16:02] the dimmer so I'm going to go back into the SSH window I'm gonna just go ahead and plop it into the demo frame and there we go so this is the I just took
[16:14] these two items names from if you go to configuration and items as you can see I just matched up the nine names so I took the dimmer is right here and the roller
[16:26] shutter is right here and then I also added some mappings to the roller added some mappings to the roller shutter all right now press ctrl X Y and shutter all right now press ctrl X Y and enter now if I go into my basic UI I
[16:40] have my items so I compress it as you can see it moved over there and I have the two items here all right that is it for this complete guide to openhab MQTT 2.4 this guide is probably gonna be the same for if open app changes it's a 2.5
[16:57] or anything else with a 2 in front of it so if you have any questions or need help join my discord server I believe it's MK smart calm slash discord or it'll be at the link in the description in the description you'll
[17:11] find links to all the parts and devices used in the video as well as a link to MK smart slack home slash shop where I have a wide range of smart home kits one all right if you found this video helpful click that like button and if
[17:24] the channel so hit that subscribe button if you have any questions in the comment section below or join the community over at MK smart sicom slash forum goodbye [Music] Oh
⚡ Saved you 0h 17m reading this? Transcribe any YouTube video for free — no signup needed.