Skip to main content

Requests and Events

Every command returns immediately. Work that takes longer completes asynchronously: SDVoE commands hand back a request to poll, and DisplayNet commands push a notification when the work lands.

Requests

A command that needs time returns PROCESSING with a request_id:

update 001ec0f04d9c blueriver_rdk-2-0-0-0.apz
{
"status" : "PROCESSING",
"request_id" : 32223,
"result" : null,
"error" : null
}

request polls that id: it answers PROCESSING until the command finishes, then SUCCESS.

SDVoE commands only

Request polling applies to commands carrying the SDVoE Command Type. DisplayNet commands do not return a request_id; they send DN_NOTIFICATION events for anything that cannot answer immediately.

Notifications

mode async switches a session to asynchronous delivery: the server pushes a notification whenever an event occurs, whether or not the session sent a command. Without it, a client reads events on demand with event, and only learns of changes made by other clients when it polls.

There are two types of events:

Event typeStatusRaised by
SDVoENOTIFICATIONA device becoming available, disconnecting, or changing a setting
DisplayNetDN_NOTIFICATIONA DisplayNet object updating, in the same way a device does

A notification may carry multiple event objects, each with its own request_id, when many changes land at once.