Skip to content

Show when the backend holds a charger at BootNotification - #14

Open
ozcan-durak wants to merge 1 commit into
mainfrom
feat/boot-decision-badge
Open

ozcan-durak wants to merge 1 commit into
mainfrom
feat/boot-decision-badge

Conversation

@ozcan-durak

Copy link
Copy Markdown
Contributor

Summary

  • The gateway now records how it answered each charger's last BootNotification (last_boot_status, last_boot_reason, last_boot_decided_at; Record how the last BootNotification was answered per charge point OCPP#268). The Console shows it, so "the backend has no device for this charge_point_id" no longer looks like a dead charger or like the gateway's own pending-authorization queue.
  • Badge in the charger detail header and on fleet rows and cards, a notice under the detail header, and a hint under "No connectors reported." when the boot was not Accepted. Remote start is disabled with that reason.
  • GET /sys/charge-points proxy with a whitelisted filter set, and a read-only "Waiting for backend registration" section on the Authorizations page. The section also filters on the client, so a gateway without the new field lists nothing there instead of every charger.

Test plan

  • vitest run (apps/web): 570 passed, including a case where the gateway returns rows without last_boot_status
  • pnpm -r typecheck: clean
  • pnpm -r lint (CI)
  • Detail page of a charger whose last boot was Pending shows the badge and the hint

Risk / blast radius

Read-only UI plus one proxied GET. Needs eveys-mobility/OCPP#268 deployed for the badges; without it the Authorizations section stays empty.

The gateway now records how it answered each charger's last
BootNotification (`last_boot_status`, `last_boot_reason`,
`last_boot_decided_at`). Surface it so an operator can tell "the
TOGER backend has no device for this charge_point_id" apart from the
gateway's own pending-authorization queue, instead of reading an
empty connector list as a dead charger.

- protocol: the three fields on `chargePointSummary`.
- web: `boot-decision.ts` maps status + reason to operator text;
  badge in the charger detail header and on fleet rows / cards, a
  notice under the detail header, and a hint under "No connectors
  reported." when the boot was not Accepted. `canRemoteStart` treats
  a non-Accepted boot as not startable with that reason.
- server: `GET /sys/charge-points` proxy with a whitelisted filter set
  (fail-soft like `/sys/authorizations`); `last_boot_status` accepted
  by the gateway client and the WS broker.
- Authorizations page: read-only "Waiting for backend registration"
  section that polls chargers whose last boot answer is Pending and
  links to the detail page.
- api-types: ChargePoint schemas in the OpenAPI copy carry the new
  fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant