deviceswitch
The deviceswitch command sets the operating mode of a switchable device, such as the DN-300 transceiver.
Use
deviceswitch instead of set propertyOn 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 Type | DisplayNet |
| Minimum Version | 3.5.x |
Usage
deviceswitch <target> <mode>
Arguments
| Argument | Required | Description |
|---|---|---|
target | Yes | Device ID or device name of a single switchable device. |
mode | Yes | The mode to switch to. See Modes. |
Modes
| Value | Mode |
|---|---|
transmitter | Transmitter mode |
receiver | Receiver mode |
transceiver | Transceiver mode (only on devices that support it) |
Examples
Switch a transceiver into receiver modedeviceswitch 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 type | DisplayNet API command |
|---|---|
| Address | POST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands. |
| Role | User |
| Operation | Parameters |
|---|---|
deviceswitch | device mode |
See also
set property: the lower-level form this command exists to replaceget: read a device's current mode