RDM Get/Set results#

To obtain results of RDM GET or SET operations, subscribe to the rdm_get_set channel:

{
    "subscribe": "rdm_get_set"
}

Updates on this channel will have a data object with the following keys:

Key

Function

"message_type"

string (see below)

"universe_id"

The universe ID in Universe Key Format - see below.

"device_id"

string in RDM UID Format

"pid"

string, RDM PID as a human-readable string, e.g. DEVICE_INFO, or a string containing the hex representation of the enum value of the PID as defined by the RDM standard, e.g. c1

"data"

object (optional)

A universe key string for RDM takes the form:

  • protocol:index for protocols dmx and art-net;

  • protocol:remoteDeviceType:remoteDeviceNum:port for protocol edn.

Where:

  • remoteDeviceType can be edn10 or edn20;

  • remoteDeviceNum is an integer;

  • port is an integer.

For example:

  • "dmx:1"

  • "edn:edn20:1:5"

The message_types are:

  • get_finished: The GET operation indicated by the PID has finished. No data object is expected.

  • set_finished: The SET operation indicated by the PID has finished. No data object is expected.

  • result: Provides the results of the operation, parsed from the response from the device.

  • result_error: The operation indicated by the PID has encountered an error parsing the response from the device.

  • get_cancelled: The GET operation indicated by the PID has been cancelled.

  • set_cancelled: The SET operation indicated by the PID has been cancelled.

For the messages sending data, the data object format is described in the following sections.

Get/Set result#

"message_type" : "result"

The data object will be appropriate for the PID. If the PID is one of the supported PIDs, e.g. DEVICE_INFO then data is described under RDM Supported PIDs.

For example:

{
    "broadcast": "rdm_get_set",
    "data": {
        "message_type": "result",
        "universe": "dmx:1",
        "device_id": "7068:3730936e",
        "pid": "DEVICE_MODEL_DESCRIPTION",
        "data": {
              "model_description": "LDA - Mini RDM Fixture"
        }
    }
}

Otherwise, pid will be the hexadecimal representation of the enum value of the PID, and data will have one key, raw, the value of which will be the base64-encoded raw payload data received from the device.

For example:

{
   "broadcast": "rdm_get_set",
   "data": {
      "message_type": "result",
      "universe": "dmx:1",
      "device_id": "7068:893b0b82",
      "pid": "8500",
      "data": {
         "raw": "V1MyODEyQg=="
      }
   }
}

Get/Set result error#

"message_type" : "result_error"

The data object will contain:

  • error: string, a description of the error with the response

Get/Set operation cancelled#

"message_type" : "get_cancelled"

"message_type" : "set_cancelled"

The data object will contain:

  • error: string, a description of why the operation was cancelled

For example:

{
   "broadcast": "rdm_get_set",
   "data": {
      "message_type": "get_cancelled",
      "universe": "dmx:1",
      "device_id": "7068:3730936e",
      "pid": "9999",
      "data": {
         "error": "unknown pid"
      }
   }
}

RDM UID Format#

RDM UIDs take the form:

{manuId}:{deviceId}(:{subId})

where:

  • {manuId} is a padded unsigned hexadecimal integer of width 4, lowercase, e.g. 072c;

  • {deviceId} is a padded unsigned hexadecimal integer of width 8, lowercase, e.g. 0004fe02;

  • {subId} is an optional unsigned decimal integer.