ReferenceHTTP API
motionTrigger
The motionTrigger router: 2 methods of the motion-trigger capability, with tier, scope, input and output.
Capability motion-trigger · scope device · mode singleton · source packages/types/src/capabilities/motion-trigger.cap.ts:50.
Every method is called at /trpc/motionTrigger.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
setMotionTrigger | mutation | protected | create | yes |
motionTrigger.getStatus
- Kind: query —
GET /trpc/motionTrigger.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitymotion-trigger, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=motionTrigger.getStatuson your hub
Input
{ deviceId: number }Output
MotionTriggerStatusSchemaShapes: MotionTriggerStatusSchema
motionTrigger.setMotionTrigger
- Kind: mutation —
POST /trpc/motionTrigger.setMotionTrigger - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymotion-trigger, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=motionTrigger.setMotionTriggeron your hub
Input
{ deviceId: number; enabled: boolean }Output
void