Dominevo
ReferenceHTTP API

motionDetection

The motionDetection router: 6 methods of the motion-detection capability, with tier, scope, input and output.

Capability motion-detection · scope device · mode singleton · source packages/types/src/capabilities/motion-detection.cap.ts:26.

Every method is called at /trpc/motionDetection.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.

MethodKindTierToken scopeViewer
getDeviceSettingsContributionqueryprotectedviewyes
getDeviceLiveContributionqueryprotectedviewyes
applyDeviceSettingsPatchmutationadminadmin onlyno
analyzemutationprotectedcreateno
removeCameramutationprotecteddeleteno
resetmutationprotecteddeleteno

motionDetection.getDeviceSettingsContribution

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

Input

{ deviceId: number }

Output

{ tabs?: ({ id: string; label: string; icon: string; order?: number })[]; sections: ({ id: string; title: string; description?: string; style?: "card" | "accordion"; defaultCollapsed?: boolean; columns?: 1 | 2 | 3 | 4; tab?: string; location?: "settings" | "top-tab" | "hero"; order?: number; fields: any[] })[] } | null

motionDetection.getDeviceLiveContribution

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

Input

{ deviceId: number }

Output

{ tabs?: ({ id: string; label: string; icon: string; order?: number })[]; sections: ({ id: string; title: string; description?: string; style?: "card" | "accordion"; defaultCollapsed?: boolean; columns?: 1 | 2 | 3 | 4; tab?: string; location?: "settings" | "top-tab" | "hero"; order?: number; fields: any[] })[] } | null

motionDetection.applyDeviceSettingsPatch

  • Kind: mutation — POST /trpc/motionDetection.applyDeviceSettingsPatch (added by the framework)
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=motionDetection.applyDeviceSettingsPatch on your hub

Input

{ deviceId: number; patch: Record<string, unknown> }

Output

{ success: true }

motionDetection.analyze

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

Input

{ deviceId: number; frame?: FrameInputSchema; frameHandle?: FrameHandleSchema }

Output

MotionAnalysisResultSchema

Shapes: FrameInputSchema · FrameHandleSchema · MotionAnalysisResultSchema

motionDetection.removeCamera

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

Input

{ deviceId: number }

Output

void

motionDetection.reset

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

Input

void

Output

void