50e3107e38
Adds a command_line sensor (HAOS Media Partition Free, df of /media = sda8) and an automation that stops the Frigate add-on when free space drops below 50 GB for 2 min. Protects HAOS Core from the VAULT1 CIFS fallthrough fill scenario (RB-001). Fires regardless of CIFS mount state — the mount sensor can be stale during the crisis. Stop-only + max-priority ntfy alert; no auto-remount (needs admin token). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
# Loads default set of integrations. Do not remove.
|
|
default_config:
|
|
|
|
# Load frontend themes from the themes folder
|
|
frontend:
|
|
themes: !include_dir_merge_named themes
|
|
|
|
automation: !include automations.yaml
|
|
script: !include scripts.yaml
|
|
scene: !include scenes.yaml
|
|
http:
|
|
use_x_forwarded_for: true
|
|
trusted_proxies:
|
|
- 192.168.99.0/24 # <--- Trusts ANY device on your home network (Router, Server, Laptop)
|
|
- 172.16.0.0/12 # <--- Trusts all Docker containers
|
|
- 127.0.0.1 # <--- Localhost
|
|
|
|
command_line:
|
|
- binary_sensor:
|
|
name: "VAULT1 CIFS Mounted"
|
|
unique_id: vault1_cifs_mounted
|
|
command: "grep -c '172.30.32.1/VAULT1' /proc/mounts"
|
|
device_class: connectivity
|
|
scan_interval: 300
|
|
payload_on: "1"
|
|
payload_off: "0"
|
|
- sensor:
|
|
name: "HAOS Media Partition Free"
|
|
unique_id: haos_media_partition_free
|
|
# df of /media reports the DATA partition (sda8) that fills when VAULT1
|
|
# CIFS falls through. When CIFS is healthy this reads sda8 free (~1.x TB),
|
|
# NOT the 3.6T CIFS share — that's your post-reload sanity check.
|
|
command: "df -P -k /media | awk 'NR==2{printf \"%.1f\", $4/1048576}'"
|
|
unit_of_measurement: "GB"
|
|
state_class: measurement
|
|
scan_interval: 300
|
|
value_template: "{{ value | float(0) }}"
|
|
|
|
rest_command:
|
|
ntfy_grafana_alerts:
|
|
url: https://ntfy.goattw.net/grafana-alerts
|
|
method: POST
|
|
content_type: "text/plain"
|
|
payload: "{{ message }}"
|
|
headers:
|
|
Title: "{{ title | default('Home Assistant') }}"
|
|
Priority: "{{ priority | default('default') }}"
|
|
Tags: "{{ tags | default('house') }}"
|
|
vault1_push_heartbeat:
|
|
url: "http://192.168.99.183:3001/api/push/yxhtvRPdixD4IY3Z4tVb?status=up&msg=VAULT1+CIFS+OK&ping="
|
|
method: GET
|