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.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
open | mutation | protected | create | yes |
close | mutation | protected | create | yes |
stop | mutation | protected | create | yes |
setPosition | mutation | protected | create | yes |
setTiltPosition | mutation | protected | create | yes |
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:
viewon capabilitycover, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=cover.getStatuson your hub
Input
{ deviceId: number }Output
CoverStatusSchemaShapes: CoverStatusSchema
cover.open
- Kind: mutation —
POST /trpc/cover.open - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitycover, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=cover.openon your hub
Input
{ deviceId: number }Output
voidcover.close
- Kind: mutation —
POST /trpc/cover.close - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitycover, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=cover.closeon your hub
Input
{ deviceId: number }Output
voidcover.stop
- Kind: mutation —
POST /trpc/cover.stop - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitycover, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=cover.stopon your hub
Input
{ deviceId: number }Output
voidcover.setPosition
- Kind: mutation —
POST /trpc/cover.setPosition - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitycover, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=cover.setPositionon your hub
Input
{ deviceId: number; position: number }Output
voidcover.setTiltPosition
- Kind: mutation —
POST /trpc/cover.setTiltPosition - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitycover, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=cover.setTiltPositionon your hub
Input
{ deviceId: number; tiltPosition: number }Output
void