HomeAssistant - johnosbb/Automation GitHub Wiki

HomeAssistant 2021 VM Install

Configuring MQTT Broker

Add a new user, first turn on the advanced mode in your profile, then go to configurastion->users Adding a User

Adding NodeRed

Install the Addon Configure as follows

Node Red Config

Styling LoveLace

LoveLace

Installing in a Container

See this guide

Controlling SonOff devices from HomeAssistant (Now Outdated)

SonOff HomeAssistant Control

Controlling Home Assistant

Installing components in Hassbian (not HASIO)

  • sudo apt update && sudo apt upgrade
  • sudo hassbian-config upgrade hassbian-script

Installing mosquitto in Hassbian

  • sudo hassbian-config install mosquitto
  • Adding a user: sudo mosquitto_passwd -c /etc/mosquitto/pwfile yourusername
  • sudo systemctl stop mosquitto.service
  • sudo systemctl start mosquitto.service
  • sudo systemctl restart mosquitto.service
  • sudo systemctl enable mosquitto.service
  • sudo systemctl status mosquitto.service

Controlling under systemd

  • You need to add the following to create file called /lib/systemd/system/mosquitto.service
  • Add this content to it:

[Unit] Description=Mosquitto MQTT Broker daemon ConditionPathExists=/etc/mosquitto/mosquitto.conf After=network.target Requires=network.target

[Service] Type=forking RemainAfterExit=no StartLimitInterval=0 PIDFile=/var/run/mosquitto.pid ExecStart=/bin/sh -c "/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d" ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure RestartSec=2

[Install] WantedBy=multi-user.target

Configuration directory is at /etc/mosquitto/mosquitto.conf -d


  • Installing Samba in Hassbian
  • sudo hassbian-config install samba

Node Red (Install Guide)


Integrating with HomeAssistant

  • Open nodered in a browser
  • Got to the menu selector on the top right
  • select mange pallette
  • select the install tab
  • select and install the 'node-red-contrib-home-assistant' package
  • Restart nodered service with - sudo systemctl restart nodered.service
  • See Here (HASS & Node-Red - Integrating Them Together)

Setting up DuckDNS


Managing Systems Services

  • systemctl list-units

Adding Audio services to Home Assistant

Guide to Configuring Home Assistant

Integrating with Owen Tracks