WebSocket Interface
The WebSocket interface provides:
Runtime state broadcasts
Browser UI synchronization
Configuration reload notifications
Transmission lifecycle events
Test-tone state updates
Real-time control integration
For normal browser use, connect through the proxied WebSocket path:
ws://{servername}.local/wsprrypi/socket
The backend service receives this connection internally as:
ws://127.0.0.1:31416/socket
Available Commands
Examples of supported commands include:
get_tx_stateshutdownrebootRuntime control and synchronization requests used by the browser UI
Example request:
{"command":"get_tx_state"}
Example response:
{"tx_state":true}
Broadcast Events
As long as the socket remains connected, the server broadcasts runtime events to all connected clients.
Configuration Reload
Broadcast when the active configuration changes:
{
"state":"reload",
"timestamp":"2025-05-06T16:43:02Z",
"type":"configuration"
}
Transmission Start
Broadcast when a transmission begins:
{
"state":"starting",
"timestamp":"2025-05-06T16:40:01Z",
"type":"transmit"
}
Transmission Complete
Broadcast when a transmission finishes:
{
"state":"finished",
"timestamp":"2025-05-06T16:41:51Z",
"type":"transmit"
}
Transmission Cancelled
Broadcast when a transmission is stopped before completion:
{
"state":"cancelled",
"timestamp":"2025-05-06T16:40:20Z",
"type":"transmit"
}
Test Tone State
Broadcast during transient RF test tone operations:
{
"state":"starting",
"type":"test_tone"
}
The browser UI relies heavily on these broadcasts for:
Live status updates
Modal synchronization
Runtime control state
Configuration refresh
Multi-tab coordination
Update notification behavior