Dominevo
ReferenceHTTP API

coreBlocks

The coreBlocks router: 26 methods of the core-blocks capability, with tier, scope, input and output.

Capability core-blocks · scope system · mode singleton · source packages/types/src/capabilities/core-blocks.cap.ts:436.

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

MethodKindTierToken scopeViewer
listqueryadminadmin onlyno
getqueryadminadmin onlyno
createmutationadminadmin onlyno
updatemutationadminadmin onlyno
deletemutationadminadmin onlyno
setEnabledmutationadminadmin onlyno
restartmutationadminadmin onlyno
compilemutationadminadmin onlyno
getBlockSettingsqueryadminadmin onlyno
updateBlockSettingsmutationadminadmin onlyno
migrateRawSecretsmutationadminadmin onlyno
getTypeDefsqueryadminadmin onlyno
createCompositionmutationadminadmin onlyno
updateCompositionmutationadminadmin onlyno
getCompositionqueryadminadmin onlyno
listTemplateInstancesqueryadminadmin onlyno
listCompositionsqueryadminadmin onlyno
getCustomizationqueryadminadmin onlyno
getCapLinksqueryprotectedviewyes
migrateCapLinksmutationadminadmin onlyno
listComposableCapsqueryadminadmin onlyno
validateCompositionmutationadminadmin onlyno
proposeRunningThresholdqueryadminadmin onlyno
reportAutomationRunmutationadminadmin onlyno
getAutomationRunStatequeryadminadmin onlyno
getTracesqueryadminadmin onlyno

coreBlocks.list

  • Kind: query — GET /trpc/coreBlocks.list
  • 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=coreBlocks.list on your hub

Input

{}

Output

{ blocks: CoreBlockSchema[] }

Shapes: CoreBlockSchema

coreBlocks.get

  • Kind: query — GET /trpc/coreBlocks.get
  • 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=coreBlocks.get on your hub

Input

{ blockId: string }

Output

{ block: CoreBlockSchema | null }

Shapes: CoreBlockSchema

coreBlocks.create

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

Input

{ block: CoreBlockInputSchema }

Output

{ block: CoreBlockSchema }

Shapes: CoreBlockInputSchema · CoreBlockSchema

coreBlocks.update

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

Input

{ blockId: string; block: { name?: string; code?: string; files?: CoreBlockFilesSchema; entry?: string; enabled?: boolean; integrationId?: string; settingsSchema?: <custom>; tags?: string[]; tagIds?: string[] }; expectedUpdatedAt?: number }

Output

{ block: CoreBlockSchema }

Shapes: CoreBlockFilesSchema · CoreBlockSchema

coreBlocks.delete

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

Input

{ blockId: string; expectedUpdatedAt?: number }

Output

{ success: true }

coreBlocks.setEnabled

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

Input

{ blockId: string; enabled: boolean; expectedUpdatedAt?: number }

Output

{ block: CoreBlockSchema }

Shapes: CoreBlockSchema

coreBlocks.restart

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

Input

{ blockId: string }

Output

{ block: CoreBlockSchema }

Shapes: CoreBlockSchema

coreBlocks.compile

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

Input

CoreBlockCompileInputSchema

Output

CoreBlockCompileResultSchema

Shapes: CoreBlockCompileInputSchema · CoreBlockCompileResultSchema

coreBlocks.getBlockSettings

  • Kind: query — GET /trpc/coreBlocks.getBlockSettings
  • 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=coreBlocks.getBlockSettings on your hub

Input

{ blockId: string }

Output

SettingsSchemaWithValuesSchema | null

Shapes: SettingsSchemaWithValuesSchema

coreBlocks.updateBlockSettings

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

Input

{ blockId: string; patch: SettingsPatchSchema }

Output

SettingsUpdateResultSchema

Shapes: SettingsPatchSchema · SettingsUpdateResultSchema

coreBlocks.migrateRawSecrets

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

Input

RawSecretMigrationInputSchema

Output

RawSecretMigrationReportSchema

Shapes: RawSecretMigrationInputSchema · RawSecretMigrationReportSchema

coreBlocks.getTypeDefs

  • Kind: query — GET /trpc/coreBlocks.getTypeDefs
  • 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=coreBlocks.getTypeDefs on your hub

Input

{}

Output

{ libs: ({ filePath: string; content: string })[] }

coreBlocks.createComposition

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

Input

{ block: CompositionBlockInputSchema }

Output

{ block: CoreBlockSchema }

Shapes: CompositionBlockInputSchema · CoreBlockSchema

coreBlocks.updateComposition

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

Input

{ blockId: string; expectedUpdatedAt: number; block: { 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: {…} }; 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: {…} } } } }

Output

{ block: CoreBlockSchema }

Shapes: CoreBlockSchema

coreBlocks.getComposition

  • Kind: query — GET /trpc/coreBlocks.getComposition
  • 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=coreBlocks.getComposition on your hub

Input

{ blockId: string }

Output

CompositionGetReadSchema

Shapes: CompositionGetReadSchema

coreBlocks.listTemplateInstances

  • Kind: query — GET /trpc/coreBlocks.listTemplateInstances
  • 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=coreBlocks.listTemplateInstances on your hub

Input

{ templateId: string; deviceId?: number }

Output

{ instances: TemplateInstanceSchema[] }

Shapes: TemplateInstanceSchema

coreBlocks.listCompositions

  • Kind: query — GET /trpc/coreBlocks.listCompositions
  • 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=coreBlocks.listCompositions on your hub

Input

{}

Output

CompositionListReadSchema

Shapes: CompositionListReadSchema

coreBlocks.getCustomization

  • Kind: query — GET /trpc/coreBlocks.getCustomization
  • 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=coreBlocks.getCustomization on your hub

Input

{ addonId: string; stableId: string }

Output

CompositionCustomizationReadSchema

Shapes: CompositionCustomizationReadSchema

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

Input

{ deviceId: number }

Output

{ status: "ok"; links: ({ linkId: string; cap: string; slot: string | null; mode: "project" | "reference"; source: { deviceId: number | null; cap: string }; state: "linked" | "source-gone" | "disabled" })[] } | { status: "not-loaded" }
  • Kind: mutation — POST /trpc/coreBlocks.migrateCapLinks
  • 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=coreBlocks.migrateCapLinks on your hub

Input

{ dryRun: boolean }

Output

{ dryRun: boolean; converted: ({ deviceId: number; cap: string; linkId: string; source: { addonId: string; stableId: string }; fields: string[] })[]; mixed: ({ deviceId: number; cap: string; reasons: string[] })[]; skipped: number; alreadyLinked: number }

coreBlocks.listComposableCaps

  • Kind: query — GET /trpc/coreBlocks.listComposableCaps
  • 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=coreBlocks.listComposableCaps on your hub

Input

{ deviceType: "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" }

Output

{ caps: ({ cap: string; fields: ({ path: string; kind: "string" | "number" | "boolean" | "enum"; nullable: boolean; required: boolean; enumValues?: string[] })[]; itemArray?: { path: string; keyField: string } })[] }

coreBlocks.validateComposition

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

Input

{ 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 } } }; blockId?: string }

Output

{ ok: boolean; problems: ({ code: "reserved-variant" | "unknown-capability" | "not-composable" | "wrong-device-type" | "has-commands" | "unknown-field" | "nested-field" | "missing-field" | "kind-mismatch" | "source-kind-mismatch" | "may-be-null" | "source-missing" | "source-unreadable" | "source-capability-missing" | "source-field-unknown" | "expression-invalid" | "cycle" | "duplicate-target" | "not-item-array" | "item-field-reserved" | "target-missing" | "target-unreadable" | "not-replaceable" | "native-capability-replace" | "mixed-quantity" | "helper-mismatch" | "member-constraint" | "retention" | "command-method-unknown" | "command-source-unknown" | "command-input-unknown" | "command-input-missing" | "power-source-is-actuator" | "link-contribution-removed" | "link-undeclared" | "link-source-cap-missing" | "link-native" | "link-overlaps-fields"; path: string; message: string })[]; fields: ({ cap: string; path: string; item?: { arrayPath: string; key: string; label: string; resettable?: boolean }; featureIndex: number; kind: "string" | "number" | "boolean" | "enum"; nullable: boolean; required: boolean; unavailable: "null" | "offline" | "unknown" | "release" | "omit"; role: "derived" | "clock" | "constant" | "accumulator"; source: { source: { addonId: string; stableId: string }; cap: string; fieldPath: string; kind: "from" } | { kind: "expression"; expr: string; bindings: Record<string, { source: {…}; cap: string; fieldPath: string; kind: "from" } | { kind: "literal"; value: string | number | boolean | null }> } | { kind: "code"; code: string } | { kind: "aggregate"; reducer: "mean" | "median" | "min" | "max" | "sum" | "any" | "all"; reads: ({ source: {…}; cap: string; fieldPath: string })[]; activeWhen?: string[]; publish: "value" | "included" | "excluded" | "total"; empty: "null" | "omit" | "offline" } | { kind: "series"; read: { source: {…}; cap: string; fieldPath: string }; publish: "value" | "included" | "excluded" | "total"; empty: "null" | "omit" | "offline" }; reads: ({ source: { addonId: string; stableId: string }; cap: string; fieldPath: string })[] })[]; features: ({ featureIndex: number; cap: string; mode: "new" | "add" | "replace" })[]; events: ({ featureIndex: number; cap: string; eventName: string; category: "system.boot" | "system.addons-ready" | "system.restarting" | "system.restart-completed" | "system.tls-cert-changed" | "update.available" | "system.ready-state" | "addon.started" | "addon.stopped" | "addon.restarted" | "addon.updated" | "addon.installed" | "addon.uninstalled" | "addon.crashed" | "addon.runner-failed" | "addon.runner-refused" | "process.state-changed" | "system.runner-check" | "alert.episode" | "addon.error" | "addon.page-ready" | "addon.widget-ready" | "addon.load-failed" | "keychain.changed" | "addon.load-recovered" | "addon.unsupported-version" | "addon.unsupported-resolved" | "addon.retry-scheduled" | "system.liveness-failed" | "system.liveness-recovered" | "addon.retry-attempting" | "device.registered" | "device.unregistered" | "device.enabled" | "device.disabled" | "device.settings-updated" | "device.bindings-changed" | "device.meta-changed" | "device.source-info-changed" | "device.streams-registered" | "device.provisioned" | "device.ready" | "identity-link.created" | "identity-link.lost" | "integration.enabled" | "integration.disabled" | "integration.deleted" | "broker.status-changed" | "broker.message" | "provider.started" | "provider.stopped" | "process.crashed" | "process.restart_scheduled" | "process.restarted" | "storage.locations-changed" | "recording.started" | "recording.stopped" | "recording.error" | "recording.health.degraded" | "recording.health.stalled" | "recording.health.ok" | "recording.storage.critical" | "storage.location.low" | "storage.location.critical" | "storage.location.ok" | "storage.drain.progress" | "storage.drain.complete" | "recording.segment.written" | "recording.policy.fallback" | "recording.retention.completed" | "recording.export.progress" | "recording.export.completed" | "recording.export.failed" | "detection.event" | "session.track.new" | "session.track.expired" | "benchmark.progress" | "platform-probe.phase" | "pipeline.progress" | "pipeline.trace" | "pipeline.inference-result" | "pipeline.camera-assigned" | "pipeline.camera-unassigned" | "pipeline.node-inference-unavailable" | "pipeline.detection-blind" | "pipeline.motion-noisy" | "pipeline.motion-calm" | "pipeline.package-llm-silent" | "pipeline.package-llm-answered" | "pipeline.camera-updated" | "pipeline.ingest-owner-changed" | "pipeline.runner-load-snapshot" | "pipeline.camera-metrics-snapshot" | "stream-broker.metrics-snapshot" | "stream-broker.onCamStreamDemand" | "stream-broker.onCamStreamIdle" | "stream-broker.onRequestStreamSourceRefresh" | "stream-broker.onSourceRestart" | "stream-params.changed" | "device.state-changed" | "daylight.phase-changed" | "device.command-settled" | "device.native-shadow-changed" | "zone-analytics.occupancy-changed" | "battery.onStatusChanged" | "network-link.onStatusChanged" | "battery.onWakeStarted" | "doorbell.onPressed" | "running.started" | "running.finished" | "workload.started" | "workload.stopped" | "workload.crashed" | "workload.recovered" | "device-run.opened" | "device-run.closed" | "event-emitter.event" | "pipeline.engine-metrics-snapshot" | "pipeline.engine-provisioning" | "cluster.topology-snapshot" | "metrics.node-resources-snapshot" | "metrics.node-processes-snapshot" | "capability.binding-changed" | "model.download.progress" | "agent.registered" | "agent.unregistered" | "agent.online" | "agent.offline" | "worker.online" | "worker.offline" | "agent.task.dispatched" | "agent.task.assigned" | "agent.trpc.connected" | "agent.ws.connected" | "agent.ws.disconnected" | "agent.backup.activated" | "orchestration.settings-updated" | "detection.motion-analysis" | "detection.motion-zones-raw" | "motion.on-motion-changed" | "detection.result" | "detection.raw" | "detection.camera-native" | "pipeline.audio-inference-result" | "detection.phase-transition" | "provider.motion" | "provider.detection" | "enrichment.embedding.stored" | "enrichment.scene.state-changed" | "enrichment.activity.summary" | "pipeline-analytics.track-lifecycle" | "pipeline-analytics.track-started" | "pipeline-analytics.track-ended" | "pipeline-analytics.detection-event" | "pipeline-analytics.frame-tracked" | "pipeline-analytics.stationary-changed" | "pipeline-analytics.package-delivered" | "pipeline-analytics.package-picked-up" | "pipeline-analytics.face-gallery-changed" | "pipeline-analytics.plate-gallery-changed" | "camera-streams.onProfileSlotsChanged" | "stream.online" | "stream.offline" | "network.tunnel.started" | "network.tunnel.stopped" | "network.local.changed" | "network.mesh.changed" | "backup.completed" | "backup.run-completed" | "backup.restored" | "notification.dispatched" | "notification.failed" | "notification.rule-broken" | "notification.rule-repaired" | "migration.failed" | "migration.applied" | "jobs.changed" | "device.updated" | "device.online" | "device.offline" | "device.awake" | "device.sleeping" | "retention.cleanup" | "addons.bulk-update-progress" | "addons.job-progress" | "addons.job-log" | "accessories.onChildVisibilityChanged" | "accessories.onAccessoriesChanged" | "actions.onRunChanged" | "model-convert.progress"; stateField: string; fieldKey: string })[] }

coreBlocks.proposeRunningThreshold

  • Kind: query — GET /trpc/coreBlocks.proposeRunningThreshold
  • 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=coreBlocks.proposeRunningThreshold on your hub

Input

{ deviceId: number; cap: string; fieldPath: string; deviceType?: "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" }

Output

{ state: "proposal"; transform: { kind: "threshold"; comparison: "gte" | "lte"; threshold: number; startDwellMs: number; stopDwellMs: number; minSamples?: number }; evidence: { tier: "raw" | "5m"; spanMs: number; from: number; to: number; points: number; runsFound: number; pausesFound: number; longestPauseMs: number; pulsesFound: number; longestPulseMs: number; idleFloorW: number; noiseCeilingW: number; plateauW: number; replay: { intervals: number; extra: number; missed: number } }; confidence: "high" | "medium" | "low"; notes: string[] } | { state: "insufficient"; reason: "no-history" | "span-too-short" | "truncated" | "no-idle-floor" | "no-runs" | "no-separation"; evidence: { spanMs: number; points: number; runsFound: number }; fallback: { kind: "threshold"; comparison: "gte" | "lte"; threshold: number; startDwellMs: number; stopDwellMs: number; minSamples?: number } }

coreBlocks.reportAutomationRun

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

Input

{ blockId: string; trace?: { runId: string; startedAt: number; endedAt: number; trigger: { kind: string; path?: string; outcome: "pass" | "fail"; reason: string; vars: Record<string, string | number | boolean | null | (string | number)[]>; hold?: { phase: "pending" | "cancelled" | "fired" | "reseeded"; ms: number; mode: "held" | "stable"; since?: number; deadline?: number } }; conditions: ({ path: string; kind: "all" | "any" | "not" | "condition" | "device-is" | "device-fault-is" | "expression" | "stationary-present" | "time-is" | "triggered-by" | "device-becomes" | "device-event" | "device-fired" | "device-fault-raised" | "schedule" | "interval" | "manual" | "detection" | "stationary"; outcome: "pass" | "fail" | "not-evaluated"; reason: string; deviceId?: number; cap?: string; fieldPath?: string; operator?: string; expected?: string | number | boolean | null | (string | number)[]; observed?: string | number | boolean | null | (string | number)[] })[]; verdict?: { mode: { mode: "single" } | { mode: "restart" } | { mode: "queued"; max: number } | { mode: "parallel"; max: number } | { mode: "cooldown"; minutes: number }; decision: "run" | "queued" | "restart" | "drop" | "cooldown" | "bypass"; reason: string }; steps: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: ({ deviceId: number; outcome: "ok" | "error"; message?: string })[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; else?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string })[]; branch?: string; branchChecks?: ({ condition: "true" | "false" | "unknown"; conditionReason?: string })[]; iterations?: number; steps?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; branch?: string; branchChecks?: {…}[]; iterations?: number; steps?: {…}[] })[] })[]; outcome: "ran" | "skipped-trigger" | "skipped-conditions" | "skipped-cooldown" | "skipped-overlap" | "failed" | "aborted"; repeat: number; lastAt: number; scheduler?: "done" | "missed" | "inactive" | "condition-false" | "failed" | "held" | "gave-up" | "overridden" | "suspended-manual"; error?: string }; runStartedAt?: number; keepTraces?: number; onForHolds?: ({ deviceId: number; cap: string; deadline: number })[] }

Output

void

coreBlocks.getAutomationRunState

  • Kind: query — GET /trpc/coreBlocks.getAutomationRunState
  • 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=coreBlocks.getAutomationRunState on your hub

Input

{ blockId: string }

Output

{ version: 1; lastRunStartedAt: number | null; traces: ({ runId: string; startedAt: number; endedAt: number; trigger: { kind: string; path?: string; outcome: "pass" | "fail"; reason: string; vars: Record<string, string | number | boolean | null | (string | number)[]>; hold?: { phase: "pending" | "cancelled" | "fired" | "reseeded"; ms: number; mode: "held" | "stable"; since?: number; deadline?: number } }; conditions: ({ path: string; kind: "all" | "any" | "not" | "condition" | "device-is" | "device-fault-is" | "expression" | "stationary-present" | "time-is" | "triggered-by" | "device-becomes" | "device-event" | "device-fired" | "device-fault-raised" | "schedule" | "interval" | "manual" | "detection" | "stationary"; outcome: "pass" | "fail" | "not-evaluated"; reason: string; deviceId?: number; cap?: string; fieldPath?: string; operator?: string; expected?: string | number | boolean | null | (string | number)[]; observed?: string | number | boolean | null | (string | number)[] })[]; verdict?: { mode: { mode: "single" } | { mode: "restart" } | { mode: "queued"; max: number } | { mode: "parallel"; max: number } | { mode: "cooldown"; minutes: number }; decision: "run" | "queued" | "restart" | "drop" | "cooldown" | "bypass"; reason: string }; steps: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: ({ deviceId: number; outcome: "ok" | "error"; message?: string })[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; else?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string })[]; branch?: string; branchChecks?: ({ condition: "true" | "false" | "unknown"; conditionReason?: string })[]; iterations?: number; steps?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; branch?: string; branchChecks?: {…}[]; iterations?: number; steps?: {…}[] })[] })[]; outcome: "ran" | "skipped-trigger" | "skipped-conditions" | "skipped-cooldown" | "skipped-overlap" | "failed" | "aborted"; repeat: number; lastAt: number; scheduler?: "done" | "missed" | "inactive" | "condition-false" | "failed" | "held" | "gave-up" | "overridden" | "suspended-manual"; error?: string })[]; onForHolds?: ({ deviceId: number; cap: string; deadline: number })[] }

coreBlocks.getTraces

  • Kind: query — GET /trpc/coreBlocks.getTraces
  • 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=coreBlocks.getTraces on your hub

Input

{ blockId: string }

Output

{ traces: ({ runId: string; startedAt: number; endedAt: number; trigger: { kind: string; path?: string; outcome: "pass" | "fail"; reason: string; vars: Record<string, string | number | boolean | null | (string | number)[]>; hold?: { phase: "pending" | "cancelled" | "fired" | "reseeded"; ms: number; mode: "held" | "stable"; since?: number; deadline?: number } }; conditions: ({ path: string; kind: "all" | "any" | "not" | "condition" | "device-is" | "device-fault-is" | "expression" | "stationary-present" | "time-is" | "triggered-by" | "device-becomes" | "device-event" | "device-fired" | "device-fault-raised" | "schedule" | "interval" | "manual" | "detection" | "stationary"; outcome: "pass" | "fail" | "not-evaluated"; reason: string; deviceId?: number; cap?: string; fieldPath?: string; operator?: string; expected?: string | number | boolean | null | (string | number)[]; observed?: string | number | boolean | null | (string | number)[] })[]; verdict?: { mode: { mode: "single" } | { mode: "restart" } | { mode: "queued"; max: number } | { mode: "parallel"; max: number } | { mode: "cooldown"; minutes: number }; decision: "run" | "queued" | "restart" | "drop" | "cooldown" | "bypass"; reason: string }; steps: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: ({ deviceId: number; outcome: "ok" | "error"; message?: string })[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; else?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string })[]; branch?: string; branchChecks?: ({ condition: "true" | "false" | "unknown"; conditionReason?: string })[]; iterations?: number; steps?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; branch?: string; branchChecks?: {…}[]; iterations?: number; steps?: {…}[] })[] })[]; outcome: "ran" | "skipped-trigger" | "skipped-conditions" | "skipped-cooldown" | "skipped-overlap" | "failed" | "aborted"; repeat: number; lastAt: number; scheduler?: "done" | "missed" | "inactive" | "condition-false" | "failed" | "held" | "gave-up" | "overridden" | "suspended-manual"; error?: string })[]; lastError: string | null }