I am trying to send an MP3 to ‘an external system’ (not to overcomplicate the question). However i get an alert in my log that there was an illegal login attempt and the file gives a 401.
The file is located in my /media/ folder; and is perfectly playable via the web interface of HA. Therefore i think the /media/ folder is somehow protected by the HA UI.
I did add the /media entry to the configuration.yaml like this:
homeassistant:
allowlist_external_dirs:
- /media
But that doesn’t seem to resolve/help. What am i missing?
Hi @sheminasalam that doesn’t really matter if i also can’t open the file without authorisation in the browser (not on the external URL and not on the internal, by IP, URL for that matter).
You, sir, are a lifesaver. This was driving me insane! Adding some random keywords to this post to help people find it based on the errors I got and what I searched for:
and I’m trying to link to an svg file stored in the “icons” directory. Like this:
- service: media_player.play_media
data:
entity_id: media_player.nest_living_room
media_content_type: music
media_content_id: >
{%- set station = states('input_select.radio_station') -%}
{% if station == "BBC Radio 1" %} http://stream.live.vc.bbcmedia.co.uk/bbc_radio_one
{% elif station == "BBC Radio 1 Dance" %} http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/ak/bbc_radio_one_dance.m3u8
{% endif %}
extra:
thumb: >
{%- set station = states('input_select.radio_station') -%}
{% if 'BBC Radio 1' in station %} http://homeassistant.local:8123/media/icons/BBC-Radio-1-01.svg
{% elif 'BBC Radio 1 Dance' in station %} http://homeassistant.local:8123/media/icons/BBC-Radio-1-01.svg
{% endif %}
stream_type: LIVE
the svg doesn’t show on the media player
navigating to this link on the browser returns “401 unauthorized”
media-source://media_source/icons/BBC-Radio-1-01.svg didn’t work either