Skip to main content

deviceswitch

The deviceswitch command sets the operating mode of a switchable device, such as the DN-300 transceiver.

Use deviceswitch instead of set property

On supported DisplayNet devices, use this command rather than the SDVoE set property command to switch modes. It keeps extended device features consistent across the mode change.

Command TypeDisplayNet
Minimum Version3.5.x

Usage

deviceswitch <target> <mode>

Arguments

ArgumentRequiredDescription
targetYesDevice ID or device name of a single switchable device.
modeYesThe mode to switch to. See Modes.

Modes

ValueMode
transmitterTransmitter mode
receiverReceiver mode
transceiverTransceiver mode (only on devices that support it)

Examples

Switch a transceiver into receiver mode
deviceswitch tx1 receiver

Return value

deviceswitch tx1 receiver
{
"status": "SUCCESS",
"request_id": null,
"result": null,
"error": null
}

Notifications

A DN_NOTIFICATION informs all active clients that a mode change has been initiated, so they can update how the device is handled:

deviceswitch tx1 receiver
{
"status": "DN_NOTIFICATION",
"request_id": null,
"result": {
"mode_change_triggered": [
{
"device_id": "6cdffb00387f",
"from_mode": "transmitter",
"to_mode": "receiver"
}
]
},
"error": null
}

Switching modes also generates NOTIFICATION messages, including a DEVICE_DISCONNECTED event while the device reboots, followed by events reflecting its updated state. See Notifications.

REST API

Endpoint typeDisplayNet API command
AddressPOST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands.
RoleUser
OperationParameters
deviceswitchdevice mode

See also

  • set property: the lower-level form this command exists to replace
  • get: read a device's current mode