ReferenceHTTP APIShapes
Shapes: C
Named input and output shapes starting with C, referenced from the router pages.
Each shape is a TypeScript-style rendering of the validation schema. ? marks an optional field; self is a recursive reference.
CalendarEntrySchema
{
id: string
name: string
source: CalendarSourceKindSchema
enabled: boolean
instanceId?: string
providerAddonId?: string
defaultColor: string
color: string
visible: boolean
}CalendarEventSchema
{
id: string
calendarId: string
title: string
startMs: number
endMs: number
allDay?: boolean
description?: string
location?: string
}CalendarInfoSchema
{
id: string
name: string
source: CalendarSourceKindSchema
enabled: boolean
instanceId?: string
}CalendarListEventsInputSchema
{
calendarIds?: string[]
startMs: number
endMs: number
}CalendarPreferenceEntrySchema
{
visible?: boolean
color?: string
}CalendarPreferencesSchema
{
calendars: Record<string, CalendarPreferenceEntrySchema>
}CalendarSetPreferenceInputSchema
{
calendarId: string
visible?: boolean
color?: string | null
}CalendarSourceKindSchema
"ha" | "addon"CameraAssignmentStatusSchema
{
detectionNodeId: string | null
decoderNodeId: string | null
audioNodeId: string | null
sourceNodeId: string | null
pinned: { detection: boolean; decoder: boolean; audio: boolean }
reasons: { detection?: string; decoder?: string; audio?: string }
}CameraAudioStatusSchema
{
nodeId: string
enabled: boolean
}CameraBrokerProfileSchema
{
profile: string
status: string
codec: string
width: number
height: number
subscribers: number
inFps: number | null
}CameraBrokerStatusSchema
{
profiles: CameraBrokerProfileSchema[]
webrtcSessions: number
rtspRestream: boolean
}CameraCredentialsSchema
{
host: string
port?: number
onvifPort?: number
rtspPort?: number
https?: boolean
username?: string
password?: string
onvifProfile?: string
}CameraCredentialsStatusSchema
{
host: string
port: number | null
onvifPort: number | null
rtspPort: number | null
https: boolean | null
hasUsername: boolean
hasPassword: boolean
onvifProfile: string | null
}CameraDecoderStatusSchema
{
nodeId: string
}CameraDetectionPhaseSchema
"idle" | "watching" | "active"CameraDetectionProvisioningSchema
{
state: CameraDetectionProvisioningStateSchema
error?: string
}CameraDetectionProvisioningStateSchema
"idle" | "installing" | "verifying" | "ready" | "failed"CameraDetectionSourceSchema
"pipeline" | "onboard" | "none"CameraDetectionStatusSchema
{
nodeId: string
engine: { backend: string; device: string }
phase: CameraDetectionPhaseSchema
configuredFps: number
actualFps: number
queueDepth: number
avgInferenceMs: number
provisioning: CameraDetectionProvisioningSchema
}CameraMetricsSchema
{
detectionMode: "disabled" | "always-on" | "on-motion"
configuredFps: number
actualFps: number
queueDepth: number
avgInferenceTimeMs: number
droppedFrames: number
nativeCropMisses?: number
phase: "idle" | "watching" | "active"
}CameraMetricsWithDeviceIdSchema
{
detectionMode: "disabled" | "always-on" | "on-motion"
configuredFps: number
actualFps: number
queueDepth: number
avgInferenceTimeMs: number
droppedFrames: number
nativeCropMisses?: number
phase: "idle" | "watching" | "active"
deviceId: number
}CameraMotionStatusSchema
{
enabled: boolean
fps: number
}CameraOccupancySnapshotForDeviceSchema
{
deviceId: number
read: "read" | "unreadable"
snapshot: { ts: number; frameWidth: number; frameHeight: number; zones: ZoneScopeBreakdownSchema[]; frame: PerScopeBreakdownSchema; unzoned: PerScopeBreakdownSchema; stationaryObjects?: StationaryObjectSchema[] } | null
}CameraRecordingModeSchema
"off" | "events" | "continuous" | "on-device-decision"CameraRecordingStatusSchema
{
mode: CameraRecordingModeSchema
active: boolean
storageBytes: number
}CameraSourceStatusSchema
{
streams: CameraSourceStreamSchema[]
}CameraSourceStreamSchema
{
camStreamId: string
codec: string
width: number
height: number
fps: number
kind: string
}CameraStatusDegradationReasonSchema
"timeout" | "error" | "partial"CameraStatusDegradationSchema
{
stage: CameraStatusStageSchema
reason: CameraStatusDegradationReasonSchema
elapsedMs: number
}CameraStatusSchema
{
deviceId: number
assignment: CameraAssignmentStatusSchema
source: CameraSourceStatusSchema
broker: CameraBrokerStatusSchema | null
decoder: CameraDecoderStatusSchema | null
motion: CameraMotionStatusSchema | null
detection: CameraDetectionStatusSchema | null
audio: CameraAudioStatusSchema | null
recording: CameraRecordingStatusSchema | null
switchedOff: ("stream-broker" | "object-detection" | "privacy-mask" | "device-audio" | "broker-audio" | "audio-analysis" | "event-saving" | "recording" | "notifications")[]
cameraSensors?: { state: "not-configured"; cameraLevel?: { detected: boolean; atMs: number } } | { state: "unreadable"; reason: string; cameraLevel?: { detected: boolean; atMs: number } } | { state: "configured"; cameraLevel?: { detected: boolean; atMs: number }; sensors: ({ addonId: string; stableId: string; mode?: "in-addition" | "confirm" | "replace" = "in-addition"; state: "ready"; deviceId: number; name: string; caps: string[] } | { addonId: string; stableId: string; mode?: "in-addition" | "confirm" | "replace" = "in-addition"; state: "offline"; deviceId: number; name: string; reason: "offline" | "disabled" } | { addonId: string; stableId: string; mode?: "in-addition" | "confirm" | "replace" = "in-addition"; state: "missing"; reason: string } | { addonId: string; stableId: string; mode?: "in-addition" | "confirm" | "replace" = "in-addition"; state: "unsupported"; deviceId: number; name: string; reason: string } | { addonId: string; stableId: string; mode?: "in-addition" | "confirm" | "replace" = "in-addition"; state: "unreadable"; reason: string })[]; cameraMotion?: "always" | "when-confirmed" | "never"; notForwarded?: "onboard-not-listed" | "no-active-detection"; notEnforced?: "provider-not-split" }
degraded: CameraStatusDegradationSchema[]
fetchedAt: number
}CameraStatusStageSchema
"source" | "broker" | "detection" | "recording" | "switches"CameraStreamSchema
{
camStreamId: string
deviceId: number
kind: CamStreamKindSchema
url?: string
codec?: string
resolution?: CamStreamResolutionSchema
fps?: number
label?: string
deviceFeatures?: string[]
autoEligible?: boolean
maxSessionMs?: number
profileHint?: CamProfileSchema
metadata?: Record<string, unknown>
}CamProfileSchema
"high" | "mid" | "low"CamStreamDescriptorSchema
{
camStreamId: string
kind: CamStreamKindSchema
url?: string
codec?: string
resolution?: CamStreamResolutionSchema
fps?: number
label?: string
deviceFeatures?: string[]
autoEligible?: boolean
profileHint?: CamProfileSchema
metadata?: Record<string, unknown>
maxSessionMs?: number
}CamStreamKindSchema
"pull-rtsp" | "pull-rtmp" | "pull-http" | "pull-flv" | "pull-rfc4571" | "push-annexb" | "derived"CamStreamResolutionSchema
{
width: number
height: number
}CandidateQueryFilterSchema
{
search?: string
area?: string
manufacturer?: string
adoptedOnly?: boolean
unadoptedOnly?: boolean
}CapabilityBindingsSchema
Record<string, string>CarbonMonoxideStatusSchema
{
detected: boolean
lastChangedAt: number
}ClaimOutcomeSchema
| { ok: true; changed: boolean }
| { ok: false; code: "owned-by-other" | "not-claimed" | "field-not-claimed" | "invalid-slice" | "unknown-device" | "row-unreadable" | "migration-in-flight"; message: string }ClaimsListingSchema
| { state: "loaded"; claims: FieldClaimSchema[] }
| { state: "not-loaded"; reason: string }CleanupDeletedDevicesResultSchema
{
status: "skipped" | "dry-run" | "cleaned"
reason: string | null
devices: OrphanDeviceDataSchema[]
unreachable: string[]
}ClientNetworkStatsSchema
{
rttMs: number
jitterMs: number
estimatedBandwidthKbps: number
packetLossPercent: number
downlinkMbps?: number
downlinkAgeMs?: number
lastUpdated: number
}ClimateActionSchema
"heating" | "cooling" | "drying" | "fan" | "idle" | "off"ClimateControlStatusSchema
{
mode: HvacModeSchema
action?: ClimateActionSchema | null
availableModes: HvacModeSchema[]
fanMode: string
availableFanModes: string[]
preset: string
availablePresets: string[]
target: number | null
targetHigh: number | null
targetLow: number | null
targetHumidity: number | null
currentTemp: number | null
currentHumidity: number | null
swingVertical: boolean | null
swingHorizontal: boolean | null
minTemp?: number | null
maxTemp?: number | null
tempStep?: number | null
lastActiveMode?: "heat" | "cool" | "auto" | "heat_cool" | "fan_only" | "dry"
lastFetchedAt: number
}ClipBytesOfferSchema
{
ticket: { url: string; hostNodeId: string; expiresAtMs: number; declaredBytes: number | null }
contentType: string
name: string
served: CamProfileSchema
durationMs?: number
}ClipBytesSchema
{
base64: string
contentType: string
name: string
bytes: number
served: CamProfileSchema
durationMs?: number
}ClipPlaybackOptionsSchema
{
transport: "stream" | "file"
seek: "forward" | "free"
stepBack: boolean
scrub: boolean
rates: number[]
}ClipPlaybackSchema
{
playbackUrl: string
format?: "hls" | "mp4"
served?: CamProfileSchema
playbackEndpoints?: string[]
token?: string
}ClipSchema
{
id: string
source: string
kind: "motion" | "object" | "audio" | "native"
timeRange: { startMs: number; endMs: number }
labels?: string[]
thumbnail?: string
stillAtMs?: number
eventIds?: string[]
eventCount?: number
holes?: ({ startMs: number; endMs: number })[]
thumbnailMint?: string
thumbnailUnavailable?: { reason: "sleeping" | "camera-refused" | "no-keyframe" | "unsupported" }
catalogAsOf?: number
nativeTypes?: string[]
behaviours?: string[]
streams?: { sub?: { id: string; bytes?: number }; main?: { id: string; bytes?: number } }
supportSub?: boolean
playable?: boolean
unplayableReason?: string
inProgress?: boolean
}ClipSourceAvailabilitySchema
{
state: "ok" | "sleeping" | "unreachable" | "no-storage" | "index-empty"
reason?: string
catalogAsOf?: number
}ClipSourceSchema
{
source: string
label: string
addonId?: string
availability: ClipSourceAvailabilitySchema
}ClipStreamAudioReasonSchema
"not-requested" | "unsupported-ask"ClipStreamAudioSchema
"opus" | "pcmu" | "none"ClipStreamDialSchema
{
url: string
expiresAtMs: number
transport: "forward-only"
served: CamProfileSchema
servedAudio: ClipStreamAudioSchema
audioReason?: ClipStreamAudioReasonSchema
}ClipWakeSchema
"authorised"ClusterAddonNodeDeploymentSchema
{
nodeId: string
name: string
version: string
status: string
synced: boolean
}ClusterAddonStatusEntrySchema
{
hubVersion: string
nodes: ClusterAddonNodeDeploymentSchema[]
}ClusterModelChoiceSchema
| { kind: "stored"; modelId: string }
| { kind: "absent"; defaultModelId: string }
| { kind: "unreadable"; reason: "owner-not-ready" | "store-read-failed" | "three-way-read-unavailable" | "invalid-stored" | "not-cluster-scoped"; error?: string }ClusterUpdateBlockerSchema
"no-target" | "node-busy" | "job-running" | "nothing-to-do" | "status-unreadable"ClusterUpdateFailureReasonSchema
"backup-unavailable" | "backup-failed" | "server-refused" | "server-not-on-target" | "node-capless" | "status-unreadable" | "addon-update-failed" | "addons-not-converged" | "interrupted" | "timeout-stall" | "timeout-ceiling"ClusterUpdateJobSchema
{
id: string
state: ClusterUpdateJobStateSchema
targetVersion: string
requestedBy: string
startedAt: number
finishedAt?: number
steps: ClusterUpdateStepSchema[]
stoppedAt?: string
reason?: ClusterUpdateFailureReasonSchema
skippedOffline: string[]
}ClusterUpdateJobStateSchema
"running" | "succeeded" | "failed"ClusterUpdateOptionsSchema
{
version?: string
addons?: boolean
backup?: boolean
}ClusterUpdatePlanSchema
{
targetVersion: string | null
steps: ClusterUpdateStepSchema[]
skippedOffline: string[]
blocker: ClusterUpdateBlockerSchema | null
blockerDetail: string | null
}ClusterUpdateStepKindSchema
"backup" | "hub-server" | "agent-server" | "addons"ClusterUpdateStepSchema
{
kind: ClusterUpdateStepKindSchema
nodeId?: string
status: ClusterUpdateStepStatusSchema
detail: string
reason?: ClusterUpdateFailureReasonSchema
fromVersion?: string | null
packages?: string[]
startedAt?: number
finishedAt?: number
}ClusterUpdateStepStatusSchema
"pending" | "running" | "ok" | "failed" | "skipped"CollectionColumnSchema
{
name: string
type: "TEXT" | "INTEGER" | "REAL" | "JSON" | "BOOLEAN"
primaryKey?: boolean
notNull?: boolean
unique?: boolean
defaultValue?: string | number | boolean
}CollectionIndexSchema
{
name: string
columns: string[]
unique?: boolean
}ColorStatusSchema
{
mode: "rgb" | "hsv" | "mired"
rgb?: { r: number; g: number; b: number }
hsv?: { h: number; s: number; v: number }
colorTemperature?: number
lastChangedAt: number
}ComposerApplyInputSchema
{
integrationId: string | null
storeLoaded: boolean
blocks: ComposerBlockSchema[]
restartBlockIds: string[]
unreadableBlocks: ComposerUnreadableBlockSchema[]
retiredBlockIds?: string[]
}ComposerApplyResultSchema
{
blocks: ComposerBlockVerdictSchema[]
acted: boolean
unreleasedClaims?: UnreleasedClaimSchema[]
}ComposerBlockSchema
{
id: string
name: string
enabled: boolean
updatedAt: number
composition: { target: { kind: "new"; type: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; role?: "siren" | "floodlight" | "spotlight" | "pir-sensor" | "chime" | "autotrack" | "nightvision" | "privacy-mask" | "doorbell" | "cover-blind" | "cover-shutter" | "cover-awning" | "cover-curtain" | "cover-garage" | "cover-gate" | "cover-door" | "cover-window" | "binary-helper" | "outlet" | "switch-heater" | "switch-fan" | "switch-light" | "poe-port" | "climate-ac" | "climate-thermostat" | "climate-floor" | "climate-radiator" | "climate-heater" | "climate-heat-pump-circuit" | "climate-vehicle" | "lock-vehicle" | "media-player-tv" | "motion-sensor" | "contact-sensor" | "leak-sensor" | "smoke-sensor" | "co-sensor" | "gas-sensor" | "tamper-sensor" | "vibration-sensor" | "connectivity-sensor" | "sound-sensor" | "binary-sensor" | "temperature-sensor" | "humidity-sensor" | "ambient-light-sensor" | "pressure-sensor" | "wind-sensor" | "rain-sensor" | "uv-sensor" | "solar-radiation-sensor" | "soil-moisture-sensor" | "power-sensor" | "energy-sensor" | "voltage-sensor" | "current-sensor" | "air-quality-sensor" | "ambient-monitor" | "battery-sensor" | "numeric-sensor" | "enum-sensor" | "datetime-sensor" | "generic-sensor" | "numeric-control" | "select-control" | "text-control" | "datetime-control" | "mobile-push-notifier" | "messaging-notifier" | "email-notifier" | "generic-notifier" | "ir-transmitter" | "vm" | "app-container" | "lxc" | "app" | "host" | "ups" } | { kind: "existing"; device: { addonId: string; stableId: string } }; features: ({ kind: "fields"; cap: string; enabled?: boolean; customizeKind?: "power-source" | "lock-door-sensor" | "follow-switch"; fields: Record<string, { source: {…}; cap: string; fieldPath: string; kind: "from" } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…}> } | { kind: "code"; code: string } | { kind: "aggregate"; reducer: "mean" | "median" | "min" | "max" | "sum" | "any" | "all"; reads: {…}[]; activeWhen?: string[]; publish: "value" | "included" | "excluded" | "total"; empty: "null" | "omit" | "offline" } | { kind: "series"; read: {…}; publish: "value" | "included" | "excluded" | "total"; empty: "null" | "omit" | "offline" }>; items?: Record<string, { label: string; fields: Record<string, {…} | {…} | {…} | {…} | {…}>; reset?: {…} }>; commands?: Record<string, { kind: "forward"; source: {…}; cap: string; method: string; args?: Record<string, string | number | boolean | {…} | Record<string, string | number | boolean | {…} | Record<string, self>>> } | { kind: "code"; code: string } | { kind: "extension"; target: "remote" }>; contributedBy?: { linkId: string } } | { kind: "passthrough"; cap: string; enabled?: boolean; source: { addonId: string; stableId: string } } | { kind: "capLink"; cap: string; linkId: string; enabled?: boolean; source: { addonId: string; stableId: string } })[]; helper?: { kind: "grid"; fps: number; publishedProfiles: ("high" | "mid" | "low")[]; cells: ({ source: {…}; region: {…}; cell: {…} })[] } | { kind: "crop"; source: { addonId: string; stableId: string }; rect: { x: number; y: number; width: number; height: number }; aspect: "16:9" | "4:3" | "1:1" | "free"; fps: number; publishedProfiles: ("high" | "mid" | "low")[] } | { kind: "terminal"; terminalId: string } | { kind: "group"; templateId: "temperature" | "humidity" | "pressure" | "illuminance" | "power" | "energy" | "battery" | "numeric" | "motion" | "contact" | "leak" | "smoke" | "occupancy" | "binary" | "switch" | "light" | "fan" | "cover" | "valve" | "lock" | "media-player" | "climate"; aggregate: "mean" | "median" | "min" | "max" | "sum" | "any" | "all"; members: ({ source: {…}; cap: string; fieldPath: string })[]; active?: "at-least-one" | "all" } | { kind: "statistic"; stat: "min" | "max" | "mean" | "sum" | "count" | "change"; window: { kind: "rolling"; span: "1h" | "24h" | "2d" | "7d" | "30d" | "custom"; customMinutes?: number } | { kind: "calendar"; period: "today" | "yesterday" | "this-week" | "this-month" }; source: { source: {…}; cap: string; fieldPath: string } } | { kind: "integral"; reset: "never" | "daily" | "weekly" | "monthly"; output: "energy" | "meter"; source: { source: {…}; cap: string; fieldPath: string } } | { kind: "threshold"; source: { source: {…}; cap: string; fieldPath: string }; high: number; low: number; onForMs: number; offForMs: number } | { kind: "arithmetic"; op: "sum" | "difference" | "ratio"; inputs: ({ source: {…}; cap: string; fieldPath: string })[] } | { kind: "expression"; expr: string; inputs: ({ name: string; member: {…} })[]; output: "number" | "boolean" } | { kind: "derivative"; window: { kind: "rolling"; span: "1h" | "24h" | "2d" | "7d" | "30d" | "custom"; customMinutes?: number }; per: "second" | "minute" | "hour"; source: { source: {…}; cap: string; fieldPath: string } } }
}ComposerBlockVerdictSchema
{
blockId: string
status: "stopped" | "starting" | "running" | "degraded" | "incomplete" | "failed"
reason?: string
}ComposerUnreadableBlockSchema
{
id: string
name: string | null
error: string
}CompositionBlockInputSchema
{
name?: string
enabled: boolean
composition: { target: { kind: "new"; type: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; role?: "siren" | "floodlight" | "spotlight" | "pir-sensor" | "chime" | "autotrack" | "nightvision" | "privacy-mask" | "doorbell" | "cover-blind" | "cover-shutter" | "cover-awning" | "cover-curtain" | "cover-garage" | "cover-gate" | "cover-door" | "cover-window" | "binary-helper" | "outlet" | "switch-heater" | "switch-fan" | "switch-light" | "poe-port" | "climate-ac" | "climate-thermostat" | "climate-floor" | "climate-radiator" | "climate-heater" | "climate-heat-pump-circuit" | "climate-vehicle" | "lock-vehicle" | "media-player-tv" | "motion-sensor" | "contact-sensor" | "leak-sensor" | "smoke-sensor" | "co-sensor" | "gas-sensor" | "tamper-sensor" | "vibration-sensor" | "connectivity-sensor" | "sound-sensor" | "binary-sensor" | "temperature-sensor" | "humidity-sensor" | "ambient-light-sensor" | "pressure-sensor" | "wind-sensor" | "rain-sensor" | "uv-sensor" | "solar-radiation-sensor" | "soil-moisture-sensor" | "power-sensor" | "energy-sensor" | "voltage-sensor" | "current-sensor" | "air-quality-sensor" | "ambient-monitor" | "battery-sensor" | "numeric-sensor" | "enum-sensor" | "datetime-sensor" | "generic-sensor" | "numeric-control" | "select-control" | "text-control" | "datetime-control" | "mobile-push-notifier" | "messaging-notifier" | "email-notifier" | "generic-notifier" | "ir-transmitter" | "vm" | "app-container" | "lxc" | "app" | "host" | "ups" } | { kind: "existing"; device: { addonId: string; stableId: string } }; features: ({ kind: "fields"; cap: string; enabled?: boolean; customizeKind?: "power-source" | "lock-door-sensor" | "follow-switch"; fields: Record<string, { source: {…}; cap: string; fieldPath: string; kind: "from" } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…}> } | { kind: "code"; code: string } | { kind: "aggregate"; reducer: "mean" | "median" | "min" | "max" | "sum" | "any" | "all"; reads: {…}[]; activeWhen?: string[]; publish: "value" | "included" | "excluded" | "total"; empty: "null" | "omit" | "offline" } | { kind: "series"; read: {…}; publish: "value" | "included" | "excluded" | "total"; empty: "null" | "omit" | "offline" }>; items?: Record<string, { label: string; fields: Record<string, {…} | {…} | {…} | {…} | {…}>; reset?: {…} }>; commands?: Record<string, { kind: "forward"; source: {…}; cap: string; method: string; args?: Record<string, string | number | boolean | {…} | Record<string, string | number | boolean | {…} | Record<string, self>>> } | { kind: "code"; code: string } | { kind: "extension"; target: "remote" }>; contributedBy?: { linkId: string } } | { kind: "passthrough"; cap: string; enabled?: boolean; source: { addonId: string; stableId: string } } | { kind: "capLink"; cap: string; linkId: string; enabled?: boolean; source: { addonId: string; stableId: string } })[]; helper?: { kind: "grid"; fps: number; publishedProfiles: ("high" | "mid" | "low")[]; cells: ({ source: {…}; region: {…}; cell: {…} })[] } | { kind: "crop"; source: { addonId: string; stableId: string }; rect: { x: number; y: number; width: number; height: number }; aspect: "16:9" | "4:3" | "1:1" | "free"; fps: number; publishedProfiles: ("high" | "mid" | "low")[] } | { kind: "terminal"; terminalId: string } | { kind: "group"; templateId: "temperature" | "humidity" | "pressure" | "illuminance" | "power" | "energy" | "battery" | "numeric" | "motion" | "contact" | "leak" | "smoke" | "occupancy" | "binary" | "switch" | "light" | "fan" | "cover" | "valve" | "lock" | "media-player" | "climate"; aggregate: "mean" | "median" | "min" | "max" | "sum" | "any" | "all"; members: ({ source: {…}; cap: string; fieldPath: string })[]; active?: "at-least-one" | "all" } | { kind: "statistic"; stat: "min" | "max" | "mean" | "sum" | "count" | "change"; window: { kind: "rolling"; span: "1h" | "24h" | "2d" | "7d" | "30d" | "custom"; customMinutes?: number } | { kind: "calendar"; period: "today" | "yesterday" | "this-week" | "this-month" }; source: { source: {…}; cap: string; fieldPath: string } } | { kind: "integral"; reset: "never" | "daily" | "weekly" | "monthly"; output: "energy" | "meter"; source: { source: {…}; cap: string; fieldPath: string } } | { kind: "threshold"; source: { source: {…}; cap: string; fieldPath: string }; high: number; low: number; onForMs: number; offForMs: number } | { kind: "arithmetic"; op: "sum" | "difference" | "ratio"; inputs: ({ source: {…}; cap: string; fieldPath: string })[] } | { kind: "expression"; expr: string; inputs: ({ name: string; member: {…} })[]; output: "number" | "boolean" } | { kind: "derivative"; window: { kind: "rolling"; span: "1h" | "24h" | "2d" | "7d" | "30d" | "custom"; customMinutes?: number }; per: "second" | "minute" | "hour"; source: { source: {…}; cap: string; fieldPath: string } } }
}CompositionCustomizationReadSchema
| { state: "loaded"; view: CompositionViewSchema | null }
| { state: "not-loaded"; reason: string }CompositionGetReadSchema
| { state: "loaded"; view: CompositionViewSchema | null }
| { state: "not-loaded"; reason: string }CompositionListReadSchema
| { state: "loaded"; views: CompositionViewSchema[] }
| { state: "not-loaded"; reason: string }CompositionStateReadSchema
| { kind: "answered"; state: { blockId: string; deviceId: number | null; status: "stopped" | "starting" | "running" | "degraded" | "incomplete" | "failed"; reason?: string; fields: ({ cap: string; path: string; item?: {…}; state: "fresh" | "stale" | "unavailable"; value: string | number | boolean | null; reason?: string })[] } | null }
| { kind: "unreachable"; error: string }CompositionViewSchema
{
block: CoreBlockSchema
state: CompositionStateReadSchema
}ConfigEntrySchema
{
key: string
value: unknown
description?: string
}ConfigSectionWithValuesSchema
{
id: string
title: string
titleKey?: string
description?: string
descriptionKey?: string
style?: "card" | "accordion"
defaultCollapsed?: boolean
columns?: 1 | 2 | 3 | 4
tab?: string
location?: "settings" | "top-tab" | "hero"
order?: number
fields: any[]
}ConfigTabDeclarationSchema
{
id: string
label: string
icon: string
order?: number
}ConnectivityStatusSchema
{
connected: boolean
lastChangedAt: number
}ConsumableFormSchema
"part" | "tank" | "product" | "bin"ConsumableItemSchema
{
key: string
label: string
level: number | null
status: ConsumableStatusSchema | null
kind?: ConsumableKindSchema
form?: ConsumableFormSchema
lastResetAt: number | null
resettable: boolean
remaining?: ConsumableRemainingSchema
}ConsumableKindSchema
"wear" | "supply" | "waste"ConsumableRemainingKindSchema
"duration" | "count" | "distance"ConsumableRemainingSchema
{
value: number | null
kind: ConsumableRemainingKindSchema
}ConsumablesStatusSchema
{
items: ConsumableItemSchema[]
lastChangedAt: number
}ConsumableStatusSchema
"ok" | "low" | "empty" | "full" | "replace"ContactStatusSchema
{
entryOpen: boolean
lastChangedAt: number
}ControlKindSchema
"numeric" | "select" | "text" | "datetime"ControlStatusSchema
{
kind: ControlKindSchema
value: number | string
options: string[]
lastChangedAt: number
min?: number
max?: number
step?: number
}CoreBlockCompileInputSchema
{
code?: string
files?: CoreBlockFilesSchema
entry?: string
}CoreBlockCompileResultSchema
{
ok: boolean
error?: string
line?: number
column?: number
}CoreBlockFilesSchema
Record<string, string>CoreBlockInputSchema
{
name: string
code?: string
files?: CoreBlockFilesSchema
entry?: string
enabled: boolean
integrationId?: string
settingsSchema?: <custom>
tags?: string[]
tagIds?: string[]
}CoreBlockSchema
{
name: string
code: string
files?: CoreBlockFilesSchema
entry?: string
enabled: boolean
integrationId?: string
settingsSchema?: <custom>
tags?: string[]
tagIds?: string[]
id: string
createdAt: number
updatedAt: number
createdBy: string
status: CoreBlockStatusSchema
lastError?: string
lastChangedAt: number
source?: CoreBlockSourceSchema
}CoreBlockSourceSchema
| { kind: "code" }
| { kind: "recipe"; recipe: { when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; actions: ({ kind: "wait"; enabled?: boolean; seconds: number; if?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; else?: ({…} | {…})[] } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; if?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; else?: ({…} | {…})[]; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed"; if?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean>; if?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "code"; enabled?: boolean; code: string })[]; runMode?: { mode: "single" } | { mode: "restart" } | { mode: "queued"; max: number } | { mode: "parallel"; max: number } | { mode: "cooldown"; minutes: number }; keepTraces?: number; template?: { templateId: string; values: Record<string, number | string | boolean | number[] | {…} | {…} | {…} | {…} | (Record<string, unknown>)[] | (Record<string, number | string | boolean | number[] | {…} | {…} | {…} | {…} | (Record<string, unknown>)[] | (Record<string, number | string | boolean | number[] | {…} | {…} | {…} | {…} | (Record<string, unknown>)[]>)[]>)[]>; codeHash?: string; problems?: {…}[] } } | pipe }
| { kind: "composition"; composition: { target: { kind: "new"; type: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; role?: "siren" | "floodlight" | "spotlight" | "pir-sensor" | "chime" | "autotrack" | "nightvision" | "privacy-mask" | "doorbell" | "cover-blind" | "cover-shutter" | "cover-awning" | "cover-curtain" | "cover-garage" | "cover-gate" | "cover-door" | "cover-window" | "binary-helper" | "outlet" | "switch-heater" | "switch-fan" | "switch-light" | "poe-port" | "climate-ac" | "climate-thermostat" | "climate-floor" | "climate-radiator" | "climate-heater" | "climate-heat-pump-circuit" | "climate-vehicle" | "lock-vehicle" | "media-player-tv" | "motion-sensor" | "contact-sensor" | "leak-sensor" | "smoke-sensor" | "co-sensor" | "gas-sensor" | "tamper-sensor" | "vibration-sensor" | "connectivity-sensor" | "sound-sensor" | "binary-sensor" | "temperature-sensor" | "humidity-sensor" | "ambient-light-sensor" | "pressure-sensor" | "wind-sensor" | "rain-sensor" | "uv-sensor" | "solar-radiation-sensor" | "soil-moisture-sensor" | "power-sensor" | "energy-sensor" | "voltage-sensor" | "current-sensor" | "air-quality-sensor" | "ambient-monitor" | "battery-sensor" | "numeric-sensor" | "enum-sensor" | "datetime-sensor" | "generic-sensor" | "numeric-control" | "select-control" | "text-control" | "datetime-control" | "mobile-push-notifier" | "messaging-notifier" | "email-notifier" | "generic-notifier" | "ir-transmitter" | "vm" | "app-container" | "lxc" | "app" | "host" | "ups" } | { kind: "existing"; device: {…} }; features: ({ kind: "fields"; cap: string; enabled?: boolean; customizeKind?: "power-source" | "lock-door-sensor" | "follow-switch"; fields: Record<string, {…} | {…} | {…} | {…} | {…}>; items?: Record<string, {…}>; commands?: Record<string, {…} | {…} | {…}>; contributedBy?: {…} } | { kind: "passthrough"; cap: string; enabled?: boolean; source: {…} } | { kind: "capLink"; cap: string; linkId: string; enabled?: boolean; source: {…} })[]; helper?: { kind: "grid"; fps: number; publishedProfiles: ("high" | "mid" | "low")[]; cells: {…}[] } | { kind: "crop"; source: {…}; rect: {…}; aspect: "16:9" | "4:3" | "1:1" | "free"; fps: number; publishedProfiles: ("high" | "mid" | "low")[] } | { kind: "terminal"; terminalId: string } | { kind: "group"; templateId: "temperature" | "humidity" | "pressure" | "illuminance" | "power" | "energy" | "battery" | "numeric" | "motion" | "contact" | "leak" | "smoke" | "occupancy" | "binary" | "switch" | "light" | "fan" | "cover" | "valve" | "lock" | "media-player" | "climate"; aggregate: "mean" | "median" | "min" | "max" | "sum" | "any" | "all"; members: {…}[]; active?: "at-least-one" | "all" } | { kind: "statistic"; stat: "min" | "max" | "mean" | "sum" | "count" | "change"; window: {…} | {…}; source: {…} } | { kind: "integral"; reset: "never" | "daily" | "weekly" | "monthly"; output: "energy" | "meter"; source: {…} } | { kind: "threshold"; source: {…}; high: number; low: number; onForMs: number; offForMs: number } | { kind: "arithmetic"; op: "sum" | "difference" | "ratio"; inputs: {…}[] } | { kind: "expression"; expr: string; inputs: {…}[]; output: "number" | "boolean" } | { kind: "derivative"; window: {…}; per: "second" | "minute" | "hour"; source: {…} } } }CoreBlockStatusSchema
"stopped" | "starting" | "running" | "degraded" | "incomplete" | "failed"CoverStateSchema
"open" | "opening" | "closing" | "closed" | "stopped"CoverStatusSchema
{
state: CoverStateSchema
position: number | null
tiltPosition: number | null
lastChangedAt: number
}CreateUserInputSchema
{
username: string
password: string
isAdmin?: boolean = false
allowedProviders?: string[] | "*"
allowedDevices?: Record<string, string[] | "*">
scopes?: ({ type: "viewer"; allow: "*" | number[]; block: number[]; features: ("face-assignment" | "plate-assignment" | "retrain" | "scenes")[] } | pipe)[]
}CustomActionInputSchema
{
addonId: string
action: string
input: unknown
}CustomModelDescriptorSchema
{
stepId: string
entry: { id: string; name: string; description: string; formats: { onnx?: { url: string; sizeMB: number; isDirectory?: boolean; files?: string[]; runtimes?: "python"[]; revision?: string }; coreml?: { url: string; sizeMB: number; isDirectory?: boolean; files?: string[]; runtimes?: "python"[]; revision?: string }; openvino?: { url: string; sizeMB: number; isDirectory?: boolean; files?: string[]; runtimes?: "python"[]; revision?: string }; tflite?: { url: string; sizeMB: number; isDirectory?: boolean; files?: string[]; runtimes?: "python"[]; revision?: string }; pt?: { url: string; sizeMB: number; isDirectory?: boolean; files?: string[]; runtimes?: "python"[]; revision?: string }; gguf?: { url: string; sizeMB: number; isDirectory?: boolean; files?: string[]; runtimes?: "python"[]; revision?: string } }; inputSize: { width: number; height: number }; inputChannels?: number; labels: ({ id: string; name: string; category?: string; description?: string; icon?: string })[]; inputLayout?: "nchw" | "nhwc"; inputNormalization?: "zero-one" | "imagenet" | "none" | "scrfd"; outputProbabilities?: boolean; preprocessMode?: "letterbox" | "resize"; postprocessor?: <custom>; defaultConfidence?: number; defaultClassFloors?: Record<string, number>; gpuInferencePrecision?: "f32" | "f16"; suppliedLabelFloors?: Record<string, number>; faceAlignment?: boolean; extraFiles?: ({ url: string; filename: string; sizeMB: number })[]; legacy?: boolean; metrics?: { map50?: number; p95LatencyMs?: Record<string, number> }; license?: pipe; group?: { family: string; tier: string; precision?: "fp32" | "int8"; optimization?: "standard" | "test"; resolution?: number }; provider?: "camstack" | "frigate" | "scrypted" | "custom"; classMap?: { mapping: Record<string, "person" | "vehicle" | "animal" | "package">; preserveOriginal: boolean }; suppliesSteps?: ({ kind: "label"; stepId: "animal-classifier" | "vehicle-classifier" | "package-detection"; labelToEffect: Record<string, string>; uncovered: string[] } | { kind: "crop"; stepId: "plate-detection" | "face-detection"; rootLabels: string[]; parentMacro: "vehicle" | "person"; childClass: "plate" | "face"; rootInputPx?: number } | { kind: "mask"; stepId: "segmentation" })[]; clip?: { textModelId: string; embeddingDim: number; vectorIndex: string; tokenizerFile: string; contextLength: number; padId: number; searchMinScore: number } }
}