feat(webconfig): expose mqtt.neighbors controls in the web portal

- Allow mqtt.neighbors and mqtt.neighbors.interval in the WebConfigKeys set-key
  allowlist (the CLI enforces the PSRAM guard; the stub reply handles non-PSRAM).
- Emit neighbors + neighbors_interval (hours) in the WebConfigServer config JSON.
- Add a "Publish neighbors" toggle and a "Neighbors interval (hours)" field
  (12-336) to the Publishing card, with getVal() cases in webui/index.html.
- Cover both keys in test_webconfig_keys.

WebConfigHtml.h is a gitignored build artifact regenerated by the pre-build
hook from index.html, so it is not committed. Verified: test_webconfig_keys
passes and the T_Beam_S3_Supreme observer_mqtt firmware builds [SUCCESS].
This commit is contained in:
agessaman committed 2026-07-19 22:39:42 -07:00
1 parent 6911981573
commit d6f8a87183
4 files changed
+15 -2

No files matched your search

+2
View File
@@ -591,6 +591,8 @@ void WebConfigServer::handleConfigGet(AsyncWebServerRequest* req) {
: _obs->mqtt_tx_enabled == 1 ? "on" : "off";
mqtt["rx"] = (bool)_obs->mqtt_rx_enabled;
mqtt["interval"] = _obs->mqtt_status_interval / 60000; // CLI takes minutes
mqtt["neighbors"] = (bool)_obs->mqtt_neighbors_enabled;
mqtt["neighbors_interval"] = _obs->mqtt_neighbors_interval / 3600000UL; // CLI takes hours
mqtt["timezone"] = (const char*)_obs->timezone_string;
mqtt["timezone_offset"] = _obs->timezone_offset;
mqtt["ntp"] = (const char*)_obs->mqtt_ntp_server;