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 = ''
|
||||
# ${super.python312}/bin/python3 ${patcher} codes/climate/1946.json | sed 's/MQTT/ZHA' > codes/climate/50.json
|
||||
sed 's/Broadlink/ZHA/' codes/climate/1946.json > codes/climate/50.json
|
||||
# ${super.python312}/bin/python3 ${patcher} 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
|
||||
hosts = import ../../hosts.nix;
|
||||
in
|
||||
|
|
@ -128,6 +128,8 @@ in
|
|||
# '';
|
||||
# };
|
||||
|
||||
users.users.zigbee2mqtt.extraGroups = [ "dialout" ];
|
||||
|
||||
services = {
|
||||
displayManager.autoLogin = { enable = true; user = "tiziano"; };
|
||||
avahi = {
|
||||
|
|
@ -155,6 +157,36 @@ in
|
|||
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 = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
|
@ -281,7 +313,7 @@ in
|
|||
logbook = { };
|
||||
# logger.default = "debug";
|
||||
logger.default = "info";
|
||||
logger.logs.zhaquirks = "debug";
|
||||
# logger.logs.zhaquirks = "debug";
|
||||
# "map" = { };
|
||||
mobile_app = { };
|
||||
notify = [
|
||||
|
|
@ -313,15 +345,15 @@ in
|
|||
smartir = {
|
||||
check_updates = false;
|
||||
};
|
||||
zha = {
|
||||
custom_quirks_path = "custom_zha_quirks/";
|
||||
};
|
||||
# zha = {
|
||||
# custom_quirks_path = "custom_zha_quirks/";
|
||||
# };
|
||||
climate = [{
|
||||
platform = "smartir";
|
||||
name = "Climatizzatore";
|
||||
unique_id = "climatizzatore";
|
||||
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";
|
||||
humidity_sensor = "sensor.tz3000_fllyghyj_ts0201_humidity";
|
||||
power_sensor = "binary_sensor.climatizzatore_acceso";
|
||||
|
|
@ -406,7 +438,7 @@ in
|
|||
"wake_on_lan"
|
||||
"wled"
|
||||
"workday"
|
||||
"zha"
|
||||
# "zha"
|
||||
"zoneminder"
|
||||
];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue