Binding for Apple-TV

fyi: I’m making progress

new features:

  • you could send more than one command, e.g. “top_menu right right”
  • automatic device discovery!

Now I try to capture the events and redirect them to the binding, but this will be a challenge

1 Like

More progress, I’m getting the status information - like event, but I need to poll them.

1 Like

Nice work!
Very happy to see this progress.

ok, here is beta 1:
https://raw.github.com/markus7017/org.openhab.binding.appletv/blob/beta1/target/org.openhab.binding.appletv-2.5.0-SNAPSHOT.jar

  • Automatic device discovery (background and from the Inbox)
  • Support for multiple Apple TVs (needs verification)
  • Periodic play status updates
  • Set position, shuffle and repeat mode
  • Relative positions (+10, -10, -30:00 etc.)
  • Special Keys movie,music,tvshows will be mapped to key sequences to select the media category from the main menu
  • Media type decoding in the embedded pyatv fixed (not with atvremote)
  • Prepared for binding configuration and pairing, but not yet implemented.
  • README updated
    and more.

Could someone please check if installed on 2.4 you still have the item in Paper UI’s Control section? Works fine with my 2.5 dev setup, but doesn’t shows up on my 2.4 prod setup.

Important: Existing things have to be deleted. You should shutdown openHAB before updating the jar, maybe you need to clear the cache.

Check out the README for details.

@JohnnyBravo @Normann_P_Nielsen @jacksteraz @Jorn_Reimerdes @crxporter @ei_Gelb_Geek @Heiko_Fanieng @HFM @Rickytr @ciscomike Feedback welcome.

2 Likes

Hi Markus
i am getting 404 error for this page

Strange, it works for me. You could also download the jar from

Both links give me 404:

https://github.com/markus7017/org.openhab.binding.appletv/tree/beta1/target
https://raw.github.com/markus7017/org.openhab.binding.appletv/blob/beta1/target/org.openhab.binding.appletv-2.5.0-SNAPSHOT.jar

try:
https://github.com/markus7017/org.openhab.binding.appletv/raw/master/target/org.openhab.binding.appletv-2.5.0-SNAPSHOT.jar

has anyone already installed the binding on 2.4?

Yes. I installed it on my RP3 with 2.4.

I was able get it set up on my gen 3 ATV. I was able to get artist and song information while playing some music. It doesn’t automatically fetch the album art, but I think that might be in a future release.

I hope to have more time later this week to test it out and to set it up on my ATV4.

I initially had trouble downloading the file. I changed the first part of the url from raw.github.com to gibhub.com and it worked. I suspect it has something to do with either my Windows 8 OS or the chrome browser, because on my ipad, it looked like it was available to download the original link.

When I cleared my cache, I lost access to paper UI. But I found a post in the forums to fix this.

Thanks, got it!

I have the 2.5 binding on OH2.4 - works ok it seems (have only glanced). I see some play info:

Apple TV 4


yes, album art is on the list. However the ay pyATV works is

  • connect to the ATV
  • fetch status and extract the url
  • close connection to ATV

Copy&paste the retrieved into the browser doesn’t work. It has a session id, so I assume that it’s only valid with that session. I need to dig into that some more, but first want to integrate pairing.

good to hear

Some wierdness, for the last 2 days my bedroom TV as been turned on by the ATV several times (until I take the big swich). Started after upgrading… it does not happen at daytime, but starts around 22/23 at night…

hmm, that‘s strange. do you have a standby time? maybe the background poll wakes it up, which powers hdmi and switches on the TV. Do you see anything in the log at that time?

Nothing this night… Maybe Apple is messing with me or some updates…

ok, make sure to have DEBUG enabled (it if doesn’t mess up your log also TRACE is welcome), so we could see if there is some indication of binding activity beside status polls

Hi everyone,
Thanks for the effort and the binding. I have installed the 2.5 binding to a 2.4 openhab Pi and lost the Paper UI. Does anyone had the same issue?
Thank you in advance.
Mike

What dies it mean “I lost Paper UI”

I saw this above

@jacksteraz could you please provide details what your situation has been and how you fixed it.

I’m not aware of this issue, but who knows…
Dis you copied the binding jar into the addons folder when openhab was stopped or while OH was running?

If it helps I could provide a 2.4 build. Not
sure if this makes a difference.

Which platform are you using (OS, version, OH)?