Edge dashboard can't tell 'broker refused' from 'broker unreachable' — mqtt_manager exposes no last connect error #21

Closed
opened 2026-10-04 01:21:28 -04:00 by logan · 1 comment
Owner

Found 2026-10-04 (branch feat/local-ui-usable, new /api/health checklist).

mqtt_manager exposes only is_connected. The refusal reason code from _on_connect and the TCP failure in _connect_with_retry are only logged. So the dashboard's MQTT row has to guess from whether an API key is on disk (key present + disconnected => 'restart edge-node / key may be stale'). For Toughny-type failures (node-26#14) the exact distinction — 'not authorised' vs 'can't reach mqtt.drb.cusano.net:8883' — is what the owner needs.

Ask: add mqtt_manager.last_error (str + epoch), set in _on_connect (reason_code != 0), _on_disconnect and _connect_with_retry; cleared on connect. Then app/internal/health.py MQTT check reads it. mqtt_manager.py is being edited by the install/OTA work (#14/#15), so sequence after that lands.

Found 2026-10-04 (branch feat/local-ui-usable, new /api/health checklist). `mqtt_manager` exposes only `is_connected`. The refusal reason code from `_on_connect` and the TCP failure in `_connect_with_retry` are only logged. So the dashboard's MQTT row has to guess from whether an API key is on disk (key present + disconnected => 'restart edge-node / key may be stale'). For Toughny-type failures (node-26#14) the exact distinction — 'not authorised' vs 'can't reach mqtt.drb.cusano.net:8883' — is what the owner needs. Ask: add `mqtt_manager.last_error` (str + epoch), set in `_on_connect` (reason_code != 0), `_on_disconnect` and `_connect_with_retry`; cleared on connect. Then `app/internal/health.py` MQTT check reads it. mqtt_manager.py is being edited by the install/OTA work (#14/#15), so sequence after that lands.
logan added the area/frontendarea/mqtt
priority
p3
type
feature
labels 2026-10-05 02:05:10 -04:00
Author
Owner

Fixed in 1b4fcef, merged as c57a5b9 (PR #47).

Fixed in 1b4fcef, merged as c57a5b9 (PR #47).
logan removed the
priority
p3
label 2026-11-01 06:39:52 -05:00
logan closed this issue 2026-11-01 06:39:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: logan/node-26#21