Refactor MQTT bridge handling in MyMesh to support RX and TX packet logging based on MQTT settings. Introduce mqtt_rx_enabled preference for default RX packet handling and update related logic in CommonCLI and MQTTBridge for improved configuration management. Enhance MQTTMessageBuilder to conditionally include SNR and RSSI for RX packets only.

This commit is contained in:
agessaman committed 2026-04-04 16:01:35 -07:00
1 parent 258a0d724c
commit 47b632aaa9
11 files changed
+2739 -37

No files matched your search

+32 -1
View File
@@ -947,12 +947,43 @@ region save
- `set bridge.source <source>`
**Parameters:**
- `source`:
- `source`:
- `logRx`: bridges received packets
- `logTx`: bridges transmitted packets
**Default:** `logTx`
> **Note:** For MQTT bridges, use `mqtt.rx` and `mqtt.tx` instead of `bridge.source`. These provide independent per-direction control and support both RX and TX simultaneously. `bridge.source` still works as a convenience alias for MQTT (setting `bridge.source rx` sets `mqtt.rx on` + `mqtt.tx off`, and vice versa), but `mqtt.rx`/`mqtt.tx` are preferred.
---
#### View or change MQTT RX packet uplinking
**Usage:**
- `get mqtt.rx`
- `set mqtt.rx <on|off>`
**Parameters:**
- `on`: uplink received (RX) packets to MQTT brokers
- `off`: disable RX packet uplinking
**Default:** `on`
---
#### View or change MQTT TX packet uplinking
**Usage:**
- `get mqtt.tx`
- `set mqtt.tx <on|off|advert>`
**Parameters:**
- `on`: uplink all transmitted (TX) packets to MQTT brokers
- `advert`: uplink only this node's own advert packets (self-originated advertisements only — forwarded adverts from other nodes are filtered out)
- `off`: disable TX packet uplinking
**Default:** `off`
> **Note:** `mqtt.rx` and `mqtt.tx` take effect immediately — no restart required. Both can be enabled simultaneously.
---
#### View or change the speed of the bridge (RS-232 only)