ReferenceHTTP API
humidifier
The humidifier router: 4 methods of the humidifier capability, with tier, scope, input and output.
Capability humidifier · scope device · mode singleton · source packages/types/src/capabilities/humidifier.cap.ts:48.
Every method is called at /trpc/humidifier.<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 |
setOn | mutation | protected | create | yes |
setTargetHumidity | mutation | protected | create | yes |
setMode | mutation | protected | create | yes |
humidifier.getStatus
- Kind: query —
GET /trpc/humidifier.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityhumidifier, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=humidifier.getStatuson your hub
Input
{ deviceId: number }Output
HumidifierStatusSchemaShapes: HumidifierStatusSchema
humidifier.setOn
- Kind: mutation —
POST /trpc/humidifier.setOn - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityhumidifier, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=humidifier.setOnon your hub
Input
{ deviceId: number; on: boolean }Output
voidhumidifier.setTargetHumidity
- Kind: mutation —
POST /trpc/humidifier.setTargetHumidity - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityhumidifier, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=humidifier.setTargetHumidityon your hub
Input
{ deviceId: number; humidity: number }Output
voidhumidifier.setMode
- Kind: mutation —
POST /trpc/humidifier.setMode - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityhumidifier, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=humidifier.setModeon your hub
Input
{ deviceId: number; mode: string }Output
void