| name | appletv |
| version | 1.0.0 |
| description | Control Apple TV via pyatv. Use for play/pause, navigation, volume, launching apps, power control, and checking what's playing. Triggers on "Apple TV", "TV", "what's playing", "pause TV", "play TV", "turn off TV". |
| license | MIT |
Apple TV Control
Control Apple TV via the pyatv library.
Requirements
pipx install pyatv --python python3.11
Note: pyatv requires Python ≤3.13. Python 3.14+ has breaking asyncio changes. Use --python python3.11 or python3.13 with pipx.
Configuration
Config file at ~/clawd/config/appletv.json:
{
"name": "Living Room",
"id": "DEVICE_ID",
"ip": "192.168.x.x",
"credentials": {
"companion": "...",
"airplay": "..."
}
}
First-Time Pairing
atvremote scan
atvremote --id <DEVICE_ID> --protocol companion pair
atvremote --id <DEVICE_ID> --protocol airplay pair
Save the credentials to the config file.
Quick Commands
Status & Playing
scripts/appletv.py status
scripts/appletv.py playing
Playback Control
scripts/appletv.py play
scripts/appletv.py pause
scripts/appletv.py stop
scripts/appletv.py next
scripts/appletv.py prev
Navigation
scripts/appletv.py up
scripts/appletv.py down
scripts/appletv.py left
scripts/appletv.py right
scripts/appletv.py select
scripts/appletv.py menu
scripts/appletv.py home
Volume
scripts/appletv.py volume_up
scripts/appletv.py volume_down
Power
scripts/appletv.py turn_on
scripts/appletv.py turn_off
scripts/appletv.py power
Apps
scripts/appletv.py apps
scripts/appletv.py app Netflix
scripts/appletv.py app YouTube
scripts/appletv.py app "Disney+"
Discovery
scripts/appletv.py scan
Example Interactions
- "What's playing on the TV?" →
scripts/appletv.py status
- "Pause the TV" →
scripts/appletv.py pause
- "Turn off the Apple TV" →
scripts/appletv.py turn_off
- "Open Netflix on TV" →
scripts/appletv.py app Netflix