Home Assistant Community Add-on: Node-RED

Thanks
Dick

Question to the hive-mindā€¦

Is there any advantage of running node-red as an add-on, on the same device as HA, compared to running it in a docker container of a Synology NAS?

I currently have a node-red instance running in Docker, but recently moved HA to ODroid (HA Blue) and wonder if there would be benefits to running node-red from there, too.

Thanks!

Have you figured this out yet? Just go with he one thats downloaded most, Iā€™d say. Only issue is the method used to interface node-red with Home Assistant. This might help with that Installing Node Red in Docker for Home Assistant | by Jordan Rounds | Medium

@bluepixel

If you run it directly on HA as an add-on, all of the integrated HA functionality, such as various nodes that integrate directly with the HA system via API (Call-service, events, get-entities, etc) will be included automatically within the system. If not, you will have to manually add the NPM packages. See my post above this one for instructions

EDIT:
Values are ā€˜darkā€™, ā€˜defaultā€™, ā€˜midnight-redā€™, ā€˜oledā€™, ā€˜solarized-darkā€™, ā€˜solarized-lightā€™. Dark should have worked, but maybe try the others as well? OLED works for me.

@luukbos1

I believe I read that Node-Red was getting theme support. What that means is there is likely a poorly-documented theme feature somewhere out on the internet that I need to find, as I also ran into the same issue and have yet to resolve.

Since v10.1.0 I am unable to update nodes from the palette. They all fail. Created an issue on the github: Unable to update nodes (in palette), all fail (10.1.0) Ā· Issue #1183 Ā· hassio-addons/addon-node-red Ā· GitHub

I have the same. Not all nodes fail, but modbus, gpio and serialport do.

Is it possible to start node-red in safe-mode with the add-on?

1 Like

Iā€™ve been getting some pretty degraded performance lately, where I have a sequence of flashing lights that lag very heavily now. It used to be very responsive. Seems that a restart of the ad-on temporarily solves this problem. Has anyone else had this problem?

Hello. I want to use some Node-RED modules, which donā€™t support Node.js v16.x, e.g. node-red-contrib-chatbot. Iā€™m currently using v0.19.7 of this module, but it wonā€™t update to the latest version because itā€™s dependent on sqlite3, which, again, donā€™t support Node.js v16.x

So, I want to downgrade Node.js to v14.18.2. Is there a way to do this? I previously tried to log into Node-RED Docker container as root and execute the following commands:

npm install -g n
n 14.18.2

Installation seems to go without errors, but node -v still reports v16.13.1 after PATH reload. I guess, Iā€™m doing something wrong.

Iā€™m using v10.2.0 of the addon.

BTW, Node.js v14.x is listed as ā€œrecommendedā€ at Supported Node versions : Node-RED

after uprgading to the latest verion of addon of node red appear this error:

(node:541) UnhandledPromiseRejectionWarning: #
(node:541) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line options | Node.js v17.2.0 Documentation). (rejection id: 88)
(node:541) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:541) UnhandledPromiseRejectionWarning: #
(node:541) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line options | Node.js v17.2.0 Documentation). (rejection id: 89)
(node:541) UnhandledPromiseRejectionWarning: #
(node:541) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line options | Node.js v17.2.0 Documentation). (rejection id: 90)
(node:541) UnhandledPromiseRejectionWarning: #
(node:541) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line options | Node.js v17.2.0 Documentation). (rejection id: 91)4585

how could i found the node that mafe the error?.

Hello. Iā€™ve been browsing the above chain for help, but am unable to connect to nodeRED on an ubuntu docker hosted supervised install.

Iā€™m getting the Ingress exception for the IP, have configured the secret and the http usernames and passwords, but get a 502 bad connection error when using the side bar in HA. From what I have figured out from other comments looking at the ingress error, I guess this is due to the docker network, but am unsure.

If I navigate to x.x.x.x:1880, I am able to log in, but any flows I create have a ā€œno connectionā€ error when I deploy. When configuring a node, all the autofill options are available for the entity names etc. I am able to install new palettes and nodeRED in itself seems operational.

More than happy to read up on help ideas, but Iā€™ve already dumped 6+ hrs in to researching this and Iā€™m as lost as ever. Anyone with prior experience would be very welcome :slight_smile:

Thanks and regards!

1 Like

You are not alone in this. I am having the same issue. I am doing a restore right now to get it working for now. I hope I donā€™t lose all my Node Red work!

Logs say this

RuntimeError: This module can only be run on a Raspberry Pi!


            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.


502 Bad Gateway

nginx

Actually, I backed up a snap shot but apparently it was after upgrading to the new HA so I guess I cant get this workingā€¦ I will be doing some digging to find some old snapshotsā€¦

I found this and disabled the Roborock add on (see link below on what I did). I had to delete the related servers too. I searched for them under the ā€œinfoā€ and searched flows for Roborock.

Hey Guys, I have an issue with one of my Pallets updating as I update the add-on
node-red-contrib-home-assistant-websocket
On the latest update, this should be changed to 0.40.0 However, once I updated still mine is showing 0.38.0. I retarted and same.
I noticed in the file package.json which list

 "dependencies": {
        "node-red-contrib-home-assistant-websocket": "~0.38.0"
}

and then the same is repeated on top of ā€œpackage-lock.jsonā€.
Could it be related?

Node Red Add-On wonā€™t load. Went to add-ons, found Node-RED, clicked install, clicked start, clicked open web UI. Blank screen is shown. Supervisor logs show this:

21-12-25 10:48:44 INFO (MainThread) [supervisor.addons] Creating Home Assistant add-on data folder /data/addons/data/a0d7b954_nodered
21-12-25 10:48:44 INFO (SyncWorker_1) [supervisor.docker.interface] Downloading docker image ghcr.io/hassio-addons/node-red/amd64 with tag 10.2.2.
21-12-25 10:48:58 INFO (MainThread) [supervisor.addons] Add-on 'a0d7b954_nodered' successfully installed
21-12-25 10:50:35 INFO (SyncWorker_3) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/node-red/amd64 with version 10.2.2
21-12-25 10:50:46 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:64428 ssl:default [Connect call failed ('172.30.32.1', 64428)]

So I understand why the blank screen, it canā€™t connect to the add-on (container). I know you arenā€™t supposed to have to mess with addresses/ports/etc, so how should I go about continuing to troubleshoot this issue? Thanks!

Arenā€™t you supposed to set a username and password in the configuration?

Sorry, credential secret is the one you must set.

Howdy Guys,
Are any of you getting the below error in NodeRed logs?
ā€œError connecting to dbus: Error: connect ENOENT /var/run/dbus/system_bus_socketā€
Any idea of a resolution for this?

I first noticed it when running NodeRed v10.2.2 i have rolled back to 10.0.0 and its still giving me this error roughly every 10 seconds

Iā€™ve got the issue that Node-Red everytime disconnects after each deploy.
After about 10 seconds, everything is working again.

Havenā€™t had this in the past, but with my new (fresh) HA install this issue persists.

When trying to (for example) call a service directly after deploying, it says thereā€™s an
" Error : unexpected error (502) error "

Also, in the debug pane, it shows:
ā€œCall-Service attempted without connection to server.ā€

Anyone able to help me out with this?

In the HA UI-Side panel follow: configuration/odd-ons,Backups & Supervisior/Node-Red/log.
You may need to ā€˜refreshā€™ the tab to get updates.

What is the log error? The debug error in Node-Red 502 is not enough to work with here.

I have a question also. Trying increase the

'NODE_OPTIONS='--max-old-space-size=4000'

Just unsure how to make it persistant.

Not trying to double up on a post but I started asking there, but think maybe suited here as Iā€™m getting to learn the HA community layout?