Protocol Reference
Sireno Deck uses WebSocket for real-time communication between frontend and backend.
Protocol Version
Section titled “Protocol Version”Current: 1
Connection
Section titled “Connection”- Client connects to WebSocket server
- Client sends
hellomessage with token - Server validates and sends
hello-ack - Bidirectional message exchange begins
Message Types
Section titled “Message Types”Client → Server
Section titled “Client → Server”{ type: "hello" token: string // Authentication token clientId: string // Client identifier}button-action
Section titled “button-action”{ type: "button-action" deckId: string position: number // 0-indexed button position gesture: "tap" | "dbl-tap" | "hold"}method-call
Section titled “method-call”{ type: "method-call" callId: string // Unique request ID name: string // Method name args: unknown[] // Method arguments}select-deck
Section titled “select-deck”{ type: "select-deck" deckId: string}deck-active
Section titled “deck-active”{ type: "deck-active" deckId: string}dismiss-overlay
Section titled “dismiss-overlay”{ type: "dismiss-overlay"}subscribe-channels
Section titled “subscribe-channels”{ type: "subscribe-channels" channels: string[]}Server → Client
Section titled “Server → Client”hello-ack
Section titled “hello-ack”{ type: "hello-ack" protocolVersion: 1 deviceInfo: { id: string model: string keyCount: number label: string transport: "real" | "emulated" } theme: { name: string cssPath: string }}device-info
Section titled “device-info”{ type: "device-info" id: string model: string keyCount: number label: string transport: "real" | "emulated"}deck-config
Section titled “deck-config”{ type: "deck-config" deckId: string surfaces: Record<string, unknown> navMode: "regular" | "paginated" | "overlay" isCompact: boolean hasOverlayDeckAvailable: boolean overlayDeckIcon: string | null overlayDeckName: string | null}{ type: "state" channels: Record<string, unknown> cadence?: Record<string, number> // Poll intervals in ms}decks-list
Section titled “decks-list”{ type: "decks-list" decks: Array<{ id: string; name: string }>}show-overlay
Section titled “show-overlay”{ type: "show-overlay" deckId: string}button-error
Section titled “button-error”{ type: "button-error" deckId: string position: number durationMs: number buttonId?: string details?: string}method-call-result
Section titled “method-call-result”{ type: "method-call-result" callId: string success: boolean result?: unknown error?: string}assets
Section titled “assets”{ type: "assets" assets: Array<{ id: string; data: string }>}Channel Conventions
Section titled “Channel Conventions”| Channel | Description |
|---|---|
date-time:now |
Current timestamp (every 1s) |
media:state |
Media player state (every 1s) |
weather:current |
Weather data (every 10min) |
value-display:values |
Shell command outputs (every 5s) |
runtime:system-status:* |
System metrics |
runtime:overlay |
Overlay deck state |
runtime:activeDeck |
Active deck changes |
Authentication
Section titled “Authentication”The server validates the token in the hello message against sireno-deck.token in the runtime directory.
Invalid token results in WebSocket close with code 4001.