movies: top_menu up up down left left left left select left left select right
tv shows: top_menu up down left left left left right select left select
music: top_menu up up down left left left left right right select select
auto background discovery is configurable (maybe turned off after initial setup)
channel totalTime fixed
channel totalPercent added: percentage within the media / set position on % (see below)
special keys movie renamed to movies (with s, beside tvshows and music)
binding configuration and thing config options for pairing added (work in progress)
some refactoring, pyatv.zip added to repository
If you want to use the new channel you need to delete and re-discover the thing. Disabling auto discovery is possible, maybe no need to discover new Apple-TVs in the background if you know that there will be no new one. Default is ON for new users.
A nice gimmick is setting the position by %, e.g. sending ā50%ā to the totalPercent channel. This allows for example to use a slider in your HABpanel.
Please stop OH before updating the binding. You may need to clear the cache.
Is there any way to speed up the status polling? Iād like to control my hue lights depending on whether my ATV is playing, paused, idle etc. Right now it takes up to 10s before a status change is detected by openhab.
I also noticed that my ATV get woken up by the polling. A short while after I put it to sleep it will wake up again. Any workaround for this?
Otherwise the plugin works great. Setup was a breeze
My openHAB is running on Ubuntu 18.04 x64 with python 3.6 and as I see the code is using 3.5 on linux. I somehow thought of altering the java file and rebuilding the jar, but it somehow fails to find org.jpy.PyLib when compiling.
Are there any build instructions? I have jpy installed via python3.6 setup.py --maven build on my macOs X
Iām using macOS too. You need a OH 2.4 build environment. Then it should work if you go to the binding dir and run āmvn installā or āmvn clean installā w/o -DskipChecks=true
I donāt see any dependency in pom.xml related to jpy. So afaik it cannot find the jar file, and complains about this import. Are there any steps that I need to do with jpy afer doing python3.6 setup.py --maven build ? E.g. copy jar somehere?
did you tried the latest pyatv build?
even this works it will be a lot of effort to upgrade the binding. Iām using a modified pyatv version, which required a lot of time
I donāt have an ATV4 so I canāt do any testing
this doesnāt work. While integrating pyatv I need to make a lot of changes to fit into the java environment. The binding is not just running a command line, because this took 3-5s per key. It directly integrates the Python code (using jpy). You could check the repo and compare the initial checkin with the latest code.
First of all thank you for your work and efforts.
I really like to use this binding and tried all sorts of ideas in this thread.
But I canāt get it to work.
Installing to the stage of scanning and registering with my atv4 is done. I can put commands to my atv via atvremote, thatās fine.
But if I drop the jar 2.5.0 into my addons folder, oh crashes. After i restart oh, all other bindings are working well, but appletv binding posts errors every 10s.
I suspect itās the polling.
I think itās a conflict of the python versions installed on my rpi4. The readme tells 3.5 is needed, I have 3.7 running. I canāt get the install of pyatv to work with 3.5.
My oh is 2.5.3 stable, server is raspberry pi 4, running openhabian.
I would greatly appreciate any help to get this working. I donāt want to go the path of doing a minimal control via executecommands for atvremote via cli.
Thanks in advance,
Thomas
the binding is embedding pyatv 0.3, which was fine until Apple made those changes, which leads into
ATV4 with iOS 13 doesnāt work
ATV3 still works fine, but the bindings shows the exception every 10s (which doesnāt impact overall functionality, at least in my own installation)
I worked a lot on the embedded PyATV version to build a bridge between the binding and pyatv. This is based on Python, which I have only ātrial&errorā knowledge. In fact I tried to wrap the CLI version directly into the binding and have some kind of events (bacllbacks to the binding) - sounds ugly, is ugly, but was the only way to get something working
This would have to be done with PyATV4 again and I know thatās a good bunch of work
Iām pretty sure the current approach will never pass the review process
In fact Iām lacking the required Python knowledge. I know that OH embeds the same Java/Python bridge to enable Jython based rules. The PyATV didnāt show much interest to help on this.
Fianally itās a matter of time. Iām already spending significant time on developing the bindings for Shelly, MagentaTV, GREE, Carnet, Rachio so the ATV binding got less and less priority. And last, but not least: I donāt have an ATV4, which means a lot of back and forth for testing.
If any one else is missing Markusā great AppleTV binding because of tvOS upgrade, there is a workaround!
I was frustrated losing the binding but in my research for a solution I found this: HABApp
Using HABApp, I can use the pyatv library directly. It is not as integrated as a binding and I havenāt succeeded in getting all āpushā functionality in pyatv to work, but my main use is to be able to use my single remote for āeverythingā and for that it works great!