diff --git a/hosts/genesis/home-assistant.nix b/hosts/genesis/home-assistant.nix index df578cc..2dc35fb 100755 --- a/hosts/genesis/home-assistant.nix +++ b/hosts/genesis/home-assistant.nix @@ -73,6 +73,7 @@ in # I have ZWave devices. The easiest way to connect to them is the zwavejs2mqtt service running, so we spin up # its container and map the ZWave device into it containers.zwave = { + autoStart = false; # We will try to start it with udev.extraRules listed below, as this option starts it too quickly image = "zwavejs/zwave-js-ui:latest"; ports = [ "8091:8091" "3000:3000" ]; volumes = [ "/var/lib/zwave:/usr/src/app/store" ]; @@ -95,6 +96,10 @@ in }; }; + services.udev.extraRules = '' + SUBSYSTEM=="tty", KERNEL=="ttyACM0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="podman-zwave.service" + ''; + greg.proxies = { "smart.home".target = "http://127.0.0.1:8123/";