Dominevo
ReferenceHTTP API

fanControl

The fanControl router: 6 methods of the fan-control capability, with tier, scope, input and output.

Capability fan-control · scope device · mode singleton · source packages/types/src/capabilities/fan-control.cap.ts:277.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
setPercentagemutationprotectedcreateyes
setPresetmutationprotectedcreateyes
setDirectionmutationprotectedcreateyes
setOscillatingmutationprotectedcreateyes
setOscillationAxismutationprotectedcreateyes

fanControl.getStatus

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

Input

{ deviceId: number }

Output

FanControlStatusSchema

Shapes: FanControlStatusSchema

fanControl.setPercentage

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

Input

{ deviceId: number; speed: number }

Output

void

fanControl.setPreset

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

Input

{ deviceId: number; preset: string }

Output

void

fanControl.setDirection

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

Input

{ deviceId: number; direction: FanDirectionSchema }

Output

void

Shapes: FanDirectionSchema

fanControl.setOscillating

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

Input

{ deviceId: number; oscillating: boolean }

Output

void

fanControl.setOscillationAxis

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

Input

SetOscillationAxisInputSchema

Output

FanOscillationAxisResultSchema

Shapes: SetOscillationAxisInputSchema · FanOscillationAxisResultSchema