2024-08-29 03:26:04 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
2023-05-05 22:33:05 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
imports = [ ./hass-mqtt.nix ];
|
|
|
|
|
2024-10-09 14:27:12 +02:00
|
|
|
healthchecks.closed.retiolum.ports.zigbee2mqtt = [
|
|
|
|
1337
|
|
|
|
9666
|
|
|
|
];
|
|
|
|
|
2023-05-05 22:33:05 +02:00
|
|
|
services.zigbee2mqtt = {
|
|
|
|
enable = true;
|
2023-08-23 07:43:53 +02:00
|
|
|
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;
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|