Binding for Apple-TV

Hi @markus7017,

I followed your instructions and atvremote from cli is running and the remote is paired. I can send commands to Apple TV via cli.

But then… If I put the jar in the addons folder nothing happens. No event in the log. No module in karaf console. Nothing.

As I wrote I have openhabian 1.4 running on a pi 3b+ with OH 2.4.

Any idea what is happening?

Thanks in advance
HFM

Did you used the latest build?
https://github.com/markus7017/org.openhab.binding.appletv/blob/alpha2/target/org.openhab.binding.appletv-2.4.0-SNAPSHOT.jar

In any case you should see log entries from the OH framework (before some from the binding).

I’m also on a RPi 3+ with openhabian and OH 2.4 (Release, no snapshot)

Did you tried a OH restart and loading the bundle from the console:

openhab-cli

bundle:list | grep Apple
bundle:start <bundle id> or 
bundle:restart <bundle-id>

This shows if the bundle is registered and can get loaded, e.g. if there is a missing dependent module it could happen that you don’t see the bundle startup in the log, but on the console.

I’ve been trying my best to find a way to detect if the AppleTV is either ON or in sleep mode, but no luck so far… It seems like such a simple thing to do, but I just can’t seem to find a way.

Why is that important? The device is alway ON or on standby. You could it wakeup e.g. by sending the top_menu command

I know I can wake it up by sending a command to the ATV, but that’s no so important to me.
I’d like to detect if the ATV is On or in sleep mode so i can control other things based on that.

So for example: If ATV changes from sleep to On, then set TV input to HDMI-2

How does it hoes on? With remote?

I use scenes:

  • turn on TV
  • turn on AppleTV
  • select correct hdmi on TV
  • adjust volumr
  • turn ambilight on (Dreamscreen)
  • turn off some regular light

another scene for

  • regular TV
  • amazon, Netflix
  • and β€œGood night” = everything off
  • items expose by Hue and controlled by Alexa triggering the different scenes

@Markus7017. I can confirm that I have this working on a gen 2 and a gen 4 ATV.

I only have the remoteKey channel working. The other channels that show up in paperUI config, like album and media type are not working.

I don’t know if this is helpful, but https://github.com/jkiddo/jolivia seems to do the pairing process and is written in java. It was written for iTunes, but think the ATV remote pairing is the same.

Same thing for me on my ATV4. The only channel working is remoteKey. I can read everything if I launch atvcommand directly from my RasPI.

yep, that’s correct. They channels are already there, but not yet implemented (that requires processing of the events). Will be one of the next steps, but first get the base working.

No I was not aware, but very interested to look into. pyatv also supports the pairing, but maybe this lib is easier to integrate. Thanks for the info.

1 Like

I have added the jar (from https://github.com/markus7017/org.openhab.binding.appletv/blob/alpha2/target/org.openhab.binding.appletv-2.4.0-SNAPSHOT.jar):

Added

apt-get install python3-jpy

root@robin:/usr/share/openhab2/addons# ls -l
total 182832
-rw-r--r-- 1 openhab openhab 182006216 Dec 25 16:40 openhab-addons-2.4.0.kar
-rw-r--r-- 1 openhab openhab    492312 Feb 13 19:12 org.openhab.binding.amazonechocontrol_2.5.0.Beta_05.jar
-rw-r--r-- 1 openhab openhab     56163 Mar 29 09:42 org.openhab.binding.appletv-2.4.0-SNAPSHOT.jar
-rwxr-xr-x 1 openhab openhab   4643231 Dec 25 17:19 org.openhab.binding.ipcamera-2.4.0-SNAPSHOT.jar
-rw-r--r-- 1 openhab openhab        70 Dec 17 08:01 README
root@robin:/usr/share/openhab2/addons#

and have python:

root@robin:/usr/share/openhab2/addons# python3 --version
Python 3.6.7
root@robin:/usr/share/openhab2/addons#

Added

apt-get install python3-jpy
pip3 install pyatv

Restarting openhab gives no trace of the plugin being loaded, its not in the β€œadd ons” and not availble in the Inbox (+)

Whats missing?

I’m not sure if the binding works with python 3.6, I believe development was done with python 3.5

You could try the following:

sudo apt-get install python3.5 python3-pip libpython3.5 python3-jpy avahi-utils
sudo pip3.5 install pyatv zeroconf sh

Working on that … But I would assume some loging as soon as the jar was in /usr/share/openhab2/addons

itβ€˜s correct, you need Python 3.5

which platform are you running?

However, you should see logging even when Python modules are found or canβ€˜t be loaded

Please male sure you have TRACE log enabled

open OH console and load the binding manually, maybe the loader shows problems like missing depencies

Hi Markus,

Guess this is the error people are getting :slight_smile:

root@robin:/usr/share/openhab2/addons# file org.openhab.binding.appletv-2.4.0-SNAPSHOT.jar
org.openhab.binding.appletv-2.4.0-SNAPSHOT.jar: HTML document, UTF-8 Unicode text, with very long lines
root@robin:/usr/share/openhab2/addons# 

Trying to download the jar fromm at leat one links actually gets the HTML of the https://github.com/markus7017/org.openhab.binding.appletv/blob/alpha2/target/org.openhab.binding.appletv-2.4.0-SNAPSHOT.jar page…

Stupid, but actually easy mistake to make by rightclicking and save…

That helped, even though I now ran into:

2019-03-31 14:30:34.265 [INFO ] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: Modules will be installed in '/var/lib/openhab2/tmp/ohlib-8206097929330704034'
2019-03-31 14:30:34.434 [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) [?:?]**strong text**

Info

root@robin:/usr/bin# sudo apt-get install python3-jpy
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-jpy is already the newest version (0.9-1).
0 upgraded, 0 newly installed, 0 to remove and 74 not upgraded.
root@robin:/usr/bin#

The correct link is: https://github.com/markus7017/org.openhab.binding.appletv/blob/alpha2/target/org.openhab.binding.appletv-2.4.0-SNAPSHOT.jar?raw=true
pay attention to ?raw=true

Which platform are you running?

  • OS
  • OH version

Please provide a TRACE log from the initialization. There should be more diagnostic information.

I am on Ubuntu 18.04 and have 2 Apple TVs
Python 3.5 installed
jpy and pyTV installed.

root@robin:/usr/bin# tail -f /var/log/openhab2/openhab.log | grep "jpy."
2019-04-02 11:36:49.539 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpyLib=lib/jpy/lib.synology-x86-64-3.5
2019-04-02 11:36:49.541 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonExecutable: /usr/bin/python3
2019-04-02 11:36:49.557 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonLib: /usr/lib/x86_64-linux-gnu/libpython3.5m.so
2019-04-02 11:36:49.560 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jpyLib: /var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so
2019-04-02 11:36:49.563 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jdlLib: /var/lib/openhab2/tmp/ohlib-3421330354994831441/jdl.so
2019-04-02 11:36:49.565 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonPrefix: /usr
java.lang.UnsatisfiedLinkError: /var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so: /var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so: undefined symbol: PyFloat_Type
	at org.jpy.PyLib.loadLib(PyLib.java:416) ~[?:?]
	at org.jpy.PyLib.<clinit>(PyLib.java:465) ~[?:?]
	at org.openhab.binding.appletv.internal.jpy.LibPyATV.<init>(LibPyATV.java:157) ~[?:?]
2019-04-02 11:36:52.902 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpyLib=lib/jpy/lib.synology-x86-64-3.5
2019-04-02 11:36:52.903 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonExecutable: /usr/bin/python3
2019-04-02 11:36:52.912 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonLib: /usr/lib/x86_64-linux-gnu/libpython3.5m.so
2019-04-02 11:36:52.926 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jpyLib: /var/lib/openhab2/tmp/ohlib-3908827599501265320/jpy.so
2019-04-02 11:36:52.928 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jdlLib: /var/lib/openhab2/tmp/ohlib-3908827599501265320/jdl.so
2019-04-02 11:36:52.933 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonPrefix: /usr
java.lang.NoClassDefFoundError: Could not initialize class org.jpy.PyLib
	at org.openhab.binding.appletv.internal.jpy.LibPyATV.<init>(LibPyATV.java:157) ~[?:?]


^C
root@robin:/usr/bin# /usr/bin/python3 --version
Python 3.5.7
root@robin:/usr/bin# file /var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so
/var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=973323b28cebcde213556266ded7c036a84892d5, with debug_info, not stripped

But I think my pyatv is busted now… (has been working…)

root@robin:/usr/bin# sudo /usr/bin/python3 -m pip install pyatv
The directory '/home/bnp/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/bnp/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pyatv
  Downloading https://files.pythonhosted.org/packages/ef/76/b32b5fed37022612a48300b7666c8e75315cfddc9b7734e442a613140765/pyatv-0.3.12-py3-none-any.whl (41kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 51kB 1.6MB/s
Collecting curve25519-donna>=1.3 (from pyatv)
  Downloading https://files.pythonhosted.org/packages/01/05/1ab1cc54c2b1e933721b8e65fedc01098e6b8ffdccedbc4a682d4e0db8c1/curve25519-donna-1.3.tar.gz
Collecting aiohttp>=3.0.1 (from pyatv)
  Downloading https://files.pythonhosted.org/packages/21/e6/35e3f6b1a0aea0c5567ef7fadc727487cacb7a15a892403213fcee8f9280/aiohttp-3.5.4-cp35-cp35m-manylinux1_x86_64.whl (1.1MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1.1MB 357kB/s
Requirement already satisfied: cryptography>=1.8.1 in /usr/lib/python3/dist-packages (from pyatv)
Requirement already satisfied: srptools>=0.2.0 in /usr/local/lib/python3.5/dist-packages (from pyatv)
Collecting ed25519>=1.4 (from pyatv)
  Downloading https://files.pythonhosted.org/packages/d5/d6/cd19a64022dc7557d245aad6a943eed7693189b48c58a9adf3bc00ceedc5/ed25519-1.4.tar.gz (866kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 870kB 507kB/s
Requirement already satisfied: zeroconf>=0.17.7 in /usr/local/lib/python3.5/dist-packages (from pyatv)
Requirement already satisfied: netifaces>=0.10.0 in /usr/lib/python3/dist-packages (from pyatv)
Requirement already satisfied: chardet<4.0,>=2.0 in /usr/lib/python3/dist-packages (from aiohttp>=3.0.1->pyatv)
Collecting typing-extensions>=3.6.5; python_version < "3.7" (from aiohttp>=3.0.1->pyatv)
  Downloading https://files.pythonhosted.org/packages/0f/62/c66e553258c37c33f9939abb2dd8d2481803d860ff68e635466f12aa7efa/typing_extensions-3.7.2-py3-none-any.whl
Collecting async-timeout<4.0,>=3.0 (from aiohttp>=3.0.1->pyatv)
  Downloading https://files.pythonhosted.org/packages/e1/1e/5a4441be21b0726c4464f3f23c8b19628372f606755a9d2e46c187e65ec4/async_timeout-3.0.1-py3-none-any.whl
Collecting idna-ssl>=1.0; python_version < "3.7" (from aiohttp>=3.0.1->pyatv)
  Downloading https://files.pythonhosted.org/packages/46/03/07c4894aae38b0de52b52586b24bf189bb83e4ddabfe2e2c8f2419eec6f4/idna-ssl-1.1.0.tar.gz
Requirement already satisfied: attrs>=17.3.0 in /usr/lib/python3/dist-packages (from aiohttp>=3.0.1->pyatv)
Collecting yarl<2.0,>=1.0 (from aiohttp>=3.0.1->pyatv)
  Downloading https://files.pythonhosted.org/packages/f4/56/c6dc878f561034862c1c97c052ed7d5363bed12ce95a9390ea85163ba3a0/yarl-1.3.0-cp35-cp35m-manylinux1_x86_64.whl (247kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 256kB 1.6MB/s
Collecting multidict<5.0,>=4.0 (from aiohttp>=3.0.1->pyatv)
  Downloading https://files.pythonhosted.org/packages/0a/32/f0840e0305a79f8adbc606623a8a8d0196e931a07b946557fdff9df1196b/multidict-4.5.2-cp35-cp35m-manylinux1_x86_64.whl (304kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 307kB 1.2MB/s
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from srptools>=0.2.0->pyatv)
Requirement already satisfied: ifaddr in /usr/local/lib/python3.5/dist-packages (from zeroconf>=0.17.7->pyatv)
Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from idna-ssl>=1.0; python_version < "3.7"->aiohttp>=3.0.1->pyatv)
Installing collected packages: curve25519-donna, typing-extensions, async-timeout, idna-ssl, multidict, yarl, aiohttp, ed25519, pyatv
  Running setup.py install for curve25519-donna ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tgpqp6fx/curve25519-donna/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-_e08me9o-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/curve25519
    copying python-src/curve25519/__init__.py -> build/lib.linux-x86_64-3.5/curve25519
    copying python-src/curve25519/keys.py -> build/lib.linux-x86_64-3.5/curve25519
    creating build/lib.linux-x86_64-3.5/curve25519/test
    copying python-src/curve25519/test/test_curve25519.py -> build/lib.linux-x86_64-3.5/curve25519/test
    copying python-src/curve25519/test/__init__.py -> build/lib.linux-x86_64-3.5/curve25519/test
    copying python-src/curve25519/test/test_speed.py -> build/lib.linux-x86_64-3.5/curve25519/test
    running build_ext
    building 'curve25519._curve25519' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/python-src
    creating build/temp.linux-x86_64-3.5/python-src/curve25519
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-aK5X5j/python3.5-3.5.7=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c python-src/curve25519/curve25519module.c -o build/temp.linux-x86_64-3.5/python-src/curve25519/curve25519module.o
    python-src/curve25519/curve25519module.c:3:10: fatal error: Python.h: No such file or directory
     #include <Python.h>
              ^~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tgpqp6fx/curve25519-donna/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-_e08me9o-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-tgpqp6fx/curve25519-donna/
root@robin:/usr/bin#

Guess it was busted during several tries/attemps of all sorts :frowning:

ok, this is some Python3.5 on Ubuntu crap :slight_smile:

root@robin:/usr/bin# find /usr -name "Python.h"
/usr/include/python3.6m/Python.h
/usr/include/python2.7/Python.h

root@robin:/usr/bin# rm python3
root@robin:/usr/bin# ln -s ./python3.6 python3
root@robin:/usr/bin# sudo /usr/bin/python3 -m pip install pyatv
The directory '/home/bnp/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/bnp/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: pyatv in /usr/local/lib/python3.6/dist-packages
Requirement already satisfied: curve25519-donna>=1.3 in /usr/local/lib/python3.6/dist-packages (from pyatv)
Requirement already satisfied: aiohttp>=3.0.1 in /usr/local/lib/python3.6/dist-packages (from pyatv)
Requirement already satisfied: srptools>=0.2.0 in /usr/local/lib/python3.6/dist-packages (from pyatv)
Requirement already satisfied: zeroconf>=0.17.7 in /usr/local/lib/python3.6/dist-packages (from pyatv)
Requirement already satisfied: netifaces>=0.10.0 in /usr/lib/python3/dist-packages (from pyatv)
Requirement already satisfied: ed25519>=1.4 in /usr/local/lib/python3.6/dist-packages (from pyatv)
Requirement already satisfied: cryptography>=1.8.1 in /usr/lib/python3/dist-packages (from pyatv)
Requirement already satisfied: typing-extensions>=3.6.5; python_version < "3.7" in /usr/local/lib/python3.6/dist-packages (from aiohttp>=3.0.1->pyatv)
Requirement already satisfied: chardet<4.0,>=2.0 in /usr/lib/python3/dist-packages (from aiohttp>=3.0.1->pyatv)
Requirement already satisfied: multidict<5.0,>=4.0 in /usr/local/lib/python3.6/dist-packages (from aiohttp>=3.0.1->pyatv)
Requirement already satisfied: idna-ssl>=1.0; python_version < "3.7" in /usr/local/lib/python3.6/dist-packages (from aiohttp>=3.0.1->pyatv)
Requirement already satisfied: async-timeout<4.0,>=3.0 in /usr/local/lib/python3.6/dist-packages (from aiohttp>=3.0.1->pyatv)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.6/dist-packages (from aiohttp>=3.0.1->pyatv)
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.6/dist-packages (from aiohttp>=3.0.1->pyatv)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from srptools>=0.2.0->pyatv)
Requirement already satisfied: ifaddr in /usr/local/lib/python3.6/dist-packages (from zeroconf>=0.17.7->pyatv)
Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.6/dist-packages (from idna-ssl>=1.0; python_version < "3.7"->aiohttp>=3.0.1->pyatv)

root@robin:/usr/bin# atvremote --address 10.0.0.157 --login_id ******************* top_menu

that works, the Apple TV is responding.

Startup still gives:

2019-04-02 11:53:17.000 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpyLib=lib/jpy/lib.synology-x86-64-3.5
2019-04-02 11:53:17.002 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonExecutable: /usr/bin/python3
2019-04-02 11:53:17.010 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonLib: /usr/lib/x86_64-linux-gnu/libpython3.5m.so
2019-04-02 11:53:17.016 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jpyLib: /var/lib/openhab2/tmp/ohlib-2951143335464546000/jpy.so
2019-04-02 11:53:17.030 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jdlLib: /var/lib/openhab2/tmp/ohlib-2951143335464546000/jdl.so
2019-04-02 11:53:17.044 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonPrefix: /usr
java.lang.UnsatisfiedLinkError: /var/lib/openhab2/tmp/ohlib-2951143335464546000/jpy.so: /var/lib/openhab2/tmp/ohlib-2951143335464546000/jpy.so: undefined symbol: PyFloat_Type
	at org.jpy.PyLib.loadLib(PyLib.java:416) ~[?:?]
	at org.jpy.PyLib.<clinit>(PyLib.java:465) ~[?:?]
	at org.openhab.binding.appletv.internal.jpy.LibPyATV.<init>(LibPyATV.java:157) ~[?:?]
2019-04-02 11:53:20.855 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpyLib=lib/jpy/lib.synology-x86-64-3.5
2019-04-02 11:53:20.858 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonExecutable: /usr/bin/python3
2019-04-02 11:53:20.869 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonLib: /usr/lib/x86_64-linux-gnu/libpython3.5m.so
2019-04-02 11:53:20.871 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jpyLib: /var/lib/openhab2/tmp/ohlib-8246213748312994275/jpy.so
2019-04-02 11:53:20.874 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jdlLib: /var/lib/openhab2/tmp/ohlib-8246213748312994275/jdl.so
2019-04-02 11:53:20.904 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonPrefix: /usr
java.lang.NoClassDefFoundError: Could not initialize class org.jpy.PyLib
	at org.openhab.binding.appletv.internal.jpy.LibPyATV.<init>(LibPyATV.java:157) ~[?:?]
^C

And Sending β€œTop Menu” via Paper UI gives:

2019-04-02 11:58:05.910 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.appletv.internal.handler.AppleTVHandler@750e4038': null
	at org.openhab.binding.appletv.internal.handler.AppleTVHandler.handleCommand(AppleTVHandler.java:94) ~[?:?]
	at com.sun.proxy.$Proxy131.handleCommand(Unknown Source) [255:org.openhab.binding.appletv:2.4.0.201902251908]