From df60cdea0a5beb2df8046bc85b8789862ee8c040 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 4 Apr 2019 09:50:16 +0200 Subject: ma bureautomation: remove faulty motion detector --- makefu/2configs/bureautomation/hass.nix | 65 ++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 18 deletions(-) (limited to 'makefu/2configs/bureautomation/hass.nix') diff --git a/makefu/2configs/bureautomation/hass.nix b/makefu/2configs/bureautomation/hass.nix index 007d00b0..a104f0c4 100644 --- a/makefu/2configs/bureautomation/hass.nix +++ b/makefu/2configs/bureautomation/hass.nix @@ -1,8 +1,9 @@ { pkgs, lib, ... }: let + kodi-host = "192.168.8.11"; in { networking.firewall.allowedTCPPorts = [ 8123 ]; - + state = [ "/var/lib/hass/known_devices.yaml" ]; services.home-assistant = { enable = true; config = { @@ -33,7 +34,8 @@ in { retain = true; }; }; - switch = (import ./switch/tasmota_switch.nix); + switch = (import ./switch/tasmota_switch.nix) ++ + (import ./switch/rfbridge.nix); light = (import ./light/statuslight.nix) ++ (import ./light/buzzer.nix); timer = { @@ -54,7 +56,12 @@ in { { platform = "kodi"; name = "wbob"; - host = "192.168.8.11"; + host = kodi-host; + } + ]; + media_player = [ + { platform = "kodi"; + host = kodi-host; } ]; script = (import ./script/multi_blink.nix) {inherit lib;}; @@ -70,6 +77,10 @@ in { camera = (import ./camera/verkehrskamera.nix); + # not yet released + #person = + # (import ./person/team.nix ); + frontend = { }; http = { }; conversation = {}; @@ -82,36 +93,55 @@ in { { view = "yes"; entities = [ "group.sensors" + "group.camera" "group.outside" - "group.switches" - "group.automation" - # "group.camera" + "group.team" + "group.nachtlicht" + # "group.switches" ]; }; automation = [ - "timer.felix_10h" - "script.blitz_10s" - "script.buzz_red_led_fast" - "camera.Baumarkt" ]; switches = [ "switch.bauarbeiterlampe" "switch.blitzdings" "switch.fernseher" "switch.feuer" - "switch.nachtlicht" "light.status_felix" "light.status_daniel" "light.buslicht" "light.redbutton_buzzer" ]; - - camera = [ ]; + team = [ + "device_tracker.thorsten_phone" + "device_tracker.felix_phone" + "device_tracker.ecki_tablet" + "device_tracker.daniel_phone" + "device_tracker.carsten_phone" + # "person.thorsten" + # "person.felix" + # "person.ecki" + # "person.daniel" + ]; + camera = [ + "camera.Baumarkt" + "camera.Autobahn_Heilbronn" + "camera.Autobahn_Singen" + ]; + nachtlicht = [ + "switch.nachtlicht_a" + "switch.nachtlicht_b" + "switch.nachtlicht_c" + "switch.nachtlicht_d" + ]; sensors = [ - "binary_sensor.motion" - "binary_sensor.redbutton" + "media_player.kodi" + "script.blitz_10s" + "script.buzz_red_led_fast" + "timer.felix_10h" "sensor.easy2_dht22_humidity" "sensor.easy2_dht22_temperature" + # "binary_sensor.redbutton" ]; outside = [ # "sensor.ditzingen_pm10" @@ -120,8 +150,7 @@ in { "sensor.dark_sky_humidity" # "sensor.dark_sky_pressure" "sensor.dark_sky_hourly_summary" - "camera.Autobahn_Heilbronn" - "camera.Autobahn_Singen" + "device_tracker.router" ]; }; # only for automation @@ -131,7 +160,7 @@ in { automation = (import ./automation/bureau-shutdown.nix) ++ (import ./automation/nachtlicht.nix) ++ (import ./automation/10h_timer.nix); - + device_tracker = (import ./device_tracker/openwrt.nix ); }; }; } -- cgit v1.2.3 From 197064cdba91649fd2e94e57d4ba54a0a3ea4b85 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 4 Apr 2019 22:54:18 +0200 Subject: ma bureautomation: show switches again --- makefu/2configs/bureautomation/hass.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'makefu/2configs/bureautomation/hass.nix') diff --git a/makefu/2configs/bureautomation/hass.nix b/makefu/2configs/bureautomation/hass.nix index a104f0c4..f3a400ac 100644 --- a/makefu/2configs/bureautomation/hass.nix +++ b/makefu/2configs/bureautomation/hass.nix @@ -97,7 +97,7 @@ in { "group.outside" "group.team" "group.nachtlicht" - # "group.switches" + "group.switches" ]; }; automation = [ @@ -110,7 +110,6 @@ in { "light.status_felix" "light.status_daniel" "light.buslicht" - "light.redbutton_buzzer" ]; team = [ "device_tracker.thorsten_phone" -- cgit v1.2.3 From 8172c6074419d9148fcab7b798e87f3168930bd7 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 5 Apr 2019 01:44:29 +0200 Subject: bureautomation: enable telegram bot --- makefu/2configs/bureautomation/hass.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'makefu/2configs/bureautomation/hass.nix') diff --git a/makefu/2configs/bureautomation/hass.nix b/makefu/2configs/bureautomation/hass.nix index f3a400ac..4e5fe7b6 100644 --- a/makefu/2configs/bureautomation/hass.nix +++ b/makefu/2configs/bureautomation/hass.nix @@ -55,9 +55,16 @@ in { notify = [ { platform = "kodi"; - name = "wbob"; + name = "wbob-kodi"; host = kodi-host; } + { + platform = "telegram"; + name = "telegrambot"; + chat_id = builtins.elemAt + (builtins.fromJSON (builtins.readFile + )).allowed_chat_ids 0; + } ]; media_player = [ { platform = "kodi"; @@ -88,6 +95,10 @@ in { logbook = {}; tts = [ { platform = "google";} ]; recorder = {}; + telegram_bot = [ + (builtins.fromJSON + (builtins.readFile )) + ]; group = { default_view = { view = "yes"; -- cgit v1.2.3