day-night
Vendor-neutral day/night (IR-cut) control — the per-camera config cap shared by reolink / hikvision / amcrest.
Vendor-neutral day/night (IR-cut) control — the per-camera config cap shared by reolink / hikvision / amcrest. Models the common firmware surface: the IR-cut switching MODE plus the two knobs that gate it (photocell sensitivity + switchDelaySec). Each vendor maps these onto its own ISAPI / Baichuan / Dahua-CGI fields; the cap standardises the shape so ONE derived-form renders every camera.
No hand-written settings-contribution methods — the framework derives the UI + save routing from this surface.
IR-cut switching mode. schedule = time-of-day table configured on the camera.
At a glance
| Capability | day-night |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | camera |
| Device settings | Yes: its settings section on the device page is built from this capability's methods. |
| Source | packages/types/src/capabilities/day-night.cap.ts |
Methods
Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
getOptions | query | yes | default |
setSettings | mutation | yes | admin |
getOptions
query
Input
No fields besides deviceId.
Output
Per-camera availability descriptor — drives which controls the admin UI renders. Booleans as supportsX; numeric ranges as { min, max, step } (normalized 0–100); the mode choice-set as an array. A provider returns honest, camera-probed values — never hardcoded.
| Field | Type | Required | Description |
|---|---|---|---|
modes | ("auto" | "day" | "night" | "schedule")[] | yes | Modes this camera accepts. Empty → the camera has no configurable day/night mode. |
supportsSensitivity | boolean | yes | |
sensitivity | { min: number; max: number; step: number } | no | Present when supportsSensitivity — the normalized 0–100 range. |
supportsSwitchDelay | boolean | yes | |
switchDelaySec | { min: number; max: number; step: number } | no | Present when supportsSwitchDelay — the allowed delay range in seconds. |
setSettings
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
settings | { mode?: "auto" | "day" | "night" | "schedule"; sensitivity?: number; switchDelaySec?: number } | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
dayNight.auto | Day/night auto | |
dayNight.day | Day mode | |
dayNight.night | Night mode |
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
| Field | Type | Required | Description |
|---|---|---|---|
mode | "auto" | "day" | "night" | "schedule" | yes | |
sensitivity | number | no | IR-cut trigger sensitivity, NORMALIZED 0–100 (higher = switches to night sooner). |
switchDelaySec | number | no | Delay before the IR-cut filter flips, in seconds. |
lastFetchedAt | number | yes |