Commit Graph
129 Commits
Author SHA1 Message Date
agessaman 51e9907fa6 Merge upstream/dev into mqtt-bridge-implementation
Resolve conflicts in CommonCLI: keep upstream path_hash_mode and
sanitization (adc_multiplier, path_hash_mode constrain), retain
MQTT/NodePrefs layout and MQTT fields.

Made-with: Cursor
2026-02-25 19:41:42 -08:00
agessamanandCursor 397a48fc22 Merge upstream/dev into mqtt-bridge-implementation
Resolve conflicts: keep MQTT/WiFi/timezone/analyzer defaults and get
handlers, add upstream neighbour sort guard, adc_multiplier and
pending_discover, and bootloader.ver get handler.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-24 16:23:11 -08:00
Scott Powell a66773bac0 * CommonCLI: added "get/set path.hash.mode " 2026-02-23 14:25:19 +11:00
taco 1500a5a9cb add get bootloader.ver command for nrf52 2026-02-18 15:35:20 +11:00
agessaman 88ce0d33c3 Update platformio.ini for heltec_v4: switch to heltec_v4_oled configuration for MQTT observer and room server environments, adjusting build flags and source filters accordingly. 2026-02-16 08:39:29 -08:00
Adam Gessaman 8b841d9cfd Merge remote-tracking branch 'origin/dev' into mqtt-bridge-implementation 2026-02-09 09:50:44 -08:00
Wessel NieboerandWessel Nieboer d0720c63c2 Allow negative tx power
Like SX1262 allows -9 dBm lowest, some allow lower but that probably
isn't useful
2026-02-06 02:24:51 +01:00
Adam GessamanandCursor 075552296a Merge origin/dev into mqtt-bridge-implementation
Resolve conflict in variants/heltec_v4/platformio.ini by taking
origin/dev version for PA pin comments and SX126X_RX_BOOSTED_GAIN.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 09:55:37 -08:00
agessaman 498566e6c9 MQTT bridge: fix memory use, improve status reporting
- Main broker: only allocate _mqtt_client when custom broker configured
  (analyzer-only saves one PsychicMqttClient). Reconnect main broker after
  forced disconnect with 30s throttle; set last_attempt on disconnect so
  throttle applies and avoids reconnect storms on flaky WiFi.
- Analyzer clients: call disconnect() when WiFi transitions to disconnected
  so ESP-IDF frees MQTT buffers (it does not free on WiFi drop). Reduces
  fragmentation and Max drop after disconnect/reconnect cycles.
- get wifi.status: report WiFi uptime (Xd Xh Xm Xs) when WITH_MQTT_BRIDGE.
  Track connect time in bridge; backfill when already connected at first check.
- get mqtt.status: show msgs on/off, broker (connected/disconnected/n/a),
  analyzer US/EU (connected/disconnected/off), and queue count.

Note: PsychicMqttClient change (register event only on first client creation)
belongs in the library repo if committed separately.
2026-02-02 19:09:31 -08:00
agessaman d96c900f10 Merge upstream/dev into mqtt-bridge-implementation
Resolved conflict in variants/heltec_v4/platformio.ini by keeping
detailed comments and PIN_BOARD_SDA/SCL definitions from HEAD.
2026-01-27 12:50:30 -08:00
João Brázio edeafde51c Fix: Correct validation logic in isValidName function 2026-01-27 19:36:12 +00:00
Scott Powell 5627500988 * new "clkreboot" CLI command 2026-01-27 15:22:18 +11:00
agessaman 2a84e58b3a Merge upstream/dev into mqtt-bridge-responsiveness-changes
Resolved conflicts in:
- examples/simple_repeater/MyMesh.cpp: kept analyzer/MQTT origin code, updated acl.load() signature
- examples/simple_room_server/MyMesh.cpp: kept MQTT bridge init, added acl parameter to _cli constructor
- src/helpers/CommonCLI.cpp: merged MQTT get commands with ADC/power management commands
2026-01-26 19:30:45 -08:00
liamcottle 7e24bd00b9 increase maximum flood advert interval to 168 hours (7 days) 2026-01-26 23:05:10 +13:00
liamcottle ed589f9620 boot adverts are now zero hop instead of flood 2026-01-26 22:20:36 +13:00
ripplebizandGitHub 153bcdc6a3 Merge pull request #1457 from oltaco/remote-set-prvkey
Allow set prv.key over LoRa, clear ACL and validate key
2026-01-25 14:46:41 +11:00
taco 96ef5e5efe allow set prv.key from remote, validate new prv.key 2026-01-25 01:32:48 +11:00
entr0p1 1f59e52880 nRF52840 Power Management - Phase 1 - Boot Low VBAT Voltage Lockout
Added NRF52840 power management core functionality:
- Boot‑voltage lockout
- Initial support for shutdown/reset reason storage and capture (via RESETREAS/GPREGRET2)
- LPCOMP wake (for voltage-driven shutdowns)
- VBUS wake (for voltage-driven shutdowns)
- Per-board shutdown handler for board-specific tasks
- Exposed CLI queries for power‑management status in CommonCLI.cpp
- Added documentation in docs/nrf52_power_management.md.
- Enabled power management support in Xiao nRF52840, RAK4631, Heltec T114 boards
2026-01-23 17:18:41 +11:00
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 56f98997e6 Update MQTT preferences to support configurable WiFi power save mode
- Added conditional compilation for WiFi power save settings in setMQTTPrefsDefaults.
- Updated platformio.ini files across multiple variants to define MQTT_WIFI_POWER_SAVE_DEFAULT and related configurations.
- Set default WiFi power save mode to 1 (none) when not explicitly defined, enhancing flexibility for different hardware setups.
2026-01-18 13:40:01 -08: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 5475043083 * new ANON_REQ_TYPE_VER_OWNER
* CommonCLI: new "get/set owner.info ..."
2026-01-09 11:07:31 +11:00
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 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 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 03d519f8d4 Remove redundant MQTT and WiFi settings write operations from CommonCLI savePrefs function 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 158748d41f remove extra conflict marker 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 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 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 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 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 4d7282c365 Remove final conflict marker from CommonCLI.cpp 2026-01-02 13:36:41 -08:00
agessaman 771698106f Remove remaining conflict markers from CommonCLI.cpp 2026-01-02 13:36:41 -08:00
agessaman c0c56039c5 Remove conflict marker from CommonCLI.cpp 2026-01-02 13:36:41 -08:00
agessaman 2876ea6ea4 Remove duplicate MQTT function definitions from rebase 2026-01-02 13:36:41 -08:00