nixos-config/machines/chungus/hass-zigbee2mqtt.nix

60 lines
1.1 KiB
Nix
Raw Normal View History

2024-08-29 03:26:04 +02:00
{
pkgs,
lib,
config,
...
}:
2023-05-05 22:33:05 +02:00
{
imports = [ ./hass-mqtt.nix ];
healthchecks.closed.retiolum.ports.zigbee2mqtt = [
1337
9666
];
2023-05-05 22:33:05 +02:00
services.zigbee2mqtt = {
enable = true;
dataDir = "/srv2/zigbee2mqtt";
2023-05-05 22:33:05 +02:00
settings = {
# Home Assistant integration (MQTT discovery)
homeassistant = true;
# allow new devices to join
permit_join = false;
# MQTT settings
mqtt = {
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic = "zigbee2mqtt";
# MQTT server URL
server = "mqtt://127.0.0.1:1883";
};
# Serial settings
serial = {
#port = "/dev/ttyACM0";
port = "/dev/ttyUSB0";
# disable LED of CC2531 USB sniffer
2023-05-12 23:47:19 +02:00
disable_led = true;
2023-05-05 22:33:05 +02:00
};
advanced = {
log_output = [ "console" ];
log_level = "warn";
pan_id = 1337;
# add last seen information
last_seen = "ISO_8601_local";
};
# configure web ui
frontend.port = 9666;
frontend.host = "0.0.0.0";
experimental.new_api = true;
};
};
}