Skip to content

WebSocket

Beta — Next Phase

WebSocket support is in active development and is not yet available for integration use. The documentation below reflects planned API behavior. APIs and message formats may change before the stable release.

WebSocket is used for real-time device status queries, executing device operations, and receiving device events.

REST API is suited for standard request-response integrations. WebSocket is suited for integrations that maintain a persistent connection and need low-latency interaction and real-time events.

Use Cases

  • Listen for device online, offline, or state change events
  • Listen for IO state changes such as relays, digital inputs, and sensors
  • Query device status over a long-lived connection
  • Execute device operations over a long-lived connection
  • Reduce the need to poll the REST API frequently

Out of Scope

  • Access tokens are not obtained through WebSocket
  • Historical events cannot be replayed through WebSocket
  • Bulk device control is not supported through WebSocket

Basic Flow

  1. Call Create Access Token to obtain an accessToken.
  2. Call POST /wlte/v1/ws/ticket to exchange the access token for a one-time wsTicket.
  3. Establish a WebSocket connection using wss://.../ws?ticket={wsTicket}.
  4. After the connection succeeds, an authenticated session is established.
  5. Use request messages to send session.ping, device.status.get, or device.operation.execute.
  6. Match request results by requestId in reply messages.
  7. Handle device events by topic in event messages.
  8. Reconnect according to the reconnection rules after the connection closes.

Start Here

Docs buildVersion v1.2.19-20260602-174859-60
Copyright © 2026 WLTE