core: AppleTV Intigration no longer works with tvOS15

The problem

AppleTV intigtation can no longer connect with AppleTV’s running the new tvOS15 Beta 1. Here are all i could find in the logs

I could see this happen as each of My AppleTV’s where upgrade they worked on tvOS14.7. I updated the first one and lost access but the other still worked so i updated the second to verity and it stopped working also

What is version of Home Assistant Core has the issue?

2021.6

What was the last working version of Home Assistant Core?

2021.6

What type of installation are you running?

Home Assistant Core

Integration causing the issue

AppleTV

Link to integration documentation on our website

https://www.home-assistant.io/integrations/apple_tv/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.apple_tv
Source: components/apple_tv/__init__.py:326
Integration: Apple TV (documentation, issues)
First occurred: 3:19:59 PM (148 occurrences)
Last logged: 10:02:06 PM

Failed to connect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/apple_tv/__init__.py", line 242, in _connect_loop
    await self._connect(conf)
  File "/usr/src/homeassistant/homeassistant/components/apple_tv/__init__.py", line 326, in _connect
    self.atv = await connect(conf, self.hass.loop, session=session)
  File "/usr/local/lib/python3.8/site-packages/pyatv/__init__.py", line 76, in connect
    await atv.connect()
  File "/usr/local/lib/python3.8/site-packages/pyatv/mrp/__init__.py", line 703, in connect
    await self._protocol.start()
  File "/usr/local/lib/python3.8/site-packages/pyatv/mrp/protocol.py", line 103, in start
    self.device_info = await self.send_and_receive(msg)
  File "/usr/local/lib/python3.8/site-packages/pyatv/mrp/protocol.py", line 180, in send_and_receive
    return await self._receive(identifier, timeout)
  File "/usr/local/lib/python3.8/site-packages/pyatv/mrp/protocol.py", line 188, in _receive
    await asyncio.wait_for(semaphore.acquire(), timeout)
  File "/usr/local/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
    raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 11
  • Comments: 46 (19 by maintainers)

Most upvoted comments

I have been making good progress with restoring functionality in pyatv so that it works with tvOS 15 and will soon merge that. There are a few more things I want to fix but I don’t see any issues (at least for now) to make a release and integrate it with Home Assistant before the final version of tvOS 15 is out. So hopefully we don’t end up in the same situation as when tvOS 13 was released.

The MRP protocol has been removed in tvOS 15 so everyone will face this problem. I’m trying to figure out a different way to get metadata, but I’m not quite there yet.

It will be available soon, but I won’t give any date. Had to fix a few minor things in pyatv, but should be sorted by tomorrow or so.

For the ones interested, initial version of the integration supporting tvOS 15 is available here:

https://github.com/postlund/hass-atv-beta

Can also be installed via HACS. Remember to read the instructions before installing.

The integration needs some adjustments to work. I will try to get on that tomorrow.

Thanks for the work and effort @postlund , Take your time! These other guys work you like they pay you !

@adabelleleiram Someone probably removed it after the previous uplift (tvOS 13) and I haven’t made any new PR to add it. Gonna try to finish current PR soon and have it merged.

I intend to add requires version to HACS (so you can’t install it running the wrong version of Home Assistant), but I can’t do that right now. As soon as I can I will.

And a friendly reminder that it is possible to sponsor @postlund for his time and effort.

@postlund I reported this a while back, but it looks like it is still happening in the custom integration. When you restart an Apple TV, it registers errors.

Logger: homeassistant Source: custom_components/apple_tv/config_flow.py:153 Integration: Apple TV First occurred: 10:38:36 AM (2 occurrences) Last logged: 10:38:36 AM

Error doing job: Task exception was never retrieved Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 197, in async_init flow, result = await task File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 224, in _async_init result = await self._async_handle_step(flow, flow.init_step, data, init_done) File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 320, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File “/config/custom_components/apple_tv/config_flow.py”, line 153, in async_step_zeroconf service_type = discovery_info[zeroconf.ATTR_TYPE][:-1] # Remove leading . AttributeError: module ‘homeassistant.components.zeroconf’ has no attribute ‘ATTR_TYPE’