Basic home automation using Home Assistant, MQTT broker, and Zigbee2MQTT running on Docker Compose.
- Clone this repo.
git clone git@github.com:seredot/home-automation.git
- Install docker -and if compose not part of docker installation- docker-compose.
- Create configuration files using the example files in data folder:
cp data/zigbee2mqtt/configuration.yaml.example data/zigbee2mqtt/configuration.yaml cp data/mqtt/mosquitto.conf.example data/mqtt/mosquitto.conf
- Run compose
docker compose up -d
- Create Home Assistant login at http://localhost:8123.
- Shut down compose
docker compose down
- Add below lines into newly created Home Assistant configuration file
data/home-assistant/configuration.yaml
:mqtt: broker: mqtt discovery: true birth_message: topic: 'hass/status' payload: 'online' will_message: topic: 'hass/status' payload: 'offline'
- Run compose
docker compose up -d
- Check tooling
- Home Assistant: http://localhost:8123
- Zigbee2MQTT: http://localhost:8080
- Add MQTT integration to Home Assistant
For Bluetooth on Debian based systems, install BlueZ.
The full state resides in data
folder. Please consider setting up daily automated backups. To create a backup file, run:
./backup.sh
docker compose down
docker compose pull
docker compose up --force-recreate --build -d
docker image prune -f
To view the logs, run
docker compose logs
To check the processes, run
docker compose ps