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
71.15k stars 29.83k forks source link

pyatv.exceptions.ProtocolError: an error occurred during streaming #125009

Closed tijnemans79 closed 6 days ago

tijnemans79 commented 1 week ago

The problem

e.g. mp3 streams to homepod (apple tv integration) are very unstable and suddenly stop with crash log attached. It happens randomly from 5 minutes or 2 hours or more after starting a stream.

File "/usr/src/homeassistant/homeassistant/components/apple_tv/media_player.py", line 344, in async_play_media await self.atv.stream.stream_file(media_id) File "/usr/local/lib/python3.12/site-packages/pyatv/core/facade.py", line 371, in stream_file await self.relay("stream_file")( File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/init.py", line 398, in stream_file await client.send_audio(audio_file, file_metadata, volume=volume) File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/stream_client.py", line 459, in send_audio raise exceptions.ProtocolError("an error occurred during streaming") from ex pyatv.exceptions.ProtocolError: an error occurred during streaming

I saw that @postlund pushed a new version of pyatv recently, and it was also pulled to homeassistant core so I guess this version will be available in the next version of ha? Any idea if this will improve the stability of this integration and maybe fixes this specific issue already?

What version of Home Assistant Core has the issue?

core-2024.8.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

apple tv (pyatv)

Link to integration documentation on our website

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

Diagnostics information

home-assistant_apple_tv_2024-09-01T09-29-37.860Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 week 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)

tijnemans79 commented 1 week ago

Looks like 2024.9 broke the integration for HomePod completely. Won’t play anything anymore. The mediaplayer reports “playing” but the HomePod status itself remains idle and doesn’t want to play anything anymore. I’ll try to do some further debugging and will try a reconfigure in the next few days.

tijnemans79 commented 6 days ago

Looks resolved with 0.15.1