Skip to Content
WebSocket API

Channel reference

The viewer above is rendered from the auto-generated AsyncAPI 3 spec at asyncapi.yaml. It groups all messages by their __type__ discriminator (the field that the handler in src/socketserver/index.ts looks up to route the message to the right GraphQL subscription topic).

Channel-to-subscription mapping

Channel__type__ valueForwarded to (GraphQL subscription)
/ws/live/statusLiveStatusbotStatus (catch-all)
/ws/battery/statusBatteryStatusbatteryStatus
/ws/lidar/scanLidarScanlidarScan
/ws/hardware/statusHardwareStatushardwareStatus
/ws/dongle/statusDongleStatusdongleStatus
/ws/e/propulsion/motorePropulsionMotorePropulsionMotor
/ws/generic/data/channel/messageGenericDataChannelMessagegenericDataChannel
anything else(unknown)botStatus

The handler in src/socketserver/index.ts does not validate the message against any schema — it simply matches on __type__ and publishes the raw JSON to the appropriate pubsub topic.

Subscribing from a browser

To consume this telemetry from a browser or Node client, the recommended path is the GraphQL subscription at wss://<host>/graphql (graphql-ws subprotocol). The raw 4001/ws socket is intended for the robots. See the GraphQL Schema Reference → Subscription for the live query types (batteryStatus, lidarScan, hardwareStatus, dongleStatus, ePropulsionMotor, genericDataChannel, botStatus).