Server 2.4.0, app 2.11.1: ABRP forwarding removed from the server
The car sends live data to ABRP itself, and the car and the server go over the same mobile connection: when the car cannot reach ABRP, it cannot reach the server either, so the server's fallback bought nothing. The forwarder, its ABRP_* settings and abrpSentUtc are gone; the server only stores. The app stops sending abrpSentUtc (the server ignores unknown fields, so 2.11.0 keeps working) and its texts no longer promise a server fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
This commit is contained in:
+5
-12
@@ -1,11 +1,11 @@
|
||||
# Nils' MG4 — car server
|
||||
|
||||
A small Go service at car.k8s.stinnesbeck.com: the API the car writes to, and the ABRP
|
||||
forwarder. Data lives in InfluxDB 2; Grafana reads it from there for the dashboards
|
||||
(`../k8s/grafana/`).
|
||||
A small Go service at car.k8s.stinnesbeck.com: the API the car writes to. Data lives in
|
||||
InfluxDB 2; Grafana reads it from there for the dashboards (`../k8s/grafana/`). The car sends
|
||||
its live data to ABRP itself; the server does not talk to ABRP (removed in 2.4.0).
|
||||
|
||||
```
|
||||
car ──live telemetry───▶ server ──▶ ABRP api.iternio.com/1/tlm/send
|
||||
car ──live telemetry───▶ server
|
||||
──daily chunks─────▶ │
|
||||
──charging sessions▶ ▼
|
||||
InfluxDB 2 ◀── Grafana
|
||||
@@ -20,14 +20,10 @@ Environment only; the server refuses to start when a required value is missing.
|
||||
| `INFLUX_URL`, `INFLUX_TOKEN`, `INFLUX_ORG` | required; the token needs read/write on the bucket |
|
||||
| `INFLUX_BUCKET` | default `mg4` |
|
||||
| `INGEST_TOKEN` | required, at least 24 characters: `openssl rand -hex 32` |
|
||||
| `ABRP_API_KEY`, `ABRP_USER_TOKEN` | optional; both needed to forward |
|
||||
| `ABRP_MIN_INTERVAL_SECONDS` | default 5 |
|
||||
| `APPROVAL_PASSWORD` | optional, at least 12 characters; switches pairing on (see below) |
|
||||
| `PUBLIC_URL` | the address a phone uses, for the pairing QR code; derived from the request if empty |
|
||||
| `LISTEN_ADDR` | default `:8080` |
|
||||
|
||||
The ABRP credentials never reach the car.
|
||||
|
||||
## Endpoints
|
||||
|
||||
The ingest endpoints accept `Authorization: Bearer <token>` with either the shared `INGEST_TOKEN`
|
||||
@@ -39,10 +35,7 @@ with (403 otherwise); the shared token works for any.
|
||||
dropped, known ones bounded: a value out of range is dropped on its own, and a sample without
|
||||
a plausible time (before 2001, or more than an hour ahead) is dropped whole. The rest is stored
|
||||
and the answer is `200 {stored, droppedCount, dropped}`, even when nothing was usable, since
|
||||
the car would only send it again. The newest sample is forwarded to ABRP if it is under
|
||||
5 minutes old and not ahead of the server's clock. A car that sends to ABRP itself adds
|
||||
`abrpSentUtc`, the newest sample ABRP took from it; only samples newer than that are
|
||||
forwarded, so ABRP gets each one once.
|
||||
the car would only send it again.
|
||||
- `PUT /v1/consumption/daily` — one delta chunk of a day's consumption.
|
||||
- `PUT /v1/charging-sessions/{sessionId}` — a finished DC session with its curve.
|
||||
- `GET /v1/consumption/history/{installationId}` — the car reads its own totals back.
|
||||
|
||||
Reference in New Issue
Block a user