Scenes
A scene is a named snapshot of your Sonos system: which speakers are grouped, who is the coordinator of each group, and what volume / mute each room is at. Save one when the house feels right, restore it on demand.
#Save what you have right now
sonos scene save evening
This walks the live topology, snapshots every visible zone (and its members, volume, and mute), and stores the scene under your config directory.
#List, apply, delete
sonos scene list
sonos scene apply evening
sonos scene delete evening
Apply is idempotent. It stops and reports any speaker command failure; already completed changes are not rolled back.
#Targeting one room (experimental)
sonos scene apply evening --only "Kitchen"
Only restores the parts of the scene that involve the named room. Useful when you don't want to disturb other zones.
#What's captured (and what isn't)
Captured:
- Grouping (coordinator + members) per zone
- Per-room volume (0โ100)
- Per-room mute state
Not captured:
- Currently playing track or queue contents
- EQ / loudness / surround levels
- Bonded satellite topology (preserved but not edited)
If you want a scene that also re-loads a queue, save the queue separately (e.g. capture a Spotify URI) and chain commands in a shell script:
sonos scene apply evening
sonos open --name "Living Room" spotify:playlist:37i9dQZF1DXcBWIGoYBM5M
#How apply works
- Read current topology.
- Compute the diff against the saved scene.
- Dissolve groups that conflict.
- Re-create the saved groups (each member joins the saved coordinator).
- Re-apply per-room volume and mute.
Speakers absent from the current topology are skipped. A command failure on a visible speaker stops the apply operation and returns an error.
#File layout
Scenes live alongside your config:
<user-config-dir>/sonoscli/scenes.json
The format is intentionally readable and stable; you can hand-edit a scene file if you really want to.
Saving a scene fails without replacing the saved file if any volume or mute read fails. Use --ip <speaker-ip> with save or apply to read topology directly from that speaker, bypassing discovery.