nixos-configs/configurations/homie/modules/home-assistant/zigbee.nix

56 lines
1 KiB
Nix
Raw Normal View History

2025-02-02 20:14:21 -05:00
{lib, ...}: let
inherit (lib) mkForce;
in {
2024-12-27 05:58:43 -05:00
services = {
home-assistant = {
extraComponents = [
"mqtt"
"smlight"
"zha"
];
};
mosquitto = {
enable = true;
listeners = [
{
port = 1883;
2025-02-02 16:08:03 -05:00
acl = ["pattern readwrite #"];
omitPasswordAuth = true;
2024-12-27 05:58:43 -05:00
settings.allow_anonymous = true;
}
];
};
zigbee2mqtt = {
enable = true;
settings = {
serial = {
port = "tcp://192.168.0.129:6638";
baudrate = 115200;
adapter = "zstack";
disable_led = false;
};
2025-02-02 16:08:03 -05:00
mqtt.server = "mqtt://localhost/1883";
availability.enabled = true;
2024-12-27 05:58:43 -05:00
frontend = {
port = 8080;
host = "100.64.0.10";
};
advanced.transmit_power = 20;
};
};
};
2025-02-02 20:14:21 -05:00
# Make sure it stays running through SMLIGHT reboots
systemd.services."zigbee2mqtt".serviceConfig = {
Restart = mkForce "always";
StartLimitIntervalSec = 0;
};
2024-12-27 05:58:43 -05:00
}