Commit Graph
832 Commits
Author SHA1 Message Date
agessaman 8fa99611cb Refactor loadPrefs in CommonCLI to handle fresh installs and upgrades. Introduce flags for fresh installations and upgrades, ensuring correct default settings for MQTT bridge. Migrate preferences from old filename and save updated settings accordingly. 2026-01-02 13:36:41 -08:00
agessaman 617e3b17c0 Enhance loop processing in MyMesh and MQTTBridge to prioritize radio reception and improve responsiveness. Add comments for clarity on packet processing limits and WiFi status handling during MQTT operations. 2026-01-02 13:36:41 -08:00
agessaman 5d4f1e4c02 Refactor MQTTBridge connection logic to defer server connections until WiFi is connected and NTP is synced. Enhance error logging to include socket error numbers for better diagnostics. Add DNS resolution check before NTP sync to prevent failures. Improve time synchronization handling and memory management for timezone settings. 2026-01-02 13:36:41 -08:00
agessaman f7f1f83812 Enhance WiFi status handling in CommonCLI and MQTTBridge. Add command to retrieve WiFi connection status in CommonCLI and implement event-driven WiFi diagnostics in MQTTBridge for improved connection management and logging. Introduce periodic checks for WiFi status to facilitate faster reconnection attempts and better monitoring of disconnection events. 2026-01-02 13:36:41 -08:00
agessaman 34c8bea77f Add WiFi power save mode configuration to CommonCLI and MQTTBridge. Update preferences structure to include power save settings and implement command handling for adjusting power save modes (none, min, max). Enhance MQTTBridge to apply power save settings on WiFi connection and enable auto-reconnect functionality. 2026-01-02 13:36:41 -08:00
agessaman b82d7e43d1 Add WiFi TX power configuration option for MQTT. Update MQTTBridge to use build flag for TX power, defaulting to 11dBm. Document available power levels in MQTT_IMPLEMENTATION.md and update platformio.ini with example usage. 2026-01-02 13:36:41 -08:00
agessaman 0b7c088899 Implement default bridge settings for fresh installs in CommonCLI and optimize JSON document usage in MQTTMessageBuilder to avoid heap fragmentation. Update token renewal logic in MQTTBridge to handle time synchronization more effectively. 2026-01-02 13:36:41 -08:00
agessaman 3589043b2e Enhance MQTT debug macros to prevent hangs by checking Serial availability before printing. 2026-01-02 13:36:41 -08:00
agessaman 03d519f8d4 Remove redundant MQTT and WiFi settings write operations from CommonCLI savePrefs function 2026-01-02 13:36:41 -08:00
agessaman 8fbdc98ad2 Add adc_multiplier to NodePrefs structure 2026-01-02 13:36:41 -08:00
agessaman 5cadf3d96b Convert IATA codes to uppercase in CommonCLI and MQTTBridge for consistency 2026-01-02 13:36:41 -08:00
agessaman 3c7ac9d154 add support for T-Beam ESP32 devices, add error logging for a situation where bridge.source is set to tx but tx logging is off. 2026-01-02 13:36:41 -08:00
agessaman 158748d41f remove extra conflict marker 2026-01-02 13:36:41 -08:00
agessaman 44c2451513 clean up unnecessary comments 2026-01-02 13:36:41 -08:00
agessaman aa242e786d Refactor client version string generation in MQTTBridge 2026-01-02 13:36:41 -08:00
Michael Hartandagessaman 01e77cbeb3 Updates client string to meshcore/{firmware-version-string} 2026-01-02 13:36:41 -08:00
agessaman bafa542678 enable wifi power save and limit wifi power to reduce potential interference with LoRa radio; fixed situation where retry logic failed when no brokers were connected 2026-01-02 13:36:41 -08:00
agessaman 25d40f0219 Add IATA validation to prevent MQTT publishing without configured IATA code 2026-01-02 13:36:41 -08:00
agessaman 9e06fffc31 Restore status publish retry delay to prevent MQTT server spam 2026-01-02 13:36:41 -08:00
agessaman 3feb2cd57b Remove final conflict marker from CommonCLI.cpp 2026-01-02 13:36:41 -08:00
agessaman ad68a29f37 Remove remaining conflict markers from CommonCLI.cpp 2026-01-02 13:36:41 -08:00
agessaman cf3a9c3126 Remove conflict marker from CommonCLI.cpp 2026-01-02 13:36:41 -08:00
agessaman 453c4184c3 Add missing member variables for token expiration and reconnection tracking 2026-01-02 13:36:41 -08:00
agessaman b04a1a1dc6 Fix remaining conflict marker and add missing RECONNECT_THROTTLE_MS constant 2026-01-02 13:36:41 -08:00
agessaman 0de7da8425 Fix remaining conflict marker in maintainAnalyzerConnections 2026-01-02 13:36:41 -08:00
agessaman c5e2f18d88 Remove duplicate MQTT function definitions from rebase 2026-01-02 13:36:41 -08:00
agessaman 5a816be80c Refactor MQTT preferences handling in CommonCLI
- Introduced a new MQTTPrefs struct to store MQTT settings separately from NodePrefs, enhancing compatibility and reducing conflicts.
- Implemented functions to load, save, and synchronize MQTT preferences, ensuring backward compatibility with existing configurations.
- Updated file handling to read and write MQTT settings from a dedicated /mqtt_prefs file, maintaining file format compatibility.
- Added default values for MQTT preferences to ensure proper initialization when files are missing or corrupted.
2026-01-02 13:36:41 -08:00
agessaman b89ceeeaf2 Fix timezone command handling in CommonCLI by adjusting string comparison lengths for accurate parsing. Updated offsets to ensure correct handling of timezone and timezone.offset commands. 2026-01-02 13:36:41 -08:00
agessaman 1ed18f9e3b Enhance CommonCLI and JWTHelper to support MQTT email functionality
- Added loading and saving of MQTT email preferences in CommonCLI.
- Updated command handling in CommonCLI to retrieve and set the MQTT email.
- Modified JWTHelper to include an optional email parameter in JWT token creation.
- Adjusted MQTTBridge to utilize the email from preferences when creating JWT tokens.
2026-01-02 13:36:41 -08:00
agessaman e5dbd56b5d Enhance CommonCLI and JWTHelper for MQTT owner public key support
- Added functionality to load, save, and handle the MQTT owner public key in CommonCLI.
- Implemented validation for the owner public key format and updated command handling to set the key.
- Modified JWTHelper to include optional owner and client fields in JWT token creation.
- Increased buffer sizes for JWT tokens in MQTTBridge to accommodate new fields.
2026-01-02 13:36:41 -08:00
agessaman e4ff06cbfd 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
2026-01-02 13:36:41 -08:00
agessaman 7df28557b6 Enhance MQTTBridge logging and connection handling
- Introduced throttling for log messages related to disconnected brokers and analyzer clients to reduce log spam.
- Added new member variables to track the last log timestamps for broker connection issues and analyzer client states.
- Updated the packet processing logic to reset log timers when brokers are connected, ensuring accurate logging behavior.
- Improved connection validation before publishing to prevent race conditions and maintain accurate broker states.
2026-01-02 13:36:41 -08:00
agessaman e77beff04b Implement memory monitoring and queue size reporting in MQTTBridge and CommonCLI
- Added `getQueueSize` method to `MyMesh` and `CommonCLI` for better queue management.
- Introduced memory logging functionality in `MQTTBridge` to monitor heap usage and detect potential memory leaks.
- Adjusted maximum queue size in `MQTTBridge` from 50 to 10 for improved resource management.
- Enhanced command handling in `CommonCLI` to report memory status upon request.
2026-01-02 13:36:41 -08:00
agessaman eee02025b8 Enhance MQTTMessageBuilder and MQTTBridge for improved packet handling and memory management
- Implemented size-adaptive JSON document allocation in MQTTMessageBuilder to reduce memory fragmentation.
- Increased buffer sizes for raw hex conversions to accommodate larger packets.
- Updated MQTTBridge to store raw radio data with each packet, improving data integrity during transmission.
- Enhanced packet queue management by clearing structures to prevent stale data and ensuring safe memory handling.
- Added debug logging for packet processing to aid in troubleshooting.
2026-01-02 13:36:41 -08:00
agessaman 2b0475998a Implement memory monitoring and queue size reporting in MQTTBridge and CommonCLI
- Added `getQueueSize` method to `MyMesh` and `CommonCLI` for better queue management.
- Introduced memory logging functionality in `MQTTBridge` to monitor heap usage and detect potential memory leaks.
- Adjusted maximum queue size in `MQTTBridge` from 50 to 10 for improved resource management.
- Enhanced command handling in `CommonCLI` to report memory status upon request.
2026-01-02 13:36:41 -08:00
agessaman 1219668fb1 Refactor JWTHelper base64 URL encoding to modify output in-place and improve memory efficiency. Enhance MQTTBridge cleanup process to prevent memory leaks by properly deleting queued packets and timezone objects. 2026-01-02 13:36:41 -08:00
agessaman 3851a84bbf don't start mqtt connection attempts until wifi credentials are valid (requires reboot)
display IP address on screen when connected

added quickstart section to MQTT_IMPLEMENTATION.md
2026-01-02 13:36:41 -08:00
agessaman eab70c3cf6 added configuration for mqtt.sever, mqtt.username, mqtt.pasword, and mqtt.port
validated primary MQTT server credentials are set before opening connection
2026-01-02 13:36:41 -08:00
agessaman c23663da98 Update MQTT implementation to include dynamic build date and enhance client versioning 2026-01-02 13:36:41 -08:00
agessaman a645355670 Implement Let's Mesh Analyzer integration in MQTT Bridge
- Switch from PubSub to PsychicMqttClient for async operations and websockets support
- Add support for US and EU Let's Mesh Analyzer servers with JWT authentication.
- Introduce CLI commands to enable/disable analyzer servers.
- Update NodePrefs to store analyzer server settings.
- Modify MQTTBridge to publish status and packet data to analyzer servers via WebSocket MQTT.
- Enhance documentation to reflect new features and configuration options.
2026-01-02 13:36:41 -08:00
agessaman 787af7b026 added timezone handling, updated mqtt packet output to use the proper timezones for timestamp and time/date, updated mqtt packet to use raw data instead of parsed packet structure, updated packet upload to use proper packet hash 2026-01-02 13:36:41 -08:00
agessaman 26c4b9704c Add timezone support to MQTT Bridge and CLI configuration
- Introduce timezone settings in NodePrefs for persistent storage
- Update CLI commands to get/set timezone and offset
- Modify MQTT message builder to utilize timezone for accurate timestamps
- Implement timezone handling in MQTTBridge for local time conversion
- Include timezone library dependency in platformio.ini
2026-01-02 13:36:41 -08:00
agessaman efc15eb643 Add MQTT Bridge implementation with WiFi CLI configuration
- Implement MQTT bridge for packet uplink to multiple brokers
- Add JSON message formatting for status, packets, and raw data
- Add WiFi SSID/password CLI configuration (get/set wifi.ssid, wifi.pwd)
- Add persistent storage for WiFi credentials
- Add NTP time synchronization for accurate MQTT timestamps
- Add CLI commands for MQTT configuration (origin, iata, status, packets, raw)
- Support multiple MQTT brokers with automatic reconnection
- Integrate with existing MeshCore bridge architecture
2026-01-02 13:36:41 -08:00
agessaman 0cd0c36ab9 initial commit to add MQTT observer support to Room Servers 2026-01-02 13:36:41 -08:00
agessaman bffbbb762b clean up unnecessary comments 2026-01-02 13:36:41 -08:00
agessaman a3875d8727 Refactor client version string generation in MQTTBridge 2026-01-02 13:36:41 -08:00
Michael Hartandagessaman 8b4c1bed4a Updates client string to meshcore/{firmware-version-string} 2026-01-02 13:36:41 -08:00
agessaman dd9edbde52 enable wifi power save and limit wifi power to reduce potential interference with LoRa radio; fixed situation where retry logic failed when no brokers were connected 2026-01-02 13:36:41 -08:00
agessaman a4aace61a1 Add IATA validation to prevent MQTT publishing without configured IATA code 2026-01-02 13:36:41 -08:00
agessaman 09bc9cbc78 Restore status publish retry delay to prevent MQTT server spam 2026-01-02 13:36:41 -08:00