Home automation has gained a lot of popularity nowadays as it enables people to live a smart life.  With MQTTRoute 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 MQTTRoute with the OpenHab.

MQTTRoute 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

Now download & install Java 11

Check your current java version by opening a command line

java -version

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

Now install the downloaded packages using the below link

https://www.openhab.org/docs/installation/openhabian.html

Once done, navigate either to the http://localhost:8080 or https://localhost:8443

It is better to use https://localhost:8443 as MQTTRoute UI also opens in the default port 8080.

OpenHAB : Configuration

First & foremost sign up with the new account.

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.

open-hab

OpenHAB : MQTTRoute Integration

Complete your download & installation step of MQTTRoute.

https://www.bevywise.com/mqtt-broker/help.html#installation

You can check the link 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 MQTTRoute 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 MQTTRoute 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
open-hab-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 MQTTRoute to control your home devices.

Download MQTT Broker now for FREE to get started with your Home automation set up. The new version of MQTT Broker, MQTTRoute 3.2 is available now with High availability support, $SYS topic & more.