deviceStatus
Subscription
Subscribes to the online status of Devices selected by the given filter.
A device is ONLINE while its lastHeartbeat is within ttl of the current time and OFFLINE
once it is older. On subscribe, one START message is emitted per watched device carrying its
current status. After that, one UPDATE message is emitted per status transition, so a flapping
device whose heartbeat gaps stay within ttl produces nothing.
Detection latency is bounded by ttl plus the server’s evaluation interval.
Response
Returns DeviceStatusMessage
Arguments
| Name | Type | Description |
|---|---|---|
filter | FilterDeviceInput | Selects the devices to watch, using the same filter as the |
ttl | DateTimeDuration! | How long a device may go without a heartbeat before it is reported |
Example
subscription deviceStatus( $filter: FilterDeviceInput, $ttl: DateTimeDuration!) { deviceStatus( filter: $filter, ttl: $ttl ) { device { id uuid externalId name enabled address frameRate position { type coordinates } dataSource { id name type labels } site { id name timezone } transcoderId calibrations { id timestamp precomputeAt } pointOfInterest { id name metadata } lastHeartbeat } status lastHeartbeat timestamp state }}{ "ttl": "PT1H"}{ "data": { "deviceStatus": { "device": { "id": "61d2e4db-361d-8d20-92f2-04f4efd74ac2", "uuid": "c43d07da-1005-849e-88e2-1ac21370e6c3", "externalId": "fb6f96a9-958e-889f-8d8b-56797ec9a35c", "name": "name-c8f9", "enabled": true, "address": "address-b541", "frameRate": 198.29, "position": { "type": "type-bd8d", "coordinates": [ 538.37 ] }, "dataSource": { "id": "d12da500-1c9d-8517-8064-a811ebcd3707", "name": "name-549e", "type": "FOLDER", "labels": [ "labels-516b" ] }, "site": { "id": "f5e73b52-9179-8799-92de-27516934ea4d", "name": "name-ac75", "timezone": "timezone-4f92" }, "transcoderId": "26ca1b82-27b2-8a32-9063-ce85dbc5be74", "calibrations": [ { "id": "df384b8d-3900-85a7-b8c8-32d6f760286a", "timestamp": "2025-01-01T00:00:00.000Z", "precomputeAt": "2025-01-01T00:00:00.000Z" } ], "pointOfInterest": { "id": "9bf022b1-0c59-8550-8625-aca917feaaeb", "name": "name-9f71", "metadata": {} }, "lastHeartbeat": "2025-01-01T00:00:00.000Z" }, "status": "ONLINE", "lastHeartbeat": "2025-01-01T00:00:00.000Z", "timestamp": "2025-01-01T00:00:00.000Z", "state": "UPDATE" } }}