Commands

sonos favorites

sonos favorites

Lists and plays Sonos Favorites — the FV:2 container in ContentDirectory.

sonos favorites list [--start N] [--limit N]
sonos favorites open --name "<Room>" [<title>] [--index <n>]

#sonos favorites list

sonos favorites list
sonos favorites list --limit 10
sonos favorites list --format json | jq -r '.[].title'
FlagDefaultWhat it does
--start int0Starting index (0-based).
--limit int50Max results.

#sonos favorites open

Plays a favorite by exact title (case-insensitive) or by 1-based index from sonos favorites list.

sonos favorites open --name "Kitchen" "Morning Coffee"
sonos favorites open --name "Kitchen" --index 3

Tip: for services where direct CLI search/playback is not available, such as YouTube Music, save the album or playlist as a Sonos Favorite in the Sonos app, then open that favorite from sonoscli.

#How it works

  • list calls ContentDirectory.Browse(ObjectID=FV:2) and parses the DIDL-Lite favorites.
  • open resolves the favorite. Stream and track favorites are sent directly with AVTransport.SetAVTransportURI, then Play.
  • Container favorites such as service-side albums and playlists use the Sonos queue path: clear the queue, enqueue the container with AddURIToQueue, switch playback to the queue, seek to the first enqueued track, then Play.