Dominevo
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.

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
setOnmutationprotectedcreateyes
setTargetHumiditymutationprotectedcreateyes
setModemutationprotectedcreateyes

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: view on capability humidifier, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=humidifier.getStatus on your hub

Input

{ deviceId: number }

Output

HumidifierStatusSchema

Shapes: HumidifierStatusSchema

humidifier.setOn

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

Input

{ deviceId: number; on: boolean }

Output

void

humidifier.setTargetHumidity

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

Input

{ deviceId: number; humidity: number }

Output

void

humidifier.setMode

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

Input

{ deviceId: number; mode: string }

Output

void