跳到正文
Skillpedia
其他394k · #81

sonoscli

它能做什么

它指导 AI 智能体使用 sonos 命令控制本地网络中的 Sonos 音箱。它适合拥有 Sonos 音箱、希望通过聊天管理音乐的人。

适用场景

  • ✓你想在 Sonos 音箱上播放、暂停或停止音乐的时候。
  • ✓你需要调节某个房间的音量的时候。
  • ✓你想给音箱分组,或播放已保存的收藏的时候。

技能链接

https://github.com/openclaw/openclaw/blob/main/skills/sonoscli/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/openclaw/openclaw/blob/main/skills/sonoscli/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 discover
  • sonos 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 host should stay consistent
  • 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 Gateway
    • node if running via launchd
    • Terminal if running the gateway directly in the terminal
    • Visual Studio Code if 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 discover within a Codex CLI session with sandbox enabled and not approving the escalation request)
常见问题

如果找不到音箱怎么办?

如果自动发现失败,你可以直接提供音箱的 IP 地址。

网络设置在 Mac 上重要吗?

重要。在 macOS 上,必须允许运行网关的主机应用访问本地网络。

我需要 Spotify 密钥吗?

只有可选的 Spotify Web API 搜索需要,它需要客户端 ID 和密钥。

详情

作者的原始描述

Control Sonos speakers (discover/status/play/volume/group).

repo: openclaw/openclaw

热度

GitHub 星标
394k
排名
#81
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能