HASS On Unraid: MQTT

This post is part of a series covering running various containers on Unraid. {: .prompt-tip }

In this post I will be covering getting up and running with MQTT on Home Assistant, installation is pretty simple when following the official documentation and should take no longer than a couple of minutes.

Install an MQTT Broker

The first thing you will need to do is install MQTT either as a service running on your computer, or as a Docker container, or using the Home Assistant Addon.

Personally I am running MQTT as a Docker container with the following configuration.

You can follow the instructions here to add \ manage user accounts.

Configuring Home Assistant

custom/mqtt.yaml

I tend to break my configuration up into component specific files (it just feels a lot cleaner to me, and makes excluding portions of configuration a lot simpler too), this is the contents of my custom/mqtt.yaml file:

# https://www.home-assistant.io/integrations/mqtt/
broker: !secret mqtt_broker
username: !secret mqtt_username
password: !secret mqtt_password
port: !secret mqtt_port
discovery: true

Note: the values used for !secret ... are located in secrets.yaml {: .prompt-info }

configuration.yaml

You can add the line below to your configuration.yaml file to add MQTT support:

mqtt: !include custom/mqtt.yaml

After a quick restart of Home Assistant you should now see your MQTT integration.

_MQTT is working_

All Done

It doesn't get more simple than that :)