Smart Home Skills

Control your physical environment directly from CLI-JAW. Smart Home skills bridge the gap between your AI assistant and IoT devices, letting you manage Philips Hue lighting and Spotify playback with natural language commands.

Overview

CLI-JAW ships with two smart home skills that connect to popular device ecosystems via their respective APIs. Both skills are implemented as MCP (Model Context Protocol) servers and are loaded on demand when the agent detects a relevant request.

SkillTargetProtocolAuthDescription
openhuePhilips Hue BridgeHue API v2 (REST)Bridge API keyControl lights, rooms, scenes, and schedules on your Hue network
spotify-playerSpotifySpotify Web APIOAuth 2.0 PKCEPlay, pause, skip, search, queue, and manage Spotify playback

openhue — Philips Hue Control

The openhue skill communicates with a Philips Hue Bridge on your local network. It exposes MCP tools for controlling individual lights, rooms, zones, and scenes.

Capabilities

ToolDescriptionExample
get_lightsList all lights and their current stateRetrieve brightness, color, on/off status
set_lightControl a single lightTurn on, set brightness, change color
get_roomsList rooms defined on the bridgeLiving Room, Bedroom, Office
set_roomControl all lights in a roomTurn off entire room, dim to 30%
get_scenesList available Hue scenesEnergize, Relax, Concentrate
set_sceneActivate a predefined sceneApply "Relax" scene to living room

Configuration

Add the openhue MCP server to your CLI-JAW settings. The bridge IP and API key are required.

{
  "mcpServers": {
    "openhue": {
      "command": "npx",
      "args": ["-y", "@openhue/mcp-server"],
      "env": {
        "OPENHUE_BRIDGE_IP": "192.168.1.100",
        "OPENHUE_API_KEY": "your-hue-api-key"
      }
    }
  }
}

To obtain your Hue API key, press the physical link button on your Hue Bridge and then run:

curl -X POST http://192.168.1.100/api \
  -d '{"devicetype":"cli-jaw#instance"}'

Natural Language Examples

Korean (natural prompts)
  • "거실 불 켜줘" — Turn on the living room lights
  • "방 불 다 꺼줘" — Turn off all bedroom lights
  • "불 밝기 50%로 해줘" — Set brightness to 50%
  • "불 따뜻한 색으로 바꿔줘" — Change lights to warm white
  • "집중 모드로 불 바꿔줘" — Activate the Concentrate scene
  • "릴렉스 씬 틀어줘" — Activate the Relax scene
English examples
  • "Turn on the office lights"
  • "Dim the living room to 30%"
  • "Set all lights to warm white"
  • "Activate the Relax scene in the bedroom"
  • "Turn off all the lights"

How It Works

When you say something like "불 켜줘", CLI-JAW routes the request through its skill matching system:

  1. The agent recognizes the intent as a smart home command
  2. The openhue MCP server is loaded (if not already running)
  3. The agent calls the appropriate tool (e.g., set_room with on: true)
  4. The Hue Bridge executes the command and returns the updated state
  5. The agent confirms the action in natural language

spotify-player — Spotify Control

The spotify-player skill connects to the Spotify Web API, giving CLI-JAW full control over music playback. It supports searching tracks, managing queues, controlling playback, and browsing playlists.

Capabilities

ToolDescriptionExample
playStart or resume playbackPlay a track, album, or playlist
pausePause current playbackPause music
nextSkip to the next trackSkip current song
previousGo back to the previous trackReplay last song
searchSearch tracks, albums, artistsFind "Bohemian Rhapsody"
queueAdd a track to the playback queueQueue a song for next
get_playbackGet current playback stateWhat is currently playing
set_volumeAdjust playback volumeSet volume to 60%
get_playlistsList user playlistsBrowse saved playlists
set_shuffleToggle shuffle modeEnable or disable shuffle
set_repeatSet repeat modeRepeat track, context, or off

Configuration

Add the spotify-player MCP server with your Spotify OAuth credentials.

{
  "mcpServers": {
    "spotify-player": {
      "command": "npx",
      "args": ["-y", "spotify-player-mcp"],
      "env": {
        "SPOTIFY_CLIENT_ID": "your-client-id",
        "SPOTIFY_CLIENT_SECRET": "your-client-secret",
        "SPOTIFY_REDIRECT_URI": "http://localhost:8888/callback"
      }
    }
  }
}

OAuth Setup

  1. Go to the Spotify Developer Dashboard
  2. Create a new app with redirect URI http://localhost:8888/callback
  3. Copy the Client ID and Client Secret into your config
  4. On first use, CLI-JAW will open a browser window for Spotify authorization
  5. After approval, the refresh token is cached locally for subsequent sessions

Natural Language Examples

Korean (natural prompts)
  • "음악 틀어줘" — Resume playback
  • "재즈 음악 틀어줘" — Search and play jazz music
  • "다음 곡으로 넘겨줘" — Skip to the next track
  • "볼륨 좀 줄여줘" — Lower the volume
  • "지금 뭐 듣고 있어?" — Show current playback info
  • "이 노래 반복 재생해줘" — Repeat the current track
  • "셔플 켜줘" — Enable shuffle mode
  • "BTS 노래 틀어줘" — Search and play BTS
English examples
  • "Play some lo-fi beats"
  • "What song is playing right now?"
  • "Skip this track"
  • "Add Blinding Lights to the queue"
  • "Set volume to 40%"
  • "Show my playlists"

Combined Workflows

Smart home skills become powerful when combined with each other or with other CLI-JAW capabilities. Because the agent understands context, you can issue compound commands naturally.

Multi-skill examples
  • "영화 볼 준비 해줘" — Dim lights to 20%, activate Relax scene, pause Spotify
  • "작업 모드로 바꿔줘" — Set lights to Concentrate scene, play lo-fi playlist at low volume
  • "잘 준비 해줘" — Turn off all lights, stop music
  • "Set up movie night" — Combines lighting and audio adjustments
# Example: the agent interprets "영화 볼 준비 해줘" as:
1. openhue → set_room(room="Living Room", brightness=20)
2. openhue → set_scene(scene="Relax", room="Living Room")
3. spotify-player → pause()

Troubleshooting

IssueCauseSolution
Hue Bridge not foundWrong IP or bridge offlineVerify OPENHUE_BRIDGE_IP and ensure the bridge is on the same network
API key rejectedKey expired or never createdPress the bridge link button and regenerate the key
Spotify auth failsInvalid credentials or redirect URI mismatchCheck Client ID/Secret and ensure redirect URI matches exactly
No active deviceSpotify has no active playback deviceOpen Spotify on a device first, then retry the command
MCP server won't startnpx not found or network issueEnsure Node.js is installed and npx is in your PATH
Lights respond slowlyNetwork latency to bridgeUse a wired connection for the Hue Bridge if possible

Environment Variables Reference

VariableSkillRequiredDescription
OPENHUE_BRIDGE_IPopenhueYesLocal IP address of your Philips Hue Bridge
OPENHUE_API_KEYopenhueYesAPI key generated via the bridge link button
SPOTIFY_CLIENT_IDspotify-playerYesOAuth Client ID from Spotify Developer Dashboard
SPOTIFY_CLIENT_SECRETspotify-playerYesOAuth Client Secret from Spotify Developer Dashboard
SPOTIFY_REDIRECT_URIspotify-playerYesOAuth redirect URI (must match dashboard config)