i8beef / node-red-contrib-castv2

MIT License
22 stars 15 forks source link

Not displaying images from node-red-static folder #11

Closed nygma2004 closed 4 years ago

nygma2004 commented 4 years ago

I have a static folder set up in Node-Red settings.js and I place some images there that I want to display on Home Hub: e.g. http://192.168.1.80:1880/gate.jpg. If I open this URL in the browser I get image, so the URL is definitely correct. If I send this URL to Home Hub as a Media, I get a "Error: load failed". Unfortunately there is no more info on this, so I have no way of telling what has gone wrong. Any ideas why Home Hub does not like the Node Red server?

i8beef commented 4 years ago

Unsure. You'd have to start looking at various pieces and troubleshooting. Things I'd check:

  1. Does it not like the port? I.e., does it require port 80/443?
  2. Is your static folder not outputting the right headers to satisfy the Chromecast, like content-type, etc.?

Try hosting it somewhere else real quick on your local network and see if you can do it from there to eliminate the node-red static serving as the issue. Normally, I'd setup an nginx proxy around the node-red install for just this reason, so I have a real HTTP server that I can work with.

nygma2004 commented 4 years ago

Thanks for your tip. It looks like Node Red is causing the issue. I have copied the same image to my NAS which also has a web server and that works fine on port 5000. I have Apache web server also running on the PI serving some other bits, so I save my image to /var/www/html and point Google Hub to http://192.168.x.x:8080/gate.jpg and it works just fine. So it must be Node-Red.