home-assistant: neue wohnung wip
This commit is contained in:
parent
607dfb0efc
commit
f9204c1f0a
3 changed files with 118 additions and 108 deletions
|
@ -6,11 +6,11 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
./home-assistant.nix
|
./home-assistant.nix
|
||||||
./kodi.nix
|
#./kodi.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./tinc.nix
|
./tinc.nix
|
||||||
./wifi-access-point.nix
|
./wifi-access-point.nix
|
||||||
./lan.nix
|
#./lan.nix
|
||||||
./dms.nix
|
./dms.nix
|
||||||
|
|
||||||
./borg.nix
|
./borg.nix
|
||||||
|
@ -28,10 +28,12 @@
|
||||||
# networking
|
# networking
|
||||||
# ----------
|
# ----------
|
||||||
system.custom.wifi = {
|
system.custom.wifi = {
|
||||||
enable = true;
|
enable = false;
|
||||||
interfaces = [ "wlp3s0" ];
|
interfaces = [ "wlp3s0" ];
|
||||||
configurationFile = <secrets/wpa_supplicant>;
|
configurationFile = <secrets/wpa_supplicant>;
|
||||||
};
|
};
|
||||||
|
# just enable lan
|
||||||
|
networking.dhcpcd.allowInterfaces = [ "enp0s25" ];
|
||||||
# nix-shell -p speedtest_cli --run speedtest
|
# nix-shell -p speedtest_cli --run speedtest
|
||||||
configuration.fireqos = {
|
configuration.fireqos = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -8,32 +8,34 @@
|
||||||
user = "homeassistant";
|
user = "homeassistant";
|
||||||
password = "hallo";
|
password = "hallo";
|
||||||
};
|
};
|
||||||
scenes = [
|
scenes = [{
|
||||||
{ name = "default"; }
|
name = "default";
|
||||||
{
|
room_tracking_enabled = false;
|
||||||
name = "outside";
|
}
|
||||||
room_tracking_enabled = false;
|
#{
|
||||||
ignored_sensors = [ "zigbee2mqtt/door_sensor_4" ];
|
# name = "outside";
|
||||||
}
|
# room_tracking_enabled = false;
|
||||||
{
|
# ignored_sensors = [ "zigbee2mqtt/door_sensor_4" ];
|
||||||
name = "cooking";
|
#}
|
||||||
enabled_switches = [ "stat/PAL07/RESULT" "stat/PAL08/RESULT" ];
|
#{
|
||||||
}
|
# name = "cooking";
|
||||||
{
|
# enabled_switches = [ "stat/PAL07/RESULT" "stat/PAL08/RESULT" ];
|
||||||
name = "night";
|
#}
|
||||||
room_tracking_enabled = false;
|
#{
|
||||||
brightness = 25;
|
# name = "night";
|
||||||
disabled_switches = [
|
# room_tracking_enabled = false;
|
||||||
"stat/PAL01/RESULT"
|
# brightness = 25;
|
||||||
"stat/PAL03/RESULT"
|
# disabled_switches = [
|
||||||
"stat/PAL04/RESULT"
|
# "stat/PAL01/RESULT"
|
||||||
"stat/PAL07/RESULT"
|
# "stat/PAL03/RESULT"
|
||||||
"stat/PAL08/RESULT"
|
# "stat/PAL04/RESULT"
|
||||||
"zigbee2mqtt/light_2"
|
# "stat/PAL07/RESULT"
|
||||||
];
|
# "stat/PAL08/RESULT"
|
||||||
ignored_sensors = [ "zigbee2mqtt/motion_sensor_7" ];
|
# "zigbee2mqtt/light_2"
|
||||||
}
|
# ];
|
||||||
];
|
# ignored_sensors = [ "zigbee2mqtt/motion_sensor_7" ];
|
||||||
|
#}
|
||||||
|
];
|
||||||
sensors = let
|
sensors = let
|
||||||
door = { topic, room }: {
|
door = { topic, room }: {
|
||||||
topic = topic;
|
topic = topic;
|
||||||
|
@ -49,46 +51,50 @@
|
||||||
delay = 60;
|
delay = 60;
|
||||||
};
|
};
|
||||||
in [
|
in [
|
||||||
(motion {
|
|
||||||
topic = "zigbee2mqtt/motion_sensor_2";
|
|
||||||
room = "bed_room";
|
|
||||||
})
|
|
||||||
(motion {
|
|
||||||
topic = "zigbee2mqtt/motion_sensor_7";
|
|
||||||
room = "bed_room";
|
|
||||||
})
|
|
||||||
(motion {
|
(motion {
|
||||||
topic = "zigbee2mqtt/motion_sensor_1";
|
topic = "zigbee2mqtt/motion_sensor_1";
|
||||||
room = "kitchen";
|
room = "office_room";
|
||||||
})
|
})
|
||||||
(motion {
|
(motion {
|
||||||
topic = "zigbee2mqtt/motion_sensor_3";
|
topic = "zigbee2mqtt/motion_sensor_2";
|
||||||
room = "living_room";
|
room = "office_room";
|
||||||
})
|
|
||||||
(motion {
|
|
||||||
topic = "zigbee2mqtt/motion_sensor_4";
|
|
||||||
room = "living_room";
|
|
||||||
})
|
|
||||||
(motion {
|
|
||||||
topic = "zigbee2mqtt/motion_sensor_5";
|
|
||||||
room = "bath_room";
|
|
||||||
})
|
|
||||||
(motion {
|
|
||||||
topic = "zigbee2mqtt/motion_sensor_8";
|
|
||||||
room = "bath_room";
|
|
||||||
})
|
|
||||||
(motion {
|
|
||||||
topic = "zigbee2mqtt/motion_sensor_6";
|
|
||||||
room = "floor";
|
|
||||||
})
|
|
||||||
(door {
|
|
||||||
topic = "zigbee2mqtt/door_sensor_2";
|
|
||||||
room = "floor";
|
|
||||||
})
|
|
||||||
(door {
|
|
||||||
topic = "zigbee2mqtt/door_sensor_4";
|
|
||||||
room = "floor";
|
|
||||||
})
|
})
|
||||||
|
#(motion {
|
||||||
|
# topic = "zigbee2mqtt/motion_sensor_7";
|
||||||
|
# room = "bed_room";
|
||||||
|
#})
|
||||||
|
#(motion {
|
||||||
|
# topic = "zigbee2mqtt/motion_sensor_1";
|
||||||
|
# room = "kitchen";
|
||||||
|
#})
|
||||||
|
#(motion {
|
||||||
|
# topic = "zigbee2mqtt/motion_sensor_3";
|
||||||
|
# room = "living_room";
|
||||||
|
#})
|
||||||
|
#(motion {
|
||||||
|
# topic = "zigbee2mqtt/motion_sensor_4";
|
||||||
|
# room = "living_room";
|
||||||
|
#})
|
||||||
|
#(motion {
|
||||||
|
# topic = "zigbee2mqtt/motion_sensor_5";
|
||||||
|
# room = "bath_room";
|
||||||
|
#})
|
||||||
|
#(motion {
|
||||||
|
# topic = "zigbee2mqtt/motion_sensor_8";
|
||||||
|
# room = "bath_room";
|
||||||
|
#})
|
||||||
|
#(motion {
|
||||||
|
# topic = "zigbee2mqtt/motion_sensor_6";
|
||||||
|
# room = "floor";
|
||||||
|
#})
|
||||||
|
#(door {
|
||||||
|
# topic = "zigbee2mqtt/door_sensor_2";
|
||||||
|
# room = "floor";
|
||||||
|
#})
|
||||||
|
#(door {
|
||||||
|
# topic = "zigbee2mqtt/door_sensor_4";
|
||||||
|
# room = "floor";
|
||||||
|
#})
|
||||||
];
|
];
|
||||||
switches = let
|
switches = let
|
||||||
sonoff = { id, rooms, delay ? 0 }: {
|
sonoff = { id, rooms, delay ? 0 }: {
|
||||||
|
@ -117,55 +123,57 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in [
|
in [
|
||||||
(light {
|
#(light {
|
||||||
topic = "zigbee2mqtt/light_1";
|
# topic = "zigbee2mqtt/light_1";
|
||||||
rooms = [ "floor" ];
|
# rooms = [ "floor" ];
|
||||||
})
|
#})
|
||||||
|
#(light {
|
||||||
|
# topic = "zigbee2mqtt/light_2";
|
||||||
|
# rooms = [ "floor" ];
|
||||||
|
#})
|
||||||
|
#(light {
|
||||||
|
# topic = "zigbee2mqtt/light_3";
|
||||||
|
# rooms = [ "living_room" ];
|
||||||
|
# delay = 10;
|
||||||
|
#})
|
||||||
|
|
||||||
(light {
|
(light {
|
||||||
topic = "zigbee2mqtt/light_2";
|
topic = "zigbee2mqtt/light_2";
|
||||||
rooms = [ "floor" ];
|
rooms = [ "office_room" ];
|
||||||
})
|
|
||||||
(light {
|
|
||||||
topic = "zigbee2mqtt/light_3";
|
|
||||||
rooms = [ "living_room" ];
|
|
||||||
delay = 10;
|
|
||||||
})
|
})
|
||||||
(light {
|
(light {
|
||||||
topic = "zigbee2mqtt/light_4";
|
topic = "zigbee2mqtt/light_4";
|
||||||
rooms = [ "bath_room" ];
|
rooms = [ "office_room" ];
|
||||||
})
|
|
||||||
(light {
|
|
||||||
topic = "zigbee2mqtt/light_8";
|
|
||||||
rooms = [ "bed_room" ];
|
|
||||||
delay = 10;
|
|
||||||
})
|
|
||||||
(sonoff {
|
|
||||||
id = "PAL01";
|
|
||||||
rooms = [ "bed_room" ];
|
|
||||||
})
|
|
||||||
(sonoff {
|
|
||||||
id = "PAL03";
|
|
||||||
rooms = [ "living_room" ];
|
|
||||||
})
|
|
||||||
(sonoff {
|
|
||||||
id = "PAL04";
|
|
||||||
rooms = [ "bed_room" ];
|
|
||||||
})
|
|
||||||
(sonoff {
|
|
||||||
id = "PAL06";
|
|
||||||
rooms = [ "kitchen" ];
|
|
||||||
})
|
|
||||||
# monitor and speakers
|
|
||||||
(sonoff {
|
|
||||||
id = "PAL07";
|
|
||||||
rooms = [ "bed_room" ];
|
|
||||||
delay = 180;
|
|
||||||
})
|
|
||||||
(sonoff {
|
|
||||||
id = "PAL08";
|
|
||||||
rooms = [ "bed_room" ];
|
|
||||||
delay = 180;
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
#(sonoff {
|
||||||
|
# id = "PAL01";
|
||||||
|
# rooms = [ "bed_room" ];
|
||||||
|
#})
|
||||||
|
#(sonoff {
|
||||||
|
# id = "PAL03";
|
||||||
|
# rooms = [ "living_room" ];
|
||||||
|
#})
|
||||||
|
#(sonoff {
|
||||||
|
# id = "PAL04";
|
||||||
|
# rooms = [ "bed_room" ];
|
||||||
|
#})
|
||||||
|
#(sonoff {
|
||||||
|
# id = "PAL06";
|
||||||
|
# rooms = [ "kitchen" ];
|
||||||
|
#})
|
||||||
|
## monitor and speakers
|
||||||
|
#(sonoff {
|
||||||
|
# id = "PAL07";
|
||||||
|
# rooms = [ "bed_room" ];
|
||||||
|
# delay = 180;
|
||||||
|
#})
|
||||||
|
#(sonoff {
|
||||||
|
# id = "PAL08";
|
||||||
|
# rooms = [ "bed_room" ];
|
||||||
|
# delay = 180;
|
||||||
|
#})
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
users.groups."syncthing".members = [ "mpd" "syncthing" "kodi" ];
|
users.groups."syncthing".members = [ "mpd" "syncthing" "kodi" ];
|
||||||
|
|
||||||
custom.samba-share = {
|
custom.samba-share = {
|
||||||
enable = true;
|
enable = false;
|
||||||
folders = {
|
folders = {
|
||||||
movies = config.test.services.syncthing.declarative.folders.movies.path;
|
movies = config.test.services.syncthing.declarative.folders.movies.path;
|
||||||
music =
|
music =
|
||||||
|
|
Loading…
Reference in a new issue