sonoscli
它能做什么
它指导 AI 智能体使用 sonos 命令控制本地网络中的 Sonos 音箱。它适合拥有 Sonos 音箱、希望通过聊天管理音乐的人。
适用场景
- ✓你想在 Sonos 音箱上播放、暂停或停止音乐的时候。
- ✓你需要调节某个房间的音量的时候。
- ✓你想给音箱分组,或播放已保存的收藏的时候。
技能链接
https://github.com/openclaw/openclaw/blob/main/skills/sonoscli/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把厨房音箱的音量调到 15,并播放我的收藏“Morning Mix”。”
每周 5 个新技能,1 分钟读完。
工作原理
技能在你的网络中查找 Sonos 音箱,并把播放、音量、分组或队列命令发送给你指定的音箱。当设置了可选密钥时,它也可以通过 Sonos 搜索 Spotify。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Sonos CLI
Use sonos to control Sonos speakers on the local network.
Quick start
sonos discoversonos status --name "Kitchen"sonos play|pause|stop --name "Kitchen"sonos volume set 15 --name "Kitchen"
Common tasks
- Grouping:
sonos group status|join|unjoin|party|solo - Favorites:
sonos favorites list|open - Queue:
sonos queue list|play|clear - Spotify search (via SMAPI):
sonos smapi search --service "Spotify" --category tracks "query"
Notes
- If SSDP fails, specify
--ip <speaker-ip>. - Spotify Web API search is optional and requires
SPOTIFY_CLIENT_ID/SECRET. - If there is an error, check the troubleshooting section and offer advice if there is a decent match.
Troubleshooting
sonos discover - no route to host
- On error
Error: write udp4 0.0.0.0:64326->239.255.255.250:1900: sendto: no route to host (Command exited with code 1)- Note that the port number after
0.0.0.0:is ephemeral and will change and the netmask may not match exactly either - The
sendto: no route to hostshould stay consistent
- Note that the port number after
- Advise the user that in
direct(no Docker sandbox) mode on Mac OS that Settings -> Privacy & Security -> Local Network will need to be enabled for the top-level host parent process of the Gatewaynodeif running vialaunchdTerminalif running the gateway directly in the terminalVisual Studio Codeif running via terminal in VS Code
- An alternative option is to use
sandbox(docker container) with network access allowed for that sandbox
sonos discover - bind: operation not permitted
- On error
Error: listen udp4 0.0.0.0:0: bind: operation not permitted - Advise the user that they may be running via a Codex or other sandbox that does not permit network access (this can be replicated by running
sonos discoverwithin a Codex CLI session with sandbox enabled and not approving the escalation request)
常见问题
如果找不到音箱怎么办?
如果自动发现失败,你可以直接提供音箱的 IP 地址。
网络设置在 Mac 上重要吗?
重要。在 macOS 上,必须允许运行网关的主机应用访问本地网络。
我需要 Spotify 密钥吗?
只有可选的 Spotify Web API 搜索需要,它需要客户端 ID 和密钥。
详情
热度
- GitHub 星标
- 394k
- 排名
- #81
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
discord-user-post
394k让你的智能体通过 Discord 桌面应用,以你的身份发送你已批准的消息,并在发送前确认具体频道。
discrawl
394k让你的智能体搜索和总结本地保存的 Discord 消息档案,查看档案的新旧程度,并阅读私信。
gitcrawl
394k让你的智能体搜索已保存的 GitHub 议题和拉取请求档案,将重复内容归类,并在 GitHub 上核实它们的当前状态。
graincrawl
394k让你的智能体搜索已保存的 Granola 会议记录和转写稿,查看它们的新旧程度,并统计某段时间内的数量。