Receive live data and status updates

PUB live/{instrument}

Live data, status updates and actions

Only online noise instruments are supported through this API. If an instrument is online you can connect the websocket, if the instrument goes offline the websocket will be closed.

Requires an API key with the instruments:read scope to make the connection and begin receiving status updates. Other actions require additional scopes.

Receive live data and status updates.

PUBLISH live/{instrument}

Message #1

Headers

Payload

  • type string

    Type of message

    Value is LiveData.

  • time string(date-time)

    Time of the data

  • values array[object]

    List of live data values

    Hide values attributes Show values attributes array[object]
    • name string

      Name of the value

    • value number

      The value in dB

Payload example
{
  "type": "LiveData",
  "time": "2020-01-01T00:00:00Z",
  "values": [
    {
      "name": "LAeq",
      "value": 50.0
    },
    {
      "name": "LCPeak",
      "value": 60.0
    }
  ]
}

Message #2

Headers

Payload

  • type string

    Type of message

    Value is InstrumentStatus.

  • time string(date-time)

    Time of the status

  • online boolean

    True if the instrument is online, otherwise false

  • measuring boolean

    True if the instrument is measuring, otherwise false

  • calibrationInProgress boolean

    True if the instrument is performing a calibration, otherwise false

  • sicInProgress boolean

    True if the instrument is performing a System Integrity Check (SIC), otherwise false

Payload example
{
  "type": "InstrumentStatus",
  "time": "2020-01-01T00:00:00Z",
  "online": true,
  "measuring": true,
  "calibrationInProgress": false,
  "sicInProgress": false
}

Message #3

Headers

Payload

  • type string

    Type of message

    Value is ActionStatus.

  • time string(date-time)

    Time of the status

  • action string

    Action that was performed

    Values are Identify, Calibration, or SIC.

  • status string

    Status of the action

    Values are InProgress, Success, or Failed.

  • error string | null

    May contain additional error message if status is Failed

  • data object | null

    One of:

    Status of the Calibration

    Hide attributes Show attributes
    • time string(date-time)

      Time of the calibration

    • status string

      Status of the calibration

    • level number

      The calibration level in dB

    • offset number

      The offset from factory calibration in dB

Payload example
{
  "type": "ActionStatus",
  "time": "2020-01-01T00:00:00Z",
  "action": "Identify",
  "status": "InProgress"
}

Message #4

Headers

Payload

  • error string

    Error code

  • description string

    Description of the error

Payload example
{
  "error": "InvalidAction",
  "description": "Unknown action (X)"
}

Message #5

The connection will timeout after 1 minute of inactivity.
To keep the connection alive, send a KeepAlive message every 30 seconds.

The server will respond with another KeepAlive message.

Headers

Payload

  • action string

    Action to perform

    Value is KeepAlive.

Payload example
{
  "action": "KeepAlive"
}