{"skill":{"slug":"home-music-terry","displayName":"Home Music","summary":"Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.","description":"---\nname: home-music\ndescription: Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.\nhomepage: local\nmetadata: {\"clawdbot\":{\"emoji\":\"🏠\",\"os\":[\"darwin\"]}}\ntriggers:\n  - music scene\n  - morning music\n  - party mode\n  - chill music\n  - reading music\n  - house music\n  - stop music\n---\n\n```\n    ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫\n    \n    🏠  H O M E   M U S I C  🎵\n    \n    ╔══════════════════════════════════════════╗\n    ║   Whole-House Music Scenes               ║\n    ║   One command. All speakers. Perfect.    ║\n    ╚══════════════════════════════════════════╝\n    \n    ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫\n```\n\n> *\"Why click 17 times when one command does the job?\"* – Owen 🐸\n\n---\n\n## 🎯 What Does This Skill Do?\n\n**Home Music** combines Spotify + Airfoil into magical music scenes. One command – and the right playlist plays on the right speakers at the perfect volume.\n\n**Imagine:**\n- You wake up → `home-music morning` → Gentle tunes in the bathroom\n- Friends arrive → `home-music party` → All speakers blasting rock\n- Time to relax → `home-music chill` → Lounge vibes everywhere\n- Done for the day → `home-music off` → Silence. Peace. Serenity.\n\n---\n\n## 📋 Dependencies\n\n| What | Why | Link |\n|------|-----|------|\n| 🍏 **macOS** | This skill uses AppleScript | — |\n| 🟢 **Spotify Desktop App** | The music source! Must be running. | [spotify.com](https://spotify.com) |\n| 📡 **Airfoil** | Routes audio to AirPlay speakers | [rogueamoeba.com](https://rogueamoeba.com/airfoil/) |\n| 🎵 **spotify-applescript** | Clawdbot skill for Spotify control | `skills/spotify-applescript/` |\n\n> ⚠️ **Important:** Both Spotify and Airfoil must be running before you start any scenes!\n\n---\n\n## 🎬 Scenes\n\n### 🌅 Morning\n*A gentle start to your day*\n\n```bash\nhome-music morning\n```\n- **Speaker:** Sonos Move\n- **Volume:** 40%\n- **Playlist:** Morning Playlist\n- **Vibe:** ☕ Coffee + good vibes\n\n---\n\n### 🎉 Party\n*Time to celebrate!*\n\n```bash\nhome-music party\n```\n- **Speaker:** ALL (Computer, MacBook, Sonos Move, Living Room TV)\n- **Volume:** 70%\n- **Playlist:** Rock Party Mix\n- **Vibe:** 🤘 Neighbors hate this one trick\n\n---\n\n### 😌 Chill\n*Pure relaxation*\n\n```bash\nhome-music chill\n```\n- **Speaker:** Sonos Move\n- **Volume:** 30%\n- **Playlist:** Chill Lounge\n- **Vibe:** 🧘 Om...\n\n---\n\n### 📖 Reading\n*Ambient sounds for getting lost in a book*\n\n```bash\nhome-music reading\n```\n- **Speaker:** Living Room + Bedroom\n- **Volume:** 20%\n- **Playlist:** Ambient Reading\n- **Vibe:** 📚 Turn the page...\n\n---\n\n### 🔇 Off\n*Silence*\n\n```bash\nhome-music off\n```\n- Pauses Spotify\n- Disconnects all speakers\n- **Vibe:** 🤫 Finally, peace and quiet\n\n---\n\n### 📊 Status\n*What's playing right now?*\n\n```bash\nhome-music status\n```\n\nShows:\n- Current Spotify track\n- Connected speakers\n\n---\n\n## 🔧 Installation\n\n```bash\n# Make the script executable\nchmod +x ~/clawd/skills/home-music/home-music.sh\n\n# Symlink for global access\nsudo ln -sf ~/clawd/skills/home-music/home-music.sh /usr/local/bin/home-music\n```\n\nNow `home-music` works from anywhere in your terminal! 🎉\n\n---\n\n## 🎨 Custom Playlists & Scenes\n\n### Changing Playlists\n\nOpen `home-music.sh` and find the playlist configuration:\n\n```bash\n# === PLAYLIST CONFIGURATION ===\nPLAYLIST_MORNING=\"spotify:playlist:19n65kQ5NEKgkvSAla5IF6\"\nPLAYLIST_PARTY=\"spotify:playlist:37i9dQZF1DXaXB8fQg7xif\"\nPLAYLIST_CHILL=\"spotify:playlist:37i9dQZF1DWTwnEm1IYyoj\"\n```\n\n**How to find Playlist URIs:**\n1. Right-click on a playlist in Spotify\n2. \"Share\" → \"Copy Spotify URI\"\n3. Or copy the URL and extract the `/playlist/` part\n\n### Adding a New Scene\n\nAdd a new case in the `main` block:\n\n```bash\n# In home-music.sh after the \"scene_chill\" function:\n\nscene_workout() {\n    echo \"💪 Starting Workout scene...\"\n    airfoil_set_source_spotify\n    airfoil_connect \"Sonos Move\"\n    sleep 0.5\n    airfoil_volume \"Sonos Move\" 0.8\n    \"$SPOTIFY_CMD\" play \"spotify:playlist:YOUR_WORKOUT_PLAYLIST\"\n    \"$SPOTIFY_CMD\" volume 100\n    echo \"✅ Workout: Sonos Move @ 80%, Pump it up!\"\n}\n\n# And in the case block:\n    workout)\n        scene_workout\n        ;;\n```\n\n### Available Speakers\n\n```bash\nALL_SPEAKERS=(\"Computer\" \"Andy's M5 Macbook\" \"Sonos Move\" \"Living Room TV\")\n```\n\nYou can add any AirPlay speaker – they just need to be visible in Airfoil.\n\n---\n\n## 🐛 Troubleshooting\n\n### ❌ \"Speaker won't connect\"\n\n**Check 1:** Is Airfoil running?\n```bash\npgrep -x Airfoil || echo \"Airfoil is not running!\"\n```\n\n**Check 2:** Is the speaker on the network?\n- Open the Airfoil app\n- Check if the speaker appears in the list\n- Try connecting manually\n\n**Check 3:** Is the name exactly correct?\n- Speaker names are case-sensitive!\n- Open Airfoil and copy the exact name\n\n---\n\n### ❌ \"No sound\"\n\n**Check 1:** Is Spotify playing?\n```bash\n~/clawd/skills/spotify-applescript/spotify.sh status\n```\n\n**Check 2:** Is the Airfoil source correct?\n- Open Airfoil\n- Check if \"Spotify\" is selected as the audio source\n- If not: Click \"Source\" → Select Spotify\n\n**Check 3:** Speaker volume?\n```bash\n# Manually check volume\nosascript -e 'tell application \"Airfoil\" to get volume of (first speaker whose name is \"Sonos Move\")'\n```\n\n---\n\n### ❌ \"Spotify won't start\"\n\n**Is Spotify open?**\n```bash\npgrep -x Spotify || open -a Spotify\n```\n\n**Is spotify-applescript installed?**\n```bash\nls ~/clawd/skills/spotify-applescript/spotify.sh\n```\n\n---\n\n### ❌ \"Permission denied\"\n\n```bash\nchmod +x ~/clawd/skills/home-music/home-music.sh\n```\n\n---\n\n## 🔊 Direct Airfoil Commands\n\nIf you want to control Airfoil manually:\n\n```bash\n# Connect a speaker\nosascript -e 'tell application \"Airfoil\" to connect to (first speaker whose name is \"Sonos Move\")'\n\n# Set speaker volume (0.0 - 1.0)\nosascript -e 'tell application \"Airfoil\" to set (volume of (first speaker whose name is \"Sonos Move\")) to 0.5'\n\n# Disconnect a speaker\nosascript -e 'tell application \"Airfoil\" to disconnect from (first speaker whose name is \"Sonos Move\")'\n\n# List connected speakers\nosascript -e 'tell application \"Airfoil\" to get name of every speaker whose connected is true'\n\n# Set audio source\nosascript -e 'tell application \"Airfoil\"\n    set theSource to (first application source whose name contains \"Spotify\")\n    set current audio source to theSource\nend tell'\n```\n\n---\n\n## 📁 Files\n\n```\nskills/home-music/\n├── SKILL.md        # This documentation\n└── home-music.sh   # The main script\n```\n\n---\n\n## 💡 Pro Tips\n\n1. **Set aliases** for even faster access:\n   ```bash\n   alias mm=\"home-music morning\"\n   alias mp=\"home-music party\"\n   alias mc=\"home-music chill\"\n   alias mo=\"home-music off\"\n   ```\n\n2. **Use with Clawdbot:**\n   > \"Hey, start party mode\"\n   > \"Put on some chill music\"\n   > \"Stop the music\"\n\n3. **Combine scenes:** Create a `dinner` scene with a jazz playlist at 25% – perfect for guests!\n\n---\n\n## 🐸 Credits\n\n```\n╭─────────────────────────────────────────────╮\n│                                             │\n│   Crafted with 💚 by Owen the Frog 🐸      │\n│                                             │\n│   \"Ribbit. Music makes everything better.\"  │\n│                                             │\n╰─────────────────────────────────────────────╯\n```\n\n**Author:** Andy Steinberger (with help from his Clawdbot Owen the Frog 🐸)  \n**Version:** 1.1.0  \n**License:** MIT  \n**Pond:** The one with the water lilies 🪷\n\n---\n\n*Did this skill improve your life? Owen appreciates flies. 🪰*\n","tags":{"latest":"1.1.1"},"stats":{"comments":0,"downloads":472,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":2},"createdAt":1778099357785,"updatedAt":1778545909789},"latestVersion":{"version":"1.1.1","createdAt":1778544462984,"changelog":"Added reading scene: ambient playlist on Living Room + Bedroom at 20% volume","license":"MIT-0"},"metadata":{"setup":[],"os":["darwin"],"systems":null},"owner":{"handle":"terrycarter1985","userId":"s17brwfrqyjhbjgadkvar20h8x8492g8","displayName":"terrycarter1985","image":"https://avatars.githubusercontent.com/u/1542987?v=4"},"moderation":null}