
version: '3'  
services:
  homeassistant:
    container_name: homeassistant
    image: ghcr.io/home-assistant/home-assistant:stable
    volumes:
      - ./config:/config
    ports:
      - "8123:8123"
    restart: unless-stopped
    privileged: true
    devices:
      - /dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_51600E94-if00-port0:/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_51600E94-if00-port0
      - /dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_51600E94-if01-port0:/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_51600E94-if01-port0
  
  zwavejs:
    container_name: zwavejs
    image: zwavejs/zwavejs2mqtt:latest
    restart: unless-stopped
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0
    ports:
      - "8091:8091"
      - "3001:3000"
    privileged: true
    environment:
      - SECURITY_KEY_S2_UNAUTHENTICATED=1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d
      - SECURITY_KEY_S2_AUTHENTICATED=f1e2d3c4b5a6978685746352413f2e1d
      - SECURITY_KEY_S2_ACCESS_CONTROL=1f2e3d4c5b6a7978685746352413f2e1
      - SECURITY_KEY_S0_LEGACY=a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
      - SECURITY_KEY_S2_AUTHENTICATED_LR=f1e2d3c4b5a6978685746352413a5b6c
      - SECURITY_KEY_S2_ACCESS_CONTROL_LR=F4C9FA475F64A12697AC99DE5F122236
      - ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/config
      - ZWAVE_DEVICE=/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_51600E94-if00-port0
    volumes:
      - ~/homeassistant/zwavejs:/usr/src/app/store
