Home About us Support Partners SIGN UP NOW
Text Copied
 Home    Blog    MQTTRoute Integration with OpenHAB

MQTTRoute integration with openHAB

openhab integration

Home automation has gained a lot of popularity nowadays as it enables people to live a smart life. With MQTT broker integrated into the home automation platform you can easily develop your own home automation system. OpenHAB is one such open source platform you can use to automate your home devices. Here is a step by step tutorial on how to integrate MQTT broker with the OpenHab.

MQTT broker integration with openHAB

OpenHAB : Installation

OpenHAB can be run on different versions of macOS and Windows and many different variants of Linux (Ubuntu, Raspbian, etc.).

Prerequisites : You need to get any of the JAVA platform installed mentioned below


  • Azul Zulu (https://www.azul.com/downloads/?package=jdk)
  • Oracle Java
  • AdoptOpenJDK (https://adoptopenjdk.net/)

Now download & install Java 11


Check your current java version by opening a command line

java -version

Then Set up variants by Downloading and extracting a platform-independent zip archive: macOS, Windows, Linux.


Now install the downloaded packages from this openhab installation page.

Installation in Raspberry pi

  • For installing OpenHAB on Raspberry Pi, first, download the appropriate OpenHabian Disk Image for your Raspberry Pi using the following link.
  • https://github.com/openhab/openhabian/releases?after=patchday-20200715
  • Here I have chosen Raspberry pi 3.
  • Go to Etcher page and install Etcher on your computer.
  • Once installation is done, open Etcher and select the openhabian disk image you have downloaded in the first step.
  • Choose the right SD card and click Flash. Before this, have your SD card formatted.
  • Insert the SD card on your pi & connect an Ethernet cable & power it up. To configure wi-fi, please check this post.
  • Once done, navigate either to the http://localhost:8080 or https://localhost:8443
  • It is better to use https://localhost:8443, as MQTT broker UI also opens in the default port 8080.

OpenHAB : Configuration

Signing up with a new account is the first & foremost step.


Follow the steps mentioned by Open HAB. You can either finish up with the configurations or can be done it later.


Once you finish your set up. Let us move on to Add-ons which is present under the settings tab.


  • Click Bindings under Add-ons
  • Select MQTT-binding in the given list.

Your MQTT-binding set up is completed now.

openhab

OpenHAB : MQTT broker Integration

Complete your download & installation step of MQTT broker.


Check our Broker help documentation for step by step procedure for installation.


Once done, go to Bevywise/MQTTRoute/conf You need to enable authentication in broker.conf file.


[AUTHENTICATION] AUTHENTICATION_ENABLED = YES # YES || NO

Save your changes.


Now move to the openHAB UI.


  • Let us add MQTT Broker using Things tab.
  • Add things by clicking the + icon present at the bottom.
  • Now select MQTT Broker as Thing type from the list.
  • The configuration need to be set correctly to make MQTT Broker & OpenHAB communication.
  • Click show advanced.
  • Provide IP or host name of MQTT broker 127.0.0.1
  • By default port will be set as 1883. In case if TLS is enabled in the broker.conf file, you need to change the port here.
  • Now enter username and password which is provided in the security tab of MQTT broker UI.
  • Once done click submit. If your configurations are set correctly the toggle button will show Online. You can view the OpenHAB device connected to the MQTT Broker in Devices tab. You can now connect your home devices in the devices tab of OpenHAB UI.
add-ons

mqtt-binding

thing-type

openhab-success

Hope this article provide you a detailed view on openHAB integration with MQTT Broker. Try setting up with the home automation platforms by yourself & integrating MQTT broker to control your home devices.


Download endlessly free MQTT Broker to get started with your Home automation set up.


The MQTT Broker version 3.3 is now available with mobile app to track your devices right from your android.


Try our MQTT Broker for FREE and experience seamless connectivity.