Cant Cast local file

I have a png file that i would like to cast it on TV. I put the "car.png" file in this path C:\Users\ASUSE\car.png, unfort i got this error "Not able to load media:Load failed Not able to load the media".

Any help would be appreciated.

[{"id":"dbab92a5.684af","type":"tab","label":"Flow 17","disabled":false,"info":""},{"id":"d5a6dd33.a0e28","type":"http in","z":"dbab92a5.684af","name":"","url":"endpoint/car.png","method":"get","upload":false,"swaggerDoc":"","x":120,"y":140,"wires":[["d59c8c4.b480d7","e7ed07e7.97da58"]]},{"id":"d59c8c4.b480d7","type":"file in","z":"dbab92a5.684af","name":"","filename":"car.png","format":"","chunk":false,"sendError":false,"encoding":"none","x":310,"y":260,"wires":[["87b9c5b8.526558","49056e53.5a32b"]]},{"id":"87b9c5b8.526558","type":"http response","z":"dbab92a5.684af","name":"","statusCode":"","headers":{"contentType":"image/png"},"x":500,"y":260,"wires":[]},{"id":"e7ed07e7.97da58","type":"debug","z":"dbab92a5.684af","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":140,"wires":[]},{"id":"49056e53.5a32b","type":"debug","z":"dbab92a5.684af","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":200,"wires":[]},{"id":"b72151a6.617e3","type":"cast-to-client","z":"dbab92a5.684af","name":"","url":"","contentType":"","message":"","language":"en","ip":"","port":"","volume":"","x":490,"y":360,"wires":[[]]},{"id":"2dbcc2cc.94f80e","type":"inject","z":"dbab92a5.684af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"ip\":\"192.168.100.2\",\"url\":\"http://127.0.0.1:1880/endpoint/car\",\"contentType\":\"image/png\",\"volume\":5}","payloadType":"json","x":220,"y":320,"wires":[["b72151a6.617e3"]]},{"id":"60f067e8.57cd68","type":"inject","z":"dbab92a5.684af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":260,"wires":[["d59c8c4.b480d7"]]}]

You have set the URL for Chromecast to play as http://127.0.0.1:1880/endpoint/car.

To the Chromecast, 127.0.0.1 is itself. Replace that with the IP of your node-red server.

Also, you set the endpoint to endpoint/car.png so you will need the URL to be http://node-red-ip:1880/endpoint/car.png

Thank you Steve for your response.

sorry, I didt understand the first Edit "To the Chromecast, 127.0.0.1 is itself. Replace that with the IP of your node-red server" if got it right, i alredy write the ip address of node red.

[{"id":"dbab92a5.684af","type":"tab","label":"Flow 17","disabled":false,"info":""},{"id":"d5a6dd33.a0e28","type":"http in","z":"dbab92a5.684af","name":"","url":"endpoint/car.png","method":"get","upload":false,"swaggerDoc":"","x":120,"y":140,"wires":[["d59c8c4.b480d7","e7ed07e7.97da58"]]},{"id":"d59c8c4.b480d7","type":"file in","z":"dbab92a5.684af","name":"","filename":"car.png","format":"","chunk":false,"sendError":false,"encoding":"none","x":310,"y":260,"wires":[["87b9c5b8.526558","49056e53.5a32b"]]},{"id":"87b9c5b8.526558","type":"http response","z":"dbab92a5.684af","name":"","statusCode":"","headers":{"contentType":"image/png"},"x":500,"y":260,"wires":[]},{"id":"e7ed07e7.97da58","type":"debug","z":"dbab92a5.684af","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":140,"wires":[]},{"id":"49056e53.5a32b","type":"debug","z":"dbab92a5.684af","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":200,"wires":[]},{"id":"b72151a6.617e3","type":"cast-to-client","z":"dbab92a5.684af","name":"","url":"","contentType":"","message":"","language":"en","ip":"","port":"","volume":"","x":490,"y":360,"wires":[[]]},{"id":"2dbcc2cc.94f80e","type":"inject","z":"dbab92a5.684af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"ip\":\"192.168.100.2\",\"url\":\"http://127.0.0.1:1880/endpoint/car.png\",\"contentType\":\"image/png\",\"volume\":5}","payloadType":"json","x":220,"y":320,"wires":[["b72151a6.617e3"]]},{"id":"60f067e8.57cd68","type":"inject","z":"dbab92a5.684af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":260,"wires":[["d59c8c4.b480d7"]]}]```

The IP address 127.0.0.1 is a special address, it always points to the device making the request, so if you send the URL http://127.0.0:1880/endpoint/car.png to the Chromecast, the Chromecast will be the device making the request to fetch that content.

So the Chromecast will ask it's self for the file, which of course it will not be able to provide.

You are accessing Node-RED using 127.0.0.1 because the browser you are using is on the same machine as Node-RED. To access Node-RED from the Chromecast it will need to use the LAN IP address of you machine, it will start with 192.168.100. but you will need to look up what actual address is.

On Windows you would run a the ipconfig command to find your machines IP address

Thank you guys i got it, that is very helpful

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.