Skip to content

Implement fault alert system with region scoping and PSK handling#11

Merged
agessaman merged 7 commits into
mqtt-bridge-implementation-flexfrom
feat/observer-alert
May 18, 2026
Merged

Implement fault alert system with region scoping and PSK handling#11
agessaman merged 7 commits into
mqtt-bridge-implementation-flexfrom
feat/observer-alert

Conversation

@agessaman
Copy link
Copy Markdown
Owner

Fault alerts can be sent to a hashtag channel or private channel. Alerts are time-gated to not spam the mesh too much. Alerts use default scope set on repeater for flood, or a custom alert region can be set.

agessaman added 7 commits May 10, 2026 19:19
Implemented a new fault alert system that broadcasts notifications over LoRa when WiFi or MQTT connections are down for a specified duration. The alerts are configurable via CLI commands, allowing operators to set private PSKs or hashtags for alert channels. Default settings for alert thresholds and intervals are established, and the system ensures that alerts do not spam the public channel. Updated relevant files to integrate this feature into the MyMesh implementations and CLI handling.
Updated the fault alert functionality to include an optional region name for scoping alert floods, allowing operators to override the default scope. Introduced a list of banned channels (e.g., Public PSK, `#test`, `#bot`) to prevent spamming community channels with alerts. The implementation ensures that alerts are only sent to private PSKs or non-banned hashtags. Relevant changes were made across multiple files, including updates to the CLI for setting and retrieving the new `alert.region` preference.
Modified the sendFlood method in AlertReporter to incorporate path hash size, ensuring compatibility with the repeater's configured path.hash.mode. This change enhances the handling of alert floods by accommodating different regional mesh configurations.
Enhanced the CLI command for setting the alert PSK to support both base64 (24/44 chars) and hex (32/64 chars) formats. This change allows for greater flexibility in key input, accommodating the mobile app's "share" output. Updated error messages for clarity and ensured that previously derived hashtags are cleared when a new PSK is set. Relevant adjustments made in CommonCLI and MQTT implementation documentation.
Updated the alert PSK implementation to remove base64 support, now requiring a 32-character hex format for private channel secrets. Adjusted related CLI commands, error messages, and internal handling to ensure consistency with the new format. This change enhances clarity and aligns with the mobile app's "Share Channel" output. Relevant updates made across multiple files, including documentation and preference handling.
Modified the alert PSK command handling to only respond when the sender timestamp is zero, ensuring that the PSK is processed exclusively from the serial command line. This change enhances security and clarity in the command processing logic.
…. This change streamlines the file by eliminating extensive sections on fault alerts, including configuration, triggers, and examples, while retaining essential information for clarity and usability.
@agessaman agessaman merged commit f1b4b75 into mqtt-bridge-implementation-flex May 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants