home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.65k stars 28.82k forks source link

Cant add Apple TV 3 #109323

Open sutharkartik opened 4 months ago

sutharkartik commented 4 months ago

The problem

While adding, a new Apple TV (of type Apple TV 3), it gives an error.

Unexpected error.

I've tried both way - by terning off Access Control (on Apple TV 3, Setting>General>Airplay>Security>select 'none' and by keeping 'Onscreen Code'

Either way, I am not able to add Apple TV.

when selected 'none' - it straitght away gives an error. When selected 'Onscreen Code' - it indeed asks the code, on Apple TV it displays the code. Upon entering this code, it gives an error (unexpected error)

I could observe following in HA logs (Provided in log section). please can you help?

Thanks!

What version of Home Assistant Core has the issue?

core-2024.1.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Apple TV

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-02-01 15:53:13.960 ERROR (MainThread) [homeassistant.components.apple_tv.config_flow] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/apple_tv/config_flow.py", line 421, in async_pair_next_protocol
await self.pairing.begin()
File "/usr/local/lib/python3.11/site-packages/pyatv/protocols/dmap/pairing.py", line 85, in begin
await self._publish_service(ipaddr, port)
File "/usr/local/lib/python3.11/site-packages/pyatv/protocols/dmap/pairing.py", line 114, in _publish_service
await mdns.publish(
File "/usr/local/lib/python3.11/site-packages/pyatv/core/mdns.py", line 548, in publish
await loop.run_in_executor(None, zconf.register_service, zsrv)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zeroconf/_core.py", line 308, in register_service
run_coro_with_timeout(
File "/usr/local/lib/python3.11/site-packages/zeroconf/_utils/asyncio.py", line 113, in run_coro_with_timeout
return asyncio.run_coroutine_threadsafe(aw, loop).result(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.11/site-packages/zeroconf/_utils/asyncio.py", line 97, in await_awaitable
task = await aw
^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zeroconf/_core.py", line 338, in async_register_service
await self.async_check_service(info, allow_name_change, cooperating_responders, strict)
File "/usr/local/lib/python3.11/site-packages/zeroconf/_core.py", line 504, in async_check_service
raise NonUniqueNameException
zeroconf._exceptions.NonUniqueNameException

Additional information

No response

home-assistant[bot] commented 4 months ago

Hey there @postlund, mind taking a look at this issue as it has been labeled with an integration (apple_tv) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `apple_tv` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign apple_tv` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


apple_tv documentation apple_tv source (message by IssueLinks)

julienvedebe commented 3 months ago

Hi there I'm getting some behavior with Apple TV 3 also. It asks first code for airplay and second code and then fails with unexpected error.

Thanks for help

issue-triage-workflows[bot] commented 4 days ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.