Dominevo
ReferenceHTTP API

lowPowerSleep

The lowPowerSleep router: 2 methods of the low-power-sleep capability, with tier, scope, input and output.

Capability low-power-sleep · scope device · mode singleton · source packages/types/src/capabilities/low-power-sleep.cap.ts:41.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
wakeUpmutationprotectedcreateyes

lowPowerSleep.getStatus

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

Input

{ deviceId: number }

Output

LowPowerSleepStatusSchema

Shapes: LowPowerSleepStatusSchema

lowPowerSleep.wakeUp

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

Input

{ deviceId: number; timeoutMs?: number = 8000 }

Output

{ awoke: boolean; durationMs: number }