home-assistant: neue wohnung wip

This commit is contained in:
Ingolf Wagner 2020-10-18 21:05:01 +02:00
parent 607dfb0efc
commit f9204c1f0a
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 118 additions and 108 deletions

View file

@ -6,11 +6,11 @@
./hardware-configuration.nix
./home-assistant.nix
./kodi.nix
#./kodi.nix
./syncthing.nix
./tinc.nix
./wifi-access-point.nix
./lan.nix
#./lan.nix
./dms.nix
./borg.nix
@ -28,10 +28,12 @@
# networking
# ----------
system.custom.wifi = {
enable = true;
enable = false;
interfaces = [ "wlp3s0" ];
configurationFile = <secrets/wpa_supplicant>;
};
# just enable lan
networking.dhcpcd.allowInterfaces = [ "enp0s25" ];
# nix-shell -p speedtest_cli --run speedtest
configuration.fireqos = {
enable = true;

View file

@ -8,32 +8,34 @@
user = "homeassistant";
password = "hallo";
};
scenes = [
{ name = "default"; }
{
name = "outside";
room_tracking_enabled = false;
ignored_sensors = [ "zigbee2mqtt/door_sensor_4" ];
}
{
name = "cooking";
enabled_switches = [ "stat/PAL07/RESULT" "stat/PAL08/RESULT" ];
}
{
name = "night";
room_tracking_enabled = false;
brightness = 25;
disabled_switches = [
"stat/PAL01/RESULT"
"stat/PAL03/RESULT"
"stat/PAL04/RESULT"
"stat/PAL07/RESULT"
"stat/PAL08/RESULT"
"zigbee2mqtt/light_2"
];
ignored_sensors = [ "zigbee2mqtt/motion_sensor_7" ];
}
];
scenes = [{
name = "default";
room_tracking_enabled = false;
}
#{
# name = "outside";
# room_tracking_enabled = false;
# ignored_sensors = [ "zigbee2mqtt/door_sensor_4" ];
#}
#{
# name = "cooking";
# enabled_switches = [ "stat/PAL07/RESULT" "stat/PAL08/RESULT" ];
#}
#{
# name = "night";
# room_tracking_enabled = false;
# brightness = 25;
# disabled_switches = [
# "stat/PAL01/RESULT"
# "stat/PAL03/RESULT"
# "stat/PAL04/RESULT"
# "stat/PAL07/RESULT"
# "stat/PAL08/RESULT"
# "zigbee2mqtt/light_2"
# ];
# ignored_sensors = [ "zigbee2mqtt/motion_sensor_7" ];
#}
];
sensors = let
door = { topic, room }: {
topic = topic;
@ -49,46 +51,50 @@
delay = 60;
};
in [
(motion {
topic = "zigbee2mqtt/motion_sensor_2";
room = "bed_room";
})
(motion {
topic = "zigbee2mqtt/motion_sensor_7";
room = "bed_room";
})
(motion {
topic = "zigbee2mqtt/motion_sensor_1";
room = "kitchen";
room = "office_room";
})
(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";
topic = "zigbee2mqtt/motion_sensor_2";
room = "office_room";
})
#(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
sonoff = { id, rooms, delay ? 0 }: {
@ -117,55 +123,57 @@
};
};
in [
(light {
topic = "zigbee2mqtt/light_1";
rooms = [ "floor" ];
})
#(light {
# topic = "zigbee2mqtt/light_1";
# rooms = [ "floor" ];
#})
#(light {
# topic = "zigbee2mqtt/light_2";
# rooms = [ "floor" ];
#})
#(light {
# topic = "zigbee2mqtt/light_3";
# rooms = [ "living_room" ];
# delay = 10;
#})
(light {
topic = "zigbee2mqtt/light_2";
rooms = [ "floor" ];
})
(light {
topic = "zigbee2mqtt/light_3";
rooms = [ "living_room" ];
delay = 10;
rooms = [ "office_room" ];
})
(light {
topic = "zigbee2mqtt/light_4";
rooms = [ "bath_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;
rooms = [ "office_room" ];
})
#(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;
#})
];
};

View file

@ -3,7 +3,7 @@
users.groups."syncthing".members = [ "mpd" "syncthing" "kodi" ];
custom.samba-share = {
enable = true;
enable = false;
folders = {
movies = config.test.services.syncthing.declarative.folders.movies.path;
music =