skills$openclaw/apple-media
officialpm10.0k

by officialpm

apple-media – OpenClaw Skill

apple-media is an OpenClaw Skills integration for coding workflows. 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.

10.0k stars6.3k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nameapple-media
descriptionDiscover 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. OpenClaw Skills integration.
ownerofficialpm
repositoryofficialpm/apple-media-officialpm
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @officialpm/apple-media-officialpm
last updatedFeb 7, 2026

Maintainer

officialpm

officialpm

Maintains apple-media in the OpenClaw Skills directory.

View GitHub profile
File Explorer
10 files
.
scripts
connect.sh
263 B
scan-hosts.sh
232 B
scan-json.js
2.4 KB
scan.sh
124 B
volume.sh
261 B
_meta.json
289 B
CHANGELOG.md
255 B
README.md
1.5 KB
SKILL.md
2.6 KB
SKILL.md

name: apple-media description: 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.

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

# 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

2) Control HomePod / speaker volume (recommended path)

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
README.md

apple-media

Discover and control AirPlay / Apple media devices from macOS.

This repo contains the Clawdbot skill located in SKILL.md plus helper scripts under scripts/.

Author

Parth Maniar — @officialpm

What it does

  • Scan the local network for AirPlay devices (HomePod, Apple TV, AirPlay TVs)
  • Provide a JSON summary of discovered devices
  • Delegate speaker volume/routing control to Airfoil (reliable for HomePods)
  • Use pyatv (atvremote) for Apple TV / supported device control

Install / setup

brew install pipx
pipx install pyatv || pipx upgrade pyatv

# Pin to Python 3.12 to avoid Python 3.14 asyncio issues
pipx reinstall pyatv --python python3.12

Verify:

atvremote --help | head

Airfoil (optional but recommended for HomePods)

Install Airfoil and grant Accessibility permissions.

  • brew install --cask airfoil

Usage

Scan (text)

./scripts/scan.sh 5

Scan (JSON)

node ./scripts/scan-json.js 5

Faster scan (known IPs)

./scripts/scan-hosts.sh "10.0.0.28,10.0.0.111" 3

Control HomePod volume (Airfoil)

# Requires Airfoil + the Clawdbot airfoil skill scripts
./scripts/connect.sh "Living Room"
./scripts/volume.sh "Living Room" 35

Privacy / safety

  • This repo intentionally avoids committing any personal data (no resume paths, no tokens, no device credentials).
  • The scan output includes IP addresses at runtime; do not commit scan outputs.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install apple-media?

Run openclaw add @officialpm/apple-media-officialpm in your terminal. This installs apple-media into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/officialpm/apple-media-officialpm. Review commits and README documentation before installing.