If you find this useful,
Blog
Back to Blog

OpenClaw Sonos: Control Your Multi-Room Audio System with AI

· by Trellis

Control Sonos speakers with OpenClaw. Multi-room audio, playlists, grouping, volume control through Telegram, WhatsApp, or Discord. Setup takes 5 minutes.

Most people control Sonos speakers through their phone. Unlock the screen, open the app, navigate to the right room, pick a playlist. It works, but it’s four steps when you just want music in the kitchen.

OpenClaw lets you skip all that. Install the Sonos skill, send a message to your AI agent, and your speakers do what you asked. No app switching, no navigation, no tapping through menus.

This guide shows you how to set up OpenClaw Sonos control in five minutes. By the end, you’ll be controlling your entire multi-room system through natural language commands.


What OpenClaw Sonos Control Does

OpenClaw is an open-source AI agent framework with 145,000+ GitHub stars and access to 3,500+ skills. The Sonos skill connects your agent to your Sonos system through the Sonos Control API.

Once configured, you can:

  • Play music in specific rooms
  • Control volume across multiple speakers
  • Group and ungroup speakers for party mode
  • Manage playlists from Spotify, Apple Music, or your local library
  • Check what’s currently playing
  • Pause, skip, and control playback
  • Set up multi-room audio zones

All through your messaging app of choice: Telegram, WhatsApp, Discord, or Signal.


Feature Comparison

FeatureSonos AppOpenClaw SonosHome Assistant
Room selectionManual navigationNatural languageScene-based
Multi-room grouping3+ tapsOne commandAutomation rules
Voice controlAlexa/Google requiredBuilt-in via messagingTTS integration
Playlist accessFull libraryFull libraryFull library
Custom commandsNoUnlimitedYes, via YAML
Setup time2 minutes5 minutes20-60 minutes
Remote controlIn-network onlyAnywhere via messagingVPN required

The Sonos app wins on polish. OpenClaw wins on flexibility and remote access. Home Assistant wins if you’re building a full smart home automation system.

For most users, OpenClaw hits the sweet spot: simpler than Home Assistant, more powerful than the Sonos app.


What You Need

Before starting:

  1. OpenClaw installed — If you haven’t set up OpenClaw yet, follow our Getting Started guide. Takes 10 minutes.

  2. A Sonos system — Any Sonos speaker or set of speakers on your local network.

  3. A messaging channel — Telegram, WhatsApp, Discord, or Signal connected to your OpenClaw agent.

  4. Sonos Control API access (optional) — The basic setup uses local network discovery. For remote control outside your home network, you’ll need the Sonos Control API with OAuth2 credentials.

That’s it. No Sonos developer account required for basic functionality.


Installation: Two Approaches

OpenClaw offers two ways to control Sonos speakers. Pick the one that matches your use case.

The sonoscli skill uses command-line tools to control Sonos speakers on your local network. Zero API configuration, works in 60 seconds.

Install it:

clawhub install sonoscli

That’s the entire setup. The skill uses the SoCo library to discover and control Sonos devices automatically. If your OpenClaw agent can reach your speakers over the network, it works.

Limitations:

  • Only works when your agent is on the same network as your speakers
  • No remote control from outside your home
  • Requires Sonos devices to be discoverable on your LAN

Approach 2: Sonos Control API (For Remote Access)

If you want to control your speakers from anywhere, use the official Sonos Control API. This requires OAuth2 setup but gives you full remote access.

Step 1: Create a Sonos Integration

  1. Go to the Sonos Developer Portal
  2. Create a new integration
  3. Note your Client ID and Client Secret
  4. Add your redirect URI (usually http://localhost:8080/callback for local testing)

Step 2: Set Up OAuth2

The Sonos API uses OAuth2 for authentication. You’ll need to:

  1. Generate an authorization URL with your Client ID
  2. Authorize the integration with your Sonos account
  3. Exchange the authorization code for access and refresh tokens
  4. Store the tokens in your OpenClaw environment

This is the technical part. The full OAuth2 flow is documented in the Sonos API docs.

Step 3: Configure OpenClaw

Add your Sonos API credentials to your environment:

export SONOS_CLIENT_ID=your_client_id
export SONOS_CLIENT_SECRET=your_client_secret
export SONOS_REFRESH_TOKEN=your_refresh_token

Then install a custom Sonos API skill (you’ll need to create a SKILL.md that handles the Sonos Control API endpoints).

When to use this approach:

  • You travel frequently and want to control music remotely
  • You’re building automation that needs to work outside your home network
  • You want programmatic access to Sonos features beyond what sonoscli offers

For most users, sonoscli is simpler and sufficient.


Basic Commands

Once sonoscli is installed, try these commands through your messaging app:

Play Music

Play jazz in the living room

Your agent discovers the “living room” speaker and starts playing jazz from your default music service.

Control Volume

Set kitchen volume to 40%
Turn up the bedroom speakers

Volume commands work per-room or globally.

Multi-Room Audio

Play the same music in the kitchen and dining room

This groups the two speakers and syncs playback.

Check Status

What's playing in the living room?

Returns the current track, artist, album, and playback status.

Pause and Resume

Pause the living room
Resume the bedroom

Skip Tracks

Skip to the next song in the kitchen

Multi-Room Configurations

Multi-room audio is where Sonos shines. OpenClaw makes it easier to control.

Party Mode: Group Everything

Group all speakers and play party playlist

Creates a single zone with all discoverable Sonos devices, then plays your party playlist across all of them.

Custom Zones

Create a zone with the living room, kitchen, and patio speakers
Play chill music in that zone at 30% volume

Ungroup Speakers

Ungroup all speakers

Breaks all zones back into individual rooms.

Per-Room Volume in a Group

Even when speakers are grouped, you can adjust individual room volumes:

Turn down the kitchen but keep the living room the same

Playlist and Music Service Integration

Sonos supports multiple music services. OpenClaw inherits that support.

Spotify

If Spotify is your default service in Sonos:

Play my Discover Weekly playlist in the bedroom
Play songs by Radiohead in the living room

Apple Music

Play my Apple Music favorites in the kitchen

Local Library

Play tracks from my library in the office

Radio and Podcasts

Play NPR in the kitchen
Play the latest episode of [podcast name]

Sonos handles the service routing. Your agent just sends the command.


Home Assistant Integration (Alternative Approach)

If you’re already using Home Assistant for smart home control, you can integrate Sonos through that instead of OpenClaw.

Home Assistant offers:

  • Automations triggered by time, sensors, or other devices
  • Scene-based control (e.g., “movie mode” dims lights and sets speaker volume)
  • TTS (text-to-speech) announcements through Sonos speakers
  • Integration with 3,000+ other smart home devices

To use Home Assistant with OpenClaw:

  1. Set up the Sonos integration in Home Assistant
  2. Install the Home Assistant skill for OpenClaw
  3. Control Sonos through Home Assistant’s API via your agent

This adds complexity but gives you a unified smart home control plane. Worth it if you’re managing more than just speakers.


Advanced Use Cases

Morning Routine

Create a routine that:

  1. Groups kitchen and bathroom speakers
  2. Plays news radio at 25% volume
  3. Gradually increases volume over 10 minutes

Command:

Start my morning routine

You’d define the routine steps in your agent’s configuration or as a custom skill script.

Dinner Music Automation

When it's 6 PM on weekdays, play jazz in the dining room at 20% volume

This requires a scheduler skill (like cron integration) paired with Sonos commands.

Guest Mode

Set guest mode: pause music when the doorbell rings

Pair Sonos control with a smart doorbell integration. When the doorbell triggers, your agent pauses all speakers automatically.


Troubleshooting

”Speaker not found”

Your agent can’t discover the speaker. Common fixes:

  1. Verify your Sonos speaker is on the same network as your OpenClaw agent
  2. Check that network discovery isn’t blocked by firewall rules
  3. Restart the Sonos speaker and try again
  4. Run sonos discover manually to see what devices are visible

”No music service configured”

Sonos needs at least one music service set up. Open the Sonos app, go to Settings > Services & Voice, and add Spotify, Apple Music, or another service.

”OAuth token expired”

If you’re using the Sonos Control API, your refresh token expired. Re-authenticate through the Sonos Developer Portal and update your environment variables.

Commands work locally but not remotely

sonoscli only works on your local network. For remote control, switch to the Sonos Control API approach with OAuth2.


Security Considerations

Local Network Control

sonoscli sends commands over your local network. Anyone on your LAN can discover and control your Sonos speakers. This is true for the Sonos app as well.

Best practices:

  • Use WPA3 encryption on your Wi-Fi
  • Segment IoT devices onto a separate VLAN if possible
  • Don’t expose your OpenClaw agent to the public internet

API Credentials

If you use the Sonos Control API:

  • Store credentials in environment variables, not in code
  • Use refresh tokens instead of long-lived access tokens
  • Rotate credentials periodically
  • Don’t commit API keys to version control

Messaging App Security

Your agent responds to commands from your messaging app. Make sure:

  • Only trusted users have access to your agent’s messaging account
  • Enable two-factor authentication on your messaging platform
  • Use end-to-end encrypted channels (Signal, WhatsApp) when possible

Comparison: OpenClaw vs. Voice Assistants

You can already control Sonos through Alexa or Google Assistant. Why use OpenClaw?

FeatureAlexa/GoogleOpenClaw
Wake word requiredYesNo
PrivacyCloud-processedSelf-hosted
Custom commandsLimitedUnlimited
Multi-step commandsSimple onlyComplex workflows
Remote accessThrough appThrough messaging
Integration with other skillsPlatform-locked3,500+ skills
CostFree or $4-10/monthFree (API costs only)

Voice assistants win on convenience. OpenClaw wins on privacy, flexibility, and remote access.

If you’re already using OpenClaw for other tasks, adding Sonos control is a one-line install. If you’re only controlling speakers, Alexa or Google might be simpler.


What to Try Next

Once you have Sonos working with OpenClaw, extend your setup:

Smart Home Integration

Control lights, thermostats, and speakers together. See our guides:

Media Skills

Combine Sonos with other media tools:

  • tube-summary — Summarize YouTube videos, then play the audio through Sonos
  • spotify-mcp — Advanced Spotify playlist management

Voice to Text

Use elevenlabs-skill for TTS announcements through your Sonos speakers. Have your agent read notifications, calendar events, or news summaries out loud.


FAQ

Does this work with Sonos Arc, Beam, or soundbars?

Yes. Any Sonos device that shows up in the Sonos app works with OpenClaw.

Can I control Sonos speakers outside my home?

Only if you use the Sonos Control API with OAuth2. sonoscli requires local network access.

Does this support Sonos S1 systems?

sonoscli should work with S1 speakers as long as they’re on your network. The Sonos Control API only supports S2.

What music services are supported?

Whatever you’ve configured in your Sonos app. Spotify, Apple Music, Amazon Music, Tidal, YouTube Music, and dozens more.

Can multiple people control the same Sonos system?

Yes, as long as they’re messaging the same OpenClaw agent. Each person sends commands through their messaging app.

Does this drain my Sonos battery?

Sonos speakers don’t have batteries (except the Roam and Move). For portable speakers, this uses the same amount of power as controlling them through the Sonos app.


Summary

OpenClaw Sonos control gives you:

  • Natural language commands for your speakers
  • Multi-room audio control from any messaging app
  • Remote access when you’re away from home
  • Integration with 3,500+ other OpenClaw skills
  • No subscription fees or cloud dependencies

Setup takes five minutes with sonoscli for local control, or 20 minutes if you configure the Sonos Control API for remote access.

Install the skill:

clawhub install sonoscli

Start your agent:

openclaw start

Then send a message:

Play jazz in the living room

If you haven’t set up OpenClaw yet, start with our Getting Started guide. Once your agent is running, adding Sonos is a one-line install.

For more smart home skills, check the Smart Home category or browse the best OpenClaw skills of 2026.