[APP][Pro] Apple TV & HomePod

@BasMilius

Can you add a flowcard:

“IF Apple TV plays on profile …”

source: Profielen toevoegen en beheren in de Apple TV-app - Apple Support (NL)

Is this supported in the AppleTV API?

Sorry for the late reply, still not working? How is your HomePod connected to the network and how is your Homey connected?

Unfortunately, no, I can only fetch the available users and send a switch to user command but I cannot see which profile is currently active. At least, not in the current version of my apple protocols library, maybe something changed in iOS/iPadOS/tvOS 27.

Hi,

Homepod on Wifi network, Homey wired connection but same network.

adding the device is still not possible.

Apple TV & HomePod 1.9.0

  • New Artwork Player widget. Large album artwork with playback controls, a progress bar and an optional volume slider.
  • Animated album artwork from the Apple Music catalog, in both the Mini Player and the new Artwork Player. Each widget has a checkbox for it, so you can go back to a still image if you prefer.
  • Artwork keeps retrying until the device hands over a URL (#49).
  • Animated artwork is now also found for tracks where the device leaves the album name empty.
  • Animated artwork no longer stops after scrolling quickly through a dashboard.
  • Updated Apple Protocols SDK.

Apple Protocols

Two releases went into this one, 0.14.0 and 0.14.1.

  • Animated artwork and lyrics from the Apple Music catalog.
  • PTP timing, with the timing strategy picked from the receiver’s own feature flags.
  • Text input over Companion Link, which is the transport tvOS expects.
  • Account switching announces the controller’s iCloud account the way the iOS Remote does during the handshake.
  • Discovery reuses a recent scan by default, so a second lookup no longer fires a fresh mDNS query.
  • Reconnects are tied to a generation. A stale attempt can no longer revive a connection that was already replaced.
  • Artwork stays put after an artwork update message, and the reported playback position keeps running between updates.
  • Touch gestures moved from Remote to Companion Link. tvOS drops the session when a virtual touch event arrives over MRP.
  • HID and touch input are framed the way tvOS accepts.
  • Credentials are written through a temporary file with mode 0600 and renamed into place, instead of being written where they stand.
  • Every package now uses named exports instead of default exports. Breaking if you use the library directly.
  • 0.14.1 fixes the AirPlay SETUP audio format codes. They did not line up with what a receiver advertises, so a PCM stream asked for a format the receiver never offered. PCM streaming works now.

Hi,
I’ve been using your app for nearly a year now. I have the latest app version 1.18.0. I have the latest Apple 4K box with ethernet connecter. I have TVoS 27.0. So, I’m all up to date. My problem pre-existed to earlier versions, so, I don’t have a smoking gun. If the ATV box is streaming something, e.g. YouTube or Amazon Prime, your app and Homey show what’s streaming. But, if the ATV is idle and just showing the screensaver, then the ap shows the device as unavailable. Should I drop the device and then re-add? Is there a problem on the ATV side, like permissions?

@Don_Brown Hmm… That’s weird, could you send a diagnostics report and give me the ID? Please restart the app first, then let something play and let the screensaver appear, when the device becomes unavailable send the report. Thanks!

Hello Bas,
Thanks for the quick reply. I’ve put off responding while trying to replicate the problem after a couple of changes.

  1. I changed the Apple Airplay permissions from allowing Airplay by devices on my network to anyone. That seemed to work, so I changed it back thinking it would break again. It continued to work.
  2. Your app was upgraded fromv1.8 to 1.9. So, I repeated the test; same results, it works as advertised.
  3. I restarted the app per your request and retested. Still working.
    So, I’m not sure if anything above “fixed” my use of your app and this device in particular, but, all seems good for now. Thanks for your help.

@Don_Brown Great to hear! Let me know if it goes sideways after a while :slight_smile:

Hello. I have TVOS 27.0 and ver 1.9.0 of this app installed. I am finding that my Apple TV is often showing as “No Response.” It is the only device I have configured in this app. It is ethernet connected as is my Homey Pro Mini. Restarting the app does not fix the problem. I cannot figure out what does fix it, because sometime is comes bback and works. I just cannot find the cause of it staartoing to work or the cause of it when it stops working. Just in case it helps, I generated a diagnostic report while it is not responding. It is 0bfde485-3529-4c35-ae1e-d65e0052e197 n

I am getting this error “Cannot read properties of undefined (reading ‘send’)” when I try sto start my apple tv

Hi Bas,

First of all, thanks for the Apple TV & HomePod app, it works really well when the Apple TV is in use.

I’m seeing one issue: as soon as my Apple TV goes into standby, the device in Homey keeps flipping between “unavailable” and available, roughly every 30-40 seconds. As soon as I wake the Apple TV, it’s stable again.

What I’ve checked so far:

  • App version 1.9.0 (latest) tvOS 27
  • Homey Pro, firmware 13.5.3
  • Apple TV has a fixed IP address, and the network connection itself is stable (my UniFi router shows sessions lasting hours, no drops)
  • AirPlay & HomeKit access on the Apple TV is set to “Anyone on the same network”
  • Removed and re-paired the device in Homey, no change

So it looks like the Apple TV closes the connection periodically while in standby, and the app reconnects each time, marking the device unavailable in between.

Would it be possible to treat this as “standby” instead of “unavailable”, or to delay marking the device unavailable for a short while? That would also prevent flows that react to the device becoming unavailable from firing every 30 seconds.

Happy to provide logs or test a build if that helps.

Thanks!
Reinier

Hello, I’m having trouble with my Apple TV in Homey. The device “Salón Chechi Hause” still shows “No response”. It is on the same Wi-Fi network, AirPlay is enabled, and access is set to “Same Network”. The Apple TV & HomePod app is version 1.9.0. I restarted both the app and the Apple TV, but the issue remains. Homey shows the Apple TV as powered on, but the app information and remote controls are unavailable. Launching the Acuario app did not work. Diagnostic report: d3b946d1-1494-4810-81c0-06d6e8708478.

Lots of problems lately, not only with the Apple TV that’s on tvOS 27. Most of the time showing ‘No reaction’. I didn’t change a thing…

I own a few of the new home pod minis 2, and they don’t show up to add them as new devices, any plan on supporting those?

edit: I opened a PR with the help of Claude to allow for the new home pod minis. Here’s the PR: fix(homepod-mini): list the HomePod mini 2 during pairing by jcmartinezdev · Pull Request #56 · basmilius/homey-apple · GitHub

@jcmartinezdev Soon :slight_smile:

@everyone: I’m almost done with a big non-homey project, so more time for my Homey-apps after that. I have a lot for a next release, in all of them. Appreciate the patience.

Hi everyone! I’m back working on the Apple TV & HomePod app. The reason that it took a while was that I had some other projects, but also that I had to wait on the new Apple TV and HomePod Mini.

There are some changes on the airplay protocol required, but I’m happy to say that I got it working. I just have to run some tests, let it run for a day, check HomePod Mini as well and then I’m going to release a new update to the Homey app.

I’m aiming to submit the update on Sunday, so it should be available somewhere next week.

Note: You can add the new Apple TV and HomePod Mini to the current version of my app, it adds and pairs correctly, but now playing information is not there.

Apple TV & HomePod 1.10.0 - TEST

I went crazy and did everything already, the app is submitted for review and will hopefully be available for everyone somewhere next week. Meanwhile, testers can already upgrade to the new release. A lot went into this release. The feature I’m most excited about is that we can finally play url’s on an Apple TV! :slight_smile:

  • Support for the new Apple TV and the HomePod mini 2. The HomePod mini 2 now shows up during pairing.
  • New flow cards to play a URL on the Apple TV, optionally at a set volume.
  • New triggers for when a chosen app starts or stops playing on the Apple TV.
  • Playing a URL on a HomePod keeps the volume you set.
  • The now playing app is set before playback is reported, so flows see the right app.
  • Animated artwork is now also a capability, so you can use it outside the widgets. Devices paired earlier get it on their next now playing update.
  • The Apple TV keeps trying to reconnect AirPlay after its recovery runs out.
  • On/off works again when Companion Link is found after the Apple TV was already set up.
  • Pairing shows the actual error with a retry button, instead of hanging on a spinner.
  • Updated Apple Protocols SDK.

Apple Protocols 0.15.0

  • URL playback through the AirPlay play queue, which is what tvOS 27 expects. Receivers without it keep using the old route.
  • Playing a URL on a HomePod now fails right away with a clear error, since a HomePod can’t fetch a URL itself. Streaming audio from a URL works instead.
  • Season, episode, genre and rating now come through for the Apple TV app.
  • Fixed large encrypted AirPlay frames and float vocal levels, which broke the connection and the now playing state on the newest Apple TV.
  • Fixed numbers from 128 to 255 arriving negative over Companion Link, and plist integers being read as signed.
  • Companion Link now actually delivers now playing info, because dictionaries were decoded as arrays before.
  • Pair-verify from an unknown controller now fails instead of skipping the signature check.
  • Events from a replaced connection are ignored, and discovery shares one mDNS scan.
  • Audio decoding runs in worker threads, and those now also start on Homey.
  • A second URL playback is no longer stopped when the first one ends.