Skip to main content

event

The event command returns a list of events that occurred recently. For more on requests, events, and notifications, see Requests and Events.

Command TypeSDVoE
Minimum Version2.x.x

Usage

event [<eventid>]

Arguments

ArgumentRequiredDescription
eventidNoEvent ID of the last event retrieved; all events after it are returned. If omitted, all unexpired events since the beginning of the API session are returned.
Events sent automatically to new clients

When a new client connects, the following are returned (to that client only) to convey the current network state:

  • A DEVICE_CONNECTED event for every device present on the network.
  • A DEVICE_DISCONNECTED event for every device previously seen but no longer present.
  • A FIRMWARE_UPDATE_START event for any device being updated (expires 10 minutes after it occurs).

Examples

Fetch everything after event 49
event 49

Return value

event 2385
{
"status": "SUCCESS",
"request_id": null,
"result": {
"events": [
{
"device_id": "6cdffb00f1b7",
"device_name": "HomeLab",
"event_id": 2386,
"event_type": "DEVICE_CONNECTED",
"timestamp": 1785343080,
"request_id": 2386
},
{
"device_id": "6cdffb00f1b7",
"device_name": "HomeLab",
"event_id": 2387,
"event_type": "DEVICE_INFO_AVAILABLE",
"timestamp": 1785343080,
"request_id": 2387
}
]
},
"error": null
}
MemberDescription
device_idThe device the event concerns
device_nameThat device's name, added by DisplayNet
event_idThe event's sequence number. Pass the last one you saw as the next eventid
event_typeWhat happened
timestampWhen it happened, as a Unix timestamp
request_idThe id to pass to request for the event's data, or null when it carries none

REST API

Endpoint typeSDVoE API command, forwarded to the Control Server
Address/api/event
RoleGoverned by the device lock rather than by a DisplayNet role
GET /api/event?after=<event_id>&limit=<limit>&type=<types>&settings_change=<subsets>

Values labeled with a type name such as String or Integer are placeholders, not literal text. Replace them with actual values; fields marked (optional) can be omitted.

{target} takes a DisplayNet device name as readily as a device ID, and a locked device refuses a mutating operation. See SDVoE API operations for what DisplayNet adds to these calls.

See also

  • request: fetch the data behind an event's request_id
  • mode: mode async on pushes events instead of polling