Dominevo
ReferenceHTTP API

waterHeater

The waterHeater router: 4 methods of the water-heater capability, with tier, scope, input and output.

Capability water-heater · scope device · mode singleton · source packages/types/src/capabilities/water-heater.cap.ts:51.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
setOperationModemutationprotectedcreateyes
setAwaymutationprotectedcreateyes
setTargetTempmutationprotectedcreateyes

waterHeater.getStatus

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

Input

{ deviceId: number }

Output

WaterHeaterStatusSchema

Shapes: WaterHeaterStatusSchema

waterHeater.setOperationMode

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

Input

{ deviceId: number; mode: string }

Output

void

waterHeater.setAway

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

Input

{ deviceId: number; on: boolean }

Output

void

waterHeater.setTargetTemp

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

Input

{ deviceId: number; temp: number }

Output

void