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.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
setOperationMode | mutation | protected | create | yes |
setAway | mutation | protected | create | yes |
setTargetTemp | mutation | protected | create | yes |
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:
viewon capabilitywater-heater, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=waterHeater.getStatuson your hub
Input
{ deviceId: number }Output
WaterHeaterStatusSchemaShapes: WaterHeaterStatusSchema
waterHeater.setOperationMode
- Kind: mutation —
POST /trpc/waterHeater.setOperationMode - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitywater-heater, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=waterHeater.setOperationModeon your hub
Input
{ deviceId: number; mode: string }Output
voidwaterHeater.setAway
- Kind: mutation —
POST /trpc/waterHeater.setAway - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitywater-heater, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=waterHeater.setAwayon your hub
Input
{ deviceId: number; on: boolean }Output
voidwaterHeater.setTargetTemp
- Kind: mutation —
POST /trpc/waterHeater.setTargetTemp - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitywater-heater, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=waterHeater.setTargetTempon your hub
Input
{ deviceId: number; temp: number }Output
void