feat(issue-11): add Node-RED physical panel simulator #13

Merged
rznz merged 1 commit from feat/11-node-red-panel into main 2026-10-27 09:41:29 +03:00
Collaborator

Closes #11

The physical panel can now be exercised without a Raspberry Pi. A separate Node-RED process uses native FlowFuse switches, button and text widgets, sends existing HardwareEvent JSON and renders authoritative hub status. Controls wait for a mock snapshot, follow state_revision and disable on disconnection. One small native ui-template prevents Dashboard from buffering offline browser input.

Depends on #10 / PR #12, including its prepared ASGI cancellation cleanup regression fix. Merge that dependency first, then update this main-based branch and regenerate memory indexes. This PR does not copy hub source changes into the simulator.

Acceptance criteria

  • Two power switches, confirm button, five hardware outputs, display and connection state.
  • Existing REST/WebSocket contract, revision handling and synchronization without feedback events.
  • Disconnect input lock and automatic reconnect synchronization on both network legs.
  • Environment-configurable addresses, importable flow, exact dependencies and lock, setup/import guide.
  • Automated and real-browser verification; README, architecture, prompts and task memory updated.

Verification

  • Clean npm ci; Node-RED 5.0.9 and @flowfuse/node-red-dashboard 1.34.0.
  • npm test: 10 passed.
  • Real Node-RED + #10 mock Uvicorn: two browser views, three actions = three events, outputs/display, reset = zero events without a loop, hub restart/revision 0 and continued control.
  • Node-RED loss: offline pointer/keyboard actions blocked and not replayed; reconnect required no reload.
  • Dependency fix: deterministic cancellation test fails before fix, full Python suites 16/16 five consecutive runs after it; live sockets/ping-pong/reset passed.
  • git diff --check passed. No physical hardware or Android changes.

Setup: simulator/README.md. Prompt: docs/prompts/11-node-red-panel.md. Memory: .agents/work/tasks/11-node-red-panel/.

Review requested from echo1; reviewed on continuation by rznz (not the PR author). The user explicitly authorized review and merge in the preceding conversation and resumed that instruction on 2026-10-27.

2026-10-27 integration verification

Rebased onto merged PR #12. Combined documentation and rebuilt shared indexes/generated docs from all source outcomes. Hub/device Python tests: 16 passed; panel Node tests: 10 passed; global secret/conflict checks passed. Simulator runtime source unchanged by rebase.

Closes #11 The physical panel can now be exercised without a Raspberry Pi. A separate Node-RED process uses native FlowFuse switches, button and text widgets, sends existing HardwareEvent JSON and renders authoritative hub status. Controls wait for a mock snapshot, follow state_revision and disable on disconnection. One small native ui-template prevents Dashboard from buffering offline browser input. Depends on #10 / PR #12, including its prepared ASGI cancellation cleanup regression fix. Merge that dependency first, then update this main-based branch and regenerate memory indexes. This PR does not copy hub source changes into the simulator. ## Acceptance criteria - [x] Two power switches, confirm button, five hardware outputs, display and connection state. - [x] Existing REST/WebSocket contract, revision handling and synchronization without feedback events. - [x] Disconnect input lock and automatic reconnect synchronization on both network legs. - [x] Environment-configurable addresses, importable flow, exact dependencies and lock, setup/import guide. - [x] Automated and real-browser verification; README, architecture, prompts and task memory updated. ## Verification - Clean npm ci; Node-RED 5.0.9 and @flowfuse/node-red-dashboard 1.34.0. - npm test: 10 passed. - Real Node-RED + #10 mock Uvicorn: two browser views, three actions = three events, outputs/display, reset = zero events without a loop, hub restart/revision 0 and continued control. - Node-RED loss: offline pointer/keyboard actions blocked and not replayed; reconnect required no reload. - Dependency fix: deterministic cancellation test fails before fix, full Python suites 16/16 five consecutive runs after it; live sockets/ping-pong/reset passed. - git diff --check passed. No physical hardware or Android changes. Setup: simulator/README.md. Prompt: docs/prompts/11-node-red-panel.md. Memory: .agents/work/tasks/11-node-red-panel/. Review requested from echo1; reviewed on continuation by rznz (not the PR author). The user explicitly authorized review and merge in the preceding conversation and resumed that instruction on 2026-10-27. ## 2026-10-27 integration verification Rebased onto merged PR #12. Combined documentation and rebuilt shared indexes/generated docs from all source outcomes. Hub/device Python tests: 16 passed; panel Node tests: 10 passed; global secret/conflict checks passed. Simulator runtime source unchanged by rebase.
dudll requested review from echo1 2026-10-26 16:20:01 +03:00
rznz force-pushed feat/11-node-red-panel from a88019839e to e5f80918f6 2026-10-27 09:41:07 +03:00 Compare
rznz approved these changes 2026-10-27 09:41:18 +03:00
rznz left a comment

No blocking findings. Reviewed acceptance criteria, flow mapping/offline guard, protocol and task outcomes. After rebase onto merged PR #12: hub/device pytest 16 passed, panel node tests 10 passed; global secret/conflict checks passed. Rebuilt generated task indexes and docs from all outcomes; frozen tasks preserved. Runtime simulator source matches the previously browser-verified version. Physical hardware is outside scope. User explicitly requested review and merge in the preceding conversation and asked to resume it.

No blocking findings. Reviewed acceptance criteria, flow mapping/offline guard, protocol and task outcomes. After rebase onto merged PR #12: hub/device pytest 16 passed, panel node tests 10 passed; global secret/conflict checks passed. Rebuilt generated task indexes and docs from all outcomes; frozen tasks preserved. Runtime simulator source matches the previously browser-verified version. Physical hardware is outside scope. User explicitly requested review and merge in the preceding conversation and asked to resume it.
rznz merged commit e90d1df131 into main 2026-10-27 09:41:29 +03:00
rznz deleted branch feat/11-node-red-panel 2026-10-27 09:41:29 +03:00
Sign in to join this conversation.
No description provided.