Hello Everyone,
I have copied mp3 file in /config/media and /config/www folders.
My configuration.yaml file is having following
homeassistant:
external_url: https://my_sub_domain.my_domain.com
internal_url: http://192.168.0.101:8123
media_dirs:
media: /config/media
I able to play mp3 file on Google Speaker with following code from Developer Tools
action: media_player.play_media
target:
entity_id: media_player.speaker_in_dining_room
data:
media_content_type: audio/mp3
media_content_id: https://my_sub_domain.my_domain.com/local/door_squeak.mp3
I also able to file from “My Media” of Home Assistant on peaker_in_dining_room.
But not able to play file with following code from Developer Tools
action: media_player.play_media
target:
entity_id: media_player.speaker_in_dining_room
data:
media_content_type: audio/mp3
media_content_id: https://my_sub_domain.my_domain.com/media/local/door_squeak.mp3
Got following error
2025-05-03 01:58:35.410 ERROR (Thread-6) [homeassistant.components.cast.media_player] Failed to cast media https://my_sub_domain.my_domain.com/media/local/door_squeak.mp3?authSig=hbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIyOTQxNTRlZmZjZjI0ZTkwOZmIwZGMwZGQ2YTI5ZSIsInBhdGgiOiIvbWVkaWEvbG9jYWwvMTI1MDk3X19kcmVlbF9fZG9vcl9zcXVlYWtfMjhfMDNfMTFfMTIubXAzIiwicGFyYW1zIjpbXSwiaWF0IjoxNMjAxNTEzLCJleHAiOjE3NDYyODc5MTN9.79ZG1oIunGqj5sQLULwo2S9MLSXEYHDRoTLzND44 from external_url (https://my_sub_domain.my_domain.com). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address