couch.

Native components

The optional presentation array gives an integration a useful control surface without allowing it to inject UI code. Packages provide data; Couch renders the controls in its own web and remote interfaces.

This component set is part of the integration package developer preview. It is deliberately small and may evolve before public release.

Try the components

Interactive examples of Couch’s web controls, using sample data. Try a command, change the power state or choose an input. Everything stays in this page; no device is connected. Layout on the remote may differ.

Command group

command_group

Buttons for the commands your integration declares.

Volume

View declaration
{
  "kind": "command_group",
  "title": "Volume",
  "commands": [
    "volume-up",
    "volume-down"
  ]
}

Status text

status_text

A read-only value. Try the volume buttons to see it change.

Volume35%
View declaration
{
  "kind": "status_text",
  "label": "Volume",
  "field": "volume"
}

Toggle

toggle

A button that sends the command for the opposite state.

Power

View declaration
{
  "kind": "toggle",
  "label": "Power",
  "state": "on",
  "on": "power-on",
  "off": "power-off"
}

Input selector

input_selector

A list of sources returned by your integration.

View declaration
{
  "kind": "input_selector",
  "label": "Source"
}

Sample receiver ready. Volume 35%; power on.

Component library

Component Fields Use
command_group title, commands A named group of declared commands.
status_text label, field A read-only value from device status.
toggle label, state, on, off A boolean state with explicit on and off commands.
input_selector label The input list returned by the integration.

An integration may declare up to 16 components. A command group contains 1 to 32 distinct declared capabilities. Labels and titles are plain text, at most 128 bytes, with no control characters.

Example receiver controls

"presentation": [
  {
    "kind": "toggle",
    "label": "Power",
    "state": "on",
    "on": "power-on",
    "off": "power-off"
  },
  {
    "kind": "command_group",
    "title": "Volume",
    "commands": ["volume-up", "volume-down"]
  },
  {
    "kind": "toggle",
    "label": "Mute",
    "state": "muted",
    "on": "mute-on",
    "off": "mute-off"
  },
  {
    "kind": "input_selector",
    "label": "Source"
  }
]

This is a textual component example, not a screenshot from physical hardware. The installed Couch build decides the final styling and layout.

Status fields

status_text accepts on, playing, muted, volume, input, or title. Only on, playing, and muted are boolean and may back a toggle.

Use the field your device truly reports. For example, a receiver that reports decibels should not expose that number as Couch's percentage volume field. Omit a component when the state is unavailable or ambiguous.

Validation rules

Couch rejects the manifest before activation when:

If presentation is omitted, Couch can still expose the package's basic command list. A package cannot supply HTML, CSS, JavaScript, Slint, images, or an arbitrary layout through this API.

Source references