[codex] add web controls for wifi reconnect espnow on off and mqtt publish #8
Reference in New Issue
Block a user
Delete Branch "codex/web-network-controls-latest"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Continuing the web networking work (WiFi/ESP-NOW/MQTT), this PR adds missing runtime control actions that were available over serial but not exposed as dedicated web endpoints/actions.
What changed
Backend routes
In
WebServerManager:POST /api/network/wifi/reconnect->WIFI_RECONNECTPOST /api/network/espnow/on->ESPNOW_ONPOST /api/network/espnow/off->ESPNOW_OFFWeb UI controls
In
data/webui/:Why
Validation
platformio run -e esp32dev-> SUCCESSbash scripts/test_terminal.sh-> PASSNotes
src/web/WebServerManager.cppdata/webui/index.htmldata/webui/script.jsCross-repo context:\n- Zacus coordination issue: https://github.com/electron-rare/le-mystere-professeur-zacus/issues/90\n- Zacus related PR: https://github.com/electron-rare/le-mystere-professeur-zacus/pull/92\n- Kill_LIFE route-parity gate proposal: https://github.com/electron-rare/Kill_LIFE/issues/1\n\nThis PR extends browser-side WiFi/ESP-NOW/MQTT operability without changing the existing interop contract.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
0f71cf24b2ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@@ -211,9 +225,32 @@ function bindEvents() {}When the payload starts with
{or[,parsePayloadValueturns it into an object/array, but the server-side/api/network/mqtt/publishhandler readsdoc["payload"]into aString(const String payload = doc["payload"] | ""), which falls back to an empty string for non-string JSON values. In practice, submitting JSON payloads (including the default{"ping":true}shown in the new form) publishes an empty payload instead of the intended message.Useful? React with 👍 / 👎.
Coordination firmware ok: la PR Zacus https://github.com/electron-rare/le-mystere-professeur-zacus/pull/92 expose maintenant les endpoints /api/network/* + /api/control alignés avec ce que vous poussez ici. Contrat ESP-NOW status/payload inchangé côté interop.
Codex code review (latest head):
Findings:
/api/network/mqtt/publishreadspayloadas string.4f857b4: publish payload is now sent as raw string.Validation rerun after fix:
platformio run -e esp32dev-> SUCCESSbash scripts/test_terminal.sh-> PASSCurrent review verdict:
@codex review
Codex Review: Didn't find any major issues. More of your lovely PRs please.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex review rapide du diff RTC #8: pas de régression bloquante détectée. Les endpoints ajoutés sont cohérents avec le WebServerManager et le script WebUI. Point de vigilance mineur: pas de checks CI attachés sur cette branche, donc validation à compléter par build/test RTC avant merge.
Sync binôme: la PR firmware Zacus #95 couvre maintenant les endpoints web réseau manquants côté Freenove (
wifi/reconnect,espnow/on,espnow/off) pour rester en phase avec cette PR RTC.