Skip to main content

lock

The lock command protects one or more devices from configuration and routing changes. While a device is locked, commands that would modify it, including connect, disconnect, deviceswitch, MultiView routing, USB 2.0 pair/unpair/role changes, preset application, and applying saved settings, are rejected with an error. Locking does not interrupt existing routes; it only prevents new changes.

The unlock command returns the device(s) to the unlocked state.

lock is a convenience alias over the dev.Locked device configuration item: locking a device is equivalent to config set <device> dev.Locked true. Clients receive the same configurations notification produced by the config command.

info

Locking is idempotent: locking an already-locked device succeeds without making a change or emitting a notification.

Command TypeDisplayNet
Minimum Version4.6

Usage

lock <target>

Arguments

target is a single device ID, a comma-separated list of device IDs, or a device group:

ValueLocks
<device_id>A single device
ALLAll devices
ALL_TXAll transmitter devices
ALL_RXAll receiver devices

With a group or a list, each resolvable device is processed independently and the result reports the outcome per device.

State and side effects

  • The lock is stored as device configuration, not as session state, so it survives a server restart and applies to every client: telnet, SSH, WebSocket, REST and DisplayNet Manager alike.
  • It gates routing and device mutation: connect, disconnect, usb2 pairing, and the mutating SDVoE verbs (start, stop, join, leave, switch, unicast, multicast, set, factory, reboot) are all refused against a locked device.
  • Reads are never gated. A lock protects a device from being changed; it does not hide it or interrupt a link that is already up.
  • A refused command returns the DEVICE_LOCKED reason.

Notifications

Locking devices that change state raises NOTIFICATION messages carrying the updated device configuration. See Requests and Events for more information.

Return value

The result contains a lock array with one entry per processed device. Each entry reports the device's actual locked state after the operation and a status of locked (state changed), unchanged (already locked), or skipped (the change could not be applied).

lock room_projector
{
"status" : "SUCCESS",
"request_id" : null,
"result" : {
"lock" : [
{ "device_id" : "001ec0f04d9c", "locked" : true, "status" : "locked" }
]
},
"error" : null
}

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
locktargets

See also

  • unlock: the inverse
  • config: the dev.Locked setting this is an alias over
  • connect: the routing a lock refuses