spotify-connect
Control Spotify playback on remote Spotify Connect devices (speakers, TVs, Echo, phone, desktop). Use when user wants to play music, pause, skip, adjust volume, list audio devices, or transfer playback to a specific device. Supports multiple Spotify accounts with named profiles. Requires Spotify Premium.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/mlewislogic/spotify-connectSpotify Connect
Control Spotify playback on any Spotify Connect device. Supports multiple authenticated accounts.
Setup (one-time)
-
Create a Spotify app at https://developer.spotify.com/dashboard
- Set redirect URI to
http://127.0.0.1:8888/callback - Enable "Web API" and "Web Playback SDK"
- Note the Client ID and Client Secret
- Set redirect URI to
-
Set environment variables (or add to OpenClaw config under
env.vars):export SPOTIFY_CLIENT_ID="your-client-id" export SPOTIFY_CLIENT_SECRET="your-client-secret" -
Run initial auth (opens browser):
uv run {baseDir}/scripts/spotify.py auth --name "alice"This creates a named account profile with auto-refreshing token.
-
(Optional) Add more accounts:
uv run {baseDir}/scripts/spotify.py auth --name "bob" -
(Optional) Configure device aliases in
~/.openclaw/spotify-connect/devices.json:{ "kitchen": "Kitchen Echo", "kids": "Kids Room Echo", "office": "Office Speaker" }
Dependencies
Python dependencies are managed inline via PEP 723 — uv run handles installation automatically. No manual pip install needed.
Account Management
# Authenticate a new account (opens browser)
uv run {baseDir}/scripts/spotify.py auth --name "alice"
# List all authenticated accounts
uv run {baseDir}/scripts/spotify.py accounts
# Switch active account (by name or email)
uv run {baseDir}/scripts/spotify.py switch alice
uv run {baseDir}/scripts/spotify.py switch [email protected]
# Remove an account
uv run {baseDir}/scripts/spotify.py logout alice
The active account is used for all playback commands. Account data is stored in ~/.openclaw/spotify-connect/accounts.json.
Commands
All commands use: uv run {baseDir}/scripts/spotify.py <command> [args]
List devices
# Current account only
uv run {baseDir}/scripts/spotify.py devices
# All accounts in parallel (recommended before playing on a specific device)
uv run {baseDir}/scripts/spotify.py devices --all-accounts
Play
# Resume playback (current device or specify one)
uv run {baseDir}/scripts/spotify.py play
uv run {baseDir}/scripts/spotify.py play --device "kitchen"
# Play a song, artist, album, or playlist (searches Spotify)
uv run {baseDir}/scripts/spotify.py play --query "Bohemian Rhapsody"
uv run {baseDir}/scripts/spotify.py play --query "artist:Radiohead"
uv run {baseDir}/scripts/spotify.py play --query "album:OK Computer"
uv run {baseDir}/scripts/spotify.py play --query "playlist:Chill Vibes"
uv run {baseDir}/scripts/spotify.py play --uri "spotify:track:6rqhFgbbKwnb9MLmUQDhG6"
# Play on a specific device
uv run {baseDir}/scripts/spotify.py play --query "Daft Punk" --device "office"
Playback control
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-mlewislogic-spotify-connect": {
"enabled": true,
"auto_update": true
}
}
}