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. 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 and this procedure node-red-contrib-cast (node) - Node-RED to play local files but it didn't work for me
Try to use this sample Create an HTTP Endpoint : Node-RED 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
[{"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":[]}]