Skip to main content

Send an STB Command

Sends a command to an STB device. The device must be online and connected (status Online or Standby) to successfully receive the command. Commands are sent immediately to the receiving STB and are not queued or retained for offline devices. Commands are identified by a string and the expected parameters are defined uniquely for each supported command.

Authorizations: STB Administration

Requests

Power On/Off
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command":"standby-off" 
}
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command":"standby-on" 
}

Parameters:

Field

Type

Description

command

String

Command to send: standby-off or standby-on.

Reboot
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command":"reboot" 
}

Parameters:

Field

Type

Description

command

String

Command to send: reboot.

Mute/Unmute
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command":"mute" 
}
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command":"unmute" 
}

Parameters:

Field

Type

Description

command

String

Command to send: mute or unmute.

Set Volume
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command":"set-volume",
  "parameters": { 
    "volume": .75 
  }
}

Parameters:

Field

Type

Description

command

String

Command to send: set-volume.

volume

Float

Volume level to set. Range: 0.00-1.00

Set Channel
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command":"set-channel", 
  "parameters": { 
    "id":"ae7dcb56-9a62-402d-99e8-e053c4af0ff5", 
    "name":null, "type":"source" 
  } 
}

Parameters:

Field

Type

Description

command

String

Command to send: set-channel.

id

String

ID of the resource to watch.

name

String

Name of the resource to watch.

Note

Content is not checked, recommend setting to null.

type

String

Type of resource: source, session, asset, or composition (layout).

Show Message
CODE
POST /apis/devices/stbs/:stbId/commands
{
  "command": "show-text-message",
  "parameters": {
    "data": [
      {
        "message": "This is an important message",
        "duration": 300000,
        "color": "#ffffff",
        "blink": false
      }],
    "useFades": true,
    "repeat": -1,
    "showMode": "static",
    "location": {
      "position": "bottom",
      "offset": 0
    },
    "backgroundColor": "#ff0000"
  }
}

Parameters:

Field

Type

Description

command

String

Command to send: set-text-message.

repeat

Number

Repeat count. Set to -1 to disable.

showMode

String

Display mode: static or scroll.

backgroundColor

String

Color RGB value in hex, e.g., #aabbcc.

useFades

Boolean

Set to true.

position

String

Anchor position: bottom-left, bottom-right, top-left, top-right, left, right.

offset

Number

Vertical pixel offset from anchor position.

message

String

Text content of message.

duration

Number

Message duration in ms.

color

String

Color RGB value in hex, e.g., #aabbcc.

blink

Boolean

Blink/pulse the text message.

Enable/Disable DWS

These commands enable and disable the STB's diagnostic web server.

CODE
POST /apis/devices/stbs/:stbId/commands
{
  "command":"enable-dws" 
}
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command":"disable-dws" 
}

Parameters:

Field

Type

Description

command

String

Command to send: enable-dws or disable-dws.

Enable/Disable CC
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command": "enable-cc", 
  "parameters": { 
    "channel": 0 
  } 
}
CODE
POST /apis/devices/stbs/:stbId/commands
{ 
  "command":"disable-cc" 
}

Parameters:

Field

Type

Description

command

String

Command to send: enable-cc or disable-cc

channel

Number

Closed Captions channel. Range: 0-3

Response

Success

CODE
{
  "data": { 
    "type":"Send Commands to Device", 
    "status":"ok", 
    "message":"Successfully sent command to device" 
  }
}

Error

Code

Payload

Description

404

{"code": "040000", "name":"NotFound",
"message":"Device stream not found", "httpStatusCode":404}

Device offline.

404

{"code": "040000", "name":"NotFound",
"message":"Device not found", "httpStatusCode":404}

Unknown device ID.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.