ReferenceHTTP API
heroLayout
The heroLayout router: 3 methods of the hero-layout capability, with tier, scope, input and output.
Capability hero-layout · scope system · mode singleton · source packages/types/src/capabilities/hero-layout.cap.ts:39.
Every method is called at /trpc/heroLayout.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getHeroModel | query | protected | view | yes |
getRowModels | query | protected | view | yes |
getLayout | query | protected | view | yes |
heroLayout.getHeroModel
- Kind: query —
GET /trpc/heroLayout.getHeroModel - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityhero-layout, or categorysystem - Viewer: yes
- Try it: open
/system/api-explorer?method=heroLayout.getHeroModelon your hub
Input
{ deviceId: number; canActuate?: boolean }Output
{ deviceId: number; type: string; role: string | null; name: string; state: "on" | "off" | "running" | "idle" | "standby" | "alert" | "offline" | "unknown"; stateAssumed: boolean; look: { icon: <custom>; tone: "success" | "warning" | "danger" | "primary" | "info" | "muted"; background: "plain" | "heat-rise" | "cool-fall" | "glow" | "water" | "drum" | "sky" | "mist" | "alert-wash"; animation: "none" | "pulse" | "spin" | "glow" | "halo" | "wave" | "rise" | "fall" | "tumble" | "equalizer" | "blink" | "breathe" }; background: { kind: "artwork"; url: string; fallback: { token: "plain" | "heat-rise" | "cool-fall" | "glow" | "water" | "drum" | "sky" | "mist" | "alert-wash"; animation: "none" | "pulse" | "spin" | "glow" | "halo" | "wave" | "rise" | "fall" | "tumble" | "equalizer" | "blink" | "breathe" } } | { kind: "state"; token: "plain" | "heat-rise" | "cool-fall" | "glow" | "water" | "drum" | "sky" | "mist" | "alert-wash"; animation: "none" | "pulse" | "spin" | "glow" | "halo" | "wave" | "rise" | "fall" | "tumble" | "equalizer" | "blink" | "breathe" }; scene: { id: "ac" | "thermostat" | "heater" | "heat-pump" | "fan" | "washer" | "dryer" | "dishwasher" | "pet-fountain" | "pet-feeder" | "vacuum" | "lawn-mower" | "tv" | "speaker" | "camera" | "light" | "cover" | "lock" | "alarm" | "siren" | "sensor-sparkline" | "contact" | "presence" | "weather" | "plug" | "button" | "update" | "control-dial" | "event-stream" | "gateway" | "generic"; mode: "cool" | "heat" | "dry" | "fan" | "auto" | "playing" | "paused" | "open" | "closed" | null; level: number | null }; facts: ({ id: "power" | "energy" | "battery" | "link" | "phase" | "remaining" | "volume" | "source" | "consumables" | "since" | "speed" | "progress" | "level" | "last-run" | "event" | "members" | "failures" | "reading" | "climate" | "temperature" | "humidity" | "pressure" | "air-quality" | "illuminance" | "valve"; icon: <custom> | null; text: { en: string; it: string }; tone: "success" | "warning" | "danger" | "primary" | "info" | "muted" })[]; sideTiles: { left: ({ label: { en: string; it: string }; value: { en: string; it: string }; tone?: "success" | "warning" | "danger" | "primary" | "info" | "muted"; at?: number })[]; right: ({ label: { en: string; it: string }; value: { en: string; it: string }; tone?: "success" | "warning" | "danger" | "primary" | "info" | "muted"; at?: number })[] }; title: { en: string; it: string }; caption?: { en: string; it: string }; badges: ({ id: "battery" | "network-link" | "integration"; icon: <custom>; tone: "success" | "warning" | "danger" | "primary" | "info" | "muted"; value: number | null; label: { en: string; it: string } })[]; remote: { commands: number | null; open?: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } } | null; historyLabel: { en: string; it: string }; consumables: { items: ({ key: string; label: string; level: number | null; needsAttention: boolean })[]; attention: number } | null; consumption: { kind: "power"; watts: number; detail: ({ label: { en: string; it: string }; value: number | string; unit: string | null })[] } | { kind: "running"; running: boolean | null; since: number | null; phase: string | null; detail: ({ label: { en: string; it: string }; value: number | string; unit: string | null })[] } | null; ownPower: { source: "switch" | "media-player" | "climate-control"; on: boolean | null; assumed: boolean; turnOn: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null }; turnOff: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } } | null; timedRun: { activeUntil: number | null; quickRun: TimedRunQuickRunSchema; run: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null }; cancel: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null }; remaining: number | null } | null; powerSupply: { on: boolean | null; confirmOffWhileRunning: boolean; running: boolean | null; powerOn: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } | null; powerOff: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } | null; restart: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } } | null; rows: ({ id: "progress" | "run-for" | "cycle" | "program" | "appliance-power" | "now-playing" | "playback" | "volume" | "source" | "contact" | "motion-trigger" | "lock" | "alarm" | "fan" | "vacuum" | "vacuum-suction" | "mower" | "feeder" | "fountain" | "pump-cycle" | "automation" | "script" | "do-not-disturb" | "brightness" | "color" | "cover" | "valve" | "humidifier" | "update" | "button" | "climate-mode" | "climate-fan" | "setpoint" | "channel" | "control" | "circuit" | "heat-pump-power" | "system-mode"; placement?: "row" | "scene"; label?: { en: string; it: string }; group?: { en: string; it: string }; pills?: ({ icon: <custom> | null; text: { en: string; it: string }; tone: "success" | "warning" | "danger" | "primary" | "info" | "muted" })[]; icon: <custom>; status: { en: string; it: string } | null; controls: ({ kind: "action"; action: { id: string; label: {…}; icon: <custom>; call: {…}; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } } | { kind: "toggle"; id: string; label: { en: string; it: string }; on: boolean | null; turnOn: { id: string; label: {…}; icon: <custom>; call: {…}; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null }; turnOff: { id: string; label: {…}; icon: <custom>; call: {…}; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } } | { kind: "slider"; id: string; label: { en: string; it: string }; value: number | null; min: number; max: number; step: number; unit: string; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | { kind: "picker"; id: string; label: { en: string; it: string }; current: string | null; options: string[]; optionLabels?: Record<string, { en: string; it: string }>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | { kind: "number"; id: string; label: { en: string; it: string }; value: number | null; step: number | null; unit: string; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | { kind: "text"; id: string; label: { en: string; it: string }; value: string | null; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string })[]; progress?: number | null })[]; measurement?: { quantity: "temperature" | "humidity" | "power" | "contact" | "motion" | "illuminance" | "co2" | "voc" | "pm25" | "pm10" | "aqi" | "text"; reading: { value: number; quantity: "temperature" | "pressure" | "speed" | "precipitation" | "precipitation-rate" | "length" | "area" | "illuminance" | "irradiance" | "power" | "energy" | "voltage" | "current" | "apparent-power" | "humidity" | "percentage" | "concentration-volume" | "concentration-mass" | "concentration-ppb" | "volume" | "price-per-volume" | "duration" | "duration-ms" | "information" | "sound-level" | "signal-level" | "signal-ratio" | "frequency" | "colour-temperature" | "angle" | "bitrate" | "rate" | "mass" | "index" | "ratio" | "count" | "none" | "device" } | null; icon: <custom> | null; value: { en: string; it: string }; unit: string | null; band: "hot" | "mild" | "cold" | null; level: number | null; word: { en: string; it: string }; tone: "success" | "warning" | "danger" | "primary" | "info" | "muted"; since: number | null; sinceKind: "updated" | "changed"; historyKey: string | null }; measurements?: ({ quantity: "temperature" | "humidity" | "power" | "contact" | "motion" | "illuminance" | "co2" | "voc" | "pm25" | "pm10" | "aqi" | "text"; reading: { value: number; quantity: "temperature" | "pressure" | "speed" | "precipitation" | "precipitation-rate" | "length" | "area" | "illuminance" | "irradiance" | "power" | "energy" | "voltage" | "current" | "apparent-power" | "humidity" | "percentage" | "concentration-volume" | "concentration-mass" | "concentration-ppb" | "volume" | "price-per-volume" | "duration" | "duration-ms" | "information" | "sound-level" | "signal-level" | "signal-ratio" | "frequency" | "colour-temperature" | "angle" | "bitrate" | "rate" | "mass" | "index" | "ratio" | "count" | "none" | "device" } | null; icon: <custom> | null; value: { en: string; it: string }; unit: string | null; band: "hot" | "mild" | "cold" | null; level: number | null; word: { en: string; it: string }; tone: "success" | "warning" | "danger" | "primary" | "info" | "muted"; since: number | null; sinceKind: "updated" | "changed"; historyKey: string | null })[]; gated: string[]; provenance: ({ partId: string; cap: string })[] } | nullShapes: TimedRunQuickRunSchema
heroLayout.getRowModels
- Kind: query —
GET /trpc/heroLayout.getRowModels - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityhero-layout, or categorysystem - Viewer: yes
- Try it: open
/system/api-explorer?method=heroLayout.getRowModelson your hub
Input
{ deviceIds: number[]; canActuate?: boolean }Output
({ deviceId: number; name: string; type: string; state: "on" | "off" | "running" | "idle" | "standby" | "alert" | "offline" | "unknown"; stateAssumed: boolean; look: { icon: <custom>; tone: "success" | "warning" | "danger" | "primary" | "info" | "muted"; background: "plain" | "heat-rise" | "cool-fall" | "glow" | "water" | "drum" | "sky" | "mist" | "alert-wash"; animation: "none" | "pulse" | "spin" | "glow" | "halo" | "wave" | "rise" | "fall" | "tumble" | "equalizer" | "blink" | "breathe" }; scene: { id: "ac" | "thermostat" | "heater" | "heat-pump" | "fan" | "washer" | "dryer" | "dishwasher" | "pet-fountain" | "pet-feeder" | "vacuum" | "lawn-mower" | "tv" | "speaker" | "camera" | "light" | "cover" | "lock" | "alarm" | "siren" | "sensor-sparkline" | "contact" | "presence" | "weather" | "plug" | "button" | "update" | "control-dial" | "event-stream" | "gateway" | "generic"; mode: "cool" | "heat" | "dry" | "fan" | "auto" | "playing" | "paused" | "open" | "closed" | null; level: number | null }; statusLine: ({ en: string; it: string })[]; primary: { kind: "action"; action: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } } | { kind: "toggle"; id: string; label: { en: string; it: string }; on: boolean | null; turnOn: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null }; turnOff: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } } | { kind: "slider"; id: string; label: { en: string; it: string }; value: number | null; min: number; max: number; step: number; unit: string; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | { kind: "picker"; id: string; label: { en: string; it: string }; current: string | null; options: string[]; optionLabels?: Record<string, { en: string; it: string }>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | { kind: "number"; id: string; label: { en: string; it: string }; value: number | null; step: number | null; unit: string; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | { kind: "text"; id: string; label: { en: string; it: string }; value: string | null; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | null; primaryGated?: boolean; timedRun: { id: "timed-run.run" | "timed-run.cancel"; duration: number; unit: "min" | "s" } | null; extras?: ({ kind: "action"; action: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } } | { kind: "toggle"; id: string; label: { en: string; it: string }; on: boolean | null; turnOn: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null }; turnOff: { id: string; label: { en: string; it: string }; icon: <custom>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; emphasis: "primary" | "normal"; confirm: "off-while-running" | "unlock" | "install" | "press" | null } } | { kind: "slider"; id: string; label: { en: string; it: string }; value: number | null; min: number; max: number; step: number; unit: string; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | { kind: "picker"; id: string; label: { en: string; it: string }; current: string | null; options: string[]; optionLabels?: Record<string, { en: string; it: string }>; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | { kind: "number"; id: string; label: { en: string; it: string }; value: number | null; step: number | null; unit: string; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string } | { kind: "text"; id: string; label: { en: string; it: string }; value: string | null; call: { cap: string; method: string; args: Record<string, string | number | boolean | Record<string, self>> }; valueArg: string })[]; trailing: { id: "power" | "energy" | "battery" | "link" | "phase" | "remaining" | "volume" | "source" | "consumables" | "since" | "speed" | "progress" | "level" | "last-run" | "event" | "members" | "failures" | "reading" | "climate" | "temperature" | "humidity" | "pressure" | "air-quality" | "illuminance" | "valve"; icon: <custom> | null; text: { en: string; it: string }; tone: "success" | "warning" | "danger" | "primary" | "info" | "muted" } | null; measurement?: { quantity: "temperature" | "humidity" | "power" | "contact" | "motion" | "illuminance" | "co2" | "voc" | "pm25" | "pm10" | "aqi" | "text"; reading: { value: number; quantity: "temperature" | "pressure" | "speed" | "precipitation" | "precipitation-rate" | "length" | "area" | "illuminance" | "irradiance" | "power" | "energy" | "voltage" | "current" | "apparent-power" | "humidity" | "percentage" | "concentration-volume" | "concentration-mass" | "concentration-ppb" | "volume" | "price-per-volume" | "duration" | "duration-ms" | "information" | "sound-level" | "signal-level" | "signal-ratio" | "frequency" | "colour-temperature" | "angle" | "bitrate" | "rate" | "mass" | "index" | "ratio" | "count" | "none" | "device" } | null; icon: <custom> | null; value: { en: string; it: string }; unit: string | null; band: "hot" | "mild" | "cold" | null; level: number | null; word: { en: string; it: string }; tone: "success" | "warning" | "danger" | "primary" | "info" | "muted"; since: number | null; sinceKind: "updated" | "changed"; historyKey: string | null } } | null)[]heroLayout.getLayout
- Kind: query —
GET /trpc/heroLayout.getLayout - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityhero-layout, or categorysystem - Viewer: yes
- Try it: open
/system/api-explorer?method=heroLayout.getLayouton your hub
Input
{ deviceType: string; role?: string | null }Output
HeroLayoutRowsSchemaShapes: HeroLayoutRowsSchema