rise-meterpush-ws routes

The full description is /openapi.yaml (OpenAPI 3.0.3). This page has no script, no stylesheet and no third-party content.

HTTP routes

RouteAnswer
GET /the home page
GET /healthz200 JSON {status, feed, mode_rev, build}. It never fails.
GET /readyzJSON {ready, enabled, key, feed, modes, build}; 503 until the app is ready; never cached.
GET /openapi.yamlthis API as YAML
GET /docsthis page
GET /metricsPrometheus text, only when switched on, never in prod
anything else404 application/problem+json

Websocket route

RouteWhat it pushes
GET /v1/meterthe charging numbers of one session: smooth or live kW and kWh, then the meter reading at stop

Socket contract

  1. The browser opens the socket with an allowed Origin. A refusal is a plain 403 before the upgrade.
  2. Within the auth wait the browser sends one text frame with a ticket the webapp minted for this session: single use, short life, bound to the session and its owner.
  3. The server answers with a hello frame, then state frames, pings now and then, and a final frame at the end. It closes the socket when its lifetime ends or the server restarts (close code 1001). A bad ticket closes it with 1008; a full server closes it with 1013.
  4. The server only reads: it never writes to riseDB, and no frame carries a user id, a charger name or an amount of money.