sonos-announce
Play audio on Sonos with intelligent state restoration - pauses streaming, skips Line-In/TV/Bluetooth, resumes everything.
Why use this skill?
Integrate OpenClaw with Sonos speakers to play audio announcements with intelligent state restoration. Automatically pause music, play sounds, and resume your stream.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/clawdianova/sonos-announceWhat This Skill Does
The sonos-announce skill is a sophisticated audio integration for OpenClaw that enables intelligent playback control over Sonos speaker systems. Unlike simple audio players, this skill implements an advanced state-restoration mechanism. When triggered, it captures the current state of your Sonos devices—including track position, playlist queue, and active transport states—pauses the ongoing music or audio, plays your specified announcement or sound effect, and then intelligently resumes the previous state. It is designed to be "smart" regarding inputs: it correctly identifies and skips fixed inputs like TV, Bluetooth, or Line-In, ensuring that your announcements do not disrupt hardware-linked sources, while seamlessly returning to your Spotify, Tidal, or local library streams once finished.
Installation
To get started with sonos-announce, you must ensure your environment meets the dependency requirements. First, install the core Python library for Sonos communication:
pip install soco
Additionally, the skill relies on ffmpeg, specifically the ffprobe utility, to accurately calculate audio duration, which is crucial for managing the restoration timing. Ensure ffmpeg is installed on your system path. For installation via the OpenClaw ecosystem, use the command: clawhub install openclaw/skills/skills/clawdianova/sonos-announce. Configure your LAN settings by setting SONOS_HTTP_HOST and SONOS_HTTP_PORT as environment variables if your network setup requires specific routing for the media streaming server.
Use Cases
- Smart Home Notifications: Integrate with home security or sensor systems to play custom voice alerts (e.g., "Back door opened") through your whole-house audio system.
- Soundboard Interaction: Use this for interactive AI agents that require expressive audio feedback, such as playing a rimshot for a joke or a chime for a completed task.
- Automated Reminders: Schedule audio-based calendar reminders or timers that interrupt your music playback without losing your place in a podcast or album.
Example Prompts
- "OpenClaw, announce that dinner is ready on the kitchen speaker."
- "Play the soundboard airhorn effect to celebrate the project completion."
- "OpenClaw, notify me when the laundry is done by playing my 'finished' chime on the Sonos system."
Tips & Limitations
- Pre-Processing: This skill does not generate audio itself; it is strictly a playback handler. Ensure your TTS engine or audio files are rendered to a compatible format before calling
announce(). - Network Stability: Because the skill hosts a temporary local HTTP server to stream files to the Sonos hardware, ensure the device running OpenClaw is on the same subnet as your Sonos speakers to avoid firewall blocking.
- Wait Behavior: Use the
wait_for_audio=Falseparameter if you want your AI agent to continue processing other tasks in parallel without waiting for the audio file to finish playing.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-clawdianova-sonos-announce": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-read