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

52 lines
904 B
Nix
Raw Normal View History

2024-12-27 05:58:43 -05:00
{...}: let
zigbeeUser = "moskit";
in {
services = {
home-assistant = {
extraComponents = [
"mqtt"
"smlight"
"zha"
];
};
mosquitto = {
enable = true;
listeners = [
{
acl = ["topic readwrite #"];
port = 1883;
settings.allow_anonymous = true;
users."${zigbeeUser}".acl = ["readwrite #"];
}
];
};
zigbee2mqtt = {
enable = true;
settings = {
serial = {
port = "tcp://192.168.0.129:6638";
baudrate = 115200;
adapter = "zstack";
disable_led = false;
};
mqtt = {
server = "mqtt://localhost/1883";
user = zigbeeUser;
};
frontend = {
port = 8080;
host = "100.64.0.10";
};
advanced.transmit_power = 20;
};
};
};
}