Unable to configure Apple TV - does not accept PIN
See original GitHub issueDescribe the bug
While trying to add ATV to integration cannot pass the step of entering the PIN, but it is not accepted. Configuration wizard displays message:
Pairing
Pairing is required for the RAOP protocol. Please enter the PIN code displayed on
screen. Leading zeros shall be omitted, i.e. enter 123 if the displayed code is 0123.
Invalid authentication
After evry retry new PIN is displayed by ATV, but none is accepted by integration. Every retry logs error in homeassistant.log - listed below
Error log
021-12-18 14:39:59 ERROR (MainThread) [custom_components.apple_tv.config_flow] Authentication problem
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pyatv/support/__init__.py", line 33, in error_handler
return await func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pyatv/protocols/airplay/auth/legacy.py", line 62, in finish_pairing
await self._send_plist(
File "/usr/local/lib/python3.9/site-packages/pyatv/protocols/airplay/auth/legacy.py", line 79, in _send_plist
return await self.http.post(
File "/usr/local/lib/python3.9/site-packages/pyatv/support/http.py", line 359, in post
return await self.send_and_receive(
File "/usr/local/lib/python3.9/site-packages/pyatv/support/http.py", line 412, in send_and_receive
raise exceptions.HttpError(
pyatv.exceptions.HttpError: HTTP/1.1 method POST failed with code 500: Internal Server Error
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/apple_tv/config_flow.py", line 424, in async_step_pair_with_pin
await self.pairing.finish()
File "/usr/local/lib/python3.9/site-packages/pyatv/protocols/airplay/pairing.py", line 74, in finish
await error_handler(
File "/usr/local/lib/python3.9/site-packages/pyatv/support/__init__.py", line 41, in error_handler
raise fallback(str(ex)) from ex
pyatv.exceptions.PairingError: HTTP/1.1 method POST failed with code 500: Internal Server Error
How to reproduce the bug?
I receive this error every try to add ATV to HA.
What is expected behavior?
Completion of configuration wizard.
Operating System
Mac OS 12.0.1
Python
3.9
pyatv
2.2.0
Device
Apple TV 4k, TV OS 15.2
Additional context
Not sure about python version, using supervised HA in VM under ESXi. All the lates update, so assuming the latest version of python too.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
If your Apple TV can't connect to Wi-Fi
On the Apple TV menu, go to Settings > System and select Restart. Unplug your router and your cable or DSL modem from...
Read more >Apple TV not accepting password. - Apple Community
My older Apple TV will not accept my iTunes password for my library of movies due to double verification. I need to use...
Read more >Apple TV won't accept password and 6 digi…
Apple TV won't accept password and 6 digit pin even though they are correct. Whenever try to log in to the iTunes account...
Read more >I can't find a pin - Apple Support Communities
I try to stream from an app to the tv via apple tv. But the app keeps asking for a pin, to should...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Colorado4Wheeler I think we found the problem. For some reason there’s an old entry lurking around in
.storage/core.config_entries
for your device. I don’t quite understand why this isn’t visible in the frontend, but if you remove that it will work again.I’ll take another look but when I manually purged everything from core.config_entries before (when you posted that it was needed generally for the update) I was pretty thorough.