Adds a self-contained omni-pca/grafana/ bundle (InfluxDB v2 + Grafana with pre-provisioned datasource and dashboard) plus dev-stack wiring so iterating against the mock or real panel is one docker-compose-up. The dashboard has four rows plus an insights row: System health AC, battery, trouble, 24h event count Security area arming state, recent events table, zone trips Climate thermostat temperatures, HVAC mode Activity event rate by type, top toggled units Insights active zone bypasses, button press log, event distribution Color-coded event_type tags persist across panels (alarms red, restores green, batteries orange, etc.); explicit no-purple palette per CLAUDE.md. The bundle is portable: any HA install can use it by running grafana/ docker compose up -d and pasting ha-snippet.yaml into configuration.yaml. For the dev stack, dev/docker-compose.yml mounts the same provisioning files so dev and prod stay in lockstep. Verified end-to-end against the real Our House.pca panel (192.168.1.9): the dashboard fills with live zone trips, X-10 unit toggles, and push-event traffic within 30s of HA bootup.
70 lines
2.1 KiB
YAML
70 lines
2.1 KiB
YAML
# Self-contained InfluxDB v2 + Grafana stack for the omni_pca
|
|
# integration. Pre-provisioned with the InfluxDB datasource and the
|
|
# "Omni Pro II — Panel Overview" dashboard.
|
|
#
|
|
# Usage:
|
|
# cp .env.example .env && edit the secrets && docker compose up -d
|
|
# open http://localhost:3000 (admin / $GRAFANA_PASSWORD)
|
|
#
|
|
# Then paste the contents of ha-snippet.yaml into your HA
|
|
# configuration.yaml (and add `influxdb_token: $INFLUX_TOKEN` to
|
|
# secrets.yaml). Restart HA. Within 30s the dashboard's panels start
|
|
# filling in.
|
|
|
|
services:
|
|
influxdb:
|
|
image: influxdb:2.7-alpine
|
|
container_name: omni-pca-influxdb
|
|
restart: unless-stopped
|
|
environment:
|
|
DOCKER_INFLUXDB_INIT_MODE: setup
|
|
DOCKER_INFLUXDB_INIT_USERNAME: ${INFLUX_USERNAME:-admin}
|
|
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUX_PASSWORD}
|
|
DOCKER_INFLUXDB_INIT_ORG: omni-pca
|
|
DOCKER_INFLUXDB_INIT_BUCKET: ha
|
|
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUX_TOKEN}
|
|
DOCKER_INFLUXDB_INIT_RETENTION: 30d
|
|
volumes:
|
|
- influxdb-data:/var/lib/influxdb2
|
|
- influxdb-config:/etc/influxdb2
|
|
ports:
|
|
- "8086:8086"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8086/health"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
grafana:
|
|
image: grafana/grafana:11.4.0
|
|
container_name: omni-pca-grafana
|
|
restart: unless-stopped
|
|
depends_on:
|
|
influxdb:
|
|
condition: service_healthy
|
|
environment:
|
|
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}
|
|
GF_AUTH_ANONYMOUS_ENABLED: "false"
|
|
GF_USERS_ALLOW_SIGN_UP: "false"
|
|
GF_LOG_LEVEL: warn
|
|
# Consumed by ./provisioning/datasources/influxdb.yml
|
|
INFLUX_URL: http://influxdb:8086
|
|
INFLUX_TOKEN: ${INFLUX_TOKEN}
|
|
volumes:
|
|
- grafana-data:/var/lib/grafana
|
|
- ./provisioning:/etc/grafana/provisioning:ro
|
|
ports:
|
|
- "3000:3000"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3000/api/health || exit 1"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 15s
|
|
|
|
volumes:
|
|
influxdb-data:
|
|
influxdb-config:
|
|
grafana-data:
|