Control your Apple TVs from Hubitat: turn them on and off from scenes, rules and dashboards, with live power state, and nothing extra to run. No Homebridge, no Home Assistant, no Raspberry Pi, no Python.
Now in beta: v1.0.0
Why
Hubitat’s AirPlay integration is great for sending audio and announcements to your Apple devices.This integration adds the other half: control of the Apple TV itself, starting with power on/off and live power state, with remote buttons, playback, volume and app launching to follow. Until now, getting any of that into Hubitat meant running a bridge on another machine. This talks to the Apple TV directly from the hub, using the same protocol the Apple TV Remote app and Control Center use.
What it does
- Finds your Apple TVs automatically over Bonjour, so there are no IPs or ports to type
- One app to set up all your Apple TVs, whether you have 1 or 10
- One-time pairing with the PIN shown on the TV
- One device per Apple TV with a standard Switch: on wakes it, off puts it to sleep. Works with scenes, Rule Machine, dashboards and voice assistants
- Live power state (asleep, screensaver, awake), including changes made with the Siri Remote
- Default names like “Apple TV - Living Room”, editable during setup, so the device doesn’t collide with other devices named after the room
- One encrypted local connection per Apple TV, so commands are instant. Reconnects on its own after reboots, network drops and IP changes
- All logs in one place under the app, with Errors Only, Normal and Full levels
Install (HPM)
- Open Hubitat Package Manager, choose Install, then From a URL
- Paste:
https://raw.githubusercontent.com/jdthomas24/Hubitat-Apps-Drivers/main/Apple%20TV%20Integration/packageManifest.json- Apps → Add User App → Apple TV Integration. Give it about 30 seconds and click Refresh. Your Apple TVs show up by name.
- Click Pair, type the PIN shown on the TV, and click Submit PIN
It will be added to the HPM search once the beta wraps up. Installing from the URL now still gets you updates through HPM.
Tip: to turn the TV on too, enable Settings → Remotes and Devices → Control TVs and Receivers on the Apple TV (HDMI-CEC). Waking the Apple TV then wakes the TV and switches its input.
Scope
This is for Apple TV only. HomePods and announcements stay with Hubitat’s AirPlay integration, which handles audio well. v1.0.0 covers power. Remote buttons, play/pause, volume and app launching are next on the list.Requirements
An Apple TV HD or 4K on a current tvOS version, on the same network as the hub. All processing stays local.Testers wanted
I’m looking for a few testers, especially with different Apple TV models. If you run into anything, set the app’s Log level to FULL, reproduce it, and post the logs along with your Apple TV model.Full details and troubleshooting are in the README: Apple TV Integration on GitHub
Credit to the pyatv project, whose protocol documentation made this possible.
I’ll have a go at it. Currently running tvOS 27.2 (24K5103f) on a Gen 3 (2022) Ethernet model, and in no danger of buying a Gen 4.
Yeah, I've been looking forward to upgrading to the Gen 4 and then saw that $299 price tag. Whoa! That's some chutzpah on Apple's part. I'm mostly a fan boy, but I have a few Rokus too and when you can get 90% of the features for about 15% of the price, well that's nuts.
I’m all in on this! Please keep us informed. I have three Apple TVs and would love to test with/for you. [MQD22LL/A and MXGY2LL/A models]
ATV HD and 4K, it will be nice to fully run my ATV automations on hubitat.
Quick update: the Beta 1.0.1 is ready.
I’ve updated the original post with the HPM install link, so you can install it now with Install → From a URL in Hubitat Package Manager. You’ll get updates through HPM as they come out.
If you give it a try, I’d love to hear how it goes, especially which Apple TV model you have. If anything doesn’t work right, set the app’s Log level to FULL, reproduce it, and post the logs here.
Thanks to everyone who’s shown interest so far!
Release: Apple TV Integration v1.0.2
Fixes Submit PIN not sending the PIN, so pairing could stall after the PIN appeared on the TV.
Problem:
After tapping Pair, the PIN showed up on the TV, but tapping Submit PIN sometimes did nothing. If the PIN was typed and Submit PIN was tapped right away, Hubitat didn’t always save what was typed (this happened most often over remote access), so an empty PIN was sent and pairing stalled with no error in the logs.The Fix:
- The PIN box now saves as soon as you finish typing, and a saved PIN is sent automatically when the page refreshes, so it always reaches the Apple TV.
- Tapping Submit PIN with an empty box now tells you to enter the PIN instead of doing nothing.
- Every pairing step is now logged at Normal (PIN sent, PIN accepted, paired), so it’s easy to see where things stand.
Action needed:
Update through HPM (Update, then Apple TV Integration). If pairing stalled on an earlier version, open the app, tap Pair to get a fresh PIN, type it in, then tap Submit PIN.