Skip to main content

mode

The mode command modifies the behavior of an individual API connection. Each mode setting applies only to the connection that sets it.

Command TypeSDVoE
Minimum Version2.1.x

Usage

mode <submode> <on | off>

Arguments

ArgumentRequiredDescription
submodeYesThe connection mode to change. See Modes.
valueYeson to enable the mode, off to disable it.

Modes

ModeDefaultBehavior when on
asyncoffThe API pushes event notifications to the client as they occur. When off, events are retrieved by polling with the event command
reduced_settings_changeoffReduces the payload of SETTINGS_CHANGED events to only the changed properties instead of full device details, cutting bandwidth for clients that track device state locally
humanoffFormats replies for reading at a terminal instead of as machine-parseable JSON
DisplayNet Manager's Console

Sending mode commands in DisplayNet Manager's Console changes the Manager's own connection and can interfere with it. Use the Console's Human Mode setting instead. Connections outside DisplayNet Manager can use every mode freely.

Examples

Enable push notifications on this connection
mode async on
Reduce SETTINGS_CHANGED payloads
mode reduced_settings_change on

Return value

mode async on
{
"status": "SUCCESS",
"request_id": null,
"result": null,
"error": null
}

REST API

No REST equivalent

This command acts on a single API session, so it has no REST operation. REST requests are independent of one another and have no session to act on. Over REST, obtain a token with POST /api/displaynet/login and send it on each request; see Authentication.

See also

  • event: poll for events when async is off
  • Notifications: the events delivered in async mode