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.
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:
viewon capabilitylow-power-sleep, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lowPowerSleep.getStatuson your hub
Input
{ deviceId: number }Output
LowPowerSleepStatusSchemaShapes: LowPowerSleepStatusSchema
lowPowerSleep.wakeUp
- Kind: mutation —
POST /trpc/lowPowerSleep.wakeUp - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitylow-power-sleep, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lowPowerSleep.wakeUpon your hub
Input
{ deviceId: number; timeoutMs?: number = 8000 }Output
{ awoke: boolean; durationMs: number }