Dominevo
ReferenceHTTP API

daylightPhase

The daylightPhase router: 3 methods of the daylight-phase capability, with tier, scope, input and output.

Capability daylight-phase · scope system · mode singleton · source packages/types/src/capabilities/daylight-phase.cap.ts:34.

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

MethodKindTierToken scopeViewer
getPhasequeryprotectedviewno
getSettingsqueryprotectedviewno
setSettingsmutationadminadmin onlyno

daylightPhase.getPhase

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

Input

{}

Output

DaylightStatusSchema

Shapes: DaylightStatusSchema

daylightPhase.getSettings

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

Input

{}

Output

{ source: "sun" } | { source: "sensor"; deviceId: number; cap: string; fieldPath: string; darkBelow: number; hysteresis: number; minDwellMin: number }

daylightPhase.setSettings

  • Kind: mutation — POST /trpc/daylightPhase.setSettings
  • 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=daylightPhase.setSettings on your hub

Input

{ source: "sun" } | { source: "sensor"; deviceId: number; cap: string; fieldPath: string; darkBelow: number; hysteresis: number; minDwellMin: number }

Output

DaylightStatusSchema

Shapes: DaylightStatusSchema