Dominevo
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.

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
isDetectedqueryprotectedviewyes

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: view on capability motion, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=motion.getStatus on your hub

Input

{ deviceId: number }

Output

MotionStatusSchema

Shapes: MotionStatusSchema

motion.isDetected

  • Kind: query — GET /trpc/motion.isDetected
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability motion, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=motion.isDetected on your hub

Input

{ deviceId: number }

Output

boolean