feat(mqtt,docs): add mqtt.status control and tighten migration guidance

Cette révision appartient à :
Jared Dohrman
2026-04-10 18:26:29 +10:00
Parent 01d31b3121
révision 60648142a2
3 fichiers modifiés avec 17 ajouts et 2 suppressions
+6
Voir le fichier
@@ -12,6 +12,8 @@ These commands are available on `*_repeater_mqtt` firmware targets.
- `get mqtt.status` - `get mqtt.status`
- shows WiFi, NTP, IATA, endpoint status, and TX state - shows WiFi, NTP, IATA, endpoint status, and TX state
- `get mqtt.statuscfg`
- shows whether periodic status messages are enabled
- `get mqtt.iata` - `get mqtt.iata`
- shows the IATA/location code used in MQTT topics - shows the IATA/location code used in MQTT topics
- `set mqtt.iata <code>` - `set mqtt.iata <code>`
@@ -42,6 +44,8 @@ These commands are available on `*_repeater_mqtt` firmware targets.
- shows whether raw packet payloads are published - shows whether raw packet payloads are published
- `set mqtt.raw on|off` - `set mqtt.raw on|off`
- enables or disables the separate `raw` MQTT topic - enables or disables the separate `raw` MQTT topic
- `set mqtt.status on|off`
- enables or disables periodic MQTT status publishing
- `get mqtt.tx` - `get mqtt.tx`
- shows whether TX packets are included - shows whether TX packets are included
- `set mqtt.tx on|off` - `set mqtt.tx on|off`
@@ -125,6 +129,8 @@ That allowlist currently includes:
- `set mqtt.packets on|off` - `set mqtt.packets on|off`
- `get mqtt.raw` - `get mqtt.raw`
- `set mqtt.raw on|off` - `set mqtt.raw on|off`
- `get mqtt.statuscfg`
- `set mqtt.status on|off`
- `get mqtt.tx` - `get mqtt.tx`
- `set mqtt.tx on|off` - `set mqtt.tx on|off`
- `get mqtt.eastmesh-au` - `get mqtt.eastmesh-au`
+4 -2
Voir le fichier
@@ -27,6 +27,7 @@ Once the new firmware is flashed, set:
- `set wifi.ssid <your-ssid>` - `set wifi.ssid <your-ssid>`
- `set wifi.pwd <your-password>` - `set wifi.pwd <your-password>`
- `set mqtt.iata <code>` - `set mqtt.iata <code>`
- `set mqtt.status on`
## Optional Settings ## Optional Settings
@@ -53,6 +54,7 @@ Confirm the repeater is up and connected with:
- `get wifi.status` - `get wifi.status`
- `get mqtt.status` - `get mqtt.status`
- `get mqtt.statuscfg`
## Validate In The Web Console ## Validate In The Web Console
@@ -94,11 +96,11 @@ If you flash without erase first, older legacy values may still remain in flash
1. Flash the new EastMesh firmware without erasing. 1. Flash the new EastMesh firmware without erasing.
2. Open the serial CLI or companion app. 2. Open the serial CLI or companion app.
3. Set `wifi.ssid`, `wifi.pwd`, and `mqtt.iata`. 3. Set `wifi.ssid`, `wifi.pwd`, `mqtt.iata`, and `mqtt.status on`.
4. Optionally set `mqtt.owner` and `mqtt.email`. 4. Optionally set `mqtt.owner` and `mqtt.email`.
5. If you previously had TX publishing disabled, set `mqtt.tx off`. 5. If you previously had TX publishing disabled, set `mqtt.tx off`.
6. Reboot the repeater. 6. Reboot the repeater.
7. Verify with `get wifi.status` and `get mqtt.status`. 7. Verify with `get wifi.status`, `get mqtt.status`, and `get mqtt.statuscfg`.
8. Optionally confirm local web access with `set web on`, `get web.status`, and `https://<IP_ADDRESS>/`. 8. Optionally confirm local web access with `set web on`, `get web.status`, and `https://<IP_ADDRESS>/`.
## Related Docs ## Related Docs
+7
Voir le fichier
@@ -1337,6 +1337,8 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, char *command, char *reply
sprintf(reply, "> %s", mqtt.isPacketsEnabled() ? "on" : "off"); sprintf(reply, "> %s", mqtt.isPacketsEnabled() ? "on" : "off");
} else if (memcmp(command, "get mqtt.raw", 12) == 0) { } else if (memcmp(command, "get mqtt.raw", 12) == 0) {
sprintf(reply, "> %s", mqtt.isRawEnabled() ? "on" : "off"); sprintf(reply, "> %s", mqtt.isRawEnabled() ? "on" : "off");
} else if (memcmp(command, "get mqtt.statuscfg", 18) == 0) {
sprintf(reply, "> %s", mqtt.isStatusEnabled() ? "on" : "off");
} else if (memcmp(command, "get mqtt.tx", 11) == 0) { } else if (memcmp(command, "get mqtt.tx", 11) == 0) {
sprintf(reply, "> %s", mqtt.isTxEnabled() ? "on" : "off"); sprintf(reply, "> %s", mqtt.isTxEnabled() ? "on" : "off");
} else if (memcmp(command, "get mqtt.eastmesh-au", 20) == 0 || memcmp(command, "get mqtt.eastmesh.au", 20) == 0) { } else if (memcmp(command, "get mqtt.eastmesh-au", 20) == 0 || memcmp(command, "get mqtt.eastmesh.au", 20) == 0) {
@@ -1396,6 +1398,9 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, char *command, char *reply
} else if (memcmp(command, "set mqtt.raw ", 13) == 0) { } else if (memcmp(command, "set mqtt.raw ", 13) == 0) {
mqtt.setRawEnabled(memcmp(&command[13], "on", 2) == 0); mqtt.setRawEnabled(memcmp(&command[13], "on", 2) == 0);
strcpy(reply, "OK"); strcpy(reply, "OK");
} else if (memcmp(command, "set mqtt.status ", 16) == 0) {
mqtt.setStatusEnabled(memcmp(&command[16], "on", 2) == 0);
strcpy(reply, "OK");
} else if (memcmp(command, "set mqtt.eastmesh-au ", 21) == 0 || memcmp(command, "set mqtt.eastmesh.au ", 21) == 0) { } else if (memcmp(command, "set mqtt.eastmesh-au ", 21) == 0 || memcmp(command, "set mqtt.eastmesh.au ", 21) == 0) {
mqtt.setEndpointEnabled(0x01, memcmp(&command[21], "on", 2) == 0); mqtt.setEndpointEnabled(0x01, memcmp(&command[21], "on", 2) == 0);
strcpy(reply, "OK"); strcpy(reply, "OK");
@@ -1448,6 +1453,7 @@ void MyMesh::runWebCommand(const char* command, char* reply, size_t reply_size)
matches_exact("get mqtt.email") || matches_exact("get mqtt.email") ||
matches_exact("get mqtt.packets") || matches_exact("get mqtt.packets") ||
matches_exact("get mqtt.raw") || matches_exact("get mqtt.raw") ||
matches_exact("get mqtt.statuscfg") ||
matches_exact("get mqtt.tx") || matches_exact("get mqtt.tx") ||
matches_exact("get mqtt.eastmesh-au") || matches_exact("get mqtt.eastmesh-au") ||
matches_exact("get mqtt.eastmesh.au") || matches_exact("get mqtt.eastmesh.au") ||
@@ -1471,6 +1477,7 @@ void MyMesh::runWebCommand(const char* command, char* reply, size_t reply_size)
matches_prefix("set mqtt.email ") || matches_prefix("set mqtt.email ") ||
matches_prefix("set mqtt.packets ") || matches_prefix("set mqtt.packets ") ||
matches_prefix("set mqtt.raw ") || matches_prefix("set mqtt.raw ") ||
matches_prefix("set mqtt.status ") ||
matches_prefix("set mqtt.tx ") || matches_prefix("set mqtt.tx ") ||
matches_prefix("set web ") || matches_prefix("set web ") ||
matches_prefix("set.web ") || matches_prefix("set.web ") ||