Closed strutings closed 4 months ago
Hi @strutings. Sorry you've been having issues, and thank you for providing the debug log messages and your configuration.
From the debug logs it appear that your cast
media_player requires publicly available MP3 addresses:
2024-07-08T09:46:13.052605+02:00 odin hass[3286511]: 2024-07-08 09:46:13.045 ERROR (Thread-11) [homeassistant.components.cast.media_player] Failed to cast media http://10.0.0.186:8123/media/media/sounds/temp/chime_tts/7ougo45g.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI4NDk0OTZiNGM3ZDU0N2RlYTYyNWIzODkyYTMxODE2OCIsInBhdGgiOiIvbWVkaWEvbWVkaWEvc291bmRzL3RlbXAvY2hpbWVfdHRzLzdvdWdvNDVnLm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTcyMDQyNDc3MiwiZXhwIjoxNzIwNTExMTcyfQ.BBsCYCAu4-XYZwhkaXx9h4r8ACrtPIwk1w0EMlnrnJE from internal_url (http://10.0.0.186:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
Can you please try changing your temporary folder path to a public-facing folder (eg: /config/www/chime_tts/temp/
) and report back whether this fixes the issue?
EDIT: After reviewing the documentation for Google Cast, it appear that media_player.play_media
requires the filepath (URL) and not the media content id.
Can you please verify that using the URL returned by chime_tts.say_url
works with your cast
media_player when calling media_player.play_meda
?
If so I will add a fix so that Chime TTS will use the public URL path with cast
media_players instead of the media content id.
Hi @strutings. Sorry you've been having issues, and thank you for providing the debug log messages and your configuration.
From the debug logs it appear that your
cast
media_player requires publicly available MP3 addresses:2024-07-08T09:46:13.052605+02:00 odin hass[3286511]: 2024-07-08 09:46:13.045 ERROR (Thread-11) [homeassistant.components.cast.media_player] Failed to cast media http://10.0.0.186:8123/media/media/sounds/temp/chime_tts/7ougo45g.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI4NDk0OTZiNGM3ZDU0N2RlYTYyNWIzODkyYTMxODE2OCIsInBhdGgiOiIvbWVkaWEvbWVkaWEvc291bmRzL3RlbXAvY2hpbWVfdHRzLzdvdWdvNDVnLm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTcyMDQyNDc3MiwiZXhwIjoxNzIwNTExMTcyfQ.BBsCYCAu4-XYZwhkaXx9h4r8ACrtPIwk1w0EMlnrnJE from internal_url (http://10.0.0.186:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
~Can you please try changing your temporary folder path to a public-facing folder (eg:
/config/www/chime_tts/temp/
) and report back whether this fixes the issue?~EDIT: After reviewing the documentation for Google Cast, it appear that
media_player.play_media
requires the filepath (URL) and not the media content id.Can you please verify that using the URL returned by
chime_tts.say_url
works with yourcast
media_player when callingmedia_player.play_meda
?If so I will add a fix so that Chime TTS will use the public URL path with
cast
media_players instead of the media content id.
Changed the public folder to www/sounds/temp/chime_tts/chimes/ and successfully played the media file, so it seems like you've right that it's the URL path required
service: media_player.play_media target: entity_id: media_player.ikealampe data: media_content_id: http://10.0.0.186:8123/local/sounds/temp/chime_tts/wdbleu4j.mp3 media_content_type: music announce: true
EDIT: It's also the same behavior when using platform: sonos
Great! I will include a fix in the next beta release and let you know when it's available for testing 👍
I have implemented a permanent fix in a new beta release, v1.1.4-beta4.
To install the new beta version:
⋮
button in the top right↻ Redownload
optionShow beta versions
option (it may take a moment to update the list)v1.1.4-beta4
from the updated version drop-down list2024-07-10T10:36:07.690447+02:00 odin hass[3349181]: 2024-07-10 10:36:07.681 INFO (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Executing step call service
2024-07-10T10:36:07.693789+02:00 odin hass[3349181]: 2024-07-10 10:36:07.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╔════════════════════════════════════════════╗
2024-07-10T10:36:07.694193+02:00 odin hass[3349181]: 2024-07-10 10:36:07.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ║ Chime TTS Say Called. Version v1.1.4-beta4 ║
2024-07-10T10:36:07.694909+02:00 odin hass[3349181]: 2024-07-10 10:36:07.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╚════════════════════════════════════════════╝
2024-07-10T10:36:07.695556+02:00 odin hass[3349181]: 2024-07-10 10:36:07.682 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-07-10T10:36:07.695752+02:00 odin hass[3349181]: 2024-07-10 10:36:07.686 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭────────────────────╮
2024-07-10T10:36:07.696447+02:00 odin hass[3349181]: 2024-07-10 10:36:07.686 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ General Parameters │
2024-07-10T10:36:07.697132+02:00 odin hass[3349181]: 2024-07-10 10:36:07.686 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰────────────────────╯
2024-07-10T10:36:07.697662+02:00 odin hass[3349181]: 2024-07-10 10:36:07.687 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] entity_ids = ['media_player.ikealampe']
2024-07-10T10:36:07.700412+02:00 odin hass[3349181]: 2024-07-10 10:36:07.687 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] chime_path = bells_2
2024-07-10T10:36:07.701411+02:00 odin hass[3349181]: 2024-07-10 10:36:07.687 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] cache = True
2024-07-10T10:36:07.701643+02:00 odin hass[3349181]: 2024-07-10 10:36:07.687 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] offset = 450.0
2024-07-10T10:36:07.701818+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] final_delay = 0.0
2024-07-10T10:36:07.702857+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] message = testing
2024-07-10T10:36:07.703293+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_platform = cloud
2024-07-10T10:36:07.703791+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_speed = 100.0
2024-07-10T10:36:07.703971+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_pitch = 0
2024-07-10T10:36:07.704110+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce = True
2024-07-10T10:36:07.707560+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] fade_audio = False
2024-07-10T10:36:07.707734+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] volume_level = -1
2024-07-10T10:36:07.707834+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join_players = False
2024-07-10T10:36:07.707910+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] unjoin_players = False
2024-07-10T10:36:07.707995+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-07-10T10:36:07.708097+02:00 odin hass[3349181]: 2024-07-10 10:36:07.690 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.ikealampe
2024-07-10T10:36:07.708188+02:00 odin hass[3349181]: 2024-07-10 10:36:07.690 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-07-10T10:36:07.708275+02:00 odin hass[3349181]: 2024-07-10 10:36:07.690 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.1
2024-07-10T10:36:07.708362+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-07-10T10:36:07.708721+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: True
2024-07-10T10:36:07.708799+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-07-10T10:36:07.708863+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-07-10T10:36:07.708944+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭─────────────────╮
2024-07-10T10:36:07.709031+02:00 odin hass[3349181]: 2024-07-10 10:36:07.692 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ Preparing Audio │
2024-07-10T10:36:07.709100+02:00 odin hass[3349181]: 2024-07-10 10:36:07.692 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰─────────────────╯
2024-07-10T10:36:07.709167+02:00 odin hass[3349181]: 2024-07-10 10:36:07.692 DEBUG (MainThread) [custom_components.chime_tts] Checking Chime TTS audio cache
2024-07-10T10:36:07.709235+02:00 odin hass[3349181]: 2024-07-10 10:36:07.698 DEBUG (MainThread) [custom_components.chime_tts] ...cached audio found
2024-07-10T10:36:07.709328+02:00 odin hass[3349181]: 2024-07-10 10:36:07.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭────────────────────╮
2024-07-10T10:36:07.709401+02:00 odin hass[3349181]: 2024-07-10 10:36:07.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ Chime TTS playback │
2024-07-10T10:36:07.709467+02:00 odin hass[3349181]: 2024-07-10 10:36:07.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰────────────────────╯
2024-07-10T10:36:07.709550+02:00 odin hass[3349181]: 2024-07-10 10:36:07.699 WARNING (MainThread) [custom_components.chime_tts] Error calling media_player.play_media
service: No media content id found
2024-07-10T10:36:07.709618+02:00 odin hass[3349181]: 2024-07-10 10:36:07.699 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.385s for audio playback to complete...
2024-07-10T10:36:11.092648+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 0 media_players aren't playing...
2024-07-10T10:36:11.093552+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts] - Timed out waiting for playback to complete
2024-07-10T10:36:11.093795+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭──────────────────────────────────────────╮
2024-07-10T10:36:11.094270+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │──── Chime TTS Say Completed in 3.4 s ────│
2024-07-10T10:36:11.094490+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰──────────────────────────────────────────╯
2024-07-10T10:36:11.094786+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Service call completed successfully
2024-07-10T10:36:11.094985+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Queue now empty
Seems like it's still the same. Using setup 'media' and paths www/sounds/temp/chime_tts/chimes/ and www/sounds/temp/chime_tts/
Any progress on this?
Still struggling with this. The public_url is wrong and probably this causing the same error for Sonos as well.
ERROR (Thread-16) [homeassistant.components.cast.media_player] Failed to cast media http://10.0.0.186:8123/home/homeassistant/.homeassistant/local/chime_tts/jedciv2h.mp3?authSig=kjhsfkjahdsgfsadgf from internal_url (http://10.0.0.186:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
The correct url should be http://10.0.0.186:8123/local/chime_tts/jedciv2h.mp3
When I change local url in HA settings to nabu casa url, it throws Unable to find public url error..
Installed v. 1.1.3 and added correct path to both configuration.yaml and chime config. Now it's working again.
System Health details
`## System Information
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 | 1476 Downloaded Repositories | 76 HACS Data | okHome Assistant Cloud
logged_in | true -- | -- subscription_expiration | 11. februar 2025 kl. 01:00 relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | eu-central-1-8.ui.nabu.casa certificate_status | ready instance_id | 07060d1f46034d3891b0a3025373b0fc can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okDashboards
dashboards | 17 -- | -- resources | 38 views | 56 mode | storageRecorder
oldest_recorder_run | 7. mai 2024 kl. 16:52 -- | -- current_recorder_run | 8. juli 2024 kl. 09:19 estimated_db_size | 17735.95 MiB database_engine | mysql database_version | 10.11.6Spotify
api_endpoint_reachable | ok -- | --