Merge pull request #11 from xJARiD/develop

feat(mqtt,docs): add mqtt.status control and tighten migration guidance
Этот коммит содержится в:
xJARiD
2026-04-10 18:31:42 +10:00
коммит произвёл GitHub
родитель 0d77f9ff94 60648142a2
Коммит a239817d4d
3 изменённых файлов: 17 добавлений и 2 удалений
+6
Просмотреть файл
@@ -12,6 +12,8 @@ These commands are available on `*_repeater_mqtt` firmware targets.
- `get mqtt.status`
- shows WiFi, NTP, IATA, endpoint status, and TX state
- `get mqtt.statuscfg`
- shows whether periodic status messages are enabled
- `get mqtt.iata`
- shows the IATA/location code used in MQTT topics
- `set mqtt.iata <code>`
@@ -42,6 +44,8 @@ These commands are available on `*_repeater_mqtt` firmware targets.
- shows whether raw packet payloads are published
- `set mqtt.raw on|off`
- enables or disables the separate `raw` MQTT topic
- `set mqtt.status on|off`
- enables or disables periodic MQTT status publishing
- `get mqtt.tx`
- shows whether TX packets are included
- `set mqtt.tx on|off`
@@ -125,6 +129,8 @@ That allowlist currently includes:
- `set mqtt.packets on|off`
- `get mqtt.raw`
- `set mqtt.raw on|off`
- `get mqtt.statuscfg`
- `set mqtt.status on|off`
- `get mqtt.tx`
- `set mqtt.tx on|off`
- `get mqtt.eastmesh-au`
+4 -2
Просмотреть файл
@@ -27,6 +27,7 @@ Once the new firmware is flashed, set:
- `set wifi.ssid <your-ssid>`
- `set wifi.pwd <your-password>`
- `set mqtt.iata <code>`
- `set mqtt.status on`
## Optional Settings
@@ -53,6 +54,7 @@ Confirm the repeater is up and connected with:
- `get wifi.status`
- `get mqtt.status`
- `get mqtt.statuscfg`
## 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.
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`.
5. If you previously had TX publishing disabled, set `mqtt.tx off`.
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>/`.
## Related Docs
+7
Просмотреть файл
@@ -1337,6 +1337,8 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, char *command, char *reply
sprintf(reply, "> %s", mqtt.isPacketsEnabled() ? "on" : "off");
} else if (memcmp(command, "get mqtt.raw", 12) == 0) {
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) {
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) {
@@ -1396,6 +1398,9 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, char *command, char *reply
} else if (memcmp(command, "set mqtt.raw ", 13) == 0) {
mqtt.setRawEnabled(memcmp(&command[13], "on", 2) == 0);
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) {
mqtt.setEndpointEnabled(0x01, memcmp(&command[21], "on", 2) == 0);
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.packets") ||
matches_exact("get mqtt.raw") ||
matches_exact("get mqtt.statuscfg") ||
matches_exact("get mqtt.tx") ||
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.packets ") ||
matches_prefix("set mqtt.raw ") ||
matches_prefix("set mqtt.status ") ||
matches_prefix("set mqtt.tx ") ||
matches_prefix("set web ") ||
matches_prefix("set.web ") ||