# How to cast mp3 local file in nodered as HA addons

**URL:** <https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607>\
**Category:** General\
**Created:** [9 March 2022 16:59 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607 "2022-03-09T16:59:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrrobot](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mrrobot](https://discourse.nodered.org/u/mrrobot)\
**Post date:** [9 March 2022 16:59 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/1 "2022-03-09T16:59:13Z")

</div>

Hi Everyone,

Currently iam running nodered as homeassistant addons and i need to cast mp3 local file from nodered.

Unfortunately can't find /endpoint directory to put an mp3 file. Only find the nodered directory to put mp3 file in _ **usr/share/hassio/homeassistant/** _ but not success to play it.

The messages debug in nodered is _ **"Not able to load media:Load failed Not able to load the media."** _

Try to test access the mp3 URL directly in browser but can't play and have a messages _ **"Cannot GET /endpoint/test.mp3"** _

Checking the homeassistant log is _**"Failed to cast media [https://xxxxx.com:1880/endpoint/test.mp3](https://xxxxx.com:1880/endpoint/test.mp3). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address"**_

Try to follow this topic [How to cast videos - #19 by Steve-Mcl](https://discourse.nodered.org/t/how-to-cast-videos/25039/19) and this procedure [node-red-contrib-cast (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-cast) to play local files but it didn't work for me

Try to use this sample [Create an HTTP Endpoint : Node-RED](https://cookbook.nodered.org/http/create-an-http-endpoint) it's works like charm

Believe what next step i need is have to play mp3 successfully in browser but i don't know where exactly /endpoint folder to put an mp3 file.

I have no config anything auth for http\_node options. only have https ssl configuration.

Anyone can help how to cast local life with this situation? Let me know if I am missing in this scenario. and let you know this flow below

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/f/ff7f42d228ad9a3130ce663e82388d73c9663d24.png)

```auto
[{"id":"01a5fce4debb676d","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"7058ebff8eb168c9","type":"http in","z":"01a5fce4debb676d","name":"","url":"/","method":"get","upload":false,"swaggerDoc":"","x":420,"y":200,"wires":[["495526aab1718814","51d348fe933a5d73"]]},{"id":"495526aab1718814","type":"file in","z":"01a5fce4debb676d","name":"","filename":"test.mp3","format":"","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":680,"y":200,"wires":[["5010c49e41e7e78c","d64a5e7e4565c4e7"]]},{"id":"5010c49e41e7e78c","type":"http response","z":"01a5fce4debb676d","name":"","statusCode":"","headers":{"contentType":"audio/mp3"},"x":910,"y":200,"wires":[]},{"id":"51d348fe933a5d73","type":"debug","z":"01a5fce4debb676d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":140,"wires":[]},{"id":"d64a5e7e4565c4e7","type":"debug","z":"01a5fce4debb676d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":930,"y":140,"wires":[]},{"id":"4504f24cb43fb341","type":"cast-to-client","z":"01a5fce4debb676d","name":"","url":"","contentType":"","message":"","language":"en","ip":"","port":"","volume":"50","x":670,"y":260,"wires":[["af95eba64593a3df"]]},{"id":"c11bc90cb49306ac","type":"inject","z":"01a5fce4debb676d","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"ip\":\"192.168.50.50\",\"url\":\" https://xxxxx.com:1880/endpoint/\",\"contentType\":\"audio/mp3\",\"volume\":50}","payloadType":"json","x":490,"y":260,"wires":[["4504f24cb43fb341"]]},{"id":"af95eba64593a3df","type":"debug","z":"01a5fce4debb676d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":890,"y":260,"wires":[]},{"id":"0e4784673f6c4c0d","type":"http in","z":"01a5fce4debb676d","name":"","url":"/hello","method":"get","upload":false,"swaggerDoc":"","x":430,"y":380,"wires":[["66915b6fa8705d51"]]},{"id":"66915b6fa8705d51","type":"template","z":"01a5fce4debb676d","name":"page","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head></head>\n <body>\n <h1>Hello World! Good Morning!</h1>\n </body>\n</html>","x":620,"y":380,"wires":[["6caa147e3ba74a64"]]},{"id":"6caa147e3ba74a64","type":"http response","z":"01a5fce4debb676d","name":"","statusCode":"","headers":{},"x":760,"y":380,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 March 2022 17:08 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/2 "2022-03-09T17:08:44Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/b/8b554959d4a737e5a526b7f74e36a3547fc45aee.png)

Try these steps ↑

---

<div class="post-metadata">

**Author:** ![mbonani](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mbonani/32/10631_2.png) [@mbonani](https://discourse.nodered.org/u/mbonani)\
**Post date:** [9 March 2022 18:41 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/3 "2022-03-09T18:41:53Z")

</div>

This is what I use to play local media files.

```json
[{"id":"4fb7f41ac04ccb3c","type":"api-call-service","z":"d0505e55.8a4b8","name":"Play","server":"","version":5,"debugenabled":false,"domain":"media_player","service":"play_media","areaId":[],"deviceId":[],"entityId":["media_player.living_room_speaker"],"data":"{\"media_content_id\":\"media-source://media_source/local/test.mp3\",\"media_content_type\":\"music\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1080,"y":320,"wires":[[]]}]

```

The `test.mp3` file is saved in `/usr/share/hassio/media/`.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 March 2022 18:54 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/4 "2022-03-09T18:54:09Z")

</div>

I dont use HA so cant help there.

Did you try what I asked?

At step 2, did you enter the URL into the browser? What URL did you use? What did you see?

---

<div class="post-metadata">

**Author:** ![mrrobot](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mrrobot](https://discourse.nodered.org/u/mrrobot)\
**Post date:** [10 March 2022 08:48 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/5 "2022-03-10T08:48:43Z")

</div>

Hi @Steve-Mcl ,

This is a result that I use as your suggestion.

1. Use the full path to file (/usr/share/hassio/homeassistant/node-red/audio/test.mp3)

2. Cannot set this to /test but /endpoint/test

3. Access entering url use into the browser ([https://x.x.x.x:1880/endpoint/test](https://x.x.x.x:1880/endpoint/test))

4. Check the browser pages (This site can’t be reached)

5. Check debug msg.payload (Error: ENOENT: no such file or directory, open '/usr/share/hassio/homeassistant/node-red/audio/test.mp3')

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/a/dad697c0e96570236c647254d19c1d3f03e61f18.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/f/1f2dfedcab700b166dea6771949efcdc7d865241.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/9/997a83e3c6f90c82744a248e0cb0e189d1497bd5.png)

```auto
[{"id":"4e8121031854c065","type":"http in","z":"01a5fce4debb676d","name":"","url":"/test","method":"get","upload":false,"swaggerDoc":"","x":250,"y":220,"wires":[["122a3ecd7775d97f","a82de37c21178ffb"]]}]

```

What should need to check further and next action for this error?

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [10 March 2022 09:00 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/6 "2022-03-10T09:00:09Z")

</div>

Not a HomeAssistant user, but.

The problem here will be that HomeAssistant runs Node-RED in a container, so unless the `/usr/share/hassio/homeassistant/` directory has been mounted into the container it will not have access to it.

You will have to ask the HomeAssistant node-red plugin folk what paths on the host system are available to the plugin.

---

<div class="post-metadata">

**Author:** ![mrrobot](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mrrobot](https://discourse.nodered.org/u/mrrobot)\
**Post date:** [10 March 2022 12:03 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/7 "2022-03-10T12:03:54Z")

</div>

Hi @hardillb @Steve-Mcl ,

So, my flow and config above is correct but have no exit way?

Is there an alternative way to use public directory that can mount and access for this situation?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 March 2022 12:08 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/8 "2022-03-10T12:08:23Z")

</div>

Did you ask on HA forum which directories are available/shared to the node-red container?

---

<div class="post-metadata">

**Author:** ![mbonani](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mbonani/32/10631_2.png) [@mbonani](https://discourse.nodered.org/u/mbonani)\
**Post date:** [10 March 2022 21:06 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/9 "2022-03-10T21:06:57Z")

</div>

> [@mrrobot](#):
>
> - Use the full path to file (/usr/share/hassio/homeassistant/node-red/audio/test.mp3)

`/usr/share/hassio/homeassistant` is mapped to `/config` inside the container  
You should use `/config/node-red/audio/test.mp3`

> [@mrrobot](#):
>
> - Access entering url use into the browser ([https://x.x.x.x:1880/endpoint/test](https://x.x.x.x:1880/endpoint/test))

Is Node-RED accessible via [https://x.x.x.x:1880](https://x.x.x.x:1880) ? Did you expose port 1880 in the add-on configuration?

---

<div class="post-metadata">

**Author:** ![mrrobot](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mrrobot](https://discourse.nodered.org/u/mrrobot)\
**Post date:** [10 March 2022 23:35 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/10 "2022-03-10T23:35:55Z")

</div>

Hi @mbonani ,

> [@mbonani](#):
>
> `/usr/share/hassio/homeassistant` is mapped to `/config` inside the container  
> You should use `/config/node-red/audio/test.mp3`

Can not find /config/node-red/ directory. could you advise the /config/node-red/ is mapped to where?  
so I can put test.mp3 file in there.

> [@mbonani](#):
>
> Is Node-RED accessible via [https://x.x.x.x:1880](https://x.x.x.x:1880) ? Did you expose port 1880 in the add-on configuration?

Yes, expose port 1880 in the add-on config. So can accessible via web interface.

---

<div class="post-metadata">

**Author:** ![mbonani](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mbonani/32/10631_2.png) [@mbonani](https://discourse.nodered.org/u/mbonani)\
**Post date:** [11 March 2022 00:04 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/11 "2022-03-11T00:04:30Z")

</div>

> [@mbonani](#):
>
> `/usr/share/hassio/homeassistant` is mapped to `/config` inside the container

This means that what you see on the host as `/usr/share/hassio/homeassistant`, is seen from within the add-on as `/config`.

So `/usr/share/hassio/homeassistant/node-red/audio/test.mp3`, is seen from inside the add-on as `/config/node-red/audio/test.mp3`. And that's what you should use in the node in this case.

Ideally, you'd save audio/video files to `/usr/share/hassio/media`, which is mapped to `/media` in the add-on.

---

<div class="post-metadata">

**Author:** ![mrrobot](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mrrobot](https://discourse.nodered.org/u/mrrobot)\
**Post date:** [11 March 2022 08:07 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/12 "2022-03-11T08:07:47Z")

</div>

Hi @mbonani ,

Well noted.

If nodered need accessible file via [https://x.x.x.x:1880/endpoint/audio/test.mp3](https://x.x.x.x:1880/endpoint/audio/test.mp3)

Let me know the directory on the host that I can save audio files to, So is seen from within the add-on as /endpoint/audio/test.mp3

Also I can set this url below correctly and can play test.mp3 via webbrowser directly.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/f/1f2dfedcab700b166dea6771949efcdc7d865241.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 March 2022 08:35 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/13 "2022-03-11T08:35:18Z")

</div>

Do you mean you want to access multiple `mp3`s but only specify endpoint `/endpoint/audio/`

e.g.

- you want to save `sound1.mp3` to `/config/node-red/audio/` and access it via `/endpoint/audio/sound1.mp3`
- you want to save `sound2.mp3` to `/config/node-red/audio/` and access it via `/endpoint/audio/sound2.mp3`
- etc etc
- but with only having one endpoint setup as `/endpoint/audio/`

Is that what you mean?

> [@mrrobot](#):
>
> If nodered need accessible file via [https://x.x.x.x:1880/endpoint/audio/test.mp3](https://x.x.x.x:1880/endpoint/audio/test.mp3)
> 
> Let me know the directory on the host that I can save audio files to

@mbonani already said " `/usr/share/hassio/homeassistant` , is seen from within the add-on as `/config`"

So putting `sound1.mp3` inside `/usr/share/hassio/homeassistant` will be `/config/sound1.mp3` for node-red.

> [@mrrobot](#):
>
> Also I can set this url below correctly and can play test.mp3 via webbrowser directly

Now i am confused - can you access your `test.mp3` or not?

* * *

Maybe you should start again. Show use what files you have put where and what your flow currently is. Also, explain fully what your end goal is.

---

<div class="post-metadata">

**Author:** ![mrrobot](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mrrobot](https://discourse.nodered.org/u/mrrobot)\
**Post date:** [11 March 2022 10:47 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/14 "2022-03-11T10:47:46Z")

</div>

Hi @Steve-Mcl ,

The end goal is can cast mp3 local file. Let you know this config and flow currently below.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/0097aa66b8728b5049c8b2f1827d1db3c4ff6934.png)

```auto
[{"id":"01a5fce4debb676d","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"4e8121031854c065","type":"http in","z":"01a5fce4debb676d","name":"","url":"/audio","method":"get","upload":false,"swaggerDoc":"","x":250,"y":220,"wires":[["122a3ecd7775d97f","a82de37c21178ffb"]]},{"id":"122a3ecd7775d97f","type":"file in","z":"01a5fce4debb676d","name":"","filename":"/config/node-red/audio/test.mp3","format":"","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":570,"y":220,"wires":[["dd8a20a5580907a2","ee4e9408ac8af6a9"]]},{"id":"dd8a20a5580907a2","type":"http response","z":"01a5fce4debb676d","name":"","statusCode":"","headers":{"contentType":"audio/mp3"},"x":850,"y":220,"wires":[]},{"id":"a82de37c21178ffb","type":"debug","z":"01a5fce4debb676d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":250,"y":280,"wires":[]},{"id":"ee4e9408ac8af6a9","type":"debug","z":"01a5fce4debb676d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":530,"y":280,"wires":[]},{"id":"5d8b66fce47eb44b","type":"cast-to-client","z":"01a5fce4debb676d","name":"","url":"","contentType":"","message":"","language":"en","ip":"","port":"","volume":"50","x":490,"y":360,"wires":[["5e99d16a17a8d2be"]]},{"id":"1503885c909d3f21","type":"inject","z":"01a5fce4debb676d","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"ip\":\"x.x.x.x\",\"url\":\"https://x.x.x.x:1880/endpoint/audio/test.mp3\",\"contentType\":\"audio/mp3\",\"volume\":50}","payloadType":"json","x":310,"y":360,"wires":[["5d8b66fce47eb44b"]]},{"id":"5e99d16a17a8d2be","type":"debug","z":"01a5fce4debb676d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":360,"wires":[]}]

```

1. Already put file test.mp3 to /usr/share/hassio/homeassistant/node-red/audio/test.mp3
2. Already config the flow as above configuration
3. Can not play mp3 by accessing [https://x.x.x.x:1880/endpoint/audio/test.mp3](https://x.x.x.x:1880/endpoint/audio/test.mp3)

Is there any missed config?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 March 2022 10:48 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/15 "2022-03-11T10:48:58Z")

</div>

> [@mrrobot](#):
>
> Can not play mp3 by accessing [https://x.x.x.x:1880/endpoint/audio/test.mp3](https://x.x.x.x:1880/endpoint/audio/test.mp3)

No, you cannot because you named your endpoint `/endpoint/audio` - that is the only endpoint possible.

Thats why I asked...

> [@Steve-Mcl](#):
>
> Do you mean you want to access multiple `mp3` s but only specify endpoint `/endpoint/audio/`
> 
> e.g.
> 
> - you want to save `sound1.mp3` to `/config/node-red/audio/` and access it via `/endpoint/audio/sound1.mp3`
> - you want to save `sound2.mp3` to `/config/node-red/audio/` and access it via `/endpoint/audio/sound2.mp3`
> - etc etc
> - but with only having one endpoint setup as `/endpoint/audio/`
> 
> Is that what you mean?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 March 2022 10:49 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/16 "2022-03-11T10:49:41Z")

</div>

what happens if you try `https://x.x.x.x:1880/endpoint/audio` in a browser?

---

<div class="post-metadata">

**Author:** ![mrrobot](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mrrobot](https://discourse.nodered.org/u/mrrobot)\
**Post date:** [11 March 2022 11:30 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/17 "2022-03-11T11:30:26Z")

</div>

Hi @Steve-Mcl ,

> [@Steve-Mcl](#):
>
> Do you mean you want to access multiple `mp3` s but only specify endpoint `/endpoint/audio/`
> 
> e.g.
> 
> - you want to save `sound1.mp3` to `/config/node-red/audio/` and access it via `/endpoint/audio/sound1.mp3`
> - you want to save `sound2.mp3` to `/config/node-red/audio/` and access it via `/endpoint/audio/sound2.mp3`
> - etc etc
> - but with only having one endpoint setup as `/endpoint/audio/`
> 
> Is that what you mean?

Yes should be want like that. but i need to try for only single `mp3`s first

> [@Steve-Mcl](#):
>
> what happens if you try `https://x.x.x.x:1880/endpoint/audio` in a browser?

if try access `https://x.x.x.x:1880/endpoint/audio` in a browser, what happens is auto download a file with no extension. then I complete rename with extension .mp3, this is actually file test.mp3 that I put to `/usr/share/hassio/homeassistant/node-red/audio/`

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/c/0ce3a5669af563e995294f25ee2b517cd13be90c.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 March 2022 11:39 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/18 "2022-03-11T11:39:49Z")

</div>

ok, so now we know it works, you can try casting the URL [https://x.x.x.x:1880/endpoint/audio](https://x.x.x.x:1880/endpoint/audio) to your device.

After that, I will show you how to do multiple files.

---

<div class="post-metadata">

**Author:** ![mrrobot](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mrrobot](https://discourse.nodered.org/u/mrrobot)\
**Post date:** [11 March 2022 11:56 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/19 "2022-03-11T11:56:24Z")

</div>

Hi @Steve-Mcl ,

Already try casting the URL [https://x.x.x.x:1880/endpoint/audio](https://x.x.x.x:1880/endpoint/audio), the cast status node is play but have no any sound in speaker. Any missed?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/ae74350e40da850b8b84d336663e8b31c185c510.png)

and few minutes came `error load media`

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/78a1c44b16fdf165684c3ca3c0b7e91295138305.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 March 2022 12:21 UTC](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607/20 "2022-03-11T12:21:55Z")

</div>

Try entering a valid content type header in the HTTP response...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/f/5f2b17b0cdcb8e259f0c398dda38a5b7844bab8d.png)

[Next page](https://discourse.nodered.org/t/how-to-cast-mp3-local-file-in-nodered-as-ha-addons/59607.md?page=2)
