Files
MeshCore-mqtt-observer/examples
agessaman ba48376bda refactor(mqtt): decouple observer config and bridge from repeater NodePrefs
The observer stack only worked inside CommonCLI hosts: /mqtt.json load/save
lived on CommonCLI, the observer CLI was a set of CommonCLI members, and
MQTTBridge read the repeater NodePrefs directly. A companion build has its own
NodePrefs class of the same name, so it could host none of it.

- ObserverConfig owns MQTTPrefs, /mqtt.json load/recovery/atomic save (moved
  verbatim from CommonCLI.cpp) and the observer CLI (CommonCLI_Observer.cpp ->
  ObserverCLI.cpp). Host hooks go through ObserverCallbacks; CommonCLI keeps
  its public API and forwards via a nested adapter.
- MQTTBridge takes an MQTTBridgeHost (node name, radio params, forwarding,
  role) instead of NodePrefs; repeater and room server implement it.
- Status messages gain an additive "role" field (repeater / room_server) so
  brokers can tell observer hosts apart. client_version is unchanged.

No change to the /mqtt.json format or recovery behavior.
2026-11-07 11:29:24 -08:00
..