preset
The preset command creates, updates, and runs presets. A snapshot preset stores the current system state for later restoration; a script preset stores a list of API commands to execute.
| Command Type | DisplayNet |
| Minimum Version | 2.x.x |
Usage
preset list
preset set snapshot <preset_name>
preset set script <preset_name> ["command1", "command2", ...]
preset get <preset_name>
preset echo <preset_name>
preset run <preset_name>
preset rename <preset_name> <new_name>
preset delete <preset_name>
preset status <task_id>
preset cancel <task_id>
Subcommands
| Subcommand | Description |
|---|---|
list | Retrieves a list of all presets |
set | Creates or updates a preset. For a snapshot, stores the current system state; for a script, creates or replaces the command list |
get | Gets a preset's details, including its stored commands. Snapshots return the full SDVoE command set needed to restore from a blank slate, plus any errors that would prevent a complete load (e.g. offline devices) |
echo (alias preview) | Previews a snapshot's contents without applying it |
run | Runs a preset. Snapshots execute only the commands needed relative to the current system state; scripts execute their stored commands. Returns a script task ID for status/cancel |
rename | Renames a preset |
delete | Deletes a preset |
status | Retrieves the status of a script task |
cancel | Cancels a currently running script task |
save <name> is a legacy alias for set snapshot <name>.
Arguments
| Argument | Required | Description |
|---|---|---|
preset_type | set | snapshot or script. Other subcommands detect the type from the name. |
preset_name | Most subcommands | The preset name. Use underscores instead of spaces (spaces are not supported). |
commands | set script | A JSON array of command strings, e.g. ["connect hdmi tx1 rx2", "WAIT 500", "connect hdmi tx2 rx1"]. |
task_id | status, cancel | The task ID returned from a script run. |
Snapshot behavior
getreturns the sum of all possible commands needed to restore the snapshot exactly, assuming every setting on every device must be restored.runexecutes only the commands required relative to the current system state, minimizing the number of commands sent.- Loading a snapshot can cause a large amount of response traffic, since many commands run in quick succession.
Script behavior
- All SDVoE and DisplayNet commands are supported in scripts.
- A
WAIT <milliseconds>command delays processing of the next command, which suits third-party devices that need timed command sequences. - Each command is authorized as the user executing the script; unauthorized commands are skipped.
- Errors during a run are stored in the script task details. After 100 errors, the script stops.
Examples
Save the current routing statepreset set snapshot MorningState
Create a script with a timed sequencepreset set script MyScript [ "connect hdmi tx1 rx2", "WAIT 500", "connect hdmi tx2 rx1" ]
Run it and check the taskpreset run MyScript
preset status c013cd7d-10b9-4812-bd69-9af9b0e9b501
Return value
- preset list
- preset get (snapshot)
- preset get (script)
- preset status
preset list{
"status": "SUCCESS",
"request_id": null,
"result": {
"presets": [
{
"name": "MorningState",
"type": "snapshot",
"creationDate": "2026-06-29T22:31:13.808789",
"createdBy": "DNAdmin",
"lastEditDate": "2026-06-30T19:51:15.507022",
"lastEditedBy": "DisplayNet",
"snapShotId": 4,
"scriptItemId": 0
}
]
},
"error": null
}
The id member that applies to the preset's type carries its value; the other is 0.
preset get MorningState{
"status": "SUCCESS",
"request_id": null,
"result": {
"preset_details": [
{
"type": "snapshot",
"name": "MorningState",
"snapShotId": 26,
"creationDate": "2023-07-24T19:25:03.951527",
"lastEditDate": "2023-07-24T19:25:03.951528",
"createdBy": "DisplayNet",
"lastEditedBy": "DisplayNet",
"mode": "get",
"commands": [],
"errors": []
}
]
},
"error": null
}
preset get NewScript{
"status": "SUCCESS",
"request_id": null,
"result": {
"preset_details": [
{
"type": "script",
"name": "NewScript",
"scriptItemId": 17,
"creationDate": "2023-07-24T19:32:48.498109",
"lastEditDate": "2023-07-24T19:32:48.498176",
"createdBy": "DisplayNet",
"lastEditedBy": "DisplayNet",
"commands": [
"// created by : DisplayNet, Mon Jul 24 2023 15:32:49 GMT-0400 (Eastern Daylight Time)"
],
"versions": []
}
]
},
"error": null
}
preset status c013cd7d-10b9-4812-bd69-9af9b0e9b501{
"status": "SUCCESS",
"request_id": null,
"result": {
"preset_task": [
{
"TaskId": "c013cd7d-10b9-4812-bd69-9af9b0e9b501",
"ScriptName": "NewScript",
"StartTime": "2023-07-25T22:26:14.0391373Z",
"EndTime": "2023-07-25T22:26:14.0532906Z",
"Status": 5,
"StatusMessage": "Completed",
"TaskUser": "DisplayNet",
"SessionId": "9b714108-7618-4097-a4ab-3ac88488a6c0",
"Errors": []
}
]
},
"error": null
}
Status is numeric, and StatusMessage is its name:
| Value | Status |
|---|---|
0 | Initializing |
1 | Running |
2 | Cancelling |
3 | Cancelled |
4 | Failed |
5 | Completed |
Notifications
Preset changes broadcast a DN_NOTIFICATION with a preset_update result:
- Set snapshot
- Rename
preset set snapshot MorningState{
"status": "DN_NOTIFICATION",
"request_id": null,
"result": {
"preset_update": [
{
"type": "snapshot",
"name": "MorningState",
"snapShotId": 26,
"createdBy": "DisplayNet",
"creationDate": "2023-07-24T19:25:03.9515274Z",
"lastEditedBy": "DisplayNet",
"LastEditDate": "2023-07-24T19:25:03.9515282Z"
}
]
},
"error": null
}
preset rename TESTING RouteMain{
"status": "DN_NOTIFICATION",
"request_id": null,
"result": {
"preset_update": [
{
"type": "script",
"scriptItemId": 16,
"oldname": "TESTING",
"newname": "RouteMain",
"createdBy": "DisplayNet",
"creationDate": "2022-10-11T16:56:30.359732",
"lastEditedBy": "DisplayNet",
"lastEditDate": "2023-07-24T19:21:35.7288208Z"
}
]
},
"error": null
}
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 |
| Subcommand | Operation | Parameters |
|---|---|---|
cancel | preset_cancel | task_id |
delete | preset_delete | name |
echo | preset_echo | name |
get | preset_get | name |
list | preset_list | — |
rename | preset_rename | old_name new_name |
run | preset_run | name |
save | preset_save | name |
set | preset_set | type name [commands]* |
status | preset_status | [task_id] |
A parameter in brackets is optional. A parameter marked * takes the remainder of the command line as one string. Pass the text exactly as you would type it on the TCI interface.
See also
getinitdata: thepresetsdataset for client startupreplace: migrates presets when replacing a device