Dominevo
ReferenceHTTP API

fanPresets

The fanPresets router: 4 methods of the fan-presets capability, with tier, scope, input and output.

Capability fan-presets · scope system · mode singleton · source packages/types/src/capabilities/fan-presets.cap.ts:140.

Every method is called at /trpc/fanPresets.<method> — queries with GET, mutations with POST. See How to call and Authorization.

MethodKindTierToken scopeViewer
getPresetsqueryprotectedviewno
setPresetsmutationadminadmin onlyno
applyPresetmutationprotectedcreateno
capturePresetqueryprotectedviewno

fanPresets.getPresets

  • Kind: query — GET /trpc/fanPresets.getPresets
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability fan-presets, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=fanPresets.getPresets on your hub

Input

{ deviceId: number }

Output

FanPresetSchema[]

Shapes: FanPresetSchema

fanPresets.setPresets

  • Kind: mutation — POST /trpc/fanPresets.setPresets
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=fanPresets.setPresets on your hub

Input

{ deviceId: number; presets: FanPresetSchema[] }

Output

FanPresetsSetResultSchema

Shapes: FanPresetSchema · FanPresetsSetResultSchema

fanPresets.applyPreset

  • Kind: mutation — POST /trpc/fanPresets.applyPreset
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability fan-presets, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=fanPresets.applyPreset on your hub

Input

{ deviceId: number; presetId: string }

Output

FanPresetApplyResultSchema

Shapes: FanPresetApplyResultSchema

fanPresets.capturePreset

  • Kind: query — GET /trpc/fanPresets.capturePreset
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability fan-presets, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=fanPresets.capturePreset on your hub

Input

{ deviceId: number; fields?: FanCaptureFieldSchema[] }

Output

FanPresetCaptureResultSchema

Shapes: FanCaptureFieldSchema · FanPresetCaptureResultSchema