Last active
September 11, 2022 16:47
-
-
Save coltenkrauter/1314506f9f3dc0d310e195df53315baf to your computer and use it in GitHub Desktop.
Docker compose file for setting up Home Assistant with ZWAVEJS in order to support Aeotec Z-Stick Gen5 Z-Wave Plus USB Gateway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker-compose-home-assistant.yml or docker-compose.yml | |
# Before running 'docker-compose up -d', ensure that all directories exist and bash variables are set | |
# Here is an example of how you could create the dirs and set the vars needed in this file: | |
# Resource: https://zwave-js.github.io/zwavejs2mqtt/#/getting-started/docker?id=installation | |
# BOOTSTRAP_Z_STICK_USB_ID="$(l /dev/serial/by-id/ | head -c -2)" | |
# BOOTSTRAP_ZWAVEJS_SESSION_SECRET="$(cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" | |
# echo "export BOOTSTRAP_Z_STICK=$BOOTSTRAP_Z_STICK" >> $HOME/.bashrc | |
# echo "export BOOTSTRAP_ZWAVEJS_SESSION_SECRET=$BOOTSTRAP_ZWAVEJS_SESSION_SECRET" >> $HOME/.bashrc | |
# mkdir $HOME/zwavejs2mqtt | |
# mkdir $HOME/home-assistant | |
# mkdir $HOME/docker | |
version: '3.7' | |
services: | |
# Support for Home Assistant – https://www.home-assistant.io/installation/linux#install-home-assistant-container | |
homeassistant: | |
container_name: homeassistant | |
image: 'ghcr.io/home-assistant/home-assistant:stable' | |
volumes: | |
- $HOME/home-assistant:/config | |
- /etc/localtime:/etc/localtime:ro | |
restart: unless-stopped | |
# environment: | |
# DISABLE_JEMALLOC: true | |
privileged: true | |
network_mode: host | |
# Support for ZWAVEJS – https://zwave-js.github.io/zwavejs2mqtt/#/ | |
zwavejs2mqtt: | |
container_name: zwavejs2mqtt | |
image: zwavejs/zwavejs2mqtt:latest | |
restart: always | |
tty: true | |
stop_signal: SIGINT | |
environment: | |
SESSION_SECRET: $BOOTSTRAP_ZWAVEJS_SESSION_SECRET | |
ZWAVEJS_EXTERNAL_CONFIG: /usr/src/app/store/.config-db | |
HTTPS: 'true' | |
# Uncomment if you want logs time and dates to match your timezone instead of UTC | |
# Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | |
#- TZ=America/New_York | |
devices: | |
# Do not use /dev/ttyUSBX serial devices, as those mappings can change over time. | |
# Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick. | |
- "/dev/serial/by-id/$BOOTSTRAP_Z_STICK_USB_ID:/dev/zwave" | |
volumes: | |
- $HOME/zwavejs2mqtt:/usr/src/app/store | |
network_mode: host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment