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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
setMotionTriggermutationprotectedcreateyes

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

Input

{ deviceId: number }

Output

MotionTriggerStatusSchema

Shapes: MotionTriggerStatusSchema

motionTrigger.setMotionTrigger

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

Input

{ deviceId: number; enabled: boolean }

Output

void