Set up EMQX Cloud MQTT Broker with openHAB

OpenHAB, also known as open Home Automation Bus, is an open-source home automation software written in Java. With the strengths of integrating various devices, providing a clear user interface, and supporting the most flexible tools, openHAB becomes one of the most outstanding platforms in the field of home automation.

With the high flexibility and ease of use, openHAB provides a particular binding for users to connect MQTT Broker. In this article, we will introduce to you the process of setting up EMQX Cloud MQTT Broker with openHAB.

What is MQTT?

MQTT, known as Message Queuing Telemetry Transport, is a lightweight IoT messaging protocol based on the publish/subscribe model and is becoming the standard for IoT communications with its simplicity, QoS support, lightweight and bandwidth-saving features.

What is EMQX Cloud MQTT?

EMQX Cloud is an MQTT messaging middleware product for the IoT domain from EMQ. As the world's first fully managed MQTT 5.0 public cloud service, EMQX Cloud provides a one-stop O&M colocation and a unique isolated environment for MQTT messaging services. It serves dozens of countries and regions around the world, providing low-cost, secure, and reliable cloud services for 5G and Internet of Everything applications.

EMQX Cloud is available in three plans: Basic, Professional, and Unlimited, which offers a variety of flexible product specifications to support the deployment of fully managed MQTT services exclusively for you on the world's leading public clouds. Need more information with EMQX Cloud's product plan? Click here.

Such a powerful product is a great choice to integrate with openHAB. You could check out the documentation to get more information regarding EMQX Cloud。

Binding EMQX MQTT Broker with openHAB 3

If it's your first time using EMQX Cloud, don't worry. We will guide you through connecting Home Assistant with EMQX Cloud.

  1. Create an EMQX Cloud Account.

  2. Login to EMQX Cloud console and start a new deployment.

    For the first-time EMQX Cloud customers, we have an opportunity for you to create a free trial deployment of up to 30 days in length. The free trial deployment is an ideal way for you to learn and explore the features of EMQX Cloud.
    
  3. After the new deployment is created and the status is running, add the client authentication information (you could choose to add manually or import from the file).

    add authentication

  4. Install openHAB. You could easily get openHAB installed by following the steps shown here. OpenHAB could be run on various systems based on your preference.

  5. After the openHAB is installed, run the openHAB and go to console.

  6. Go to Settings and install MQTT Binding:

    openHAB MQTT binding.png

  1. Add MQTT to Things

    add mqtt to openHAB things

  2. Select MQTT Broker and fill in the information of the deployment we created before.

    select mqtt broker

    For the user name and password, fill in the authentication information as mentioned before.

    mqtt broker info

  1. When there is a little green label that shows ONLINE, you are successfully connecting openHAB with EMQX Cloud. Congrats!

    mqtt broker inline

    You could also check the status from the EMQX Cloud's monitor page.

    EMQX Cloud's monitor page

Try EMQX Cloud for Free
No credit card required
Get Started →

Related Posts

Quick Start of EMQX MQTT Cloud Service

In this tutorial, we will teach you to step by step to build an IoT platform. After completing this tutorial, you will quickly learn how to deploy an MQTT cluster in EMQX Cloud.

2021-07-25
EMQX Cloud update: ensure data security with flexible HTTP custom authentication

EMQ X Cloud recently launched the HTTP custom authentication that supports permission authentication and access control authentication.

2022-03-03
Read it, get it! The difference between EMQX Enterprise and EMQX Cloud

This article will make a detailed comparison and interpretation of EMQX Enterprise and EMQX Cloud from product architecture, features, and applicable scenarios.