-
-
Notifications
You must be signed in to change notification settings - Fork 32k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apple TV integration not working with AirPort Express #101948
Comments
Hey there @postlund, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) apple_tv documentation |
What is the actual IP of your AirPort Express? |
It is 192.168.1.65 but in the log I see 169.254.248.229 If I connect to the page 169.254.248.229:7000 it loads, same for 192.168.1.65:7000 |
I suspect that Zeroconf resolves incorrect IP here, maybe @bdraco can help? |
Yes I also think that By the way I also have one HomePod and a Belkin Soundform receiver and they works well. |
How old is the mdns stack in the problem device. Can the firmware be updated ? |
It looks like that device isn't made anymore or no mdns fixes coming I took the link local workaround out in postlund/pyatv@17d130a because we fixed the problem in zeroconf that it was created for. It looks like Apple has the same or similar ordering bug where it can announce an older ip address later that a newer one in its older mdns implementations which is likely never to get fixed since you can't update the firmware We can put that workaround back in as apparently we still need it to support these older devices. I'll open a PR later today with a comment about why it's still needed even though zeroconf itself guarantees LIFO order for ip addresses. |
It probably means we need to check for unspecified addresses as well |
Latest AirPort Express software is 7.8.1 from around June 2019, so it is very old (no more updates for that one). I also seem to have some discovery issues (maybe not related) with my HomePod (but I also saw the same thing with my AirPort Express prior to restarting Home Assistant):
Using |
Yeah we have workarounds for devices announcing unspecified addresses 🙈🙈🙈 in HA proper |
Probably not related. I've seen the devices never respond to device info queries but if you query something else it includes device info in the response. We could include an ANY question in unicast fallback. That would probably fix that issue |
@postlund just realized we don't have the name yet at that point to be able to send an Any query. Is it not working or are you just seeing the fallback in the log to try to get the device info? |
Maybe if you are just missing device info we have the name from one of the other records from the address. We could extract it and include an any question for that name if we have it |
If we are sending an any query we should be including know answers though so we don't generate a multicast response to everyone on the network |
I guess we can't include known answers since if all questions are suppressed by the mdns stack on the HomePod it won't include the device info |
And it looks like the only record missing is device info from your logs ... so we are kinda stuck with a bare any question without known answers. |
It's annoying that Apple makes it so hard to get device info since they don't publish device info the dns sd services |
|
The any question didn't seem to help. I'll probably need to see the raw |
How can I get that log? |
Sorry @Spale350z , we are conflating issues here. postlund/pyatv#2241 should fix the issue you reported. The log I was looking for was for @postlund 's HomePod issue. We should take that discussion out of this issue to avoid confusion. |
Ok thank you very much. |
SOLVED Changed the static IP of AirPort Express and reverted it back to what it was. Both of them now work 🎉 |
I have this issue! |
Unfortunately it may be a few months or years before we can update You can follow along with the migration process at #99218 An alternative would be for pyatv to remove the |
Nah, removing that dependency is easy (I only use MacAddress from there). If that's the only blocker, I can fix that later today hopefully. |
AFAICT thats the only one. Nice! |
@postlund It would be good to add the shims as well so we don't have to do it later example https://github.com/AngellusMortis/pyunifiprotect/pull/297 more details in #99218 |
@bdraco I will fix that! Is pydantic-settings a problem as well? |
@bdraco I decided to remove pydantic-settings as a dependency since it's not really used anyway. Backporting required a few changes to the code, but should be fine now. I also changed version of pydantic in base_version.txt, so tests are run with a 1.x version as an extra precaution. Maybe you can try if this works before I merge and make a release: |
To apply this fix before it’s merged would I need to ssh into my home assistant install on port 2222, please? |
I would suggest that you wait for this being released and merged properly before testing it. |
Will test as soon as I land. I have about another 45 minutes in flight. Sent from my iPhoneOn Oct 23, 2023, at 2:03 AM, Pierre Ståhl ***@***.***> wrote:
@bdraco I decided to remove pydantic-settings as a dependency since it's not really used anyway. Backporting required a few changes to the code, but should be fine now. I also changed version of pydantic in base_version.txt, so tests are run with a 1.x version as an extra precaution. Maybe you can try if this works before I merge and make a release:
postlund/pyatv#2262
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Install seems ok, doing live testing now
|
for comparison this is master
|
Functional testing looks good. I think your change is good to go to solve the dep conflict 👍 |
Really thank you for your work guys! |
@bdraco 0.14.3 is out now! |
Thanks. I'll bump that PR |
The problem
After the 2023.8 update I can't stream any media to my AirPort Express anymore.
I keep getting this error:
[Errno 110] Connect call failed ('IP_OF_AIRPORT_EXPRESS', 7000)
Downgrading back to 2023.7 will fix it and streams any kind of file through pyatv.
I've also noticed that if I select the AirPort Express as Airplay destination from iOS the Apple TV integration reloads instantly.
Anyone has the same issue?
I'm attaching the log file
What version of Home Assistant Core has the issue?
2023.10.2
What was the last working version of Home Assistant Core?
2023.7.3
What type of installation are you running?
Home Assistant OS
Integration causing the issue
apple_tv
Link to integration documentation on our website
https://www.home-assistant.io/integrations/apple_tv
Diagnostics information
Logger: homeassistant.components.script.riproduci_radio_viva_fm_soundbar
Source: helpers/script.py:468
Integration: Script (documentation, issues)
First occurred: 16:57:21 (1 occurrences)
Last logged: 16:57:21
Riproduci Radio Viva FM - Soundbar: Error executing script. Unexpected error for call_service at pos 4: [Errno 110] Connect call failed ('169.254.248.229', 7000)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/apple_tv/media_player.py", line 300, in async_play_media
await self.atv.stream.stream_file(media_id)
File "/usr/local/lib/python3.11/site-packages/pyatv/core/facade.py", line 370, in stream_file
await self.relay("stream_file")(
File "/usr/local/lib/python3.11/site-packages/pyatv/protocols/raop/init.py", line 349, in stream_file
client, context = await self.playback_manager.setup(self.core.service)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyatv/protocols/raop/init.py", line 147, in setup
self._connection = await http_connect(self._address, self._port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyatv/support/http.py", line 653, in http_connect
_, connection = await loop.create_connection(HttpConnection, address, port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('169.254.248.229', 7000)
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: