API Reference¶
r0astr provides WebSocket endpoints for real-time control and integration.
Overview¶
The API enables:
- Remote control of panels (start, stop, update patterns)
- Playback control (tempo, stop all)
- State queries (current patterns, playing status)
Connection¶
WebSocket Endpoint¶
The WebSocket server runs alongside the development server.
Message Format¶
All messages are JSON objects:
Panel Control¶
Start Panel¶
Stop Panel¶
Update Pattern¶
Playback Control¶
Stop All¶
Set Tempo¶
State Queries¶
Get State¶
Response:
{
"type": "state:current",
"payload": {
"panels": [
{
"id": "panel-1",
"playing": true,
"pattern": "s(\"bd*4\")"
}
],
"tempo": 120
}
}
Events¶
The server broadcasts state changes:
Panel State Changed¶
Error Handling¶
Errors are returned as:
Rate Limiting¶
No rate limiting is currently enforced. Be reasonable with message frequency.
Security¶
Local Network Only
The API is designed for local network use. Do not expose to the public internet without additional security measures.
See Remote Control for the built-in remote interface.