low-power-sleep
low-power-sleep — a device that goes into low-power sleep and must be WOKEN before it streams (#459, Q2).
low-power-sleep — a device that goes into low-power sleep and must be WOKEN before it streams (#459, Q2). A battery camera (Reolink Argus, a robot's on-board camera) is one; a battery SENSOR is not: it reports charge on the battery cap and never sleeps.
The state is the sleep inputs (deriveBatteryPresence): whether the device is asleep, and the last time it PROVED it was reachable. Read from this slice by the stream broker (readBatterySleepFacts), the recorder (recordingWakeDeps) and the snapshot builtin. The broker's per-device mirror is still also fed by BatteryOnStatusChanged events.
At a glance
| Capability | low-power-sleep |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | camera |
| Source | packages/types/src/capabilities/low-power-sleep.cap.ts |
Methods
Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
wakeUp | mutation | yes | default |
wakeUp
mutation
Explicitly wake the device from low-power sleep ahead of a streaming session start. Consumers that initiate a stream against a sleeping camera (wake-on-play, the recorder, HomeKit, Alexa, snapshot wrappers) call this with a short timeout before establishing the media pipeline — the broker's own passive wake-on-dial works but adds 5–7 seconds to first-frame. Pre-waking compresses that gap.
Returns awoke: true when the firmware acknowledged the wake before timeoutMs, awoke: false when it timed out; the caller should still attempt the stream — the passive broker wake remains as fallback.
Input
| Field | Type | Required | Description |
|---|---|---|---|
timeoutMs | number | no (default 8000) | Bound on the wait. Sensible range 3000–10000ms. |
Output
| Field | Type | Required | Description |
|---|---|---|---|
awoke | boolean | yes | |
durationMs | number | yes |
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
| Field | Type | Required | Description |
|---|---|---|---|
sleeping | boolean | yes | True while the firmware is in low-power mode. A provider MUST avoid polling during sleep — a read wakes the device and drains charge. |
lastContactAt | number | no | Ms epoch of the last time the device proved it was reachable, from PASSIVE signals only (a completed round-trip, an observed wake, a push). Absent = never since this slice was born. The only input that separates "asleep" from "gone". |
lastUpdated | number | yes | Ms epoch of the last observation. |