Files
byd-exporter/docker-compose.yml
thistineandClaude Opus 5 52e1aaa0c0
Test / test (push) Failing after 25m47s
Add BYD vehicle telemetry exporter
Go port of the read path of pybyd 0.0.75 (the client behind
jkaberg/hass-byd-vehicle): the bangcle white-box AES envelope, the
signing/checkcode layer, login, vehicle list, and realtime readings.

Scraping runs on a cron schedule rather than per Prometheus request
because each reading wakes the car's T-Box and drains the traction
battery; /metrics serves the last result.

Every numeric field of the realtime payload becomes a gauge, so the
exporter does not need a hand-maintained field list that goes stale
when BYD changes the payload.

Tests pin the wire format against pybyd byte-for-byte and drive the
client end to end against a fake cloud that speaks the real protocol.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-05 22:03:16 +07:00

21 lines
664 B
YAML

# Deployment stack. Copy to the GitOps compose repo as byd-exporter/docker-compose.yml.
services:
byd-exporter:
image: 192.168.1.17:30008/thistine/byd-exporter:latest
container_name: byd-exporter
restart: always
environment:
BYD_USERNAME: ${BYD_USERNAME:?set in .env}
BYD_PASSWORD: ${BYD_PASSWORD:?set in .env}
BYD_REGION: ${BYD_REGION:-sg}
BYD_COUNTRY_CODE: ${BYD_COUNTRY_CODE:-TH}
BYD_TIME_ZONE: ${BYD_TIME_ZONE:-Asia/Bangkok}
# Every scrape wakes the car. Hourly is already fairly aggressive.
BYD_SCHEDULE: ${BYD_SCHEDULE:-0 * * * *}
networks:
- proxy
networks:
proxy:
external: true