How to Use HiveMQ Cloud MQTT Broker with Home Assistant

How to Use HiveMQ Cloud MQTT Broker with Home Assistant

author portrait

Written by Magi Erber

Category: HiveMQ Cloud Cloud

Published: May 14, 2021


Home Assistant is a popular home automation platform and open source project on GitHub. Home Assistant allows for the integration of MQTT enabled devices. To integrate these devices with the home automation platform you need to use an MQTT broker.

Home Assistant users have the option of using free public brokers, setting up their own MQTT broker or using a managed cloud broker. A managed MQTT cloud broker is definitely going to be the most private, secure, and easiest option to deploy. Now that HiveMQ Cloud allows users to connect up to 100 devices for free, we thought it would be a great idea to make it easy for Home Assistant enthusiasts to connect with HiveMQ Cloud.

Here are the instructions Home Assistant users need to follow to use HiveMQ Cloud for free.

  1. Create an account on HiveMQ Cloud.

  2. By signing up you start straight with the free plan that enables you to connect up to 100 devices (no credit card required).

  3. Create MQTT credentials in the Access Management tab of your Cluster Detail view. These can be used to connect Home Assistant and any MQTT device.

  4. Download the trusted certificate from Let’s Encrypt to ensure secure communication between Home Assistant and your HiveMQ Cloud cluster. Store the certificate in a location that is reachable from your Home Assistant configuration file.

  5. Copy the broker info to your configuration.yaml. You can find the broker hostname in Cluster Details Overview.

    Use the credentials you just created as username and password and the path from the downloaded certificate.
       mqtt:
          broker: HIVEMQ_BROKER_HOSTNAME
          port: 8883
          username: MQTT_USERNAME
          password: MQTT_PASSWORD
          certificate: PATH_TO_STORED_CERTIFICATE
    
  6. Your HiveMQ Cloud will appear as MQTT integration in Home Assistant.

Sign up to get your free HiveMQ Cloud cluster
author Magi Erber

About Magi Erber

Magi Erber is a product manager at HiveMQ. She loves creating software that delights customers and helps them realizing innovative IoT solutions.

mail icon Contact

newer posts How to Connect a Smart Factory and Visualize IIoT Data with MQTT Sparkplug
HiveMQ 4.6.1 Maintenance Release older posts