This document outlines the home automation system running on the Docker server.
The server hosts an integrated home automation system centered around Home Assistant. The system consists of:
Core Components
Devices and Sensors
User Interfaces
Home Assistant is the central hub for all automation and device control.
homeassistant
/home/ali3nz/docker/homeassist/config
Home Assistant connects to the following systems:
Integration | Purpose | Configuration |
---|---|---|
MQTT | Device communication | Connected to Mosquitto broker |
Z-Wave JS | Z-Wave device control | Using Z-Wave JS UI |
Zigbee2MQTT | Zigbee device control | Via MQTT |
Frigate | Camera management | Via MQTT and API |
Google Cast | Media casting | Automatic discovery |
Mobile App | Remote access | iOS and Android apps |
MQTT broker facilitates communication between devices and services.
mosquitto
/home/ali3nz/docker/mqtt/config
Frigate provides AI-powered object detection for security cameras.
frigate
/home/ali3nz/docker/frigate/config
/mnt/surveillance
The camera system consists of multiple IP cameras connected to Frigate:
mqtt:
host: mosquitto
user: frigate
password: password
cameras:
front_door:
ffmpeg:
inputs:
- path: rtsp://user:[email protected]/stream
roles:
- detect
- record
detect:
enabled: True
width: 1280
height: 720
objects:
track:
- person
- car
- dog
backyard:
ffmpeg:
inputs:
- path: rtsp://user:[email protected]/stream
roles:
- detect
- record
detect:
enabled: True
width: 1280
height: 720
objects:
track:
- person
- animal
detectors:
coral:
type: edgetpu
device: usb
The server manages Z-Wave and Zigbee networks for smart home devices:
zwavejs
zigbee2mqtt
The system features several key automations:
automation:
- alias: "Home Arrival"
trigger:
platform: state
entity_id: person.admin
from: 'not_home'
to: 'home'
action:
- service: scene.turn_on
target:
entity_id: scene.welcome_home
- service: notify.mobile_app
data:
message: "Welcome home!"
automation:
- alias: "Security Alert"
trigger:
platform: state
entity_id: binary_sensor.frigate_front_door_person
to: 'on'
condition:
condition: state
entity_id: alarm_control_panel.home_alarm
state: 'armed_away'
action:
- service: notify.all_phones
data:
title: "Security Alert"
message: "Person detected at front door while away"
data:
image: "{{ states.camera.frigate_front_door.attributes.entity_picture }}"
- service: script.turn_on
target:
entity_id: script.record_all_cameras
The home automation stack is deployed via Docker Compose:
version: '3'
services:
homeassistant:
container_name: homeassistant
image: ghcr.io/home-assistant/home-assistant:stable
volumes:
- /home/ali3nz/docker/homeassist/config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
privileged: true
network_mode: host
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto:latest
volumes:
- /home/ali3nz/docker/mqtt/config:/mosquitto/config
- /home/ali3nz/docker/mqtt/data:/mosquitto/data
- /home/ali3nz/docker/mqtt/log:/mosquitto/log
ports:
- 1883:1883
- 8883:8883
restart: unless-stopped
frigate:
container_name: frigate
image: blakeblackshear/frigate:stable
volumes:
- /home/ali3nz/docker/frigate/config:/config
- /mnt/surveillance:/media/frigate
- /dev/bus/usb:/dev/bus/usb
- /etc/localtime:/etc/localtime:ro
ports:
- 5000:5000
- 1935:1935
restart: unless-stopped
privileged: true
zwavejs:
container_name: zwavejs
image: zwavejs/zwave-js-ui:latest
restart: unless-stopped
devices:
- /dev/ttyACM0:/dev/ttyACM0
volumes:
- /home/ali3nz/docker/zwavejs:/usr/src/app/store
ports:
- 8091:8091
- 3000:3000
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt:latest
volumes:
- /home/ali3nz/docker/zigbee2mqtt/data:/app/data
- /run/udev:/run/udev:ro
ports:
- 8080:8080
devices:
- /dev/ttyACM1:/dev/ttyACM1
restart: unless-stopped
environment:
- TZ=Pacific/Auckland
The home automation configuration is backed up through several methods:
Regular maintenance ensures the system runs smoothly:
Common issues and their resolutions:
# Restart Home Assistant
docker restart homeassistant
# Check logs
docker logs homeassistant
# Repair database
docker exec -it homeassistant python -m homeassistant.scripts.check_config
# Check MQTT service
docker logs mosquitto
# Test MQTT connection
docker exec -it mosquitto mosquitto_sub -h localhost -u username -P password -t "homeassistant/#" -v
# Z-Wave network heal
docker exec -it zwavejs z-wave-js-server-full heal
# Check USB device connections
ls -l /dev/ttyACM*