Open moraespc opened 11 months ago
Interesting. I just want to make sure that I get this right:
I apologize for the delay in responding. I was doing as many tests as possible to get consistent answers regarding the problem since the devices are not exactly in my house. I tried reproduce the error using multiple instances of virtual devices, but pairing with my only one physical device and it was very difficult for me to reproduce this exception once again. However, i've noticed something that can be helpful. If you pair with Apple TV (devices shows up at App Remote & Devices list) and shortly thereafter remove power supply and put it back, the devices will be no longer listed as allowed, and this exactly exception occurs. That wasn't the way it occurred at the first time so I'm worried to say that the problem is exactly that. Do you have any clue about Apple removing paired devices for any reason or if exists a time after pairing that it takes to be "stored" on device's memory?
Finally, answering the questions:
Describe the bug
Hi everyone,
I'm encountering an issue that I could use some help with. My code is designed to work with multiple AppleTV devices, and usually, it performs as expected. However, when I set up the code with around 4 devices or more, all at the same network and with Airplay permissions allowed properly, it begins working correctly. But, here's the problem: if one of the devices turns off due to something like running out of power, I receive an error message (attached), and the entire functionality breaks down. I've noticed that exception occurs on atv "connect" method. The only solution I've found was delete saved credentials and restart the entire code (including pairing process).
Could this be a bug in the system?
I've experimented by removing the AirPlay protocol credentials and the exception no longer occurs. However, this workaround comes at the cost of losing certain functionalities like Artwork and Hold Action.
Any insights or suggestions would be greatly appreciated. Thanks in advance!
Error log
PS: 192.168.10.121 is the local machine IP Address
How to reproduce the bug?
Set up more than 4 Apple TV's, controlled by the same local machine, and pull off power supply.
What is expected behavior?
All devices connecting correctly
Operating System
Windows 10
Python
Other
pyatv
0.13.4
Device
Apple TV 4k (3rd gen) tvOS 16.6
Additional context
Python 3.11