| name | apple-media |
| description | Control Apple TV, HomePod, and AirPlay devices via pyatv (scan, stream, playback, volume, navigation). |
| homepage | https://github.com/aaronn/clawd-apple-media-skill |
| metadata | {"clawdbot":{"emoji":"🎛️","requires":{"bins":["atvremote"]},"install":[{"id":"pipx","kind":"shell","command":"pipx install pyatv --python python3.13","bins":["atvremote"],"label":"Install pyatv via pipx (Python 3.13)"}]}} |
Apple Media Remote
Control Apple TV, HomePod, and AirPlay devices from the command line using atvremote.
Setup Notes
- pyatv has a compatibility issue with Python 3.14+. Use
--python python3.13 (or any version ≤3.13) when installing.
- If
~/.local/bin isn't on your PATH after install, run: pipx ensurepath
- If your default Python is 3.14+, you can also call directly:
python3.13 -m pyatv.scripts.atvremote <command>
Scan for Devices
atvremote scan
atvremote --scan-hosts 10.0.0.50 scan
atvremote --scan-hosts 10.0.0.50,10.0.0.51 scan
Returns all discoverable Apple TV, HomePod, and AirPlay devices on the local network with their names, addresses, protocols, and pairing status.
Target a Device
Use -n <name> (device name), -s <ip> (address), or -i <id> (identifier) to target:
atvremote -n "Kitchen" <command>
atvremote -s 10.0.0.50 <command>
atvremote -i AA:BB:CC:DD:EE:FF <command>
Playback Control
atvremote -n "Kitchen" playing
atvremote -n "Kitchen" play
atvremote -n "Kitchen" pause
atvremote -n "Kitchen" play_pause
atvremote -n "Kitchen" stop
atvremote -n "Kitchen" next
atvremote -n "Kitchen" previous
atvremote -n "Kitchen" skip_forward
atvremote -n "Kitchen" skip_backward
atvremote -n "Kitchen" skip_forward=30
atvremote -n "Kitchen" set_position=120
atvremote -n "Kitchen" set_shuffle=Songs
atvremote -n "Kitchen" set_repeat=All
Volume
atvremote -n "Kitchen" volume
atvremote -n "Kitchen" set_volume=50
atvremote -n "Kitchen" volume_up
atvremote -n "Kitchen" volume_down
Streaming
Stream local files or URLs to a device:
atvremote -n "Kitchen" stream_file=/path/to/audio.mp3
atvremote -n "Kitchen" play_url=http://example.com/stream.mp3
Supports common audio formats (MP3, WAV, AAC, FLAC, etc.).
Power Management
atvremote -n "Apple TV" power_state
atvremote -n "Apple TV" turn_on
atvremote -n "Apple TV" turn_off
Navigation (Apple TV)
atvremote -n "Apple TV" up
atvremote -n "Apple TV" down
atvremote -n "Apple TV" left
atvremote -n "Apple TV" right
atvremote -n "Apple TV" select
atvremote -n "Apple TV" menu
atvremote -n "Apple TV" home
atvremote -n "Apple TV" home_hold
atvremote -n "Apple TV" top_menu
atvremote -n "Apple TV" control_center
atvremote -n "Apple TV" guide
atvremote -n "Apple TV" channel_up
atvremote -n "Apple TV" channel_down
atvremote -n "Apple TV" screensaver
Keyboard Input (Apple TV)
When a text field is focused:
atvremote -n "Apple TV" text_get
atvremote -n "Apple TV" text_set="search query"
atvremote -n "Apple TV" text_append=" more"
atvremote -n "Apple TV" text_clear
App Control (Apple TV)
atvremote -n "Apple TV" app_list
atvremote -n "Apple TV" launch_app=com.apple.TVMusic
Output Devices (Multi-room)
Manage connected audio outputs (e.g. grouping HomePods):
atvremote -n "Apple TV" output_devices
atvremote -n "Apple TV" add_output_devices=<device_id>
atvremote -n "Apple TV" remove_output_devices=<device_id>
atvremote -n "Apple TV" set_output_devices=<device_id>
Push Updates (Live Monitoring)
Watch for real-time playback changes:
atvremote -n "Kitchen" push_updates
Pairing
Some devices (especially Apple TV) require pairing before control:
atvremote -n "Living Room" pair
atvremote -n "Living Room" --protocol airplay pair
atvremote wizard
Credentials are stored automatically in ~/.pyatv.conf after pairing.
Device Info
atvremote -n "Kitchen" device_info
atvremote -n "Kitchen" features
atvremote -n "Kitchen" app
Tips
- Pause vs Stop: Use
pause/play to suspend and resume. stop ends the session entirely — playback must be restarted from the source (Siri, Home app, etc.)
- HomePods with "Pairing: NotNeeded" can be streamed to immediately
- Apple TVs typically require pairing first (all protocols the device supports)
- The
playing command shows media type, title, artist, position, shuffle/repeat state
- For stereo HomePod pairs, target either unit by name
- Use
--scan-hosts for faster targeting when you know the device IP
- Navigation and keyboard commands are primarily for Apple TV (not HomePod)