Apple TV Integration at HomeKit Binding

@yfre :
Do you think that this would be possible? To access all the information of an Apple TV like pause, play and other data from Homekit?
For example Openhab could light up the room when the Apple TV pause’s the video and switch off the light when you play the video again?

Thank you for your information.

Hi Jan,

cool use case.

im currently working on television support for openhab but it will work other way around - openHAB will appear as TV and could be controlled via homekit remote on iphone (and could in turn send commands to lights, etc)

in order to get information from Apple TV we would need to be homekit client, i.e. consume/use homekit services. This is not supported, not only for Apple TV but also for other homekit devices. I have no plans to implement it. but maybe somebody else will do it.

Hi-

I realize this is an old thread, but I think what you’re looking for is an OpenHAB binding for AppleTV. Even though your AppleTV appears in the Home app, it’s not controlled via HomeKit, but rather by a series of other (evolving) protocols.

There is a binding for AppleTV that supports OpenHAB 2, but because of the way it was built, it needed to be rewritten for OpenHAB 3. I’ve been working on that and posted about an early version I wanted to get feedback on.

The readme and installation instructions are badly formatted on the link in that post, but a more readable version is available here (You only need to follow the steps to install pyatv; a pre-built version of the binding is available from the post):

It’s still a work in progress (mostly in terms of ease of installation and improved error handling) but I’ve been using it for the last month and it has been reliable when I’ve used openhab to view the status or control the device. Additionally, it’s got a number of features and benefits that the previous version lacked.

Please have a look and if there’s anything I can do to assist in getting it working, please don’t hesitate to get in touch!

2 Likes

Thank you for you work! it seems to be promising. I already achieve to install the addon and get it work on openhab 5.x but there are some issue regulary

1/ Apple TV is on, is on the same IP - biding claims it’s not able to find a apple tv device

2/ Random problems - sometimes it’s working sometimes not. Apple TV in sleep mode command turn_on not working



2025-09-08 19:03:26.779 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446089 isRunning=true
2025-09-08 19:03:26.779 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Running /var/lib/openhab/tmp/appletv-binding/bin/atvscript -i 1254B978AA8B --raop-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:8cff57ed265b04c4e75b199cc838dadb7b78082dd4a9007db3de114cfd928ba9:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39663839643535322d313664642d343237392d393833382d633335336633343833303462 --airplay-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:656c0495d7b5aea9ff5120843876f05cc81e87d9b6a69991c9a1be57d3350c17:31313534423937382d414138422d343837412d413932372d433845383644423635314536:30396333396264642d643433332d343238372d396431382d366162386234303935393832 --companion-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:a720ba105ea66c46f6905934d18a582bcd2e734dec03843a4cdf61046d5b8b2f:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39643732643133352d623062302d346239322d613434322d343435306437323831386238 command_loop
2025-09-08 19:03:29.822 [ERROR] [ding.appletv.internal.AppleTVHandler] - ATV command threw exception: Object of type AttributeError is not JSON serializable:
Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 461, in _run_command
    command = command.decode('UTF-8').strip()
              ^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'decode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 618, in appstart
    args.output(await _handle_command(args, abort_sem, storage, loop)),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 359, in _handle_command
    return await _run_command(atv, args, abort_sem, loop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 526, in _run_command
    stdout_write_nb(args.output(output(False, values={"exception": e})))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type AttributeError is not JSON serializable

2025-09-08 19:03:29.938 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#powerStatus although the handler was already disposed.
2025-09-08 19:03:29.942 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#playMode although the handler was already disposed.
2025-09-08 19:03:29.943 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#repeat although the handler was already disposed.
2025-09-08 19:03:29.943 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#shuffle although the handler was already disposed.
2025-09-08 19:03:29.943 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#mediaType although the handler was already disposed.
2025-09-08 19:03:29.944 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#album although the handler was already disposed.
2025-09-08 19:03:29.944 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#artist although the handler was already disposed.
2025-09-08 19:03:29.944 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.944 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.944 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.944 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:29.944 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:29.945 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:29.945 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.945 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.945 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:29.945 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:29.945 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:29.945 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.946 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.946 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appId although the handler was already disposed.
2025-09-08 19:03:29.946 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appName although the handler was already disposed.
2025-09-08 19:03:29.950 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#title although the handler was already disposed.
2025-09-08 19:03:29.951 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:29.951 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:29.951 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:29.951 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#totalTime although the handler was already disposed.
2025-09-08 19:03:29.951 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#position although the handler was already disposed.
2025-09-08 19:03:29.952 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#playMode although the handler was already disposed.
2025-09-08 19:03:29.952 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#repeat although the handler was already disposed.
2025-09-08 19:03:29.952 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#shuffle although the handler was already disposed.
2025-09-08 19:03:29.952 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#mediaType although the handler was already disposed.
2025-09-08 19:03:29.952 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#album although the handler was already disposed.
2025-09-08 19:03:29.952 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#artist although the handler was already disposed.
2025-09-08 19:03:29.953 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.953 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.953 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.953 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:29.953 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:29.953 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:29.953 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.954 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.954 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:29.954 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:29.958 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:29.959 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.960 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:29.962 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appId although the handler was already disposed.
2025-09-08 19:03:29.963 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appName although the handler was already disposed.
2025-09-08 19:03:29.963 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#title although the handler was already disposed.
2025-09-08 19:03:29.966 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:29.967 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:29.967 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:29.967 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#totalTime although the handler was already disposed.
2025-09-08 19:03:29.967 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#position although the handler was already disposed.
2025-09-08 19:03:30.207 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Command process=446084 exited.
2025-09-08 19:03:30.208 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446084 exists.
2025-09-08 19:03:30.212 [WARN ] [nding.appletv.internal.PyATV$Scanner] - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2025-09-08 19:03:30.212 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Started process 446095
2025-09-08 19:03:30.212 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446095 isRunning=true
2025-09-08 19:03:30.212 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Running /var/lib/openhab/tmp/appletv-binding/bin/atvscript -i 1254B978AA8B --raop-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:8cff57ed265b04c4e75b199cc838dadb7b78082dd4a9007db3de114cfd928ba9:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39663839643535322d313664642d343237392d393833382d633335336633343833303462 --airplay-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:656c0495d7b5aea9ff5120843876f05cc81e87d9b6a69991c9a1be57d3350c17:31313534423937382d414138422d343837412d413932372d433845383644423635314536:30396333396264642d643433332d343238372d396431382d366162386234303935393832 --companion-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:a720ba105ea66c46f6905934d18a582bcd2e734dec03843a4cdf61046d5b8b2f:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39643732643133352d623062302d346239322d613434322d343435306437323831386238 command_loop
2025-09-08 19:03:32.649 [ERROR] [ding.appletv.internal.AppleTVHandler] - ATV command threw exception: Object of type AttributeError is not JSON serializable:
Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 461, in _run_command
    command = command.decode('UTF-8').strip()
              ^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'decode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 618, in appstart
    args.output(await _handle_command(args, abort_sem, storage, loop)),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 359, in _handle_command
    return await _run_command(atv, args, abort_sem, loop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 526, in _run_command
    stdout_write_nb(args.output(output(False, values={"exception": e})))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type AttributeError is not JSON serializable

2025-09-08 19:03:33.103 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Command process=446089 exited.
2025-09-08 19:03:33.104 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446089 exists.
2025-09-08 19:03:33.110 [WARN ] [nding.appletv.internal.PyATV$Scanner] - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2025-09-08 19:03:33.111 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Started process 446101
2025-09-08 19:03:33.111 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446101 isRunning=true
2025-09-08 19:03:33.111 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Running /var/lib/openhab/tmp/appletv-binding/bin/atvscript -i 1254B978AA8B --raop-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:8cff57ed265b04c4e75b199cc838dadb7b78082dd4a9007db3de114cfd928ba9:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39663839643535322d313664642d343237392d393833382d633335336633343833303462 --airplay-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:656c0495d7b5aea9ff5120843876f05cc81e87d9b6a69991c9a1be57d3350c17:31313534423937382d414138422d343837412d413932372d433845383644423635314536:30396333396264642d643433332d343238372d396431382d366162386234303935393832 --companion-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:a720ba105ea66c46f6905934d18a582bcd2e734dec03843a4cdf61046d5b8b2f:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39643732643133352d623062302d346239322d613434322d343435306437323831386238 command_loop
2025-09-08 19:03:35.933 [ERROR] [ding.appletv.internal.AppleTVHandler] - ATV command threw exception: Object of type AttributeError is not JSON serializable:
Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 461, in _run_command
    command = command.decode('UTF-8').strip()
              ^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'decode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 618, in appstart
    args.output(await _handle_command(args, abort_sem, storage, loop)),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 359, in _handle_command
    return await _run_command(atv, args, abort_sem, loop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 526, in _run_command
    stdout_write_nb(args.output(output(False, values={"exception": e})))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type AttributeError is not JSON serializable

2025-09-08 19:03:36.062 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#powerStatus although the handler was already disposed.
2025-09-08 19:03:36.063 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#playMode although the handler was already disposed.
2025-09-08 19:03:36.063 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#repeat although the handler was already disposed.
2025-09-08 19:03:36.065 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#shuffle although the handler was already disposed.
2025-09-08 19:03:36.066 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#mediaType although the handler was already disposed.
2025-09-08 19:03:36.067 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#album although the handler was already disposed.
2025-09-08 19:03:36.068 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#artist although the handler was already disposed.
2025-09-08 19:03:36.069 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.069 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.069 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.069 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:36.070 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:36.070 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:36.074 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.075 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.075 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:36.075 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:36.075 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:36.075 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.076 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.076 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appId although the handler was already disposed.
2025-09-08 19:03:36.076 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appName although the handler was already disposed.
2025-09-08 19:03:36.076 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#title although the handler was already disposed.
2025-09-08 19:03:36.076 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:36.076 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:36.076 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:36.077 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#totalTime although the handler was already disposed.
2025-09-08 19:03:36.077 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#position although the handler was already disposed.
2025-09-08 19:03:36.077 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#playMode although the handler was already disposed.
2025-09-08 19:03:36.077 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#repeat although the handler was already disposed.
2025-09-08 19:03:36.077 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#shuffle although the handler was already disposed.
2025-09-08 19:03:36.078 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#mediaType although the handler was already disposed.
2025-09-08 19:03:36.078 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#album although the handler was already disposed.
2025-09-08 19:03:36.080 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#artist although the handler was already disposed.
2025-09-08 19:03:36.081 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.083 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.085 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.086 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:36.088 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:36.088 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:36.090 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.090 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.091 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:36.091 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:36.091 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:36.091 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.091 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:36.093 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appId although the handler was already disposed.
2025-09-08 19:03:36.094 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appName although the handler was already disposed.
2025-09-08 19:03:36.096 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#title although the handler was already disposed.
2025-09-08 19:03:36.097 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:36.097 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:36.097 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:36.097 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#totalTime although the handler was already disposed.
2025-09-08 19:03:36.097 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#position although the handler was already disposed.
2025-09-08 19:03:36.303 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Command process=446095 exited.
2025-09-08 19:03:36.303 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446095 exists.
2025-09-08 19:03:36.310 [WARN ] [nding.appletv.internal.PyATV$Scanner] - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2025-09-08 19:03:36.310 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Started process 446104
2025-09-08 19:03:36.311 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446104 isRunning=true
2025-09-08 19:03:36.311 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Running /var/lib/openhab/tmp/appletv-binding/bin/atvscript -i 1254B978AA8B --raop-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:8cff57ed265b04c4e75b199cc838dadb7b78082dd4a9007db3de114cfd928ba9:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39663839643535322d313664642d343237392d393833382d633335336633343833303462 --airplay-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:656c0495d7b5aea9ff5120843876f05cc81e87d9b6a69991c9a1be57d3350c17:31313534423937382d414138422d343837412d413932372d433845383644423635314536:30396333396264642d643433332d343238372d396431382d366162386234303935393832 --companion-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:a720ba105ea66c46f6905934d18a582bcd2e734dec03843a4cdf61046d5b8b2f:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39643732643133352d623062302d346239322d613434322d343435306437323831386238 command_loop
2025-09-08 19:03:38.718 [ERROR] [ding.appletv.internal.AppleTVHandler] - ATV command threw exception: Object of type AttributeError is not JSON serializable:
Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 461, in _run_command
    command = command.decode('UTF-8').strip()
              ^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'decode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 618, in appstart
    args.output(await _handle_command(args, abort_sem, storage, loop)),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 359, in _handle_command
    return await _run_command(atv, args, abort_sem, loop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 526, in _run_command
    stdout_write_nb(args.output(output(False, values={"exception": e})))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type AttributeError is not JSON serializable

2025-09-08 19:03:39.135 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Command process=446101 exited.
2025-09-08 19:03:39.136 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446101 exists.
2025-09-08 19:03:39.142 [WARN ] [nding.appletv.internal.PyATV$Scanner] - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2025-09-08 19:03:39.143 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Started process 446111
2025-09-08 19:03:39.143 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446111 isRunning=true
2025-09-08 19:03:39.143 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Running /var/lib/openhab/tmp/appletv-binding/bin/atvscript -i 1254B978AA8B --raop-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:8cff57ed265b04c4e75b199cc838dadb7b78082dd4a9007db3de114cfd928ba9:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39663839643535322d313664642d343237392d393833382d633335336633343833303462 --airplay-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:656c0495d7b5aea9ff5120843876f05cc81e87d9b6a69991c9a1be57d3350c17:31313534423937382d414138422d343837412d413932372d433845383644423635314536:30396333396264642d643433332d343238372d396431382d366162386234303935393832 --companion-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:a720ba105ea66c46f6905934d18a582bcd2e734dec03843a4cdf61046d5b8b2f:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39643732643133352d623062302d346239322d613434322d343435306437323831386238 command_loop
2025-09-08 19:03:41.898 [ERROR] [ding.appletv.internal.AppleTVHandler] - ATV command threw exception: Object of type AttributeError is not JSON serializable:
Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 461, in _run_command
    command = command.decode('UTF-8').strip()
              ^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'decode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 618, in appstart
    args.output(await _handle_command(args, abort_sem, storage, loop)),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 359, in _handle_command
    return await _run_command(atv, args, abort_sem, loop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 526, in _run_command
    stdout_write_nb(args.output(output(False, values={"exception": e})))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type AttributeError is not JSON serializable

2025-09-08 19:03:41.982 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#powerStatus although the handler was already disposed.
2025-09-08 19:03:41.983 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#playMode although the handler was already disposed.
2025-09-08 19:03:41.983 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#repeat although the handler was already disposed.
2025-09-08 19:03:41.983 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#shuffle although the handler was already disposed.
2025-09-08 19:03:41.983 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#mediaType although the handler was already disposed.
2025-09-08 19:03:41.983 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#album although the handler was already disposed.
2025-09-08 19:03:41.984 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#artist although the handler was already disposed.
2025-09-08 19:03:41.984 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.984 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.984 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.984 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:41.984 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:41.985 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:41.985 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.985 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.985 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:41.985 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:41.985 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:41.985 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.986 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.986 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appId although the handler was already disposed.
2025-09-08 19:03:41.990 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appName although the handler was already disposed.
2025-09-08 19:03:41.991 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#title although the handler was already disposed.
2025-09-08 19:03:41.991 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:41.991 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:41.991 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:41.991 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#totalTime although the handler was already disposed.
2025-09-08 19:03:41.992 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#position although the handler was already disposed.
2025-09-08 19:03:41.992 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#playMode although the handler was already disposed.
2025-09-08 19:03:41.992 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#repeat although the handler was already disposed.
2025-09-08 19:03:41.993 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#shuffle although the handler was already disposed.
2025-09-08 19:03:41.993 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#mediaType although the handler was already disposed.
2025-09-08 19:03:41.993 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#album although the handler was already disposed.
2025-09-08 19:03:41.993 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#artist although the handler was already disposed.
2025-09-08 19:03:41.993 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.993 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.994 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.996 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:41.997 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:41.997 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:41.997 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.997 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.997 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:41.997 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:41.998 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:41.998 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:41.998 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:42.002 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appId although the handler was already disposed.
2025-09-08 19:03:42.003 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appName although the handler was already disposed.
2025-09-08 19:03:42.003 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#title although the handler was already disposed.
2025-09-08 19:03:42.003 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:42.004 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:42.004 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:42.004 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#totalTime although the handler was already disposed.
2025-09-08 19:03:42.004 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#position although the handler was already disposed.
2025-09-08 19:03:42.263 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Command process=446104 exited.
2025-09-08 19:03:42.264 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446104 exists.
2025-09-08 19:03:42.270 [WARN ] [nding.appletv.internal.PyATV$Scanner] - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2025-09-08 19:03:42.271 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Started process 446116
2025-09-08 19:03:42.271 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446116 isRunning=true
2025-09-08 19:03:42.271 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Running /var/lib/openhab/tmp/appletv-binding/bin/atvscript -i 1254B978AA8B --raop-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:8cff57ed265b04c4e75b199cc838dadb7b78082dd4a9007db3de114cfd928ba9:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39663839643535322d313664642d343237392d393833382d633335336633343833303462 --airplay-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:656c0495d7b5aea9ff5120843876f05cc81e87d9b6a69991c9a1be57d3350c17:31313534423937382d414138422d343837412d413932372d433845383644423635314536:30396333396264642d643433332d343238372d396431382d366162386234303935393832 --companion-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:a720ba105ea66c46f6905934d18a582bcd2e734dec03843a4cdf61046d5b8b2f:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39643732643133352d623062302d346239322d613434322d343435306437323831386238 command_loop
2025-09-08 19:03:44.761 [ERROR] [ding.appletv.internal.AppleTVHandler] - ATV command threw exception: Object of type AttributeError is not JSON serializable:
Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 461, in _run_command
    command = command.decode('UTF-8').strip()
              ^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'decode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 618, in appstart
    args.output(await _handle_command(args, abort_sem, storage, loop)),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 359, in _handle_command
    return await _run_command(atv, args, abort_sem, loop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 526, in _run_command
    stdout_write_nb(args.output(output(False, values={"exception": e})))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type AttributeError is not JSON serializable

2025-09-08 19:03:45.335 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Command process=446111 exited.
2025-09-08 19:03:45.336 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446111 exists.
2025-09-08 19:03:45.342 [WARN ] [nding.appletv.internal.PyATV$Scanner] - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2025-09-08 19:03:45.342 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Started process 446121
2025-09-08 19:03:45.343 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446121 isRunning=true
2025-09-08 19:03:45.343 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Running /var/lib/openhab/tmp/appletv-binding/bin/atvscript -i 1254B978AA8B --raop-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:8cff57ed265b04c4e75b199cc838dadb7b78082dd4a9007db3de114cfd928ba9:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39663839643535322d313664642d343237392d393833382d633335336633343833303462 --airplay-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:656c0495d7b5aea9ff5120843876f05cc81e87d9b6a69991c9a1be57d3350c17:31313534423937382d414138422d343837412d413932372d433845383644423635314536:30396333396264642d643433332d343238372d396431382d366162386234303935393832 --companion-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:a720ba105ea66c46f6905934d18a582bcd2e734dec03843a4cdf61046d5b8b2f:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39643732643133352d623062302d346239322d613434322d343435306437323831386238 command_loop
2025-09-08 19:03:47.962 [ERROR] [ding.appletv.internal.AppleTVHandler] - ATV command threw exception: Object of type AttributeError is not JSON serializable:
Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 461, in _run_command
    command = command.decode('UTF-8').strip()
              ^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'decode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 618, in appstart
    args.output(await _handle_command(args, abort_sem, storage, loop)),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 359, in _handle_command
    return await _run_command(atv, args, abort_sem, loop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/openhab/tmp/appletv-binding/lib/python3.11/site-packages/pyatv/scripts/atvscript.py", line 526, in _run_command
    stdout_write_nb(args.output(output(False, values={"exception": e})))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type AttributeError is not JSON serializable

2025-09-08 19:03:48.058 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#powerStatus although the handler was already disposed.
2025-09-08 19:03:48.062 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#playMode although the handler was already disposed.
2025-09-08 19:03:48.062 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#repeat although the handler was already disposed.
2025-09-08 19:03:48.063 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#shuffle although the handler was already disposed.
2025-09-08 19:03:48.063 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#mediaType although the handler was already disposed.
2025-09-08 19:03:48.064 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#album although the handler was already disposed.
2025-09-08 19:03:48.064 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#artist although the handler was already disposed.
2025-09-08 19:03:48.065 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.070 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.071 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.071 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:48.071 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:48.071 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:48.072 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.072 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.072 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:48.072 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:48.072 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:48.072 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.072 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.073 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appId although the handler was already disposed.
2025-09-08 19:03:48.073 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appName although the handler was already disposed.
2025-09-08 19:03:48.073 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#title although the handler was already disposed.
2025-09-08 19:03:48.073 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:48.073 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:48.073 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:48.074 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#totalTime although the handler was already disposed.
2025-09-08 19:03:48.074 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#position although the handler was already disposed.
2025-09-08 19:03:48.175 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#playMode although the handler was already disposed.
2025-09-08 19:03:48.175 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#repeat although the handler was already disposed.
2025-09-08 19:03:48.176 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#shuffle although the handler was already disposed.
2025-09-08 19:03:48.176 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#mediaType although the handler was already disposed.
2025-09-08 19:03:48.177 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#album although the handler was already disposed.
2025-09-08 19:03:48.177 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#artist although the handler was already disposed.
2025-09-08 19:03:48.178 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.282 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.283 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.283 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:48.284 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:48.284 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:48.285 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.285 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.286 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#episodeNumber although the handler was already disposed.
2025-09-08 19:03:48.334 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Command process=446116 exited.
2025-09-08 19:03:48.335 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446116 exists.
2025-09-08 19:03:48.340 [WARN ] [nding.appletv.internal.PyATV$Scanner] - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2025-09-08 19:03:48.343 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Started process 446124
2025-09-08 19:03:48.343 [INFO ] [nding.appletv.internal.PyATV$Scanner] - Process 446124 isRunning=true
2025-09-08 19:03:48.344 [INFO ] [nding.appletv.internal.PyATV$Scanner] - AppleTVCommandLoop: Running /var/lib/openhab/tmp/appletv-binding/bin/atvscript -i 1254B978AA8B --raop-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:8cff57ed265b04c4e75b199cc838dadb7b78082dd4a9007db3de114cfd928ba9:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39663839643535322d313664642d343237392d393833382d633335336633343833303462 --airplay-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:656c0495d7b5aea9ff5120843876f05cc81e87d9b6a69991c9a1be57d3350c17:31313534423937382d414138422d343837412d413932372d433845383644423635314536:30396333396264642d643433332d343238372d396431382d366162386234303935393832 --companion-credentials 8dcc9a296e6d472c793ddee7e6d8295341266a64447c08c8efa8b10c53aafaf6:a720ba105ea66c46f6905934d18a582bcd2e734dec03843a4cdf61046d5b8b2f:31313534423937382d414138422d343837412d413932372d433845383644423635314536:39643732643133352d623062302d346239322d613434322d343435306437323831386238 command_loop
2025-09-08 19:03:48.347 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seasonNumber although the handler was already disposed.
2025-09-08 19:03:48.347 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#seriesName although the handler was already disposed.
2025-09-08 19:03:48.347 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.348 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#genre although the handler was already disposed.
2025-09-08 19:03:48.348 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appId although the handler was already disposed.
2025-09-08 19:03:48.348 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#appName although the handler was already disposed.
2025-09-08 19:03:48.349 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating channel playStatus#title although the handler was already disposed.
2025-09-08 19:03:48.349 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AppleTVHandler of thing appletv:device:12-54-B9-78-AA-8B tried updating 

Hi-

Can you let me know what version of the binding you’ve installed? The post you replied to is a few years old, so I want to make sure you’re running the latest code (I looked at the errors you’re getting and it makes me think you might not be using the latest binding.)

Let me know and I’ll see what we can do to get things working for you. Also, if you can let me know what version of the TV/HomePod software you’re running, that would be helpful too!

Hi-

I posted a message in the other thread that I think explains the errors you’re seeing. Please have a look at that message and let me know if those steps improve your situation.

Bill

-rw-r–r-- 1 openhab openhab 92268 08-27 23:11 org.openhab.binding.appletv-5.0.1.jar

I think at least some of the problems you’re seeing are being caused by the “pairing verification” process that up to now has been running regardless of whether a device was online. In the latest release of TvOS, Apple seems to be prohibiting concurrent requests, causing new connections to kick older connections offline.

I’ve got a new version of the binding that complies with this requirement, as well as one or two other improvements. If you could pop over to the other channel, you’ll see where to download the updated binding. And definitely let me know how it works/doesn’t work for you.

Thanks for your patience!

Bill