Skip to content

colfin22/ha-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

463 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ  Colm's Home Assistant Config

Home Assistant Automations License

A family smart home in Ireland โ€” built for reliability, not demos.

Buy Me a Coffee


This repository is the live, version-controlled configuration that runs the house โ€” every automation, dashboard, integration and helper, committed to git and backed up nightly. The whole setup is deliberately local-first: lighting, alarm, cameras, voice and heating keep working without the cloud, the more involved logic lives in Node-RED, and long-term history is kept in InfluxDB well past Home Assistant's recorder window. It's public so anyone can borrow the ideas or patterns for their own setup.


๐Ÿ—๏ธ Infrastructure

Component Detail
PVE Proxmox VE โ€” 2ร— Beelink S12 Mini PC (Intel N100, 16GB DDR4, 500GB SSD)
HA Home Assistant OS โ€” Proxmox VM
NAS TrueNAS SCALE โ€” N100 Mini PC (32GB DDR4, 500GB SSD), MainPool (2ร— mirror, 4ร— 8TB, ~10.88 TiB usable)
Network MikroTik router + 6ร— managed switches/APs; wireless managed via MikroTik CAPsMAN
VLANs Home ยท IoT ยท Work ยท Guest ยท Mgmt ยท Stack
DNS Pi-hole ร— 2 (Proxmox LXC primary + TrueNAS app replica)
Cameras Frigate NVR โ€” Proxmox LXC, recordings on USB 3.0 RAID 0 enclosure
Monitoring Zabbix โ€” TrueNAS hosted; InfluxDB + Grafana โ€” TrueNAS apps
Prox3 (Daire) Intel NUC (i3-7100U, 4GB RAM, 256GB SSD) running encrypted Proxmox โ€” connected via WireGuard

๐Ÿ”Œ Integrations

Core

Integration Purpose
Alarmo Multi-zone alarm with Zigbee sensors
Zigbee2MQTT Zigbee device bridge โ€” all household lights, dimmer switches, motion & contact sensors
Music Assistant Multi-room audio โ€” TuneIn (radio), Subsonic/Navidrome (local music), gPodder (podcasts)
Frigate Local AI camera NVR โ€” person/cat/fox/vehicle detection
go2rtc Low-latency camera stream server (built into Frigate)
Reolink Doorbell camera โ€” doorbell press events only; recording and detections handled by Frigate
Immich Self-hosted photo library โ€” Proxmox LXC, data in TrueNAS dataset
LLM Vision AI camera analysis via Google Gemini

Network & Infrastructure

Integration Purpose
MikroTik Router Router stats, interface monitoring
Proxmox VE VM/LXC status monitoring
TrueNAS Pool health, disk temps, dataset usage
Pi-hole DNS query stats for two instances
MQTT Message broker โ€” Proxmox LXC, underpins Z2M, Frigate and Alarmo
Nextcloud Self-hosted cloud โ€” Proxmox VM, data in TrueNAS dataset
Collabora Online Self-hosted office suite โ€” Ubuntu Docker, WOPI integration with Nextcloud for in-browser document editing
InfluxDB Long-term time-series store โ€” TrueNAS app; see the Long-term Data section below
Node-RED Flow-based automation โ€” Proxmox LXC; see the Node-RED Workflows section below

Energy & Environment

Integration Purpose
Autarco Solar inverter โ€” vendor in liquidation and the cloud integration is offline; migrating to local Modbus via SolaX Modbus (RS485 adapter on order)
myenergi Solar production, Eddi diverter โ€” preferred for live stats (faster updates)
Netatmo Smart Thermostat Controlled locally over HomeKit; heating logic runs in Node-RED (see below)
Met ร‰ireann Weather warnings โ€” custom REST sensor polling the Met ร‰ireann open data API; automation fires immediately on new alerts
Forecast.Solar Solar production forecast
Electricity Maps Grid CO2 intensity
esbn-to-mqtt HA add-on โ€” ESB Networks smart meter data via HDF - feeds Solar dashboard and InfluxDB

Media & Lifestyle

Integration Purpose
NVIDIA Shield TV Living room media player โ€” IoT VLAN
Google Cast Kitchen display, Google Home & Chromecast Audio devices โ€” whole-home audio โ€” IoT VLAN
Samsung TV 65" sitting room TV โ€” IoT VLAN
Android TV Aoife MiBox S + Cian MiTV + Kitchen MiBox โ€” IoT VLAN
Logitech Harmony 2 hubs โ€” IoT VLAN
Navidrome Self-hosted music streaming โ€” Proxmox LXC, data in TrueNAS dataset
Calibre-Web Self-hosted ebook library โ€” Proxmox LXC, data in TrueNAS dataset
Paperless-ngx Document management โ€” Ubuntu Docker, data in TrueNAS dataset
Wallabag Read-it-later โ€” Ubuntu Docker, data in TrueNAS dataset
Stremio Streaming media
Dawarich Location & travel tracking โ€” TrueNAS app, fed from HA Companion App on Android
Waste Collection Schedule Panda Waste bin collection โ€” calendar alerts for upcoming collections
CalDAV Calendar integration
HA Companion App Mobile app on all phones โ€” presence, notifications, location

๐Ÿค– Automations

56 automations across the home. Key highlights:

๐Ÿ’ก Lighting

  • All lights on Zigbee2MQTT โ€” every room migrated off the Hue bridge to Zigbee2MQTT, with HA-native scenes per room (bright/dimmed and colour moods)
  • Dimmer switches โ€” per-room Hue dimmers (paired to Zigbee2MQTT) toggle and step brightness for each room
  • Occupancy lighting โ€” hallway, landing, and rooms via Zigbee motion sensors + lux thresholds; scene-based (bright/dimmed), fade-to-off on exit
  • Sunrise/sunset โ€” scene transitions throughout the day
  • Sitting room power off โ€” turns off all Harmony devices after 30 minutes of no presence

๐Ÿ”’ Security

  • Alarm โ€” Alarmo multi-zone (house + shed); strobe all lights on trigger (saves/restores state). Arming, disarming, NFC tags and notifications run in Node-RED (see below).
  • Cat alarm โ€” protects Cian's cockatiel when cage is outside; NFC-toggled, Frigate cat detection โ†’ TTS alert; enabling it turns the kitchen TV lightstrip green (restored when disabled)
  • Morning security report โ€” summary of overnight person detections delivered at 07:00; also notes any cats, foxes, dogs or birds spotted overnight
  • Patio door โ€” NFC-toggled gate suppresses Frigate rear door & shed alerts when patio door is open; auto-disarms on door close

๐ŸŒค๏ธ Weather

  • Morning forecast โ€” daily weather summary pushed to all phones at 08:30 with emoji-coded conditions; if Colm or Olivia is more than 100km from home a second block is added for their away location
  • Evening forecast โ€” tomorrow's forecast pushed at 21:00 each night with the same away-location logic
  • Frost warning โ€” each weekday morning at 07:30, if the outdoor temperature is at or below freezing a push goes to Colm and Olivia to allow extra time to scrape the car windscreen
  • Fog warning โ€” each weekday morning at 07:30, if either weather source reports fog a push goes to Colm and Olivia to allow extra time on the commute

๐Ÿ“ฆ Alerts

  • Parcel delivery โ€” Smart Parcel Box sensor triggers a mobile notification + TTS announcement on delivery
  • Low battery โ€” monitors all Zigbee devices, notifies when battery low
  • Weather warning โ€” Met ร‰ireann official warnings โ†’ immediate mobile alert
  • Bins out โ€” the night before a Panda Waste collection: a 19:00 reminder of which bin types are due, then at 22:00 a check of Frigate's waste_bin object on the Front Van camera โ€” if no bin is detected at the kerb, it announces a TTS reminder on the speakers and sends a second phone alert with a camera snapshot
  • Appliance notifications โ€” washing machine, dishwasher and tumble dryer; notifies on cycle start and finish with energy cost; TTS announcement on completion; 22:00โ€“07:00 quiet window
  • Printer auto power cycle โ€” checks every 15 minutes (07:00โ€“21:00) and power-cycles the Brother printer socket if it goes offline

๐ŸŽ‰ Fun

  • Hello Olivia โ€” Frigate face-recognises Olivia at the doorbell on weekdays 1โ€“2pm โ†’ LLM Vision (Gemini) writes a short, witty compliment about how she looks that day from the doorbell snapshot, spoken on the kitchen + sitting-room speakers after a short delay (volume boosted then restored, falls back to a generic greeting if vision fails)
  • Colm's Grand Return โ€” Frigate face recognition detects Colm at the doorbell after 3+ days away; plays a trumpet fanfare and announces his return on all speakers

๐ŸŽต Audio

  • TTS โ€” queued announcements with volume save/restore (script.tts_announce)
  • Today FM โ€” one-tap play on kitchen display via Music Assistant

๐ŸŒก๏ธ Climate

  • Heating โ€” the house heating runs in Node-RED, driven by House Mode and the time of day (see the Heating Control flow below). The Netatmo thermostat is controlled locally over HomeKit and holds a flat baseline; Node-RED sets the comfort, evening, overnight and away temperatures on top.

โšก Energy

  • Top days โ€” solar production and grid export top 5 best days tracked independently; both leaderboards update automatically each evening at 23:59 using myenergi sensors
  • Morning energy stats โ€” daily solar and energy summary pushed each morning
  • Grid-free day โ€” notifies both phones at 20:00 if no grid electricity was imported after 8am; includes export total and estimated earnings
  • Peak-rate nudge โ€” if the washing machine, dishwasher or tumble dryer starts a cycle during the 17:00โ€“19:00 peak electricity window, both phones get a push suggesting the run could wait until after 19:00 (notification only, no announcement)

๐Ÿ  Infrastructure Monitoring

  • Infrastructure health & backup alerts โ€” migrated to Node-RED for more complex workflows; see the Infra Health & Alerts flow below.
  • Zigbee2MQTT watchdog โ€” auto-restart with 2 attempts, notifies on outcome
  • Update Tuesday โ€” generates the monthly homelab update report on the Monday before the 2nd Tuesday; notifies Colm with a link at 19:00
  • Maintenance mode โ€” a toggle on the infrastructure dashboard opens a maintenance window that silences infrastructure alerts during planned work, and mirrors itself into matching Zabbix and Uptime Kuma maintenance windows (auto-expiring after 12 hours) so no monitoring layer raises planned-work noise
  • Post-maintenance report โ€” marking Update Tuesday done on the dashboard is refused while alerts are active; otherwise it ends the maintenance window and generates a maintenance report (windows, reboots, versions), shown in place of the update report until next month's arrives
  • Backup freshness โ€” daily check that every offsite backup dataset ran recently; alerts if any goes stale

๐Ÿ”ด Node-RED Workflows

Complex, multi-input automation runs in Node-RED (Proxmox LXC). The full flows and config are open source at colfin22/node-red-config.

  • House Mode โ€” the single source of truth other flows react to: input_select.house_mode (Home / Away / Sleeping) plus overlays for storm (auto from Met ร‰ireann) and maintenance (blocks Away, silences infra alerting, auto-expires 4 h). Away = both adults out with no indoor motion remaining, so it never trips with someone still inside (Cian has no phone โ€” the motion sensors cover him). Sleeping = 22:00โ€“07:00, TVs and sitting-room lights off and 20 minutes without motion, at least one adult home. Home resumes on the first morning activity.
  • House Alarm โ€” follows house mode: Away arms away, Sleeping arms night, Home disarms. Guest mode suspends away-arming only (guests indoors would trip it) โ€” night arming still happens, and switching guest mode off re-arms to match immediately. A welcome-home announcement plays on return from Away. Every alarm event across house and shed โ€” armed, disarmed, triggered, cleared, failed-to-arm โ€” is pushed to both phones and announced on the speakers, however it was changed (phone, NFC or automatic).
  • Alarm NFC Tags โ€” the front-door tag disarms the house; the back-door tag stands the shed down for up to two hours, re-arming 15 minutes after the door closes (left open at the cap โ†’ stays disarmed and sends a push + spoken reminder). At 10pm the shed auto-arms if still disarmed with the door closed.
  • Heating Control โ€” sets the local HomeKit thermostat from input_select.house_mode + time of day (the Netatmo holds a flat baseline; Node-RED only ever raises above it). Home โ†’ comfort, warmest 7โ€“10pm. Sleeping โ†’ cooler overnight, warming from 7am โ€” pulled earlier on cold mornings by a nightly Met ร‰ireann forecast check (below-freezing forecasts also push a heads-up the night before). Away โ†’ baseline, dropping further after a full day empty (a toggle disables the deep setback for absences with pets or plants) โ€” but pre-heats toward comfort when someone is driving home (within ~10 km and getting closer; latches once triggered so a GPS wobble can't bounce the setpoint). Boosting โ€” from the dashboard controls or by nudging the thermostat above the schedule โ€” holds that temperature for two hours; turning it down just cancels. Guest mode keeps the Away setback off while visitors stay. The target is re-asserted every 30 minutes and survives reboots.
  • Camera Concierge โ€” all Frigate alerting: grouped 3-stage pushes (instant text โ†’ snapshot โ†’ GIF) to both phones, per zone (Front / Doorbell / Rear) and object type; tapping opens the event clip. Doorbell persons also cast to the kitchen display and Shield TV; couriers and the postman get spoken announcements (silenced while Sleeping โ€” pushes unaffected); rear cameras mute while the patio-door switch is on. While Sleeping, a person at the cars strobes the lights and warns over the speakers; while Away, pushes escalate to a high-priority โš ๏ธ โ€œCameras Awayโ€ channel. (Replaced seven former HA notify/alert automations.)
  • Infra Watchdog โ€” escalating alerts off Uptime Kuma (service reachability), quiet-hours aware; TTS only when Colm is home. Silenced while maintenance mode is on โ€” still logged, and anything still down when maintenance ends re-alerts on its next reminder cycle.
  • Infra Health & Alerts โ€” all homelab health and backup alerting in one flow: server/NAS/app health (CPU, memory, disk, pool, temperature, offline, updates), a daily 07:30 audit that every Proxmox backup ran, config-backup and Restic failure alerts, and Zabbix relays. Notifications go to Colm tagged Health / Backup / Monitoring, with a 22:00โ€“07:00 quiet window flushed at 07:00; silenced (logged only) while maintenance mode is on.

The House Alarm flow in Node-RED

One of the Node-RED tabs โ€” the House Alarm flow: house-mode-driven arming and disarming, guest-mode handling, NFC overrides, low-battery nudges and spoken event announcements across house and shed.


๐Ÿ› ๏ธ Fleet Management (Ansible + Semaphore)

The wider fleet โ€” the Proxmox nodes, every LXC and VM, and the MikroTik estate โ€” is managed with Ansible from a dedicated control container, with Semaphore as its web front end (config in a private repo).

  • Baseline โ€” every Linux host gets the same treatment: timezone, base tooling, and key-only SSH (password authentication disabled fleet-wide). Safe to re-run at any time โ€” a second pass changes nothing โ€” and applied canary-first.
  • Facts report โ€” a read-only sweep renders a Markdown inventory of the whole estate (OS, kernel, CPU/RAM, disk, uptime; model and serial for the network devices), with git history as the archive.
  • Updates โ€” a rolling update playbook that refuses to run unless maintenance mode is on (so Zabbix, Uptime Kuma and Node-RED alerting are guaranteed silenced), reboots only the guests that both need it and allow it โ€” reboot-sensitive hosts (the MQTT broker, Node-RED, the NVR, the uptime monitor) report a pending reboot instead โ€” and never reboots a hypervisor: node reboots stay a deliberate manual step at the end of the maintenance window.
  • Docker estate โ€” Watchtower is gone; container updates are deliberate instead. A read-only check compares every running container against its registry digest and reports current, outdated or pinned; a maintenance-gated update pulls only the stacks explicitly opted in (the NVR and photo stacks are deliberately untouchable); and a prune pass reclaims superseded images afterwards.
  • Housekeeping & assurance โ€” read-only reports for pending updates (Linux and RouterOS alike) and for backup freshness โ€” every guest's latest snapshot on both backup stores checked against its expected cadence โ€” plus a safe fleet-wide disk cleanup.
  • Semaphore โ€” push-button task templates for the lot, from ping and facts through updates, Docker checks, stack restarts and onboarding a new guest, with run history and logs.

๐Ÿ“Š Dashboards

Tab Contents
Home Room summary, security status, motion, presence
Climate Heating, Netatmo thermostat, temperature sensors
Weather Met ร‰ireann warnings, forecast, outdoor conditions
Security Alarm panel, camera feeds, activity logbook
Solar Solar production, import/export, Eddi diverter, top 5 solar days & top 5 export days, ESB Networks official meter (esbn-to-mqtt)
Floorplan SVG-based downstairs + upstairs with live entity overlays
Appliances Washing machine, dishwasher and other appliance monitoring
Map Device tracker map โ€” household presence
Network Self-hosted, tabbed homelab infrastructure dashboard, embedded as a live status page: hosts, storage, network and app health at a glance, with 24-hour trend graphs, radial gauges, a status matrix and per-service response times, drawn from Uptime Kuma, InfluxDB, Zabbix and Home Assistant

The Network tab โ€” a self-hosted homelab infrastructure dashboard: hosts, storage, network and app health at a glance, with 24-hour CPU/RAM trends, a service-status matrix and pending updates

A separate "How it Works" sidebar dashboard (visible to all users) holds a full, plain-language household guide โ€” house modes, guests, heating, lights, alarm, cameras, announcements and playing music โ€” served from www/how-the-house-works.html. It's the family reference: kept up to date as the setup evolves, so whenever a setting is adjusted or a new feature is added, everyone can simply be pointed to the guide to see how it works.

The "How it Works" guide โ€” the section index and a few example sections (House Mode, dimmer switches, the alarm), all written in plain language


๐Ÿ“ˆ Long-term Data (InfluxDB + Grafana)

HA's recorder purges after 7 days. InfluxDB (TrueNAS app) stores everything long-term; Grafana (TrueNAS app) provides dashboards on top of it with Zabbix as a second data source.

What's stored

Measurement Source Range Fields
myenergi_daily myenergi Eddi CSV exports 11-06-2025 โ†’ present Solar generated, grid import, grid export, green energy, Eddi divert
autarco_daily Autarco inverter 11-06-2025 โ†’ present Solar production, export, import, consumption
esbn_daily ESB Networks HDF (official meter) 28-05-2024 โ†’ present Import, export (3โ€“4 day lag; recent days gap-filled from Autarco)
esbn_halfhourly ESB Networks HDF 28-05-2024 โ†’ ~3 days ago Half-hourly import/export profile
All HA entities HA InfluxDB integration 28-05-2026 โ†’ present Every entity state written continuously โ€” preserves history beyond recorder purge

Grafana dashboards

Energy โ€” Current โ€” Live solar and import/export running totals; latest complete day summary stats.

Energy โ€” History โ€” Daily energy timeseries, half-hourly profile, monthly summary, top days leaderboard.

Network โ€” Infrastructure services, network metrics, Zabbix-sourced host stats.

Grafana Energy โ€” History dashboard

Energy โ€” History: daily energy (solar, grid import/export, home consumption, Eddi hot water), the half-hourly ESB-meter grid import/export profile, and monthly totals across the last year.

Grafana Network dashboard

Network: WAN download/upload throughput plus CPU and memory utilisation across servers, LXCs and Proxmox nodes over 24 hours.


๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ Household

Person Phone Notification priority
Colm notify.mobile_app_np3 All alerts
Olivia notify.mobile_app_pixel_6a Security + presence
Cian notify.mobile_app_pixel_7a Selected
Daire (visitor) notify.mobile_app_pixel_9a Only when at the house

All alert automations respect a 22:00โ€“07:00 quiet window โ€” overnight events are held and delivered with the original trigger time in the title.


๐Ÿ’พ Backup Strategy

System Method Repo
Home Assistant Git โ€” selective .storage files colfin22/ha-config (this repo)
Home Assistant VM Proxmox hourly + daily snapshots โ€” 24h/7d retention โ€”
MikroTik Proxmox cron โ†’ API export nightly at 02:00 colfin22/mikrotik-config
TrueNAS Config Proxmox cron โ†’ API config/save weekly Sunday 02:00 colfin22/truenas-config
Frigate Git โ€” config.yml colfin22/frigate-config
Immich Git โ€” docker-compose.yml colfin22/immich-config
Ubuntu Docker Git โ€” all docker-compose.yml and env files, systemd timer daily 02:00 colfin22/ubuntu-docker-config
InfluxDB + Grafana Git โ€” dashboards + provisioning config colfin22/influxdb-grafana-config
Node-RED Git โ€” flows, settings, palette + docker-compose; systemd timer daily 02:30 colfin22/node-red-config
Proxmox VMs & LXCs Proxmox Backup Server (PBS) โ€” nightly snapshot sync to remote PBS at Prox3 (Daire) โ€”
TrueNAS Datasets restic โ€” 6 datasets (photos, nextcloud, paperless, influxdb, zabbix, claude-memory) โ†’ Prox3 (Daire) daily via sftp; failure alerts via Node-RED โ€”
Claude Memory rsync every 6h โ†’ TrueNAS encrypted dataset (AES-256-GCM) โ†’ Prox3 (Daire) daily โ€”

This repo (ha-config) and the Node-RED flows repo are public. All other config repos (MikroTik, TrueNAS, Frigate, Immich, InfluxDB+Grafana, Ubuntu Docker, Ansible) are private. HA backup includes: dashboards, helpers, Alarmo, zones, persons, tags, energy config, areas.


๐Ÿงฉ Custom Components (via HACS)


Running on Proxmox ยท TrueNAS SCALE ยท MikroTik ยท Ireland ๐Ÿ‡ฎ๐Ÿ‡ช
Built by Colm, with Claude as a hands-on assistant for code, config, and debugging.
MIT licence โ€” copy whatever is useful.

About

๐Ÿ  The live, version-controlled configuration behind a family smart home in Ireland โ€” local-first automations, cameras, lighting, alarm, heating and energy, with the complex logic in Node-RED and long-term data in InfluxDB. Self-hosted on Proxmox + TrueNAS.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages