Have your AppleTV on and go to the menu where you can pair additional remotes.
It should show up as pyatv and the pin code is 1234 (as indicated by the -p option above)
When pairing is complete you’ll get the Login ID given to you in the command line of the Pi
I’m not sure if I understand your question…?
Unless you mean that you’ll need to add 'sudo ’ to the commands mentioned, depending on your user privileges.
I think I had messed up my Python install when changing to different versions all the time.
The error i had before about ‘undefined symbol’ has gone away.
My log now shows:
2019-02-25 16:27:51.615 [INFO ] [letv.internal.handler.AppleTVHandler] - Apple-TV.Handler: Initializing AppleTV
2019-02-25 16:27:51.617 [INFO ] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: Modules will be installed in '/var/lib/openhab2/tmp/ohlib-7997981974257508372'
2019-02-25 16:27:51.650 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NoClassDefFoundError: Could not initialize class org.jpy.PyLib
at org.openhab.binding.appletv.internal.jpy.LibPyATV.<init>(LibPyATV.java:157) ~[?:?]
at org.openhab.binding.appletv.internal.handler.AppleTVHandler.lambda$0(AppleTVHandler.java:59) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Worked great on my ATV4 for me.
If an amature like me wanted to know the procedure to install it on Pi, I could help.
Also I would appreciate the implementation of an ON/OFF switch, I could help in any way.
Yes, I know the next step should be to start with more specific information in README.md describing pre-requisites and the installation. @JohnnyBravo maybe you could already start working on this
If the remote is not selectable within the ATV menu you need to restart the ATV. Usually after a reboot it comes up showing the new (unpared) remote.
In general the basic steps:
You need to have Python 3.5 on the system. 2.x will not be supported, 3.6 maybe in the future, but not yet scope of testing etc. (we are in alpha stage)
Also pyatv has to be install, which includes the atvremote module as well as the packages avhi-utils and python3-jpy
You need to install the Python libs zeroconf and sh
You need to make sure that Python modules go into the Python 3.5 folders if you have multiple Python versions install (e,g, use pip3.5 instead of pip or pip3 commands)
You need to do a manual pairing (see the pyatv doc on Github)
That said I try to bring it together (not verified)
macOS is not tested recently (I know one issue to be fix) - let me know if someone want to try
Windows: currently not supported, in fact I would need to create a Windows environment; postponed until we have a clear view how to simplify installation and get access to the platform jpy modules without embedding them with the bundle
Ubuntu: not tested, would need some changes - would be nice if someone could support
I though about that, but this means to have a ON/OFF for every possible command. If this is a request by you guys I could do it - not a big thing, but from experience I know that user’s get confused with a ton of channels.