Dominevo
ReferenceDevice capabilities

media-player

Media-player cap.

Media-player cap. Models HA media_player.* (Sonos, Chromecast, Apple TV, Spotify, Roku, generic OTT receivers, …) on DeviceType.MediaPlayer. Disjoint from the camera streaming surface — those use DeviceType.Camera + the broker pipeline.

The cap declares a wide method surface; not every backend supports every method. Drivers signal sub-capability via the DeviceFeature.MediaPlayerXxx flags (paired one-to-one with the corresponding method) so the UI gates buttons without a slice fetch — same pattern as PanTiltZoom for cameras.

At a glance

Capabilitymedia-player
Provided byThe device's own driver provides it: each device registers its own provider.
Active providers per deviceone
Device typesmedia-player
Sourcepackages/types/src/capabilities/media-player.cap.ts

Methods

Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.

MethodKindRequired of a providerAccess
turnOnmutationnoprotected
turnOffmutationnoprotected
volumeUpmutationnoprotected
volumeDownmutationnoprotected
channelUpmutationnoprotected
channelDownmutationnoprotected
playmutationyesprotected
pausemutationyesprotected
stopmutationnoprotected
nextmutationnoprotected
previousmutationnoprotected
setVolumemutationnoprotected
setMutemutationnoprotected
setShufflemutationnoprotected
setRepeatmutationnoprotected
selectSourcemutationnoprotected
seekmutationnoprotected
playMediamutationnoprotected

turnOn

mutation · optional for a provider

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.turnOnTurn on

turnOff

mutation · optional for a provider

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.turnOffTurn off

volumeUp

mutation · optional for a provider

Input

FieldTypeRequiredDescription
stepsnumberno (default 1)

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.volumeUpVolume up

volumeDown

mutation · optional for a provider

Input

FieldTypeRequiredDescription
stepsnumberno (default 1)

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.volumeDownVolume down

channelUp

mutation · optional for a provider

Input

FieldTypeRequiredDescription
stepsnumberno (default 1)

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.channelUpChannel up

channelDown

mutation · optional for a provider

Input

FieldTypeRequiredDescription
stepsnumberno (default 1)

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.channelDownChannel down

play

mutation

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.playPlaystate = "playing"

pause

mutation

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.pausePause mediastate = "paused"

stop

mutation · optional for a provider

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.stopStop media

next

mutation · optional for a provider

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.nextNext track

previous

mutation · optional for a provider

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.previousPrevious track

setVolume

mutation · optional for a provider

Input

FieldTypeRequiredDescription
volumeLevelnumberyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.volumeSet volumevolumeLevel = undefined

setMute

mutation · optional for a provider

Input

FieldTypeRequiredDescription
mutedbooleanyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.muteMuteisMuted = true
media.unmuteUnmuteisMuted = false

setShuffle

mutation · optional for a provider

Input

FieldTypeRequiredDescription
shufflebooleanyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.shuffleOnShuffle onshuffle = true
media.shuffleOffShuffle offshuffle = false

setRepeat

mutation · optional for a provider

Input

FieldTypeRequiredDescription
repeat"off" | "all" | "one"yes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.repeatSet repeatrepeat = undefined

selectSource

mutation · optional for a provider

Input

FieldTypeRequiredDescription
sourcestringyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.sourceSelect sourcesource = undefined

seek

mutation · optional for a provider

Input

FieldTypeRequiredDescription
positionnumberyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.seekSeek

playMedia

mutation · optional for a provider

Input

FieldTypeRequiredDescription
mediaIdstringyesMedia identifier / URL.
mediaTypestringyesMedia kind (music, tvshow, movie, app, …) — provider passes it through to the upstream service.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
media.playMediaPlay media

Runtime state

The state Dominevo keeps for each device with this capability, readable without calling the provider.

Runtime-state slice — mirrored by the kernel. UI players read the full slice for live now-playing, volume, and progress updates without polling.

FieldTypeRequiredDescription
state"off" | "on" | "idle" | "playing" | "paused" | "buffering" | "standby"yesPlayback lifecycle state.
stateSource"reported" | "assumed"no (default "reported")Whether the state fields are readings or the driver's own bookkeeping. A slice written before this field existed parses as reported.
assumedFields("state" | "volumeLevel" | "isMuted" | "source")[]no (default [])Which fields are the driver's own guess. stateSource is assumed when this is not empty; a field not listed here is a reading even then (power from a running-state source, mute guessed from the last send).
volumeLevelnumber | nullyesVolume as 0..100 inclusive. Null when the device has no volume surface. Pair with DeviceFeature.MediaPlayerVolume.
isMutedboolean | nullyesMute toggle distinct from volume=0. Null when no mute surface. Pair with DeviceFeature.MediaPlayerMute.
muteReadbackbooleannoTrue only when the provider READS the mute state back from the device. Absent or false: mute is a momentary key. A non-null isMuted is not a reading on its own — an infrared send can leave a value without this flag.
sourcestringyesActive source / input. Empty when no source surface.
availableSourcesstring[]yesSelectable sources. Empty when no source surface. Pair with DeviceFeature.MediaPlayerSelectSource.
declaredSources({ name: string; kind: "digits" | "sequence" | "ir"; number?: string })[]noWhat each declared source IS, when the sources are the operator's own (a remote, planning#460): an exporter offers a channel by number only for a digits source and an input only for a sequence one. Absent when the player's sources are its own.
currentMedia{ type: string; title: string; artist?: string; album?: string; imageUrl?: string } | nullyesCurrently-playing media info. Null when nothing is playing.
positionnumber | nullyesCurrent playback position in ms. Null when not seekable or nothing is playing. Pair with DeviceFeature.MediaPlayerSeek.
durationnumber | nullyesTotal duration of the current media in ms. Null when unknown (live stream) or nothing is playing.
shuffleboolean | nullyesShuffle toggle. Null when no shuffle surface. Pair with DeviceFeature.MediaPlayerShuffle.
repeat"off" | "all" | "one" | nullyesRepeat mode. Null when no repeat surface. Pair with DeviceFeature.MediaPlayerRepeat.
positionUpdatedAtnumber | nullno (default null)Ms epoch when position was read from the device. Null when the driver does not say; a UI that advances the position while playing counts from it.
lastChangedAtnumberyesMs epoch when the slice was last updated.