Skip to main content
RapidDev - Software Development Agency

How to Install and Use Sonoscli in OpenClaw

To control Sonos speakers from OpenClaw, run `clawhub install sonoscli`, let the skill auto-discover your speakers on the local network, and start issuing playback commands in OpenClaw chat. No API key required — SonosCLI discovers speakers automatically via mDNS on your local network. Once connected, you can play, pause, set volume, group rooms, manage queues, and control individual speakers using plain English.

What you'll learn

  • How to install the sonoscli ClawHub skill and auto-discover Sonos speakers on your network
  • How to play, pause, skip, and adjust volume on individual speakers or speaker groups from OpenClaw chat
  • How to create and manage Sonos speaker groups (grouped rooms) from OpenClaw
  • How to manage the speaker queue — add songs, clear the queue, and control playback order
  • How to troubleshoot Sonos discovery and playback issues
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner12 min read5 minutesSmart HomeMarch 2026RapidDev Engineering Team
TL;DR

To control Sonos speakers from OpenClaw, run `clawhub install sonoscli`, let the skill auto-discover your speakers on the local network, and start issuing playback commands in OpenClaw chat. No API key required — SonosCLI discovers speakers automatically via mDNS on your local network. Once connected, you can play, pause, set volume, group rooms, manage queues, and control individual speakers using plain English.

Control Every Sonos Speaker From OpenClaw Chat

Sonos speakers are already the gold standard for multi-room audio, and the sonoscli skill brings that capability into OpenClaw's natural language interface. Rather than pulling out your phone to open the Sonos app every time you want to adjust volume or change what is playing, you tell OpenClaw what you want — and it routes the command to the correct speaker or group of speakers instantly.

The biggest advantage of the sonoscli skill is its zero-configuration discovery. Sonos speakers announce themselves on the local network via mDNS, and the skill finds them automatically when OpenClaw starts up. Unlike most hardware integrations, you do not need to find IP addresses, generate API keys, or press pairing buttons. Run `clawhub install sonoscli`, reload OpenClaw, and your speakers are immediately accessible by the room names you configured in the Sonos app.

Speaker grouping is where the skill really shines. Sonos's multi-room grouping feature lets you synchronize playback across multiple speakers with perfectly matched audio — no echo, no delay. From OpenClaw, you can group and ungroup speakers conversationally: 'group the kitchen and living room speakers and play jazz' creates a synchronized group and starts playback, all in one prompt. This matches how you naturally think about home audio and eliminates the multi-step process of grouping speakers manually in the Sonos app.

Integration method

ClawHub Skill

The sonoscli skill is a native ClawHub skill that communicates with Sonos speakers directly over your local network using Sonos's local HTTP API and UPnP/SOAP protocols. It auto-discovers all Sonos devices on the network via mDNS — no API key, no Sonos account, and no cloud access required. OpenClaw communicates with speakers directly within your local network for low-latency, internet-independent audio control.

Prerequisites

  • OpenClaw installed and running (see openclaw.ai for installation instructions)
  • ClawHub CLI available in your terminal (comes bundled with OpenClaw)
  • Sonos speakers already set up and connected to your Wi-Fi network via the Sonos app
  • OpenClaw running on the same local network as your Sonos speakers (mDNS discovery requires same network segment)
  • Speakers assigned room names in the Sonos app (the skill uses these names for identification)

Step-by-step guide

1

Install the sonoscli Skill via ClawHub

Open your terminal and run the ClawHub install command. The sonoscli skill uses Sonos's local UPnP API and mDNS discovery to find and control speakers — no API key or external service is required. The installation adds the full Sonos control capability to OpenClaw. After installation, the skill automatically runs a network scan when OpenClaw loads to discover all Sonos speakers. This discovery runs once on startup and caches the speaker list. If you add new Sonos speakers later, run `clawhub run sonoscli discover` to refresh the speaker inventory. The skill requires no mandatory configuration keys — it is the only smart home skill in this guide that works out of the box after installation with no additional setup steps. OpenClaw and your Sonos speakers just need to be on the same local network.

terminal
1clawhub install sonoscli
2
3# After installing, manually trigger discovery to see available speakers:
4clawhub run sonoscli discover

Pro tip: Run `clawhub run sonoscli discover` after installation to see a list of all discovered Sonos speakers and their room names. This confirms the skill found your speakers before you try using OpenClaw chat commands.

Expected result: Terminal shows: 'sonoscli@X.X.X installed successfully.' Running `clawhub run sonoscli discover` lists all Sonos speakers on the network with their room names and current status.

2

Verify Speaker Discovery in OpenClaw Chat

Open OpenClaw chat and ask it to list your Sonos speakers. The skill maps Sonos room names to the speakers — the same names you see in the Sonos app for each room. If your Sonos app shows a speaker named 'Living Room', you can reference it in OpenClaw as 'living room speaker' or just 'living room'. If the discovery returns no speakers, the most common cause is that OpenClaw is not on the same network segment as the Sonos speakers. Sonos mDNS discovery requires the device running OpenClaw and the Sonos speakers to be on the same subnet. If you are using a VPN, Docker network, or separate VLAN, mDNS packets may not traverse the network boundary. For setups where mDNS cannot reach the speakers, you can manually specify speaker IPs in the skill's YAML configuration as a fallback. See Step 5 for the manual IP configuration approach.

OpenClaw Prompt

List all my Sonos speakers and their current playback status — what is playing on each one and what volume are they set to?

Paste this in OpenClaw chat

Pro tip: Speaker names in OpenClaw are case-insensitive and forgiving of minor variations — 'living room', 'Living Room', and 'livingroom' all resolve to the same speaker. Use whatever phrasing feels natural.

Expected result: OpenClaw returns a list of all Sonos speakers with their room names, current playback state (playing/paused/stopped), current track information, and volume levels.

3

Test Playback Control Commands

With speakers discovered, test the core playback controls. The sonoscli skill supports the full range of Sonos playback operations: play, pause, stop, skip to next track, go back to previous track, jump to a specific position in the queue, set volume (absolute or relative), set mute, and more. For speaker-specific commands, include the room name in your prompt. For commands you want to apply to all speakers, use 'all speakers' or 'everywhere'. For grouped speakers, you can reference the group by the coordinator speaker's room name. Volume can be set as an absolute level (0-100) or relatively ('turn it up a bit', 'increase volume by 20'). The skill understands descriptive volume terms: 'quiet', 'medium', 'loud', 'max' all map to reasonable percentage values.

OpenClaw Prompt

Play the living room Sonos speaker, set it to 50% volume, and tell me what song is currently queued.

Paste this in OpenClaw chat

Pro tip: If you want to play a specific song or playlist, the skill integrates with Sonos-connected music services. Say 'play jazz on the living room speaker' and Sonos plays from your connected streaming service. For specific tracks, name the song and artist: 'play Hotel California by Eagles in the kitchen'.

Expected result: The living room speaker begins playing at 50% volume. OpenClaw confirms the current track title, artist, and the items in the queue.

4

Create and Manage Speaker Groups

Sonos's multi-room grouping capability is one of its standout features, and OpenClaw makes it conversational. When you group speakers, Sonos synchronizes playback across all grouped speakers with zero latency mismatch — all rooms play in perfect sync. To create a group, tell OpenClaw which speakers to group together. OpenClaw designates the first speaker you mention as the coordinator (it becomes the group leader whose queue and transport controls apply to the whole group). The other speakers in the group follow the coordinator. To ungroup speakers and return them to independent control, ask OpenClaw to 'separate' or 'ungroup' specific speakers. You can also disband an entire group at once. Sonos supports 'stereo pairing' (two speakers in the same room as a left/right stereo pair) — this is different from grouping and is configured in the Sonos app, not via OpenClaw. Once paired in stereo, they appear as a single entity in OpenClaw.

OpenClaw Prompt

Group the kitchen and dining room Sonos speakers together and play my Morning playlist on them at 35% volume.

Paste this in OpenClaw chat

Pro tip: Grouped speakers all follow the coordinator's queue and transport state. If you want to play something different in one room, ungroup it first: 'remove the kitchen from the group but keep the dining room playing'.

Expected result: The kitchen and dining room speakers form a synchronized group playing the Morning playlist at 35% volume. OpenClaw confirms the group composition and current track.

5

Advanced Configuration and Manual Speaker IP Setup

For most setups, the auto-discovery in Steps 1-2 is sufficient. This step covers optional advanced configuration for edge cases: manual IP setup for networks where mDNS does not work, custom speaker aliases, and discovery refresh intervals. If mDNS discovery fails due to network segmentation, you can manually specify speaker IP addresses in the skill's YAML configuration. The Sonos app shows IP addresses under System > About My System — each speaker entry shows its IP. You can also create aliases for speakers so you can use shorter or different names in OpenClaw commands. For example, aliasing 'Living Room' to 'LR' lets you say 'turn up LR' for faster commands. RapidDev recommends the manual IP approach for home setups with separate VLANs for IoT devices — a common security configuration that separates smart home devices from computers on the network. In this case, configure the speaker IPs manually and ensure OpenClaw's host machine can reach the speaker VLAN on port 1400.

OpenClaw Prompt

Show me all current Sonos speaker groups and whether any speakers are not part of a group.

Paste this in OpenClaw chat

~/.openclaw/skills/sonoscli.yaml
1# ~/.openclaw/skills/sonoscli.yaml optional advanced configuration
2sonoscli:
3 discovery_method: auto # auto (mDNS) or manual
4 discovery_refresh: 300 # Seconds between auto re-discovery (default: 5 min)
5 # Manual speaker configuration (use when mDNS fails)
6 speakers:
7 living_room:
8 ip: "192.168.1.60"
9 name: "Living Room"
10 kitchen:
11 ip: "192.168.1.61"
12 name: "Kitchen"
13 bedroom:
14 ip: "192.168.1.62"
15 name: "Bedroom"
16 # Optional: create aliases for speaker names
17 aliases:
18 lr: "living_room"
19 downstairs: ["living_room", "kitchen", "dining_room"]

Pro tip: Sonos speakers communicate on port 1400 for their local API. If you are using a firewall between OpenClaw and your speakers, ensure port 1400 is open for both inbound and outbound traffic.

Expected result: Speaker discovery and control work reliably, either via auto-discovery or manual IP configuration. All speaker commands from OpenClaw chat apply to the correct physical speakers.

Common use cases

Room-by-Room Playback Control

Control playback independently on different speakers throughout your home. Start different music in different rooms, skip tracks in the kitchen while dinner plays uninterrupted in the living room, or turn off a specific speaker without affecting others.

OpenClaw Prompt

Pause the kitchen speaker, turn up the living room speaker to 60%, and skip to the next track in the bedroom.

Copy this prompt to try it in OpenClaw

Multi-Room Audio Grouping

Group speakers to synchronize playback across multiple rooms simultaneously. OpenClaw handles the group creation and starts playing in one command, or break up existing groups back into independent speakers.

OpenClaw Prompt

Group all the downstairs speakers together and play my 'Dinner Party' playlist on them at 40% volume.

Copy this prompt to try it in OpenClaw

Queue Management

Add songs, albums, or playlists to the speaker queue, clear the queue to start fresh, or rearrange queue order — all from OpenClaw chat without opening the Sonos app.

OpenClaw Prompt

What is currently playing on the living room speaker? Add 'Kind of Blue' by Miles Davis to the end of the queue.

Copy this prompt to try it in OpenClaw

Troubleshooting

OpenClaw returns 'no Sonos speakers found' or the speaker list is empty

Cause: OpenClaw and the Sonos speakers are on different network segments (different subnets or VLANs), or mDNS traffic is being blocked by a firewall or router setting.

Solution: Verify OpenClaw's host machine can ping the Sonos speaker's IP directly. If mDNS discovery is blocked, configure manual IPs in `~/.openclaw/skills/sonoscli.yaml` under the `speakers` key. Alternatively, enable mDNS bridging in your router settings to allow mDNS across subnets.

typescript
1# Check if you can reach the Sonos speaker directly
2ping 192.168.1.60
3
4# If reachable, manually configure IPs in sonoscli.yaml
5# (see Step 5 for the full configuration format)

clawhub install sonoscli fails with '429 Too Many Requests'

Cause: ClawHub's registry is experiencing temporary rate limiting.

Solution: Wait 2-3 minutes and retry. Use `--force` to clear any partial install.

typescript
1clawhub install sonoscli --force

OpenClaw can find speakers but playback commands return 'command failed' or no response from speaker

Cause: The Sonos speaker is in a state that rejects the command — for example, playing from an external source (line-in, TV audio), or the speaker is in a group where the coordinator is not the one receiving the command.

Solution: Ask OpenClaw to get the current state of the speaker: 'what is the status of the living room speaker?' If it is playing from an external source, OpenClaw may need to switch the source first: 'switch the living room to Sonos queue mode'. For grouped speakers, target commands at the group coordinator speaker.

Newly added Sonos speakers are not recognized by OpenClaw

Cause: The skill's speaker discovery cache was built before the new speaker was added to the network.

Solution: Run `clawhub run sonoscli discover` to force a fresh discovery scan. If using manual IP configuration, add the new speaker's IP to the `~/.openclaw/skills/sonoscli.yaml` speakers list.

typescript
1# Force rediscovery
2clawhub run sonoscli discover

Best practices

  • Give Sonos speakers meaningful room names in the Sonos app — 'Kitchen', 'Living Room', 'Master Bedroom' — because OpenClaw uses these names to identify speakers in commands.
  • Use the `downstairs`/`upstairs` type aliases in the skill YAML config to create convenient shorthand for groups of speakers you frequently control together.
  • Run `clawhub run sonoscli discover` after adding new Sonos speakers to your network to update OpenClaw's speaker inventory without restarting.
  • For IoT VLAN setups where mDNS is blocked, use manual IP configuration in the YAML config rather than trying to reconfigure your network — manual IPs are just as reliable and more predictable.
  • Set a static DHCP reservation for each Sonos speaker in your router to prevent IP address changes from breaking manual IP configuration.
  • Combine the sonoscli skill with openhue or home-assistant for coordinated scene control — one OpenClaw prompt can set a lighting scene and start the right music simultaneously.
  • When grouping speakers for a party, use a single prompt to create the group and set the volume — 'group all speakers and play at 50%' is more reliable than issuing multiple sequential commands.

Alternatives

Frequently asked questions

How do I install the sonoscli skill in OpenClaw?

Run `clawhub install sonoscli` in your terminal. No API key or manual configuration is required — the skill automatically discovers Sonos speakers on your local network. Run `clawhub run sonoscli discover` to confirm your speakers are found, then start using speaker commands in OpenClaw chat.

Does the OpenClaw Sonos integration require an API key?

No — the sonoscli skill communicates directly with Sonos speakers via their local network API and auto-discovers them using mDNS. No Sonos account, no Sonos API key, and no cloud account are required. OpenClaw and your Sonos speakers just need to be on the same local network.

How do I configure OpenClaw to find my Sonos speakers?

Speakers are found automatically via mDNS discovery when the sonoscli skill is installed — no configuration required for most setups. If auto-discovery fails (common with IoT VLANs or VPN setups), add manual speaker IPs to `~/.openclaw/skills/sonoscli.yaml` under the `speakers` key. Find speaker IPs in the Sonos app under System > About My System.

ClawHub install sonoscli is not working — what should I do?

Check that the skill name is `sonoscli` (all lowercase, no spaces). If the install fails with a network error, wait a few minutes and retry — ClawHub's registry occasionally has brief rate limits. Run `clawhub install sonoscli --force` to clear any partial installation state before retrying.

Why is OpenClaw not finding my Sonos speakers?

The most common cause is network segmentation — OpenClaw's host machine and the Sonos speakers are on different subnets or VLANs. Verify you can ping a Sonos speaker's IP from OpenClaw's machine. If mDNS is blocked, configure manual IPs in `~/.openclaw/skills/sonoscli.yaml`. If you recently added a new speaker, run `clawhub run sonoscli discover` to refresh the discovery cache.

Does RapidDev offer help with OpenClaw Sonos configuration?

Yes — RapidDev can assist with configuring the sonoscli skill for complex network setups, particularly IoT VLAN configurations where mDNS discovery does not work. The self-serve setup covers most home network configurations; users with advanced networking needs can reach out to RapidDev for configuration support.

Can I control Sonos speaker groups from OpenClaw?

Yes — the sonoscli skill supports creating, managing, and disbanding Sonos speaker groups from OpenClaw chat. Tell OpenClaw which speakers to group together and it creates a synchronized group. You can also add or remove individual speakers from existing groups, and disband all groups to return every speaker to independent control.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.