core: media_player.play_media stopped working on 2024.9.3
The problem
I’ve just updated to 2024.9.3 from 2024.8.x and my automation (bellow) started failing and generating errors.
It used to always work and now it is generating the following errors:
Error: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play http://192.168.0.22/media/musica.mp3.
What version of Home Assistant Core has the issue?
core-2024.9.3
What was the last working version of Home Assistant Core?
core-2024.8.x
What type of installation are you running?
Home Assistant Core
Integration causing the issue
media_player
Link to integration documentation on our website
No response
Diagnostics information
System Information
| version | core-2024.9.3 |
|---|---|
| installation_type | Home Assistant OS |
| dev | false |
| hassio | true |
| docker | true |
| user | root |
| virtualenv | false |
| python_version | 3.12.4 |
| os_name | Linux |
| os_version | 6.6.46-haos |
| arch | aarch64 |
| timezone | Europe/Zurich |
| config_dir | /config |
Home Assistant Community Store
| GitHub API | ok |
|---|---|
| GitHub Content | ok |
| GitHub Web | ok |
| GitHub API Calls Remaining | 5000 |
| Installed Version | 1.34.0 |
| Stage | running |
| Available Repositories | 1417 |
| Downloaded Repositories | 3 |
Home Assistant Cloud
| logged_in | true |
|---|---|
| subscription_expiration | December 1, 2024 at 1:00 AM |
| relayer_connected | true |
| relayer_region | eu-central-1 |
| remote_enabled | false |
| remote_connected | false |
| alexa_enabled | false |
| google_enabled | true |
| remote_server | eu-central-1-2.ui.nabu.casa |
| certificate_status | ready |
| instance_id | ca0d14e49be04aa9bce547b38ff0ef0a |
| can_reach_cert_server | ok |
| can_reach_cloud_auth | ok |
| can_reach_cloud | ok |
Home Assistant Supervisor
| host_os | Home Assistant OS 13.1 |
|---|---|
| update_channel | stable |
| supervisor_version | supervisor-2024.09.1 |
| agent_version | 1.6.0 |
| docker_version | 26.1.4 |
| disk_total | 28.0 GB |
| disk_used | 10.2 GB |
| healthy | true |
| supported | true |
| host_connectivity | true |
| supervisor_connectivity | true |
| ntp_synchronized | true |
| virtualization | |
| board | green |
| supervisor_api | ok |
| version_api | ok |
| installed_addons | ESPHome (2024.9.1), Let’s Encrypt (5.2.1), Studio Code Server (5.16.0) |
Dashboards
| dashboards | 2 |
|---|---|
| resources | 0 |
| views | 5 |
| mode | storage |
Recorder
| oldest_recorder_run | September 29, 2024 at 10:01 PM |
|---|---|
| current_recorder_run | September 30, 2024 at 12:01 AM |
| estimated_db_size | 46.51 MiB |
| database_engine | sqlite |
| database_version | 3.45.3 |
Example YAML snippet
alias: Bedroom Sleep Song Start (timer/tag)
description: ""
trigger:
- platform: time
at: "19:00:00"
- platform: tag
tag_id: 9ce62df4-1939-4af9-a9e9-24bef25aa8b3
condition:
- condition: or
conditions:
- condition: time
after: "18:00:00"
- condition: time
before: "07:00:00"
action:
- target:
entity_id: media_player.bedroom_speaker
data:
media_content_type: audio/mp3
media_content_id: http://192.168.0.22/media/music.mp3
action: media_player.play_media
mode: single
Anything in the logs that might be useful for us?
2024-09-30 13:47:51.256 WARNING (SyncWorker_14) [pychromecast.controllers] PLAY command requested but no session is active.
2024-09-30 13:47:51.258 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281471862706608] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 100, in wrapper
return_value = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 558, in media_play
media_controller.play()
File "/usr/local/lib/python3.12/site-packages/pychromecast/controllers/media.py", line 630, in play
response_handler.wait_response()
File "/usr/local/lib/python3.12/site-packages/pychromecast/response_handler.py", line 57, in wait_response
raise RequestFailed(self._request)
pychromecast.error.RequestFailed: Failed to execute play.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
response_data = await coro
^^^^^^^^^^
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 996, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 814, in async_media_play
await self.hass.async_add_executor_job(self.media_play)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 102, in wrapper
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: CastMediaPlayerEntity.media_play Failed: Failed to execute play.
2024-09-30 13:48:04.376 WARNING (SyncWorker_11) [pychromecast.controllers] PLAY command requested but no session is active.
2024-09-30 13:48:04.378 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281471862706608] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 100, in wrapper
return_value = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 558, in media_play
media_controller.play()
File "/usr/local/lib/python3.12/site-packages/pychromecast/controllers/media.py", line 630, in play
response_handler.wait_response()
File "/usr/local/lib/python3.12/site-packages/pychromecast/response_handler.py", line 57, in wait_response
raise RequestFailed(self._request)
pychromecast.error.RequestFailed: Failed to execute play.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
response_data = await coro
^^^^^^^^^^
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 996, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 814, in async_media_play
await self.hass.async_add_executor_job(self.media_play)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 102, in wrapper
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: CastMediaPlayerEntity.media_play Failed: Failed to execute play.
2024-09-30 13:48:16.174 WARNING (SyncWorker_9) [pychromecast.controllers] PLAY command requested but no session is active.
2024-09-30 13:48:16.177 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281471862706608] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 100, in wrapper
return_value = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 558, in media_play
media_controller.play()
File "/usr/local/lib/python3.12/site-packages/pychromecast/controllers/media.py", line 630, in play
response_handler.wait_response()
File "/usr/local/lib/python3.12/site-packages/pychromecast/response_handler.py", line 57, in wait_response
raise RequestFailed(self._request)
pychromecast.error.RequestFailed: Failed to execute play.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
response_data = await coro
^^^^^^^^^^
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 996, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 814, in async_media_play
await self.hass.async_add_executor_job(self.media_play)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 102, in wrapper
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: CastMediaPlayerEntity.media_play Failed: Failed to execute play.
2024-09-30 13:50:08.411 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281471849971920] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 100, in wrapper
return_value = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 518, in _start_app
self._get_chromecast().start_app(app_id)
File "/usr/local/lib/python3.12/site-packages/pychromecast/__init__.py", line 453, in start_app
response_handler.wait_response()
File "/usr/local/lib/python3.12/site-packages/pychromecast/response_handler.py", line 54, in wait_response
raise RequestTimeout(self._request, self._timeout)
pychromecast.error.RequestTimeout: Execution of start app CC1AD845 timed out after 10.0 s.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
response_data = await coro
^^^^^^^^^^
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 996, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 782, in async_turn_on
await self.hass.async_add_executor_job(self.turn_on)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 537, in turn_on
self._start_app(pychromecast.config.APP_MEDIA_RECEIVER)
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 102, in wrapper
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: CastMediaPlayerEntity._start_app Failed: Execution of start app CC1AD845 timed out after 10.0 s.
2024-09-30 13:50:25.261 WARNING (MainThread) [homeassistant.components.automation.bedroom_afternoon_tag] Bedroom 2 Sleep Song (Tag): Already running
2024-09-30 13:50:35.915 ERROR (MainThread) [homeassistant.components.automation.bedroom_afternoon_tag] Bedroom 2 Sleep Song (Tag): Error executing script. Error for call_service at pos 1: CastMediaPlayerEntity._quick_play Failed: Execution of quick play http://192.168.1.22/media/music.mp3 timed out after 30.0 s.
Additional information
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 10
- Comments: 45
Having the same issues as well. Just updated to 2024.10.0. A rollback didn’t fix the issue. It’s wrecking my automations. I’m a diabetic and rely heavily on whole home broadcasts of TTS notifications along with other actions, to alert other family members if I need help. Also used for medication reminders. It’s completely stopping my entire automations.
I’ve reconfigured both Google Assistant SDK and Google Cast & it didn’t fix the issue.
When executing the action:
Error running action CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play (URL to media file)
When running Traces:
Executed: October 4, 2024 at 9:48:00 AM Error: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play (URL to media file)
When I try to edit the TTS portion of existing automations or if I try to create a new automation using TTS, I get the following:
Visual editor is not supported for this configuration
Key ‘service’ is not expected or not supported by the visual editor. You can still edit your config using YAML.
Current system about:
Core 2024.10.0 Supervisor 2024.10.0 Operating System 13.2.rc1 Frontend 20241002.2
Same issue here, no TTS casting to Google speakers works after updating to 2024.10.0
Doesnt work when trying to execute manually via Dev Tools - Actions or in Automations.
"Logger: homeassistant.components.automation.glom_inte_koppla_in_bilen_notifikation_pa_garaget_hogtalare_om_dorren_oppnas_och_bilen_inte_ar_inkopplad Source: components/automation/init.py:763 integration: Automation (documentation, issues) First occurred: 13:23:09 (2 occurrences) Last logged: 13:47:39
Error while executing automation automation.glom_inte_koppla_in_bilen_notifikation_pa_garaget_hogtalare_om_dorren_oppnas_och_bilen_inte_ar_inkopplad: CastMediaPlayerEntity.quick_play Failed: Failed to execute quick play http://IP MASKED/api/tts_proxy/f7ad2e8a3d59e2ad3b500313b823bc757ce609c6_sv-_google_translate.mp3."
I have the same problem. Dirty fix, but I’ve set:
continue_on_error: true
on all actions in the automation, and atleast that doesn’t make it stop.
Mine was working fine under 2024.9.3 however once I updated to 2024.10.0 the automation no longer works. The strange thing is that if you run the individual step manually then it works. Its only when its a step ran as the complete automation that it fails (and so does the rest of the automation).
Here is the Trace showing the error …
Same here
Logger: pychromecast.socket_client Source: /usr/local/lib/python3.12/site-packages/pychromecast/socket_client.py:420 First occurred: 4:39:42 PM (1 occurrences) Last logged: 4:39:42 PM
[Back Garden Speakers([::ffff:c0a8:29]):8009] Failed to connect to service HostServiceInfo(host=‘[::ffff:c0a8:29]’, port=8009), retrying in 5.0s
Logger: homeassistant.components.automation.don_t_forget_to_take_your_pills_2 Source: components/automation/init.py:763 integration: Automation (documentation, issues) First occurred: 4:39:39 PM (1 occurrences) Last logged: 4:39:39 PM
Error while executing automation automation.don_t_forget_to_take_your_pills_2: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play http://192.168.0.49:8123/api/tts_proxy/039ad76cc8bde5d7321d9ce071d093c0660795ab_en-gb_6e8b81ac47_tts.home_assistant_cloud.mp3.
Logger: homeassistant.components.automation.don_t_forget_to_take_your_pills_2 Source: helpers/script.py:2026 integration: Automation (documentation, issues) First occurred: 4:39:39 PM (3 occurrences) Last logged: 4:39:39 PM
Don’t forget to take your pills: Choose at step 1: choice 2: If at step 1: Error executing script. Error for call_service at pos 1: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play http://192.168.0.49:8123/api/tts_proxy/039ad76cc8bde5d7321d9ce071d093c0660795ab_en-gb_6e8b81ac47_tts.home_assistant_cloud.mp3. Don’t forget to take your pills: Choose at step 1: choice 2: Error executing script. Error for if at pos 1: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play http://192.168.0.49:8123/api/tts_proxy/039ad76cc8bde5d7321d9ce071d093c0660795ab_en-gb_6e8b81ac47_tts.home_assistant_cloud.mp3. Don’t forget to take your pills: Error executing script. Error for choose at pos 1: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play http://192.168.0.49:8123/api/tts_proxy/039ad76cc8bde5d7321d9ce071d093c0660795ab_en-gb_6e8b81ac47_tts.home_assistant_cloud.mp3.
WHY ISNT THIS BEING ADDRESSED?