Commit Graph

702 Commits

Author SHA1 Message Date
agessaman 39ba020fab Merge upstream/dev into mqtt-bridge-responsiveness-changes
Resolved conflicts in:
- examples/simple_repeater/MyMesh.cpp: merged comparison functions with new handler functions
- src/helpers/CommonCLI.cpp: merged MQTT fields handling with adc_multiplier and owner_info
- src/helpers/CommonCLI.h: merged NodePrefs struct changes
- variants/heltec_v3/platformio.ini: kept upstream WiFi settings
- variants/xiao_s3_wio/platformio.ini: added upstream environment definitions

Verified observer firmwares compile successfully.
2026-01-21 20:37:40 -08:00
agessaman ed27ebd015 Refactor MQTTBridge to utilize FreeRTOS for improved task management and responsiveness
- Moved MQTT processing to a dedicated FreeRTOS task on Core 0, enhancing non-blocking behavior.
- Implemented a FreeRTOS queue for thread-safe packet handling, replacing the previous circular buffer approach.
- Updated WiFi initialization and connection management to occur within the FreeRTOS task, improving overall system responsiveness.
- Enhanced logging and error handling for MQTT connections and packet processing.
- Cached broker and analyzer server statuses to reduce redundant checks and improve efficiency.
2026-01-21 20:28:36 -08:00
taco b919119faf only write contacts when changed 2026-01-16 13:15:35 +11:00
taco c61fde9328 always send PUSH_CODE_NEW_ADVERT when advert was not added to contacts[] 2026-01-16 13:15:35 +11:00
taco df6687034a bootstrap RTC from contact.lastmod and improve slot overwrite logic
slot overwrite logic can now safely use contact.lastmod to find oldest contact for overwrite
2026-01-15 18:01:20 +11:00
taco 403ce1db08 contacts: granular autoadd and overwrite-oldest 2026-01-15 18:01:20 +11:00
Scott Powell 69a71d0e25 * repeater login response, FIRMWARE_VER_LEVEL now bumped to 2 2026-01-12 17:47:51 +11:00
Scott Powell b6110eee38 * new req/resp (after login): REQ_TYPE_GET_OWNER_INFO (includes firmware-ver)
* ANON_REQ_TYPE_OWNER, firmware-ver removed (security exploit)
* ANON_REQ_TYPE_BASIC, formware-ver removed, just remote clock + some 'feature' bits
* CTL_TYPE_NODE_DISCOVER_REQ now ingored if 'repeat off' has been set
2026-01-12 16:58:35 +11:00
Scott Powell 4e4f6d92a0 * ANON_REQ_TYPE_VER_OWNER now delimited by newline chars 2026-01-09 16:32:08 +11:00
Scott Powell 65796c8f20 * CommonCLI: added "set name ..." validation
* ANON_REQ_TYPE_VER_OWNER, now removes commas from node_name
2026-01-09 16:28:08 +11:00
agessaman ffa2a1ecdd Refactor advert timer calculation in MyMesh and SensorMesh for type consistency
- Updated the advert timer calculation to explicitly cast the advert interval to an integer type, ensuring consistent behavior across different mesh implementations.
- Enhanced the savePrefs function in CommonCLI to trigger advert timer updates when the advert interval changes, improving responsiveness to user configuration changes.
- Removed the aggressive 4-hour health check in MQTTBridge to prevent connection instability, allowing the MQTT client library to manage connection health internally.
2026-01-08 20:57:28 -08:00
Scott Powell fd69acb421 * new ANON_REQ_TYPE_VER (for just simple clock + ver info) 2026-01-09 13:54:18 +11:00
Scott Powell 2a035ad816 * ANON_REQ_TYPE_VER_OWNER, now includes node_name 2026-01-09 13:20:20 +11:00
Scott Powell 5475043083 * new ANON_REQ_TYPE_VER_OWNER
* CommonCLI: new "get/set owner.info ..."
2026-01-09 11:07:31 +11:00
Scott Powell 5cc44dd802 * ANON_REQ_TYPE_REGIONS now direct only, with reply_path encoded in request 2026-01-08 13:20:52 +11:00
agessaman 2bd61c1324 Add device metadata setup in MyMesh bridge initialization and restart
- Implemented device metadata configuration in the bridge's start and restart methods.
- Added device ID, firmware version, board model, and build date settings.
- Included MQTT bridge statistics sources setup conditionally based on the WITH_MQTT_BRIDGE flag.
2026-01-03 11:09:37 -08:00
Scott Powell 3af25495bb * Repeater: new anon request sub-type: ANON_REQ_TYPE_REGIONS (rate limited to max 4 every 3 mins)
* Companion: new CMD_SEND_ANON_REQ command (reply with existing RESP_CODE_SENT frame)
2026-01-03 12:02:15 +11:00
ripplebiz e31c46ff56 Merge pull request #1294 from liquidraver/factorynvsreset
Add NVS partition reset to ESP factory reset
2026-01-03 11:57:14 +11:00
agessaman 2185523df6 Add sorting functions for neighbour information in MyMesh and optimize MQTTBridge for memory efficiency
- Introduced comparison functions for sorting neighbours by timestamp and signal strength in MyMesh.
- Implemented early exit conditions in MQTTBridge to improve processing efficiency when no neighbours are present.
- Enhanced MQTTBridge to optimize memory usage by adjusting MQTT client configurations and implementing memory pressure checks.
- Reduced processing limits in MQTTBridge to maintain responsiveness and prevent blocking during packet handling.
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 6b0c0e931f Add IP address display for MQTT bridge devices in UITask 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 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 8f34d96628 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 8ca969be78 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 46041130b6 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:40 -08:00
agessaman bba6d89691 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:40 -08:00
agessaman ed70ceb284 Update MQTT implementation to include dynamic build date and enhance client versioning 2026-01-02 13:36:40 -08:00
agessaman 180c1d49fe 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:40 -08:00
agessaman f39d229988 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:40 -08:00
agessaman 91cc4f50ed 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:40 -08:00
agessaman ee6a756591 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:40 -08:00
Jonathan Stöcklmayer 0c34557862 Fix debug log: use c->extra.room.push_failures instead of non-existent c->push_failures 2026-01-02 13:36:40 -08:00
liquidraver faf177de46 ESP factory reset clear NVS too 2026-01-02 08:37:22 +01:00
ripplebiz 2f5a8c59ea Merge pull request #1299 from entr0p1/companion-timestamp-fix
BUGFIX: Companion packet timestamp mismatch trips replay protection
2026-01-02 12:44:45 +11:00
ripplebiz f9720f0b0c Merge pull request #1266 from IoTThinks/MCdev-Powersaving-for-esp32-202512
Added powersaving to all ESP32 boards with RTC-supported DIO1
2025-12-31 11:35:46 +11:00
entr0p1 4a869163b2 BUGFIX: replay protection on repeaters tripped by timestamp sent from companion node mobile app. Send the node's RTC timestamp for TXT_TYPE_CLI_DATA messages instead of the timestamp from the app (matches the sendRequest() code logic). 2025-12-30 21:58:59 +11:00
Kevin Le 26321162ee To fix the default temperature to be overridden by external sensors (if any) 2025-12-27 15:23:23 +07:00
Kevin Le 1706f759b7 Modified hasPendingWork to return bool 2025-12-24 11:00:34 +07:00
Kevin Le 5c6c15942b Added powersaving to all ESP32 boards with RTC-supported DIO1
Added CLI to enable/disable powersaving
2025-12-23 12:48:08 +07:00
Liam Cottle 0c3fb918b2 Merge pull request #1203 from liquidraver/fix-gps-popup
Fix GPS/Buzzer toggle UI popup
2025-12-18 21:39:25 +13:00
liquidraver e855706abb move showalert after saveprefs 2025-12-17 21:27:22 +01:00
Kevin Le 2deb9cf144 Fixed to call getMCUTemperature once. 2025-12-13 07:32:26 +07:00
Kevin Le 4504ad4daf Added default temperature from ESP32 MCU and NRF52 MCU
Added NRF52Board.h and NRF52Board.cpp
Modified NRF52 variants to extend from NRF52Board to share common feature
2025-12-12 19:01:15 +07:00