Apple Media

Discover and control Apple media/AirPlay devices (HomePod, Apple TV, AirPlay speakers) from macOS. Use when you want to scan for AirPlay devices, map names→IPs/IDs, pair/connect, and control playback/volume using pyatv (atvremote) and Airfoil.

Zainstaluj
$clawhub install apple-media-officialpm

Apple Media (AirPlay + Apple TV control)

Author: Parth Maniar — @officialpm

This skill is a thin workflow wrapper around two tools:

  • pyatv (atvremote) for discovering Apple TVs/HomePods and (when supported/paired) remote-control style commands.

  • Airfoil (via the existing airfoil skill) for reliable speaker connect/disconnect + volume control across AirPlay speakers (including HomePods).

Setup

This skill uses pyatv installed via pipx.

Install/repair (pinned to Python 3.12 to avoid Python 3.14 asyncio issues):

pipx install pyatv || pipx upgrade pyatv
pipx reinstall pyatv --python python3.12

Verify:

atvremote --help | head

Quick start

1) Scan the network for devices


# Fast scan (5s)
./scripts/scan.sh 5

# Faster scan when you know IP(s)
./scripts/scan-hosts.sh "10.0.0.28,10.0.0.111" 3

# Or JSON output
node ./scripts/scan-json.js 5

You’ll see devices like:

  • HomePods (e.g., "Living Room", "Bedroom")

  • Apple TV

  • AirPlay-capable TVs

Use Airfoil for speaker control (reliable for HomePods):


# List speakers Airfoil can see
../airfoil/airfoil.sh list

# Connect and set volume
./scripts/connect.sh "Living Room"
./scripts/volume.sh "Living Room" 35

# Disconnect (direct)
../airfoil/airfoil.sh disconnect "Living Room"

3) Apple TV remote commands (pyatv)

First, scan to find the Apple TV name or id, then run commands:


# Examples (device name can be Apple TV or other targets)
atvremote -n "TV" playing
atvremote -n "TV" play_pause
atvremote -n "TV" turn_on
atvremote -n "TV" turn_off

If you get auth/protocol errors, pairing/credentials are needed (device-dependent).

Notes / gotchas

  • pyatv HomePod control often requires authentication and may not support all remote-control commands out of the box.

    • When pyatv fails for HomePod playback/volume, prefer Airfoil for volume + speaker routing.
  • atvremote scan is the source of truth for IP/ID discovery.

Bundled scripts

scripts/scan.sh

Runs atvremote scan with a configurable timeout.

./scripts/scan.sh 5

scripts/scan-json.js

Parses atvremote scan output into a compact JSON summary (name, address, model, services).

node ./scripts/scan-json.js

Szczegóły

Wersja
v0.1.1
Pobrania
1,301

Popularne Skills

Tavily AI Search
AI-optimized web search using Tavily Search API. Use when you need comprehensive web research, current events lookup, domain-specific search, or AI-generated answer summaries. Tavily is optimized for LLM consumption with clean structured results, answer generation, and raw content extraction. Best for research tasks, news queries, fact-checking, and gathering authoritative sources.
Automation Workflows
Design and implement automation workflows to save time and scale operations as a solopreneur. Use when identifying repetitive tasks to automate, building workflows across tools, setting up triggers and actions, or optimizing existing automations. Covers automation opportunity identification, workflow design, tool selection (Zapier, Make, n8n), testing, and maintenance. Trigger on "automate", "automation", "workflow automation", "save time", "reduce manual work", "automate my business", "no-code automation".
AI Persona OS
The complete operating system for OpenClaw agents. Now with 13 Iconic Character souls (Thanos, Deadpool, JARVIS, Mary Poppins, Darth Vader, and more), SOUL.md Maker (deep SOUL.md builder interview), 11 original personality souls, soul blending, and the full soul gallery. Plus: zero-terminal agent-driven setup, quick-start persona presets, in-chat commands, ambient context monitoring, enforced heartbeat protocol (model + version display), traffic-light status indicators, auto-migration, auto-pruning, config validator, version tracking, structured escalation protocol, context protection, security inoculation, shared-channel discipline, team integration, proactive patterns, never-forget protocol, 8 operating rules, and 4 growth loops. One install. Complete system. Built by Jeff J Hunter.