Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aneisch committed Jun 16, 2024
1 parent 6317732 commit 9f04e8c
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 30 deletions.
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# My Home Assistant Config

[![Build Status](https://github.com/aneisch/home-assistant-config/actions/workflows/check-ha-release-compatibility.yml/badge.svg)](https://github.com/aneisch/home-assistant-config/actions)
[![GitHub last commit](https://img.shields.io/github/last-commit/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/commits/master)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/graphs/commit-activity)
[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2024.6.2%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2024.6.3%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
<br><a href="https://www.buymeacoffee.com/aneisch" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-black.png" width="150px" height="35px" alt="Buy Me A Coffee" style="height: 35px !important;width: 150px !important;" ></a>

I do my best to keep [Home Assistant](https://github.com/home-assistant/home-assistant) on the [latest release](https://github.com/home-assistant/home-assistant/releases/latest). I'm heavily utilizing [AppDaemon](http://appdaemon.readthedocs.io/en/latest/) and [NodeRed](https://flows.nodered.org/node/node-red-contrib-home-assistant-websocket) for advanced/templated automations. See [Appdaemon config](https://github.com/aneisch/home-assistant-config/tree/master/extras/appdaemon) and my NodeRed screenshots below for details. Most of my setup is run as Docker containers (see [docker-compose](https://github.com/aneisch/home-assistant-config/tree/master/extras/docker-compose) for container list).

I do my best to keep [Home Assistant](https://github.com/home-assistant/home-assistant) on the [latest release](https://github.com/home-assistant/home-assistant/releases/latest). I'm heavily utilizing [AppDaemon](http://appdaemon.readthedocs.io/en/latest/) and [NodeRed](https://flows.nodered.org/node/node-red-contrib-home-assistant-websocket) for advanced/templated automations. See [Appdaemon config](https://github.com/aneisch/home-assistant-config/tree/master/extras/appdaemon) and my NodeRed screenshots below for details. Using [Home Assistant Companion](https://itunes.apple.com/us/app/home-assistant-companion/id1099568401?mt=8) for iOS, built-in browser shortcut in Android. Also using [Tasker Plugin](https://github.com/MarkAdamson/home-assistant-plugin-for-tasker) from [MarkAdamsom](https://github.com/MarkAdamson) to trigger some automations and scripts from the client-side. Most of my home automation software pieces run as Docker containers (see [docker-compose for container list](https://github.com/aneisch/home-assistant-config/tree/master/extras/docker-compose)).

My Home Assistant installation contains many different components and runs on a [Gen7 i3 NUC](https://amzn.to/2K0vab6) running Centos 7:
My Home Assistant installation runs on a [Gen7 i3 NUC](https://amzn.to/2K0vab6) with Centos 7:

- Home Assistant Companion for iOS and Android device tracking
- Lots of Docker containers, some described below. See [Docker Compose](https://github.com/aneisch/home-assistant-config/tree/master/extras/docker-compose)
- [Frigate](https://frigate.video/) for security camera recording and object detection
- A plethora of Lolin D1 Mini and S2 Mini sensors via [ESPHome](https://esphome.io/components/api.html) (using ESPHome API, not MQTT). See [/extras/esphome](https://github.com/aneisch/home-assistant-config/tree/master/extras/esphome) for configs.
- Milights with [Homebrew MiLight controller](http://blog.christophermullins.com/2017/02/11/milight-wifi-gateway-emulator-on-an-esp8266/) using D1 Mini and NRF24L01.
- Home Assistant Companion for iOS and Android device tracking
- A plethora of Lolin D1 Mini and S2 Mini sensors via [ESPHome](https://esphome.io/components/api.html) (using ESPHome API, not MQTT). See [/extras/esphome](https://github.com/aneisch/home-assistant-config/tree/master/extras/esphome) for configs
- Milights with [Homebrew MiLight controller](http://blog.christophermullins.com/2017/02/11/milight-wifi-gateway-emulator-on-an-esp8266/) using D1 Mini and NRF24L01
- Zwave, Zigbee, and Wifi (ESPHome) smart plugs
- ZHA using [CC2531](https://amzn.to/2L5xKNB) running zigbee2mqtt firmware
- Z-Wave JS using Aeon Labs USB stick with:
- 1 AEON Labs DSA03XXX-ZW
- 1 AEON Labs DSA03XXX-ZW
- 1 AEON Labs ZW090
- 2 First Alert (BRK Brands Inc) ZCOMBO
- 1 GE 12719 / ZW4101
Expand All @@ -43,28 +43,28 @@ My Home Assistant installation contains many different components and runs on a
- [AppDaemon](https://appdaemon.readthedocs.io/en/latest/) controlling a large number of automations and intelligent AC control. See [/extras/appdaemon](https://github.com/aneisch/home-assistant-config/tree/master/extras/appdaemon) for configs.
- [NodeRed](https://flows.nodered.org/node/node-red-contrib-home-assistant-websocket) for irrigation and other automations (see screenshot below)
- [Amazon Echos](https://amzn.to/2VLPPm0)
- [Amazon Alexa Smart Home API](https://www.home-assistant.io/components/alexa.smart_home/) using AWS Lambda
- Custom routines configured in the Alexa App.

- [Amazon Alexa Smart Home API](https://www.home-assistant.io/components/alexa.smart_home/) using AWS Lambda
- Custom routines configured in the Alexa App
- [Alexa Media Player Custom Component](https://github.com/keatontaylor/alexa_media_player)
- UPS monitoring using [apcupsd](https://github.com/gersilex/apcupsd-docker)
- Home power monitoring with ESPHome-flashed Emporia View
- Whole home power monitoring with ESPHome-flashed Emporia View
- Github actions to test beta and stable builds against config

Also using Grafana/Influx for graphing, both running in Docker containers on NUC, see [docker-compose](https://github.com/aneisch/home-assistant-config/tree/master/extras/docker-compose) for container list. Home Assistant, along with a few other web apps, are proxied through my firewall and fronted and secured by Cloudflare.

Home Assistant and other containers have ingress handled automatically by [Traefik](https://doc.traefik.io/traefik/) and are accessible locally or fronted and secured by Cloudflare Zero Trust Network Access.

## Some statistics about my installation:
Description | value
-- | --
Lines of ESPHome YAML | 2802
Lines of Home Assistant YAML | 9173
Lines of Home Assistant YAML | 9182
[Integrations](https://www.home-assistant.io/integrations/) in use | 61
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26
Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37

Description | value
-- | --
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 121
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 122
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 140
Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 15
Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 15
Expand Down Expand Up @@ -101,8 +101,9 @@ Entities in the [`update`](https://www.home-assistant.io/components/update) doma
Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1
Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 1
Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 6
**Total state objects** | **1235**
**Total state objects** | **1236**
## The HACS integrations/plugins that I use:

**Appdaemon**:<br>
[aneisch/follow_me_appdaemon](https://github.com/aneisch/follow_me_appdaemon)<br>

Expand Down Expand Up @@ -158,8 +159,9 @@ Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain |


# Interface
![UI](images/1.png)
![UI](images/2.png)

![UI](images/1.png)
![UI](images/2.png)
![UI](images/3.png)
![UI](images/4.png)
![UI](images/5.png)
Expand Down
12 changes: 12 additions & 0 deletions automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -957,3 +957,15 @@
then:
- service: lock.lock
entity_id: lock.all_doors
- id: '1718318289284'
alias: PFsense Backup
description: ''
trigger:
- platform: time_pattern
hours: /1
condition: []
action:
- service: shell_command.commit_pfsense_changes
metadata: {}
data: {}
mode: single
2 changes: 1 addition & 1 deletion extras/Node-RED/flows.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions extras/docker-compose/other/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,13 @@ services:
ports:
- 32168:32168
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/codeproject/config:/etc/codeproject/ai
#- /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYolo/custom-models/
- /opt/codeproject/NETmodules:/app/preinstalled-modules/ObjectDetectionYOLOv5Net/custom-models/
- /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYOLOv5-6.2/custom-models/
labels:
- com.centurylinklabs.watchtower.monitor-only=true
- traefik.enable=true
- traefik.http.services.codeproject.loadbalancer.server.port=32168
# HTTPS Local Only (with 80-->443 redirect)
Expand Down
2 changes: 2 additions & 0 deletions extras/docker-compose/unified/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -764,11 +764,13 @@ services:
ports:
- 32168:32168
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/codeproject/config:/etc/codeproject/ai
#- /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYolo/custom-models/
- /opt/codeproject/NETmodules:/app/preinstalled-modules/ObjectDetectionYOLOv5Net/custom-models/
- /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYOLOv5-6.2/custom-models/
labels:
- com.centurylinklabs.watchtower.monitor-only=true
- traefik.enable=true
- traefik.http.services.codeproject.loadbalancer.server.port=32168
# HTTPS Local Only (with 80-->443 redirect)
Expand Down
Binary file modified images/nodered_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/nodered_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 7 additions & 10 deletions packages/blinds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ automation:
- platform: time
at: "09:00:00"
id: morning
- platform: time
at: "10:30:00"
id: morning_later
- platform: state
entity_id: sun.sun
to: below_horizon
Expand Down Expand Up @@ -277,14 +280,17 @@ automation:
- cover.office_blinds
- cover.dining_room_blinds
- conditions: "{{ trigger.id == 'morning' }}"
alias: Open Blinds
alias: Open Blinds Morning
sequence:
- service: cover.open_cover
continue_on_error: true
target:
entity_id:
- cover.office_blinds
- cover.dining_room_blinds
- conditions: "{{ trigger.id == 'morning_later' }}"
alias: Open Blinds Morning Later
sequence:
# Only open blinds if guest mode is OFF
- if: "{{ states('input_boolean.guest_mode') == 'off' }}"
then:
Expand All @@ -293,15 +299,6 @@ automation:
target:
entity_id:
- cover.guest_bedroom_blinds
# Prevent stuck "opening" or "closing"
# - repeat:
# count: "13"
# sequence:
# - delay: 5
# - service: homeassistant.update_entity
# target:
# entity_id: >
# {{ expand(['group.guest_bedroom_blinds','group.dining_room_blinds', 'group.office_blinds']) | map(attribute='entity_id') | list}}

- alias: "Manually Update Blind State"
id: manually_update_blind_state
Expand Down
10 changes: 10 additions & 0 deletions scripts/commit_pfsense_changes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Run on NUC via SSH
cd /opt/pfsense

scp -P 23 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no [email protected]:/cf/conf/config.xml /opt/pfsense/

git add config.xml
git commit -m 'Autocommit by Home Assistant'
git push
2 changes: 1 addition & 1 deletion shell_command.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mount_plex: ssh nuc 'sudo mount -o timeo=15,soft,retry=2,nofail 10.0.1.20:/Backu

umount_plex: ssh nuc 'sudo umount -f /plex; docker stop plex'

#copy: ssh nuc 'nohup /usr/local/bin/nas-copy.sh &; exit'
commit_pfsense_changes: ssh nuc '/opt/homeassistant/scripts/commit_pfsense_changes.sh'

copy: ssh -n -f nuc "nohup /usr/local/bin/nas-copy.sh > /dev/null 2>&1 &"

Expand Down

0 comments on commit 9f04e8c

Please sign in to comment.