Bug: Community MQTT publishes stale firmware_version and model after radio firmware update #151

Closed
opened 2026-10-05 02:00:12 +02:00 by adam · 1 comment
Owner

The Community MQTT integration caches firmware_version and model in _cached_device_info for the entire lifetime of the fanout module. This cache is only cleared when the module restarts (i.e., when Community MQTT settings change or is restarted, or remote term restarts). If the radio firmware is updated and the radio reboots, the backend reconnects and correctly refreshes radio_manager.firmware_version and radio_manager.device_model, but the Community MQTT module continues publishing the old cached values indefinitely.

The fix is to replace the _fetch_device_info() call in _publish_status() with direct reads from radio_manager.device_model, radio_manager.firmware_version, and radio_manager.firmware_build, which are already refreshed on every reconnect by the post-connect setup. _fetch_device_info() should be retained as a fallback where radio_manager.device_info_loaded is False.

Happy to submit a PR with the proposed changes.

The Community MQTT integration caches firmware_version and model in _cached_device_info for the entire lifetime of the fanout module. This cache is only cleared when the module restarts (i.e., when Community MQTT settings change or is restarted, or remote term restarts). If the radio firmware is updated and the radio reboots, the backend reconnects and correctly refreshes radio_manager.firmware_version and radio_manager.device_model, but the Community MQTT module continues publishing the old cached values indefinitely. The fix is to replace the _fetch_device_info() call in _publish_status() with direct reads from radio_manager.device_model, radio_manager.firmware_version, and radio_manager.firmware_build, which are already refreshed on every reconnect by the post-connect setup. _fetch_device_info() should be retained as a fallback where radio_manager.device_info_loaded is False. Happy to submit a PR with the proposed changes. <!-- github-sync-id:4297422927 -->
adam closed this issue 2026-10-05 02:00:12 +02:00
Author
Owner

Sounds good; thanks!

Sounds good; thanks! <!-- github-comment-id:4282841361 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Remote-Terminal-for-MeshCore#151