schford
(Stuart)
June 25, 2018, 10:51am
1
Hi guys, pulling my hair out with this
So I have Home Assistant running in a docker on unraid and Node Red running in another docker…
I access them via the lets encrypt docker / reverse proxy so I have SSL access internally and externally to the network.
If I open a status node up if I connect direct to the IP eg http://192.168.0.19:1880/node-red/#flow/d147397f.dbb958
then when it tries to pull the entity IDs I get this error
"
Cannot GET /homeassistant/entities
Cannot GET /homeassistant/entities"
If I access via https via NGIX eg https://realurlhere.net/node-red/#flow/d147397f.dbb958 I just get 404 not founds.
I have googled and found others with issue but not a fix that works for me - be grateful for anyadvice?
schford
(Stuart)
June 25, 2018, 11:49am
2
I have worked out that the cause of the error is when you change the httpRoot in the config or node-red as per below.
I need to change the http root to be able to reverse proxy with lets encrypt
// The following property can be used in place of ‘httpAdminRoot’ and ‘httpNodeRoot’,
// to apply the same root to both parts.
httpRoot: ‘/node-red’,
So for me it should be pulling the data from http://192.168.0.19:1880/node-red/homeassistant/entities
But it is actually trying to pull it from http://192.168.0.19:1880/homeassistant/entities
anyone got any ideas of a fix looks like the base url is hard coded and isnt taking account of the httproot value.
schford
(Stuart)
June 25, 2018, 12:08pm
3
On line 47 of server-events-state-changed.html - we can see the url it fetches to show entities, as it does not take into account httpRoot variable I have done a quick and dirty hard code - I am sure there must be a better way of fixing this but I am not a coder as you can see below all I have done is manually put in the additional info for my installation.
$.get('/node-red/homeassistant/entities').done((entities) => {
pbcrunch
(Wayne Manion)
October 6, 2018, 6:08pm
4
I got to the bottom of this by adding an additional reverse proxy entry for the directory /homeassistant
For example, I have nodered set up to run out of ipaddress:1880/nodered
I have the main reverse proxy set up to forward requests from ipaddress/nodered to ipaddress:1880/nodered (also a rule for websockets)
So I set up another reverse proxy rule to forward requests for ipaddress/homeassistant to ipaddress:1880/nodered/homeassistant
I’m using Apache, but here is my reverse proxy setup.
ProxyPass /nodered/comms ws://localhost:1880/nodered/comms
ProxyPass /nodered http://localhost:1880/nodered
ProxyPassReverse /nodered/comms ws://localhost:1880/nodered/comms
ProxyPassReverse /nodered http://localhost:1880/nodered
ProxyPass /homeassistant http://localhost:1880/nodered/homeassistant
ProxyPassReverse /homeassistant http://localhost:1880/nodered/homeassistant
Kermit
October 6, 2018, 9:29pm
5
For reference, I have fixed this issue on my WebSocket fork if people need to use httpRoot or httpAdminRoot in their setup and want it working out of the box.