HASS Superviced add node-RED problem

Hello all,
I am new to Home Assistant. Try to switch from openhab to ha. But I was very much confused by the various install methods of HA!
I tried the HASSOS version, but that leaves me with an OS with which i could not do anything else. I wanted HA installed in docker and on a USB SSD drive, so i chose the Supervisory install method.
Installed on two RPI’s, one RPi4 and one RPi2. Installation went on both systems without problems.
Installation of Samba, Mosquitto File Editor all went very well. But then i got problems with the installation of node-RED add-on.

node-RED problem.
I installed node-RED add-on and configured the admin and user. Then i start nod-RED. When i try to access the node-RED interface it stops!!
I receive this message “502: Bad Gateway” and looking at node-RED is has stopped.

Hopefully anyone can help with this?
Kind regards, Bert
BTW, this is my node-RED config:

credential_secret: ''
dark_mode: false
http_node:
  username: admin
  password: ******
http_static:
  username: user
  password: ******
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: false
system_packages: []
npm_packages: []
init_commands: []

Bert,
I’m also new here, but will try to help if I can :grinning: Firstly, I believe you need a password in the ‘credential_secret’ field.
It does take a few seconds for node red to start up, which maybe why you get the 502 error, you can check the log (at the bottom of the add-on screen where you are starting node red, any errors here should give a pointer to what is causing the problem.

Good luck!

Gordon

Hi Gordon, thank you for your response!
I tried a bit more and added a password to the credential_secret (without quotes).
Further I tried with no users and passwords.

Both had no succes.
But when i look into the log, i see it is complaining about ssl certificate. I did not install a ca or certificaties.

But the log part about the ssl is under the iginx.sh: executing.
iginx.sh: exited 1.

So it has probably to do with the http server which is using ssl???

But i do not recall that i have configured this.
Nor do i know How to disable ssl for the http server…
Any idea?

Change the ‘ssl: true’ to ‘ssl: false’ in your config and that should sort it!

By default the Node-RED add-on is set up like this in the Network settings:
Screen Shot 2020-04-14 at 10.57.51 AM

This means the addon can only be accessed via Ingress (i.e. a tab in the left side nav of your home assistant instance). This is the default and should be good for most people. Assuming it is good for you then in your config change ssl: true to ssl: false as that doesn’t do anything in Ingress-only mode, it only applies to non-Ingress means of accessing Node-RED. Would also note that http_node and http_static also only have meaning when you are operating in non-ingress mode, if you leave the network with the default settings there’s no reason to set usernames and passwords in those nodes either.

When operating in Ingress-only mode there is one limitation of note I’ve found (I’m sure there’s more then one, just my experience): you cannot use the HTTP In node in your Node RED flows. In Ingress-only mode there’s no way to communicate directly with your Node RED instance without going through HA so using that node is impossible. If you want to use this node then you have to list a port in the Network area and enable direct access to Node RED. That’s also what the http_node field in the settings refers to, the credentials you set there used when communicating with endpoints created by HTTP In nodes, it’s not used for login to the web interface.

I actually don’t know what the credentials you put in http_static are used for. Perhaps the dashboard features? I’ve never used those myself but it seems like something else that might require direct access to your Node RED instance be enabled.

If you do choose to enable direct access to your Node RED instance then you might want to reconsider the ssl option. If you limit access to only within your local network then HTTP is probably ok but if you want to expose it outside of your network then definitely use SSL. Either via this option or via a reverse proxy.

Also as an FYI, all doc on those settings can be found in the Github Readme for the add-on

Hi Mike, Thank you for your info. Unfortunately I was not yet able to continue with the issue.
My Internet connection (glass fiber) has been cut due to cable works in my street. So i have to improvise a bit until this is fixed, hopefully next Tuesday.
To be continued…