Enhance MQTTBridge and related components for improved status reporting and stats collection

- Added support for automatic stats collection in MQTTBridge, allowing for detailed status messages including battery voltage, uptime, error flags, and air time metrics.
- Updated MQTTMessageBuilder to accommodate additional stats in the status message, increasing buffer size for JSON documents.
- Modified CommonCLI to display MQTT status interval in minutes and adjusted command handling for setting the interval.
- Introduced new methods in MQTTBridge for setting stats sources
This commit is contained in:
agessaman committed 2026-01-02 13:36:41 -08:00
1 parent 7df28557b6
commit e4ff06cbfd
6 files changed
+273 -42

No files matched your search

+7
View File
@@ -779,6 +779,13 @@ void MyMesh::begin(FILESYSTEM *fs) {
// Set build date
bridge.setBuildDate(getBuildDate());
#ifdef WITH_MQTT_BRIDGE
// Set stats sources for automatic stats collection (optional - can be done in custom initialization)
// This enables stats to be included in status messages automatically
// this (Mesh*) inherits from Dispatcher, so it can be passed as Dispatcher*
bridge.setStatsSources(this, _radio, _cli.getBoard(), _ms);
#endif
bridge.begin();
}
#endif