My configuration for Home Assistant, running in Docker on a Synology DS718+ NAS.
Install Mosquitto in Synology Package.
Edit the configuration file
sudo nano /volume1/@appstore/mosquitto/var/mosquitto.conf
Disable anonymous usage
allow_anonymous false
Add a password file
password_file /volume1/@appstore/mosquitto/var/password_file
Add users to Mosquitto
cd /volume1/@appstore/mosquitto sudo nano /volume1/@appstore/mosquitto/var/password_file
Add users to the file
username:password
Upgrade the password file
sudo ./bin/mosquitto_passwd -U ./var/password_file
Restart Mosquitto
Clone the repo
Build the Docker image
sudo docker build -t tellsticknet .
Create a configuration file named tellsticknet.conf
:
---
# Bathroom motion sensor
name: Bathroom Motion
component: binary_sensor
protocol: arctech
model: selflearning
unit: 10
house: 12345678
device_class: motion
Start a Docker container
/config/tellsticknet/tellsticknet.conf
-> /app/tellsticknet.conf
Add an environment variable named MQTT_URL
:
mqtt://username:password@localhost:1883