Dominevo
ReferenceHTTP API

cover

The cover router: 6 methods of the cover capability, with tier, scope, input and output.

Capability cover · scope device · mode singleton · source packages/types/src/capabilities/cover.cap.ts:52.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
openmutationprotectedcreateyes
closemutationprotectedcreateyes
stopmutationprotectedcreateyes
setPositionmutationprotectedcreateyes
setTiltPositionmutationprotectedcreateyes

cover.getStatus

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

Input

{ deviceId: number }

Output

CoverStatusSchema

Shapes: CoverStatusSchema

cover.open

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

Input

{ deviceId: number }

Output

void

cover.close

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

Input

{ deviceId: number }

Output

void

cover.stop

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

Input

{ deviceId: number }

Output

void

cover.setPosition

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

Input

{ deviceId: number; position: number }

Output

void

cover.setTiltPosition

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

Input

{ deviceId: number; tiltPosition: number }

Output

void