Dominevo
ReferenceHTTP API

sceneMonitor

The sceneMonitor router: 10 methods of the scene-monitor capability, with tier, scope, input and output.

Capability scene-monitor · scope device · mode singleton · source packages/types/src/capabilities/scene-monitor.cap.ts:301.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewwith the scenes feature
listScenesqueryprotectedviewwith the scenes feature
listScenesBatchqueryprotectedviewwith the scenes feature
createScenemutationadminadmin onlywith the scenes feature
updateScenemutationadminadmin onlywith the scenes feature
deleteScenemutationadminadmin onlywith the scenes feature
captureReferencemutationadminadmin onlywith the scenes feature
deleteReferencemutationadminadmin onlywith the scenes feature
recheckNowmutationadminadmin onlywith the scenes feature
resetScenemutationadminadmin onlywith the scenes feature

sceneMonitor.getStatus

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

Input

{ deviceId: number }

Output

SceneMonitorStatusSchema

Shapes: SceneMonitorStatusSchema

sceneMonitor.listScenes

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

Input

{ deviceId: number }

Output

SceneMonitorStatusSchema

Shapes: SceneMonitorStatusSchema

sceneMonitor.listScenesBatch

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

Input

{ deviceIds: number[] }

Output

SceneMonitorStatusForDeviceSchema[]

Shapes: SceneMonitorStatusForDeviceSchema

sceneMonitor.createScene

  • Kind: mutation — POST /trpc/sceneMonitor.createScene
  • 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: with the scenes feature
  • Try it: open /system/api-explorer?method=sceneMonitor.createScene on your hub

Input

{ deviceId: number; label: string; roi: MaskRectShapeSchema; check: SceneCheckSchema; triggerMode?: "periodic" | "on-motion" | "both"; checkIntervalSec?: number }

Output

SceneMonitorSchema

Shapes: MaskRectShapeSchema · SceneCheckSchema · SceneMonitorSchema

sceneMonitor.updateScene

  • Kind: mutation — POST /trpc/sceneMonitor.updateScene
  • 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: with the scenes feature
  • Try it: open /system/api-explorer?method=sceneMonitor.updateScene on your hub

Input

{ deviceId: number; monitorId: string; patch: { label?: string; roi?: MaskRectShapeSchema; enabled?: boolean; triggerMode?: "periodic" | "on-motion" | "both"; checkIntervalSec?: number; check?: SceneCheckSchema; emit?: "latched" | "live"; quietSeconds?: number; minObservationSpacingSec?: number; anchorThreshold?: number; autoRestore?: boolean; onUncoveredCondition?: SceneUncoveredPolicySchema; confirm?: SceneConfirmSchema | null } }

Output

void

Shapes: MaskRectShapeSchema · SceneCheckSchema · SceneUncoveredPolicySchema · SceneConfirmSchema

sceneMonitor.deleteScene

  • Kind: mutation — POST /trpc/sceneMonitor.deleteScene
  • 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: with the scenes feature
  • Try it: open /system/api-explorer?method=sceneMonitor.deleteScene on your hub

Input

{ deviceId: number; monitorId: string }

Output

void

sceneMonitor.captureReference

  • Kind: mutation — POST /trpc/sceneMonitor.captureReference
  • 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: with the scenes feature
  • Try it: open /system/api-explorer?method=sceneMonitor.captureReference on your hub

Input

{ deviceId: number; monitorId: string; stateId?: string; label?: string; condition?: string }

Output

{ stateId: string; referenceCount: number }

sceneMonitor.deleteReference

  • Kind: mutation — POST /trpc/sceneMonitor.deleteReference
  • 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: with the scenes feature
  • Try it: open /system/api-explorer?method=sceneMonitor.deleteReference on your hub

Input

{ deviceId: number; monitorId: string; stateId: string; index: number }

Output

void

sceneMonitor.recheckNow

  • Kind: mutation — POST /trpc/sceneMonitor.recheckNow
  • 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: with the scenes feature
  • Try it: open /system/api-explorer?method=sceneMonitor.recheckNow on your hub

Input

{ deviceId: number; monitorId: string }

Output

void

sceneMonitor.resetScene

  • Kind: mutation — POST /trpc/sceneMonitor.resetScene
  • 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: with the scenes feature
  • Try it: open /system/api-explorer?method=sceneMonitor.resetScene on your hub

Input

{ deviceId: number; monitorId: string; recapture?: boolean }

Output

void