enable zigbee2mqtt

This commit is contained in:
Vivian 2021-10-18 20:45:12 +02:00
parent 7fe56e78ea
commit 913213e228
No known key found for this signature in database
GPG key ID: A3923C699D1A3BDA
2 changed files with 23 additions and 1 deletions

View file

@ -26,7 +26,7 @@
};
deploy.nodes.bastion = {
hostname = "localhost";
hostname = "10.42.42.4";
fastConnection = true;
profiles.system = {
user = "root";

View file

@ -30,6 +30,9 @@
victor = {
acl = ["topic readwrite #"];
};
zigbee2mqtt = {
acl = ["topic readwrite #"];
};
};
enable = true;
port = 1883;
@ -37,5 +40,24 @@
allowAnonymous = true;
};
services.zigbee2mqtt = {
enable = true;
dataDir = "/var/lib/zigbee2mqtt";
settings = {
homeassistant = false;
permit_join = true;
serial = {
port = "/dev/ttyUSB0";
};
mqtt = {
base_topic = "zigbee2mqtt";
server = "mqtt://localhost:${toString config.services.mosquitto.port}";
user = "zigbee2mqtt";
};
};
};
networking.firewall.allowedTCPPorts = [ config.services.mosquitto.port ];
}