home-control
This skill should be used when the user wants to control smart home devices — lights, speakers, music playback, or scenes. Triggers on phrases like 'turn on the lights', 'play some jazz', 'dim the lights', 'stop the music', 'goodnight', 'movie mode', 'what's playing', or any reference to Yeelight bulbs, Google Cast speakers, or SomaFM radio.
What this skill does
# Home Control
Control Yeelight bulbs and Google Cast speakers on the local network using the `scripts/home.py` script bundled with this skill.
## CLI Reference
All commands output JSON. Always run from the skill's scripts directory (the base directory is provided above as "Base directory for this skill"):
```
cd <base-directory>/scripts
```
### Discover devices
```bash
python3 home.py discover [--timeout 5]
```
### Device status
```bash
python3 home.py status [--cached]
```
### Light control
```bash
python3 home.py lights --device NAME --action {on,off,toggle,brightness,ct} [--value N]
```
- `--device`: fuzzy name match or `all-lights`
- `brightness`: value 1-100
- `ct`: color temperature 1700-6500K (lower=warm, higher=cool)
### Cast/speaker control
```bash
python3 home.py cast --device NAME --action {play,stop,pause,volume,status} [--url URL] [--stream GENRE] [--volume N]
```
- `--device`: fuzzy name match, `all-speakers`, or a specific group/speaker name
- `--stream`: genre keyword (jazz, ambient, metal, electronic, etc.) — maps to SomaFM AAC streams
- `--url`: direct audio URL (overrides --stream). Must be HTTP (not HTTPS) for Cast compatibility.
- `--volume`: 0-100
### Known devices
| Name | Type | Notes |
|---|---|---|
| Kitchen speaker | Google Home Mini | Individual speaker |
| Living Room speaker | Google Nest Mini | Individual speaker |
| Master Room speaker old | Google Home Mini | Individual speaker |
| Living Room TV 2 | Chromecast | TV, may not play audio-only |
| **Motz** | **Cast Group** | Multi-room group — preferred for "play everywhere" |
| **SoundedX** | **Cast Group** | Multi-room group |
### Multi-room audio
For "play on all speakers" or "play everywhere", use `--device all-speakers`. This targets **speaker groups** (Motz, SoundedX) rather than individual devices. Playing on individual Cast speakers sequentially is unreliable; groups handle sync natively.
For single-room playback, target the specific speaker by name (e.g., `--device kitchen`).
## Workflow
1. **Parse the user's intent** into one or more device actions (light control, audio playback, scenes).
2. **Resolve devices**: use fuzzy name matching. For compound commands ("play jazz and dim the lights"), issue multiple CLI calls.
3. **Resolve genres autonomously**: if a genre keyword returns an "unknown stream/genre" error, do NOT ask the user to choose. Instead, consult `references/somafm-channels.md`, pick the closest matching channel, and play it immediately. Mention which channel was chosen. Fallback priority: match by subgenre, then by mood/energy, then by era.
4. **Execute commands** via `python3 home.py ...` and read JSON output.
5. **Report results** naturally. On success, confirm briefly ("Lights dimmed to 40%"). On error, explain and suggest fixes.
## Scene Presets
When the user says one of these, execute the corresponding commands:
**"goodnight"** / **"bedtime"**:
- `lights --device all-lights --action off`
- `cast --device all-speakers --action stop`
**"movie mode"** / **"movie time"**:
- `lights --device all-lights --action brightness --value 15`
- `lights --device all-lights --action ct --value 2700`
**"reading mode"**:
- `lights --device all-lights --action brightness --value 80`
- `lights --device all-lights --action ct --value 4000`
**"focus"** / **"work mode"**:
- `lights --device all-lights --action brightness --value 100`
- `lights --device all-lights --action ct --value 5000`
- `cast --device all-speakers --action stop`
**"relax"** / **"chill"**:
- `lights --device all-lights --action brightness --value 40`
- `lights --device all-lights --action ct --value 2700`
- `cast --device all-speakers --action play --stream ambient`
## SomaFM Genre Keywords
See `references/somafm-channels.md` for the full list. Common mappings:
| Genre keyword | Channel |
|---|---|
| jazz, spy, lounge | Secret Agent |
| ambient, chill | Groove Salad |
| metal, heavy | Metal |
| electronic, electronica | cliqhop |
| folk | Folk Forward |
| 80s | Underground 80s |
| country, americana | Boot Liquor |
| space | Space Station |
| drone | Drone Zone |
If a genre is not directly mapped, autonomously pick the closest channel from `references/somafm-channels.md` and play it. Never ask the user to choose — just pick the best fit and mention what was selected.
## Troubleshooting
- **"no lights matching"**: Lights may be powered off at the switch. Run `discover` to re-scan.
- **"pychromecast not installed"**: Run `bash <base-directory>/scripts/setup.sh`
- **Cast device not found**: Device may be asleep. Try increasing timeout: `--timeout 10`
- **Cast plays but no sound / "IDLE" after play**: Streams must use **HTTP AAC** format (not HTTPS MP3). The built-in SomaFM URLs already use the correct format. For custom URLs, ensure they are HTTP and the content type matches.
- **Connection refused on Yeelight**: Ensure "LAN Control" is enabled in the Yeelight app for each bulb.
- **Stale cache**: Run `discover` to force a fresh scan (bypasses the 30-min cache).
- **Multi-room not working**: Target a Cast group (Motz, SoundedX) instead of individual speakers. Playing on individual speakers sequentially is unreliable due to zeroconf session conflicts.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.