# typhon `typhon` is an AC Infinity telemetry exporter that polls the AC Infinity cloud API and exposes Prometheus metrics for Grafana dashboards and alerting. Stage 1 scope: - ingest controller climate telemetry (temperature, humidity, VPD) - ingest fan/port telemetry (online state, power state, speed, mode) - expose `/metrics` + `/healthz` Stage 2 scope: - add authenticated control APIs and UI for `climate.bstein.dev` ## API behavior (based on homebridge-acinfinity) This implementation follows the same API conventions used by `keithah/homebridge-acinfinity`: - host: `http://www.acinfinityserver.com` - login endpoint: `/api/user/appUserLogin` - list endpoint: `/api/user/devInfoListAll` - mode endpoint: `/api/dev/getdevModeSettingList` - auth header: `token: ` - request headers include `phoneType=1`, `appVersion=1.9.7`, and `User-Agent` matching the official app style - password field key is intentionally `appPasswordl` - API only honors the first 25 chars of password ## Configuration Environment variables: - `ACI_EMAIL` (required) - `ACI_PASSWORD` (required, use <= 25 chars for reliability) - `ACI_HOST` (optional, default `http://www.acinfinityserver.com`) - `POLL_INTERVAL_SECONDS` (optional, default `30`) - `REQUEST_TIMEOUT_MS` (optional, default `10000`) - `LISTEN_PORT` (optional, default `9108`) - `LOG_LEVEL` (optional, default `info`) Kubernetes runtime is expected to source `ACI_EMAIL`/`ACI_PASSWORD` from Vault. ## Local development ```bash npm ci npm run lint npm test npm run build ``` Run locally: ```bash ACI_EMAIL='you@example.com' \ ACI_PASSWORD='your-password' \ npm run dev ``` Metrics endpoint: - `http://localhost:9108/metrics` - `http://localhost:9108/healthz`