Skip to content

Instantly share code, notes, and snippets.

@connor4312
Created February 27, 2021 06:20
Show Gist options
  • Save connor4312/f16544bcc5b48af345a94feedb5a0ee1 to your computer and use it in GitHub Desktop.
Save connor4312/f16544bcc5b48af345a94feedb5a0ee1 to your computer and use it in GitHub Desktop.
Home Assistant docker-compose with zigbee2mqtt
# Add this to your Home Assistant config
mqtt:
broker: localhost
discovery: true
birth_message:
topic: 'hass/status'
payload: 'online'
will_message:
topic: 'hass/status'
payload: 'offline'
version: '3'
services:
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt
volumes:
- ./zigbee2mqtt:/app/data
- /run/udev:/run/udev:ro
devices:
- /dev/ttyACM0:/dev/ttyACM0
restart: always
network_mode: host
privileged: true
restart: always
environment:
- TZ=America/Los_Angeles
mosquitto:
image: eclipse-mosquitto
restart: always
network_mode: host
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
hass:
image: homeassistant/home-assistant
restart: always
network_mode: host
depends_on:
- zigbee2mqtt
volumes:
- ./:/config
- "/etc/localtime:/etc/localtime:ro"
@centerboy88
Copy link

nice one - saved my day

@semagarcia
Copy link

Thanks for share. L#11 & L#14 seem to be repeated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment