ReferenceHTTP API
motion
The motion router: 2 methods of the motion capability, with tier, scope, input and output.
Capability motion · scope device · mode singleton · source packages/types/src/capabilities/motion.cap.ts:146.
Every method is called at /trpc/motion.<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 |
isDetected | query | protected | view | yes |
motion.getStatus
- Kind: query —
GET /trpc/motion.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitymotion, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=motion.getStatuson your hub
Input
{ deviceId: number }Output
MotionStatusSchemaShapes: MotionStatusSchema
motion.isDetected
- Kind: query —
GET /trpc/motion.isDetected - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitymotion, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=motion.isDetectedon your hub
Input
{ deviceId: number }Output
boolean