📝 docs: gateway two-ids trap (network/ssids/scan-modbus-ip) #62

Merged
mat merged 2 commits from docs/gateway-ids-trap into main 2026-09-06 17:52:22 +00:00
Owner

Live-verified 2026-09-06 against the probe account (~/.secrets/comwatt, gateway id=359 / gatewayUid=BXCCBB77D9).

Closes the third open item in ROADMAP.md §1.

What

The /api/gateways/{id}/network, /ssids and /scan-modbus-ip endpoints do not all take the same id — a third instance of the recurring "two ids" trap:

endpoint takes wrong id →
/api/gateways/{id} (plain read) numeric id gatewayUid → 400 Failed to convert 'id'
/api/gateways/{id}/network gatewayUid numeric id → 412 gateway.not.found.for.fetching.network.details (bare JSON array of Spring errors, not problem+json)
/api/gateways/{id}/ssids numeric id gatewayUid → 400 "Failed to convert 'gatewayId' with value: '...'" (problem+json)
/api/gateways/{id}/scan-modbus-ip gatewayUid numeric id → 403 (empty body); the gatewayUid form actually triggers the long-running Modbus scan

Changes

  • docs/energy.comwatt.com/devices.md — add a per-endpoint "two-ids trap" table + warning in the Gateways section.

Docs-only; no client or test changes.

Live-verified 2026-09-06 against the probe account (`~/.secrets/comwatt`, gateway `id=359` / `gatewayUid=BXCCBB77D9`). Closes the third open item in `ROADMAP.md` §1. ## What The `/api/gateways/{id}/network`, `/ssids` and `/scan-modbus-ip` endpoints do **not** all take the same id — a third instance of the recurring "two ids" trap: | endpoint | takes | wrong id → | | --- | --- | --- | | `/api/gateways/{id}` (plain read) | numeric `id` | gatewayUid → `400 Failed to convert 'id'` | | `/api/gateways/{id}/network` | `gatewayUid` | numeric `id` → `412 gateway.not.found.for.fetching.network.details` (bare JSON array of Spring errors, **not** problem+json) | | `/api/gateways/{id}/ssids` | numeric `id` | gatewayUid → `400 "Failed to convert 'gatewayId' with value: '...'"` (problem+json) | | `/api/gateways/{id}/scan-modbus-ip` | `gatewayUid` | numeric `id` → `403` (empty body); the `gatewayUid` form actually triggers the long-running Modbus scan | ## Changes - `docs/energy.comwatt.com/devices.md` — add a per-endpoint "two-ids trap" table + warning in the Gateways section. Docs-only; no client or test changes.
📝 docs: document gateway two-ids trap (network/ssids/scan-modbus-ip)
All checks were successful
Tests / forgejo-pytest (push) Successful in 43s
Tests / forgejo-pytest (pull_request) Successful in 42s
aaab40229c
Live-verified 2026-09-06 against the probe account (gateway id=359,
gatewayUid=BXCCBB77D9):

- /api/gateways/{id}/network takes gatewayUid; numeric id -> 412
  gateway.not.found.for.fetching.network.details (bare JSON array of
  Spring errors, not problem+json)
- /api/gateways/{id}/ssids takes numeric id; gatewayUid -> 400
  Failed to convert 'gatewayId' (problem+json)
- /api/gateways/{id}/scan-modbus-ip takes gatewayUid; numeric id -> 403
  (empty body); gatewayUid form triggers the long-running Modbus scan

Add a per-endpoint table to devices.md and expand the README gotchas
section into an explicit 'two ids' trap list (sites, capacities,
gateways).

Closes the third open item in ROADMAP.md §1.
mat force-pushed docs/gateway-ids-trap from aaab40229c
All checks were successful
Tests / forgejo-pytest (push) Successful in 43s
Tests / forgejo-pytest (pull_request) Successful in 42s
to 6d15c2b6a1
All checks were successful
Tests / forgejo-pytest (push) Successful in 42s
Tests / forgejo-pytest (pull_request) Successful in 43s
2026-09-06 17:48:57 +00:00
Compare
📝 docs: check off gateway two-ids trap in ROADMAP
Some checks failed
Tests / forgejo-pytest (push) Successful in 42s
Tests / forgejo-pytest (pull_request) Has been cancelled
e98fec17d8
mat force-pushed docs/gateway-ids-trap from e98fec17d8
Some checks failed
Tests / forgejo-pytest (push) Successful in 42s
Tests / forgejo-pytest (pull_request) Has been cancelled
to 793cf7a9b7
All checks were successful
Tests / forgejo-pytest (push) Successful in 42s
Tests / forgejo-pytest (pull_request) Successful in 42s
2026-09-06 17:52:00 +00:00
Compare
mat changed title from WIP: 📝 docs: gateway two-ids trap (network/ssids/scan-modbus-ip) to 📝 docs: gateway two-ids trap (network/ssids/scan-modbus-ip) 2026-09-06 17:52:18 +00:00
mat merged commit 614784866b into main 2026-09-06 17:52:22 +00:00
mat deleted branch docs/gateway-ids-trap 2026-09-06 17:52:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mat/python-comwatt-client!62
No description provided.