Audio Integration
OpenClaw + Sonos
Control speakers, manage groups, and play music from your AI assistant.
Category
Audio
Setup Time
~5 minutes
What you can do
- Play/pause music
- Adjust volume
- Group/ungroup speakers
- See what's playing
Setup Guide
Prerequisites
- OpenClaw running (see our deployment guide)
- At least one Sonos speaker on your network
- Sonos S2 app (for initial setup)
Step 1: Enable Local Control
- Open the Sonos S2 app
- Go to Settings → System
- Ensure your speakers are on the same network as OpenClaw
- Note the IP address of your primary speaker
Step 2: Find Your Speaker IP
Use one of these methods:
From Sonos App:
- Settings → System → Select a room
- Find the IP under "About"
Via Network Scan:
# Scan for Sonos devices (port 1400)
nmap -p 1400 --open 192.168.1.0/24
Via UPnP Discovery:
# From a machine on the same network
gupnp-discover | grep -i sonos
Step 3: Test the Connection
# Get speaker info
curl "http://SPEAKER_IP:1400/xml/device_description.xml"
# List available services
curl "http://SPEAKER_IP:1400/status/services"
Configuration
Add the Sonos integration to your OpenClaw config:
# In your openclaw config
integrations:
sonos:
enabled: true
discovery: "local" # Auto-discover on network
# Or specify speakers directly:
speakers:
- name: "Living Room"
ip: "192.168.1.100"
- name: "Bedroom"
ip: "192.168.1.101"
Or via environment variables in your docker-compose.yml:
environment:
- SONOS_ENABLED=true
- SONOS_DISCOVERY=local
For Docker networking, ensure OpenClaw can reach your local network:
# Option 1: Host networking
services:
openclaw:
network_mode: host
# Option 2: Bridge with access (if supported)
services:
openclaw:
networks:
- sonos_net
networks:
sonos_net:
driver: bridge
ipam:
config:
- subnet: 192.168.1.0/24
Step 4: Verify and Test
Try asking OpenClaw to control Sonos:
"Play music in the living room"
"Pause all speakers"
"Set volume to 50% in bedroom"
"What's playing in the kitchen?"
"Group all speakers together"
Check logs for API activity:
docker compose logs -f openclaw | grep -i sonos
Common Issues
Speaker not found: Ensure OpenClaw and Sonos are on the same network. Docker containers may need network_mode: host to discover speakers.
Connection refused: Some Sonos firmware versions changed the API. Update your speakers via the Sonos app.
Commands not working: The local API uses UPnP/SOAP. Some actions require specific service calls. Check OpenClaw logs for error details.
Grouping issues: Sonos groups are managed dynamically. Changes may take a few seconds to reflect.
Frequently Asked Questions
Does OpenClaw work with Sonos?
Yes — OpenClaw integrates with Sonos via the local UPnP/SOAP API. It can control playback, adjust volume, and manage speaker groups. Setup takes about 5 minutes.
Is the Sonos integration free?
Yes. Sonos local control is free and doesn't require any subscription. It works entirely on your local network.
How do I set up Sonos with OpenClaw?
Find your Sonos speaker IPs, ensure they're on the same network as OpenClaw, configure the integration with discovery enabled or specific IPs, and test the connection.
Does it work with Sonos S1 or S2?
Yes, both S1 and S2 speakers work with the local API. The integration is compatible with any Sonos speaker that supports local control.
Can OpenClaw play specific songs or playlists?
OpenClaw can control playback (play, pause, skip, volume) but selecting specific songs requires integration with a music service like Spotify, which can then play to Sonos.
Ready to set up Sonos?
Follow our free guide to deploy OpenClaw and connect Sonos in minutes.
Official docs: https://docs.openclaw.ai/channels