summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham
diff options
context:
space:
mode:
Diffstat (limited to 'makefu/2configs/home/ham')
-rw-r--r--makefu/2configs/home/ham/automation/buttonboard.nix4
-rw-r--r--makefu/2configs/home/ham/automation/bye.txt.j22
-rw-r--r--makefu/2configs/home/ham/automation/check-in.nix133
-rw-r--r--makefu/2configs/home/ham/automation/daily_speedtext.nix17
-rw-r--r--makefu/2configs/home/ham/automation/fenster_auf.nix138
-rw-r--r--makefu/2configs/home/ham/automation/find_phone.nix32
-rw-r--r--makefu/2configs/home/ham/automation/firetv_restart.nix37
-rw-r--r--makefu/2configs/home/ham/automation/flurlicht.nix63
-rw-r--r--makefu/2configs/home/ham/automation/giesskanne.nix99
-rw-r--r--makefu/2configs/home/ham/automation/ladestecker_timer.nix24
-rw-r--r--makefu/2configs/home/ham/automation/lichter_dimmen.nix135
-rw-r--r--makefu/2configs/home/ham/automation/light_buttons.nix69
-rw-r--r--makefu/2configs/home/ham/automation/moodlight.nix46
-rw-r--r--makefu/2configs/home/ham/automation/pflanzen_giessen_erinnerung.nix43
-rw-r--r--makefu/2configs/home/ham/automation/project_tracker.nix68
-rw-r--r--makefu/2configs/home/ham/automation/shutdown_button.nix56
-rw-r--r--makefu/2configs/home/ham/automation/urlaub.nix51
-rw-r--r--makefu/2configs/home/ham/automation/welcome.txt.j245
-rw-r--r--makefu/2configs/home/ham/automation/wohnzimmer_rf_fernbedienung.nix151
-rw-r--r--makefu/2configs/home/ham/calendar/nextcloud.nix41
-rw-r--r--makefu/2configs/home/ham/default.nix205
-rw-r--r--makefu/2configs/home/ham/deps/dwdwfsapi.nix38
-rw-r--r--makefu/2configs/home/ham/deps/pykodi.nix37
-rw-r--r--makefu/2configs/home/ham/device_tracker/openwrt.nix13
-rw-r--r--makefu/2configs/home/ham/device_tracker/tile.nix10
-rw-r--r--makefu/2configs/home/ham/docker.nix30
-rw-r--r--makefu/2configs/home/ham/intents/default.nix35
-rw-r--r--makefu/2configs/home/ham/intents/music_chooser.txt.j213
-rw-r--r--makefu/2configs/home/ham/intents/statusbericht.txt.j237
-rw-r--r--makefu/2configs/home/ham/lib/cheat-sheet.nix42
-rw-r--r--makefu/2configs/home/ham/lib/default.nix134
-rw-r--r--makefu/2configs/home/ham/light/arbeitszimmer.nix33
-rw-r--r--makefu/2configs/home/ham/light/schlafzimmer.nix14
-rw-r--r--makefu/2configs/home/ham/light/tint_arbeitszimmer.nix281
-rw-r--r--makefu/2configs/home/ham/light/tint_wohnzimmer.nix300
-rw-r--r--makefu/2configs/home/ham/light/wohnzimmer.nix56
-rw-r--r--makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix110
-rw-r--r--makefu/2configs/home/ham/media/firetv.nix27
-rw-r--r--makefu/2configs/home/ham/media/remote_sound_arbeitszimmer.nix112
-rw-r--r--makefu/2configs/home/ham/media/remote_sound_wohnzimmer.nix107
-rw-r--r--makefu/2configs/home/ham/media/schlafzimmer_music_remote.nix158
-rw-r--r--makefu/2configs/home/ham/media/sonos.nix7
-rw-r--r--makefu/2configs/home/ham/mqtt.nix31
-rw-r--r--makefu/2configs/home/ham/multi/fliegen-couter.nix71
-rw-r--r--makefu/2configs/home/ham/multi/flurlicht.nix57
-rw-r--r--makefu/2configs/home/ham/multi/heizung.nix11
-rw-r--r--makefu/2configs/home/ham/multi/kurzzeitwecker.nix88
-rw-r--r--makefu/2configs/home/ham/multi/the_playlist.nix86
-rw-r--r--makefu/2configs/home/ham/nginx.nix15
-rw-r--r--makefu/2configs/home/ham/person/default.nix20
-rw-r--r--makefu/2configs/home/ham/sensor/dwd.nix10
-rw-r--r--makefu/2configs/home/ham/sensor/outside.nix55
-rw-r--r--makefu/2configs/home/ham/sensor/pollen.nix65
-rw-r--r--makefu/2configs/home/ham/signal-rest/default.nix6
-rw-r--r--makefu/2configs/home/ham/signal-rest/hass.nix20
-rw-r--r--makefu/2configs/home/ham/signal-rest/pkg.nix25
-rw-r--r--makefu/2configs/home/ham/signal-rest/service.nix20
-rw-r--r--makefu/2configs/home/ham/tts/google.nix18
-rw-r--r--makefu/2configs/home/ham/zigbee2mqtt.nix43
59 files changed, 0 insertions, 3694 deletions
diff --git a/makefu/2configs/home/ham/automation/buttonboard.nix b/makefu/2configs/home/ham/automation/buttonboard.nix
deleted file mode 100644
index 533311fc5..000000000
--- a/makefu/2configs/home/ham/automation/buttonboard.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-# good, bad radio
-# stop
-# start radio
-# lauter, leister
diff --git a/makefu/2configs/home/ham/automation/bye.txt.j2 b/makefu/2configs/home/ham/automation/bye.txt.j2
deleted file mode 100644
index 8a5ba7257..000000000
--- a/makefu/2configs/home/ham/automation/bye.txt.j2
+++ /dev/null
@@ -1,2 +0,0 @@
-Endlich ist Pappa fertig mit arbeit!
-Heute hast du {{ states("sensor.felix_at_work_today") |round(1) }} Stunden gearbeitet.
diff --git a/makefu/2configs/home/ham/automation/check-in.nix b/makefu/2configs/home/ham/automation/check-in.nix
deleted file mode 100644
index db051757e..000000000
--- a/makefu/2configs/home/ham/automation/check-in.nix
+++ /dev/null
@@ -1,133 +0,0 @@
-let
- button = "binary_sensor.arbeitszimmer_onebutton_button";
- light = "light.arbeitszimmer_onebutton_led";
- at_work = "input_boolean.felix_at_work";
- lib = import ../lib;
- say = lib.say.office;
-in
-{
- services.home-assistant.config.input_boolean.felix_at_work.name = "Felix auf Arbeit";
- services.home-assistant.config.timer.felix_at_work = {
- name = "Felix auf Arbeit Timer";
- duration = "10:00:00";
- };
- services.home-assistant.config.sensor = [
- {
- platform = "history_stats";
- name = "Felix at work today";
- entity_id = "input_boolean.felix_at_work";
- state = "on";
- type = "time";
- start = "{{ now().replace(hour=0, minute=0, second=0) }}";
- end = "{{ now() }}";
- }
- ];
- services.home-assistant.config.script.start_office_radio.sequence =
- [
- { service = "media_player.play_media";
- data = {
- media_content_id = "http://radio.lassul.us:8000/radio.mp3";
- media_content_type = "music";
- };
- target.entity_id = "media_player.office";
- }
- ];
- services.home-assistant.config.automation =
- [
- { alias = "Zu lange Felix!";
- trigger =
- { platform = "event";
- event_type = "timer.finished";
- event_data.entity_id = "timer.felix_at_work";
- };
-
- condition =
- {
- condition = "state";
- entity_id = at_work;
- state = "off";
- };
-
- action = (say "Felix, die zehn Stunden sind um, aufhören jetzt");
- }
- { alias = "Turn off at work sensor";
- trigger = [
- { platform = "time"; at = "00:00:00"; }
- ];
- condition =
- {
- condition = "state";
- entity_id = at_work;
- state = "off";
- };
- action =
- [
- # felix forgot to stamp out ...
- {
- service = "homeassistant.turn_off";
- entity_id = [ at_work ];
- }
- ];
- }
- { alias = "Push Check-in Button Felix with button";
- trigger = [
- {
- platform = "state";
- entity_id = button;
- to = "on";
- for.seconds = 1;
- }
- ];
- condition = [
- ];
- action =
- [
- { choose = [
- {
- conditions = {
- condition = "state";
- entity_id = at_work;
- state = "off";
- };
- sequence = [
- { service = "light.turn_on";
- target.entity_id = light;
- data.brightness = 200;
- }
- { service = "homeassistant.turn_on";
- entity_id = at_work;
- }
- { service = "timer.start";
- entity_id = [ "timer.felix_at_work" ] ;
- }
- ] ++ (say (builtins.readFile ./welcome.txt.j2)) ++
- [
- { service = "script.start_office_radio"; }
- ];
- }
- {
- conditions = {
- condition = "state";
- entity_id = at_work;
- state = "on";
- };
- sequence = [
- { service = "light.turn_off";
- target.entity_id = light;
- }
- { service = "homeassistant.turn_off";
- entity_id = at_work;
- }
- ] ++ (say (builtins.readFile ./bye.txt.j2)) ++
- [
- { service = "timer.stop";
- entity_id = [ "timer.felix_at_work" ] ;
- }
- ];
- }
- ];
- }
- ];
- }
- ];
-}
diff --git a/makefu/2configs/home/ham/automation/daily_speedtext.nix b/makefu/2configs/home/ham/automation/daily_speedtext.nix
deleted file mode 100644
index 70d59f6e1..000000000
--- a/makefu/2configs/home/ham/automation/daily_speedtext.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- services.home-assistant.config.automation =
- [
- {
- trigger = [
- { platform = "time"; at = "03:21"; }
- ];
- action =
- [
- {
- service = "speedtestdotnet.speedtest";
- }
- ];
- }
- ];
-
-}
diff --git a/makefu/2configs/home/ham/automation/fenster_auf.nix b/makefu/2configs/home/ham/automation/fenster_auf.nix
deleted file mode 100644
index 698327ff4..000000000
--- a/makefu/2configs/home/ham/automation/fenster_auf.nix
+++ /dev/null
@@ -1,138 +0,0 @@
-{ lib, ... }:
-#uses:
-# notify.signal
-# binary_sensor.badezimmer_fenster_contact
-# binary_sensor.dusche_fenster_contact
-let
- hlib = import ../lib;
- say = hlib.say.office;
- draussen = "sensor.wohnzimmer_temp_temperature";
- draussen_diff = "sensor.unterschied_draussen_drinnen";
- draussen_heiss = 23;
- min = 20;
- fenster_offen = name: entity:
- { alias = "${name} seit ${toString min} Minuten offen";
- trigger = [
- {
- platform = "state";
- entity_id = entity;
- to = "on";
- for.minutes = min;
- }
- ];
- condition = [
- ];
- action =
- [
- {
- service = "notify.signal_home";
- data_template = {
- message = "${name} seit ${toString min} Minuten offen und draussen ist es gerade {{states.sensor.dark_sky_temperature.state}}°C bei {{states.sensor.dark_sky_humidity.state}}% Luftfeuchte";
- };
- }
- {
- service = "input_boolean.turn_on";
- target.entity_id = "input_boolean.${lib.toLower name}_lang_offen";
- }
- ];
- };
- fenster_geschlossen_lang = name: entity:
- { alias = "${name} wieder geschlossen";
- trigger = [
- {
- platform = "state";
- entity_id = entity;
- to = "off";
- for.seconds = 10;
- }
- ];
- condition = [
- { condition = "state";
- entity_id = "input_boolean.${lib.toLower name}_lang_offen";
- state = "on";
- }
- ];
- action =
- [
- {
- service = "notify.signal_home";
- data = {
- message= "${name} ist wieder geschlossen, Danke!";
- };
- }
- {
- service = "input_boolean.turn_off";
- target.entity_id = "input_boolean.${lib.toLower name}_lang_offen";
- }
- ];
- };
-in {
- services.home-assistant.config = {
- template = [
- { sensor = {
- name = "Unterschied Draussen Drinnen";
- unit_of_measurement = "°C";
- state = ''
- {% set inside = states("${draussen}") | float | round(2) -%}
- {% set outside = states("sensor.dark_sky_temperature") | float | round(2) -%}
- {{ ((outside - inside) | round(1) )}}'';
- };
- }
- ];
- sensor = [
- { platform = "season"; type = "meteorological";}
- ];
-
- input_boolean = {
- badezimmerfenster_lang_offen.name = "Badezimmer lange offen";
- duschfenster_lang_offen.name = "Duschfenster lange offen";
- ist_sommer = {
- name = "Es ist Sommer";
- initial = false; # TODO
- };
- };
-
- automation = [
- (fenster_geschlossen_lang "Badezimmerfenster" "binary_sensor.badezimmer_fenster_contact")
- (fenster_geschlossen_lang "Duschfenster" "binary_sensor.dusche_fenster_contact")
-
- (fenster_offen "Badezimmerfenster" "binary_sensor.badezimmer_fenster_contact")
- (fenster_offen "Duschfenster" "binary_sensor.dusche_fenster_contact")
-
- { alias = "Draussen ist wieder kaelter";
- trigger = [
- {
- platform = "numeric_state";
- entity_id = draussen_diff;
- below = 0;
- for.minutes = 20;
- }
- ];
- condition = [
- { condition = "numeric_state";
- entity_id = draussen;
- above = draussen_heiss;
- }
- ];
- action = (say "Draussen ist es endlich kühler, jetzt kann man die Fenster auf machen");
- }
- { alias = "Draussen ist zu warm";
- trigger = [
- {
- platform = "numeric_state";
- entity_id = draussen_diff;
- above = 0;
- for.minutes = 20;
- }
- ];
- condition = [
- { condition = "numeric_state";
- entity_id = draussen;
- above = draussen_heiss;
- }
- ];
- action = (say "Draussen wird es jetzt zu warm, besser das fenster schliessen");
- }
- ];
- };
-}
diff --git a/makefu/2configs/home/ham/automation/find_phone.nix b/makefu/2configs/home/ham/automation/find_phone.nix
deleted file mode 100644
index d94942c9f..000000000
--- a/makefu/2configs/home/ham/automation/find_phone.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- services.home-assistant.config.script = {
- find_felix_phone.sequence = [
- {
- service = "notify.mobile_app_pixel_3a";
- data = {
- title= "Finde Mich!";
- message= "Such Such Such";
- data = {
- ttl = 0;
- priority = "high";
- channel = "alarm_stream";
- };
- };
- }
- ];
- find_tablet.sequence = [
- {
- service = "notify.mobile_app_nova3";
- data = {
- title = "Finde Mich!";
- message = "Such Such Such";
- data = {
- ttl = 0;
- priority = "high";
- channel = "alarm_stream";
- };
- };
- }
- ];
- };
-}
diff --git a/makefu/2configs/home/ham/automation/firetv_restart.nix b/makefu/2configs/home/ham/automation/firetv_restart.nix
deleted file mode 100644
index 01d1ba6e9..000000000
--- a/makefu/2configs/home/ham/automation/firetv_restart.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-let
- cmd = command: {
- service = "androidtv.adb_command";
- data = {
- entity_id = "media_player.firetv_stick";
- inherit command;
- };
- };
- sec = seconds: { delay.seconds = seconds; };
-in
-{
- services.home-assistant.config.automation =
- [
- {
- alias = "Nightly reboot of firetv";
- trigger = {
- platform = "time";
- at = "03:00:00";
- };
- action = [
- (cmd "reboot")
- (sec 90) # go to my music because apparently select_source does not seem to always work
- #(cmd "HOME")
- #(sec 2)
- #(cmd "DOWN")
- #(sec 2)
- #(cmd "DOWN")
- #(sec 2)
- #(cmd "ENTER")
- #(sec 4)
- #(cmd "RIGHT")
- #(sec 2)
- #(cmd "RIGHT")
- ];
- }
- ];
-}
diff --git a/makefu/2configs/home/ham/automation/flurlicht.nix b/makefu/2configs/home/ham/automation/flurlicht.nix
deleted file mode 100644
index bb4877100..000000000
--- a/makefu/2configs/home/ham/automation/flurlicht.nix
+++ /dev/null
@@ -1,63 +0,0 @@
-let
- nachtlicht = [ "light.flur_statuslight" "light.wohnzimmer_status_led" ];
-
- # flurlicht an
- lightcond = name: conditions: rgb_color: brightness:
- {
- inherit conditions;
- sequence = {
- service = "light.turn_on";
- target.entity_id = nachtlicht;
- data = {
- inherit rgb_color brightness;
- };
- };
- };
-in
-{
- services.home-assistant.config.automation =
- [
- { alias = "Nachtlicht trigger";
- trigger = [
- { platform = "sun"; event = "sunset"; }
- { platform = "sun"; event = "sunrise"; }
- { platform = "state"; entity_id = [
- "calendar.kehrwoche_kehrwoche"
- "binary_sensor.badezimmer_fenster_contact"
- "binary_sensor.dusche_fenster_contact"
- ];
- }
- ];
- action =
- [
- { choose = [
- (lightcond "Badezimmer Fenster Auf"
- [ { condition = "state"; entity_id = "binary_sensor.badezimmer_fenster_contact"; state = "on"; }
- { condition = "state"; entity_id = "input_boolean.ist_sommer"; state = "off"; }
-
- ]
- [ 64 207 255 ] 128 # hellblau
- )
- (lightcond "Duschenster auf"
- [ { condition = "state"; entity_id = "binary_sensor.dusche_fenster_contact"; state = "on"; }
- { condition = "state"; entity_id = "input_boolean.ist_sommer"; state = "off"; } ]
- [ 64 207 255 ] 128 # hellblau
- )
- (lightcond "Nachtlicht"
- { condition = "state"; entity_id = "sun.sun"; state = "below_horizon"; }
- [ 255 190 0 ] 90 # red
- )
- (lightcond "Kehrwoche"
- { condition = "state"; entity_id = "calendar.kehrwoche_kehrwoche"; state = "on"; }
- [ 204 0 255 ] 128 # pink
- )
- ];
- default = {
- service = "light.turn_off";
- entity_id = nachtlicht;
- };
- }
- ];
- }
- ];
-}
diff --git a/makefu/2configs/home/ham/automation/giesskanne.nix b/makefu/2configs/home/ham/automation/giesskanne.nix
deleted file mode 100644
index 400e553e8..000000000
--- a/makefu/2configs/home/ham/automation/giesskanne.nix
+++ /dev/null
@@ -1,99 +0,0 @@
-# uses:
-# switch.crafting_giesskanne_relay
-let
- cam = {
- name = "chilicam";
- camera = "camera.espcam_02";
- light = "light.espcam_02_light";
- seconds = 90; # default shutoff to protect the LED from burning out
- };
- seconds = 60*5; # time for giesskanne - 5 minutes
- pump = "switch.arbeitszimmer_giesskanne_relay";
- light = "switch.terrasse_plug_relay";
-
- # sensor = "sensor.statistics_for_sensor_crafting_brotbox_soil_moisture";
-in
-{
- services.home-assistant.config =
- {
- #sensor = map ( entity_id: {
- # platform = "statistics";
- # name = "Statistics for ${entity_id}";
- # inherit entity_id;
- # max_age.minutes = "60";
- # sampling_size = 1000;
- # }) [ "sensor.crafting_brotbox_soil_moisture" ];
-
- automation =
- [
-
- ##### brotbox
- { alias = "Water the plant for ${toString seconds} seconds and turn on the light";
- trigger = [
- { # trigger at 23:15 no matter what
- # TODO: retry or run only if switch.wasser is available
- platform = "sun";
- event = "sunrise";
- }
- ];
- action =
- [
-
- { # now turn on the pumping services
- # i do not start hte pump and light before the snapshot because i do
- # not know how long it takes (do not want to water the plants for too long)
- service = "homeassistant.turn_on";
- entity_id = [ pump light ];
- }
- { delay.seconds = seconds; }
- {
- service = "homeassistant.turn_off";
- entity_id = [ pump cam.light ];
- }
- { # TODO: we could also create a recording with camera.record
- service = "camera.snapshot";
- data = {
- entity_id = cam.camera;
- # TODO: create /var/lib/hass/cam/ - now being done manually
- filename = "/var/lib/hass/cam/${cam.name}_{{ now().strftime('%Y%m%d-%H%M%S') }}.jpg";
- };
- }
- ];
- }
- { alias = "Turn off the light at sunset";
- trigger = [
- {
- platform = "sun";
- event = "sunset";
- # offset = "+02:00:00";
- }
- ];
- action =
- [
- {
- service = "homeassistant.turn_off";
- entity_id = [ light ];
- }
- ];
- }
-
- { alias = "Always turn off water after ${toString (seconds * 2)}s";
- trigger = [
- {
- platform = "state";
- entity_id = pump;
- to = "on";
- for.seconds = seconds*2;
- }
- ];
- action =
- [
- {
- service = "homeassistant.turn_off";
- entity_id = [ pump ];
- }
- ];
- }
- ];
- };
-}
diff --git a/makefu/2configs/home/ham/automation/ladestecker_timer.nix b/makefu/2configs/home/ham/automation/ladestecker_timer.nix
del