From 6d72d9dfa972da35775ca3e4564ddb31f0a4a48e Mon Sep 17 00:00:00 2001 From: Igor Rzegocki Date: Thu, 12 Dec 2024 22:32:51 +0100 Subject: [PATCH] feat(meemee): enable zigbee2mqtts --- machines/meemee/configuration.nix | 13 +++++++------ modules/system/containers/zigbee2mqtt/default.nix | 4 ++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/machines/meemee/configuration.nix b/machines/meemee/configuration.nix index 039ad2d..ea0c101 100644 --- a/machines/meemee/configuration.nix +++ b/machines/meemee/configuration.nix @@ -1,6 +1,7 @@ _: let ownIP = "10.100.20.2"; + zigbeeBottomFloorIP = "10.210.10.10"; adguardCustomMappings = builtins.fromJSON (builtins.readFile ../domains.json); in @@ -265,18 +266,18 @@ rec { wireguardPort = 53201; }; zigbee2mqtt = { - enable = false; + enable = true; serials = { topfloor = { port = "/dev/ttyUSB0"; disable_led = false; baudrate = 115200; }; - # bottomfloor = { - # port = "tcp://:6638"; - # baudrate = 115200; - # adapter = "ezsp"; - # }; + bottomfloor = { + port = "tcp://${zigbeeBottomFloorIP}:6638"; + baudrate = 115200; + adapter = "ezsp"; + }; }; }; }; diff --git a/modules/system/containers/zigbee2mqtt/default.nix b/modules/system/containers/zigbee2mqtt/default.nix index 3df3c93..fe034da 100644 --- a/modules/system/containers/zigbee2mqtt/default.nix +++ b/modules/system/containers/zigbee2mqtt/default.nix @@ -78,6 +78,10 @@ in "--group-add=27" # dialout group in nixos, doesn't map 1:1 with container ] ++ lib.optionals (lib.strings.hasPrefix "/dev" value.port) [ "--device=${value.port}" ]; }; + opts = { + # access remote coordinator + allowPublic = true; + }; }; } ) (builtins.attrNames cfg.serials)