360 Secure SkillHub
360 安全技能中心

Devialet Speaker Control

通过 curl 调用 Devialet 音箱本地 IP Control HTTP API(/ipcontrol/v1)实现播放/暂停、静音、音量调节与状态查询,并提供 bash 脚本;可选 Spotify 集成(桌面应用 + playerctl/xdotool)按曲名或 URI 播放,需用户自备音箱 IP 与 Spotify 凭据。

jgm2025
jgm2025
热度 92.18
最近更新 2026-05-17 11:08:08
分类:自动化依赖:代码执行 / 第三方 API应用场景:自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add devialet
Metadata
name
devialet
description
Control Devialet Phantom speakers via HTTP API. Use for: play/pause, volume control, mute/unmute, source selection, and speaker status. Requires DOS 2.14+ firmware. Works with Phantom I, Phantom II, Phantom Reactor, and Dialog.

Devialet Speaker Control

Control Devialet speakers (Phantom, Mania) over your local network with Spotify integration.

Natural Language Commands

When the user says things like:

  • "Play Nines - Lick Shots on my speaker" → Search and play via Spotify
  • "Set speaker volume to 40" → Adjust volume
  • "Pause the music" → Pause playback
  • "What's playing?" → Check current track and status

Setup

  1. Find your speaker's IP address (check router or Devialet app)
  2. Set the DEVIALET_IP environment variable, or add to TOOLS.md:
    ## Devialet Speaker
    - IP: 192.168.x.x
    
  3. For Spotify integration: install Spotify desktop app, playerctl, and xdotool

Quick Usage

# Set your speaker IP
export DEVIALET_IP="192.168.x.x"

# Play a song (search and play)
./scripts/play-on-devialet.sh "Drake - God's Plan"

# Play by Spotify URI
./scripts/play-on-devialet.sh spotify:track:4YZNJOA9d8wiO5ELNY5WxC

# Pause / Resume
./scripts/play-on-devialet.sh pause
./scripts/play-on-devialet.sh resume

# Volume
./scripts/play-on-devialet.sh volume 50

# Status
./scripts/play-on-devialet.sh status

Requirements

  • Devialet speaker with DOS 2.14+ or SDOS 1.3+ firmware
  • Spotify integration (optional):
    • Spotify desktop app running and logged in
    • playerctl and xdotool installed (sudo apt install playerctl xdotool)
    • Speaker set as Spotify Connect device (select once in Spotify app)

How It Works

  1. Searches for track via Spotify desktop app (D-Bus/MPRIS)
  2. Opens track URI in Spotify
  3. Spotify Connect streams to Devialet
  4. Devialet API controls playback/volume

Direct Devialet API

For non-Spotify control (replace $DEVIALET_IP with your speaker's IP):

# Volume (0-100)
curl -X POST -H "Content-Type: application/json" \
  -d '{"volume": 50}' \
  "http://$DEVIALET_IP/ipcontrol/v1/systems/current/sources/current/soundControl/volume"

# Play/Pause
curl -X POST "http://$DEVIALET_IP/ipcontrol/v1/groups/current/sources/current/playback/play"
curl -X POST "http://$DEVIALET_IP/ipcontrol/v1/groups/current/sources/current/playback/pause"

# Mute/Unmute
curl -X POST "http://$DEVIALET_IP/ipcontrol/v1/groups/current/sources/current/playback/mute"
curl -X POST "http://$DEVIALET_IP/ipcontrol/v1/groups/current/sources/current/playback/unmute"

# Get status
curl -s "http://$DEVIALET_IP/ipcontrol/v1/devices/current" | jq .

Supported Models

  • Phantom I, Phantom II, Phantom Reactor (DOS 2.14+)
  • Dialog
  • Mania (SDOS 1.3+)

API Reference

See references/api.md for complete endpoint documentation.