Skip to main content

send

The send command sends serial data to connected devices using RS-232, Infrared, or CEC.

Command TypeSDVoE
Minimum Version2.x.x

Usage

send <target> <type>[:<port>] <data_string>

Arguments

ArgumentRequiredDescription
targetYesHostname or MAC address of a single device, or a device group. See Targets.
typeYesThe connection type to send through. See Types.
portNoThe device port to send to. Applies to rs232 only; defaults to 0. See Ports.
data_stringYesThe data to send, as printable ASCII with escapes. See Data string.

Targets

ValueSends to
<device>A single device
ALLAll devices
ALL_TXAll transmitter devices
ALL_RXAll receiver devices

Types

ValueSends via
rs232The RS-232 port on the device
infraredThe infrared port on the device
cecCEC, to the connected HDMI device

Ports

The physical RS-232 port maps to different port values depending on the hardware:

ModelPhysical RS-232 port
DN-1500
DN-210/DN-2200
DN-2251
DN-3000

Data string

The data_string is a printable ASCII text string. Spaces, ASCII control characters, and non-ASCII byte values must be escaped:

EscapeMeaning
\0Null character
\nLine feed
\rCarriage return
\tHorizontal tab
\xnnByte value, where nn are two hexadecimal characters
\\A single backslash
\ Space character

Examples

Send a string out a device's RS-232 port
send 001ec0f03668 rs232:0 Hello\ World!
Send a control-character-terminated command to a display
send projector rs232 PWR\ ON\r

Return value

For each device targeted, the result contains either an entry in the success array (success) or a device error object in the error array (failure). The success array is named after the type: send_rs232, send_infrared, or send_cec.

send 001ec0f03668 rs232:0 Hello\ World!
{
"status": "SUCCESS",
"request_id": null,
"result": {
"send_rs232": [
{ "device_id": "001ec0f03668" }
],
"error": []
},
"error": null
}
MemberTypeDescription
send_rs232 / send_infrared / send_cecArray of objectsThe devices for which the request succeeded. Each entry has one member, device_id
errorArray of DeviceErrorThe devices for which the command failed, and the reason why

Errors

Request-level errors:

ErrorCause
ILLEGAL_ARGUMENTThe target is not a valid device ID or group name
ILLEGAL_ARGUMENTThe data string is not in the format described above

The request may also fail for individual devices:

ErrorCause
DEVICE_TYPEThe device does not have a UART, or lacks the specified RS-232 port

REST API

Endpoint typeSDVoE API command, forwarded to the Control Server
Address/api/device/{target}
RoleGoverned by the device lock rather than by a DisplayNet role
POST /api/device/{target}
{
"op": "send:cec",
"port_index": "Integer (optional)",
"data_hex": "String"
}
POST /api/device/{target}
{
"op": "send:infrared",
"data_hex": "String"
}
POST /api/device/{target}
{
"op": "send:rs232",
"port_index": "Integer (optional)",
"data_type": "\"hex\" (optional)",
"data_string": "String"
}

Values labeled with a type name such as String or Integer are placeholders, not literal text. Replace them with actual values; fields marked (optional) can be omitted.

{target} takes a DisplayNet device name as readily as a device ID, and a locked device refuses a mutating operation. See SDVoE API operations for what DisplayNet adds to these calls.

See also

  • connect: route serial connections between devices
  • request: receive serial data routed to the API
  • display: volume and mute for the display attached to a receiver