motion-trigger
Motion-trigger toggle for accessory devices.
Motion-trigger toggle for accessory devices.
"Motion trigger" means: when the parent camera detects motion, the accessory activates automatically. The cap exposes a single boolean — enabled — that drivers map to the vendor-specific firmware action (Reolink: setSirenOnMotion, setFloodlightOnMotion; ONVIF relay: schedule binding; …).
The accessory still has its own switch cap for direct on/off; this cap is independent. Toggling motion-trigger on does NOT necessarily toggle the switch on — it just instructs the firmware to flip the switch when motion fires.
Driver-specific knobs (motion duration window, brightness while triggered, schedule windows) live in the device's getSettingsUISchema() instead of bloating this cap — same principle as switch and brightness keeping their surface minimal.
At a glance
| Capability | motion-trigger |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | light, siren, switch |
| Source | packages/types/src/capabilities/motion-trigger.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 |
|---|---|---|---|
setMotionTrigger | mutation | yes | protected |
setMotionTrigger
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
motionTrigger.on | Motion trigger on | enabled = true |
motionTrigger.off | Motion trigger off | enabled = false |
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | |
lastChangedAt | number | yes | |
lastFetchedAt | number | yes | Ms epoch of the last successful camera fetch (0 = never). |
Status
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | |
lastChangedAt | number | yes | Ms epoch of the last operator-driven change. |
Events
onMotionTriggerChanged
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | number | yes | |
enabled | boolean | yes | |
lastChangedAt | number | yes |