Vallox.js
    Preparing search index...

    Class WebSocketTransport

    WebSocket transport for Vallox units using the proprietary binary WebSocket protocol.

    The unit exposes a WebSocket endpoint at ws://host:port/. Each exchange is a single request/response pair over a fresh connection. READ_TABLES fetches the entire register set (705 uint16 values) in one message; WRITE_DATA writes one or more register/value pairs.

    Implements

    Index
    • Fetches and decodes the unit's full history log: several weeks of periodic sensor/state samples (10-minute intervals observed on a real unit; ~6700+ samples per channel) across all logged channels.

      Each channel is stored in its own fixed-size ring buffer, so returned samples are in on-device write order, NOT chronological order — that order wraps mid-array once the buffer has filled and started overwriting its oldest entries. Sort by timestamp if you need them in time order.

      WS-only — not part of the Modbus RTU register map, so this lives on WebSocketTransport rather than the generic Transport interface.

      Returns Promise<HistorySample[]>

    • Reads count consecutive registers starting at address. All requested addresses must fall within the same WS buffer region.

      Parameters

      • address: number
      • count: number

      Returns Promise<Uint16Array<ArrayBufferLike>>

    • Writes multiple register values starting at address. All values are sent in a single WRITE_DATA frame. address is used as the base; each value corresponds to address, address+1, …

      Parameters

      • address: number
      • values: readonly number[]

      Returns Promise<void>