Skip to content

Add WebSocket datasource option for local ESP32 wireless workflows#1

Draft
musfaagv wants to merge 1 commit into
mainfrom
codex/add-websocket-feature-for-esp32
Draft

Add WebSocket datasource option for local ESP32 wireless workflows#1
musfaagv wants to merge 1 commit into
mainfrom
codex/add-websocket-feature-for-esp32

Conversation

@musfaagv
Copy link
Copy Markdown
Owner

Motivation

  • Provide a wireless option for ESP32 workflows by allowing the app to connect to a laptop-hosted local WebSocket server on the same Wi‑Fi network, so incoming lines can be plotted and the Console can send commands back.

Description

  • Add WebSocketConfig and extend ConnectionType to include websocket, and expose connectWebSocket(config) from useDataConnection to open a socket and parse newline-delimited lines.
  • Implement WebSocket lifecycle handling and bidirectional support in useDataConnection, including graceful disconnects and write() routing to either serial or websocket.
  • Add a new "WebSocket" tab to ConnectModal with a WebSocket URL input and a Connect WebSocket action, and wire onConnectWebSocket through Header and App.
  • Update ConnectModal unit test and README usage instructions to document the ESP32 + local WebSocket server flow.

Testing

  • Ran targeted unit tests: npm test -- src/hooks/__tests__/useDataConnection.test.ts src/components/__tests__/ConnectModal.test.tsx, and both test files passed.
  • Built the app with npm run build, which completed successfully.
  • Ran the full test suite with npm test, and all tests passed (150 tests in the environment used).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant