Has anyone thought about developing a binding for IP control of (non jail broken) Apple TV’s?
Several of the expensive home automation companies offer this (Crestron, RTI) and so does Roomie and iRule.
The protocol is not public, and would require a lot of reverse engineering. This article http://www.cepro.com/article/apple_tv_gen_2_and_3_cracked_rti_gets_two-way_ip_control discusses how RTI did it.
The pairing process for iTunes was reverse engineered around 2008. The article has links to http://dacp.jsharkey.org/ and http://blog.mycroes.nl/2008/08/pairing-itunes-remote-app-with-your-own.html. This blog is also interesting http://jinxidoru.blogspot.com/2009/06/itunes-remote-pairing-code.html
The article suggests, that a lot of the code in iTunes and Airplay was reused in AppleTV. There is an iphone app that controls the AppleTV over IP, which can be wiresharked. I could be a tester of this binding, if anyone is up for the challenge.
Seconded - would be very handy to have this control.
I found another useful reference to this:
(We need to recruit this guy to work on openHAB!)
Also, in this Podcast interview, Will Price of Roomie Remote talks about how they got IP control of AppleTV. Basically, he says that once you have iTunes control, getting AppleTV control isn’t that much harder.
By searching google for “github” and “appletv, airplay, daap, mdns”, there are is lots of information about the appletv communication protocol. For reference, I’ll post several of the most promising.
https://github.com/benumc/Apple-TV-Basic-IP This is for integration with Savant home automation systems.
https://github.com/jeanregisser/mediaremotetv-protocol This link describes the protocol, with emphasis on the latest gen 4 Apple TV.
https://github.com/skevy/atlas-backend/blob/master/atlas/services/appletv.coffee This appears to be a module for a different automation program.
https://github.com/jkiddo/jolivia Not really Apple TV, but has java implementation of several apple protocols.
Any developers interested in taking this on?
There is an iPad only app called ytrack, that is still available, but not actively maintained. This app is designed to control iTunes, not Apple TV. But,I was able to pair my Apple TV, gen 2. The app has play/pause toggle button and forward and reverse buttons, which do work when an Apple TV video is playing. Also, the “album art” from the show I was watching shows up on the ipad, in the app. Several of the control buttons (left, right, up, down, select, home, menu) are not available. The source code for the app is available in the google code archives. It is written in objective C. https://code.google.com/archive/p/ytrack/wikis
I noticed that the original Sharkey code had a login of
but the newer versions do this:
I speculate that the “hasFP” stands for Fairplay DRM encryption.
- The protocol in the mediaremotetv-protocol mentioned above appears to be a brand new protocol that is unique to the generation 4 Apple TV.