Dominevo
ReferenceHTTP API

battery

The battery router: 1 method of the battery capability, with tier, scope, input and output.

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

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes

battery.getStatus

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

Input

{ deviceId: number }

Output

BatteryStatusSchema

Shapes: BatteryStatusSchema

On this page