2.7 KiB
2.7 KiB
AC Infinity metrics → Grafana plan
Goal: expose tent ambient temperature and fan speeds (inlet indoor/outdoor, outlet, internal) on metrics.bstein.dev overview. Keep the footprint minimal; avoid full Home Assistant if possible.
Option A (slim exporter; recommended)
- Use the community AC Infinity Python client (from the Home Assistant custom component) wrapped in a tiny Prometheus exporter.
- Flow:
- Deploy a
Deploymentinmonitoring(e.g.,acinfinity-exporter) that:- Reads AC Infinity cloud creds from a
Secret(populated via Vault). - Polls the AC Infinity cloud API on an interval (e.g., 30–60s) using the client to fetch current sensor state.
- Exposes
/metricswith gauges:acinfinity_temp_c,acinfinity_humidity_percent,acinfinity_fan_speed_percent{fan="inlet_indoor|inlet_outdoor|outlet|internal"},acinfinity_mode,acinfinity_alarm, etc.
- Reads AC Infinity cloud creds from a
- Add a
Service+ServiceMonitorto scrape the exporter. Metric relabel to friendly names if needed. - Update
scripts/dashboards_render_atlas.pyto add:- Ambient temp gauge (°C/°F) on Overview.
- Fan speed gauges (3–4 panels) for inlet/outlet/internal.
- Regenerate dashboards (
python3 scripts/dashboards_render_atlas.py --build), commit, push, reconcilemonitoring.
- Deploy a
- Pros: minimal footprint, no HA. Cons: need to vendor the client library and keep it in sync if AC Infinity changes their API.
Option B (minimal Home Assistant)
- Run a stripped-down Home Assistant in
monitoringwith only the AC Infinity custom integration and Prometheus exporter enabled. - Flow:
- HA
Deployment+ PVC or emptyDir for config;Secretfor AC Infinity creds; HA API password in Secret. - Prometheus scrapes
http://ha-acinfinity:8123/api/prometheus?api_password=...viaServiceMonitor. - Same dashboard steps as above after metric relabeling to
acinfinity_*.
- HA
- Pros: reuse maintained HA integration. Cons: heavier than exporter, HA maintenance overhead.
Secrets and ops
- Store AC Infinity username/password in Vault; template into a Secret consumed by the exporter/HA.
- Network: allow outbound HTTPS to AC Infinity cloud from the Pod.
- Interval: 30–60s polling is usually enough; avoid hammering the API.
Implementation sketch (Option A)
- New image
monitoring/acinfinity-exporter(Python + prometheus_client + AC Infinity client). - Deployment (namespace
monitoring): env AC_INFINITY_USER/PASS, POLL_INTERVAL, LISTEN_ADDR. - Service:
port: 9100(or similar). - ServiceMonitor: scrape
/metricsevery 30–60s, metricRelabel to normalize names/labels. - Dashboard panels: add to Overview top/mid rows; regenerate JSONs; push; reconcile
monitoring.