commit fcfd20d8a2fd590c38e68f01c1f670ea22b26b20
parent 4f27ad8d12a95eb23aa268322e664711cfe6fd00
Author: Leah (ctucx) <git@ctu.cx>
Date: Sun, 6 Oct 2024 19:25:19 +0200
parent 4f27ad8d12a95eb23aa268322e664711cfe6fd00
Author: Leah (ctucx) <git@ctu.cx>
Date: Sun, 6 Oct 2024 19:25:19 +0200
machines/briefkasten/smarthome/zigbee2mqtt: restart every 24h
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/machines/briefkasten/smarthome/mqtt-webui/default.nix b/machines/briefkasten/smarthome/mqtt-webui/default.nix @@ -6,7 +6,6 @@ let in { -# dns.zones."ctu.cx".subdomains."smart.home".CNAME = [ "${config.networking.fqdn}." ]; services.dnsmasq.settings.cname = [ "smart.home.ctu.cx, home.ctu.cx" ];
diff --git a/machines/briefkasten/smarthome/zigbee2mqtt.nix b/machines/briefkasten/smarthome/zigbee2mqtt.nix @@ -2,7 +2,7 @@ { - dns.zones."ctu.cx".subdomains."zigbee2mqtt.home".CNAME = lib.mkIf config.networking.usePBBUplink [ "${config.networking.fqdn}." ]; + services.dnsmasq.settings.cname = [ "zigbee2mqtt.home.ctu.cx, home.ctu.cx" ]; age.secrets = { "zigbee2mqtt-htpasswd" = { @@ -16,9 +16,13 @@ }; systemd.services.zigbee2mqtt = { - requires = [ "mosquitto.service" ]; - after = [ "mosquitto.service" ]; - onFailure = [ "email-notify@%i.service" ]; + requires = [ "mosquitto.service" ]; + after = [ "mosquitto.service" ]; + onFailure = [ "email-notify@%i.service" ]; + serviceConfig = { + Restart = lib.mkForce "always"; + RuntimeMaxSec = "1d"; + }; }; services = { @@ -70,6 +74,7 @@ advanced = { log_level = "info"; log_output = [ "console" ]; + channel = 26; network_key = "!${config.age.secrets."zigbee2mqtt-secrets.yaml".path} network_key"; }; @@ -80,10 +85,10 @@ "0x84fd27fffe44369e".friendly_name = "ikea_lamp_sleepingroom"; "0x84fd27fffea515fc".friendly_name = "ikea_lamp_livingroom"; - "0x804b50fffe42a74e".friendly_name = "ikea_remote_l_door"; - "0x842e14fffe977bfa".friendly_name = "ikea_remote_l_bed"; +# "0x804b50fffe42a74e".friendly_name = "ikea_remote_l_door"; +# "0x842e14fffe977bfa".friendly_name = "ikea_remote_l_bed"; - "0xa4c138da0f6d23de".friendly_name = "tuya_led_stripe_desk"; +# "0xa4c138da0f6d23de".friendly_name = "tuya_led_stripe_desk"; "0xa4c1389d5f391891".friendly_name = "tuya_sensor_fridge"; "0xa4c13809f76bcdc2".friendly_name = "tuya_sensor_bathroom";