core: HomePod cannot play local media or tts
The problem
I set up my HomePod mini using the Apple TV integration and I am able to control the volume of the HomePod and play/pause music from AppleMusic. However I am unable to play music from Home-Assistant’s local media. Furthermore tts is not working as well. When trying to play an audio file (either local music or tts), the following error message is shown.
What version of Home Assistant Core has the issue?
2022.10.3
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?
2022-10-16 11:35:05.142 ERROR (MainThread) [frontend.js.latest.202210100] :0:0 Script error.
2022-10-16 11:35:05.904 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281472971080944] RTSP/1.0 method SETUP failed with code 520: Origin Error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 202, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 207, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/apple_tv/media_player.py", line 292, in async_play_media
await self.atv.stream.stream_file(media_id)
File "/usr/local/lib/python3.10/site-packages/pyatv/core/facade.py", line 392, in stream_file
await self.relay("stream_file")(file, **kwargs)
File "/usr/local/lib/python3.10/site-packages/pyatv/protocols/raop/__init__.py", line 352, in stream_file
await client.initialize(self.core.service.properties)
File "/usr/local/lib/python3.10/site-packages/pyatv/protocols/raop/raop.py", line 457, in initialize
await self._setup_session()
File "/usr/local/lib/python3.10/site-packages/pyatv/protocols/raop/raop.py", line 486, in _setup_session
resp = await self.rtsp.setup(
File "/usr/local/lib/python3.10/site-packages/pyatv/support/rtsp.py", line 181, in setup
return await self.exchange("SETUP", headers=headers, body=body)
File "/usr/local/lib/python3.10/site-packages/pyatv/support/rtsp.py", line 265, in exchange
resp = await self.connection.send_and_receive(
File "/usr/local/lib/python3.10/site-packages/pyatv/support/http.py", line 414, in send_and_receive
raise exceptions.HttpError(
pyatv.exceptions.HttpError: RTSP/1.0 method SETUP failed with code 520: Origin Error
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 16 (5 by maintainers)
Same issue.
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.
Did you guys add the port 8123 after your internal url? - I just changed from having my URLs specified in yaml to back into the UI (because repairs told me to specify my country lol and yaml mode wasn’t working for me) and forgot to add the port and it broke my HomePod TTS but I just added :8123 back to the end of the internal url and TTS is back up and running