Odin: use zigbee2mqtt
This commit is contained in:
parent
91db9d4399
commit
f481a45a5d
2 changed files with 41 additions and 9 deletions
|
|
@ -285,8 +285,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# ${super.python312}/bin/python3 ${patcher} codes/climate/1946.json | sed 's/MQTT/ZHA' > codes/climate/50.json
|
# ${super.python312}/bin/python3 ${patcher} codes/climate/1946.json > codes/climate/50.json
|
||||||
sed 's/Broadlink/ZHA/' codes/climate/1946.json > codes/climate/50.json
|
sed 's/Broadlink/MQTT/' codes/climate/1946.json > codes/climate/50.json
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
hosts = import ../../hosts.nix;
|
hosts = import ../../hosts.nix;
|
||||||
in
|
in
|
||||||
|
|
@ -128,6 +128,8 @@ in
|
||||||
# '';
|
# '';
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
users.users.zigbee2mqtt.extraGroups = [ "dialout" ];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
displayManager.autoLogin = { enable = true; user = "tiziano"; };
|
displayManager.autoLogin = { enable = true; user = "tiziano"; };
|
||||||
avahi = {
|
avahi = {
|
||||||
|
|
@ -155,6 +157,36 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
displayManager.sddm.enable = true;
|
displayManager.sddm.enable = true;
|
||||||
|
mosquitto = {
|
||||||
|
enable = true;
|
||||||
|
listeners = [{
|
||||||
|
address = "127.0.0.1";
|
||||||
|
port = 1883;
|
||||||
|
users.zigbee2mqtt = {
|
||||||
|
acl = [
|
||||||
|
"readwrite #"
|
||||||
|
];
|
||||||
|
password = "zigbee2mqtt";
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
zigbee2mqtt = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
homeassistant = config.services.home-assistant.enable;
|
||||||
|
mqtt = {
|
||||||
|
user = "zigbee2mqtt";
|
||||||
|
password = "zigbee2mqtt";
|
||||||
|
client_id = "zigbee2mqtt";
|
||||||
|
};
|
||||||
|
frontend.enabled = true;
|
||||||
|
# permit_join = true;
|
||||||
|
serial = {
|
||||||
|
port = "/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0";
|
||||||
|
adapter = "ezsp";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
home-assistant = {
|
home-assistant = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|
@ -281,7 +313,7 @@ in
|
||||||
logbook = { };
|
logbook = { };
|
||||||
# logger.default = "debug";
|
# logger.default = "debug";
|
||||||
logger.default = "info";
|
logger.default = "info";
|
||||||
logger.logs.zhaquirks = "debug";
|
# logger.logs.zhaquirks = "debug";
|
||||||
# "map" = { };
|
# "map" = { };
|
||||||
mobile_app = { };
|
mobile_app = { };
|
||||||
notify = [
|
notify = [
|
||||||
|
|
@ -313,15 +345,15 @@ in
|
||||||
smartir = {
|
smartir = {
|
||||||
check_updates = false;
|
check_updates = false;
|
||||||
};
|
};
|
||||||
zha = {
|
# zha = {
|
||||||
custom_quirks_path = "custom_zha_quirks/";
|
# custom_quirks_path = "custom_zha_quirks/";
|
||||||
};
|
# };
|
||||||
climate = [{
|
climate = [{
|
||||||
platform = "smartir";
|
platform = "smartir";
|
||||||
name = "Climatizzatore";
|
name = "Climatizzatore";
|
||||||
unique_id = "climatizzatore";
|
unique_id = "climatizzatore";
|
||||||
device_code = 50;
|
device_code = 50;
|
||||||
controller_data = "a4:9e:69:ff:fe:01:2c:03";
|
controller_data = "zigbee2mqtt/Telecomando corridoio/command";
|
||||||
temperature_sensor = "sensor.tz3000_fllyghyj_ts0201_temperature";
|
temperature_sensor = "sensor.tz3000_fllyghyj_ts0201_temperature";
|
||||||
humidity_sensor = "sensor.tz3000_fllyghyj_ts0201_humidity";
|
humidity_sensor = "sensor.tz3000_fllyghyj_ts0201_humidity";
|
||||||
power_sensor = "binary_sensor.climatizzatore_acceso";
|
power_sensor = "binary_sensor.climatizzatore_acceso";
|
||||||
|
|
@ -406,7 +438,7 @@ in
|
||||||
"wake_on_lan"
|
"wake_on_lan"
|
||||||
"wled"
|
"wled"
|
||||||
"workday"
|
"workday"
|
||||||
"zha"
|
# "zha"
|
||||||
"zoneminder"
|
"zoneminder"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue