Skip to content
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

Error while playing a tts message via homepods - random playing homepods after the message #127397

Open
Stothed775 opened this issue Oct 3, 2024 · 6 comments

Comments

@Stothed775
Copy link

Stothed775 commented Oct 3, 2024

The problem

I already reported a problem a few days ago after I noticed that my homepods alternately just play something after I run a TTS automation that checks if something was playing before and then resumes playback after the message.
The Homepods then also played randomly if nothing was playing beforehand.

Now, after further testing, I have discovered that even without this check, if a TTS message is simply played, something is played randomly afterwards. This is very annoying.

A look at the logs showed the following error message.

What version of Home Assistant Core has the issue?

core-2024.9.0

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

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

`Logger: homeassistant.core
Quelle: core.py:2781
Erstmals aufgetreten: 19:40:08 (4 Vorkommnisse)
Zuletzt protokolliert: 20:56:06

Error executing service: <ServiceCall media_player.play_media (c:01J9752QSF2413AZ1WSRRF2NCJ): entity_id=['media_player.badezimmer_homepod', 'media_player.buro', 'media_player.kuche', 'media_player.esszimmer'], announce=True, extra=, media_type=music, media_id=media-source://tts/cloud?message=Die+Luftfeuchtigkeit+im+Bad+ist+hoch.+Fenster+%C3%B6ffnen!>
Error executing service: <ServiceCall media_player.play_media (c:01J975522YGYFV312XHW3A1D70): entity_id=['media_player.badezimmer_homepod', 'media_player.buro', 'media_player.kuche', 'media_player.esszimmer'], announce=True, extra=, media_type=music, media_id=media-source://tts/cloud?message=Die+Luftfeuchtigkeit+im+Bad+ist+hoch.+Fenster+%C3%B6ffnen!>
Error executing service: <ServiceCall media_player.play_media (c:01J977RCCD5GXKP4P9ARZQMC8Z): entity_id=['media_player.badezimmer_homepod', 'media_player.buro, 'media_player.kuche', 'media_player.esszimmer'], announce=True, extra=, media_type=music, media_id=media-source://tts/cloud?message=Die+Luftfeuchtigkeit+im+Bad+ist+Ok,+das+Fenster+kann+geschlossen+werden.>
Error executing service: <ServiceCall media_player.play_media (c:01J979DTP9PGS8XYMAWH1C1GQF): entity_id=['media_player.badezimmer_homepod', 'media_player.buro', 'media_player.kuche', 'media_player.esszimmer'], announce=True, extra=, media_type=music, media_id=media-source://tts/cloud?message=Die+Luftfeuchtigkeit+im+Bad+ist+Ok,+das+Fenster+kann+geschlossen+werden.>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 2781, in _run_service_call_catch_exceptions
await coro_or_task
File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1021, in entity_service_call
raise result from None
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1610, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
result = await task
^^^^^^^^^^
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 374, in stream_file
await self.relay("stream_file")(
File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/init.py", line 345, in stream_file
self.playback_manager.acquire()
File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/init.py", line 133, in acquire
raise exceptions.InvalidStateError("already streaming to device")
pyatv.exceptions.InvalidStateError: already streaming to device`

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Oct 3, 2024

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)

@Stothed775
Copy link
Author

Did a bit more Research - it seems like the status of the Homepods are not correct.

I found out, that the Homepods sometimes are in the status "playing" but they are not playing actually. So maybe this wrong status information is causing the issue?

@muziguo01
Copy link

做了更多的研究——似乎 Homepods 的状态不正确。

我发现 Homepods 有时处于“正在播放”状态,但实际上并没有播放。所以可能是这个错误的状态信息导致了这个问题?

我也发现了同样的问题,请问你解决了吗

@po975034589
Copy link

IOS18.1直接提示Unknown error,已经完全无法正常使用了

@ond000
Copy link

ond000 commented Dec 16, 2024

Still same issue with iOS 18.2

@dw1562
Copy link

dw1562 commented Dec 25, 2024

I have this exact same issue too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants