Home Assistant Community Add-on: Node-RED

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?

Im not able to get rednode working with the hacs addon.

Keeps saying custom integration needs to be installed.

I can set a light on or off.
I cannot make a sensor. Anyone a suggestion?

Both node red, and hacs node red companion app are installed without issue.

To fully integrate NR with HA 3 things are needed:

  • custom integration. Installed manually or via HACS to custom_integration directory. needs restart after its installation and updates.
  • NR companion integration - It’s HA integration. go to Configuration → Devices and Dervices (earlier this section was called just Integrations) to check if integration is added. If not - add it using add button
  • node-red-contrib-home-assistant-websocket - likely will be installed together with one of above. If not, add it in NR Palette.

I have to admit that at time I was installing NR, those dependencies wasn’t clear to me too. And seems it’s still the case for newcomers

BTW while node-red-contrib-home-assistant-websocket comes in the package (still not sure what delivers it, maybe it comes with NR add on) eventual updates must be performed manually
. At least it is how it works on my side. While custom component is being updated by HACS, you have to manually check in NR palette if there is something to update.

1 Like

Thank you sir.

I downloaden the companion app with hacs. Thought it was installed already.

I checked configuration. Devices. There it was missing. I added it. Now it is working fine.

Thank you. I

are you updating inside node red UI or using the “npm_packages” in configuration?

I’m updating inside NodeRed (using Manage palette).
My point is, that without looking into the Palette, you have no chance to be informed that the update is waiting. On the other hand other parts of the integration or even HA might be updated causing issues until node-red-contrib-home-assistant-websocket is updated.

Here is example from my NR:
image
But nowhere outside NR this information is presented. TBH I would expect NodeRed COmpanion integration to informa about this. Especially since its documentation redirects to node-red-contrib-home-assistant-websocket docs

2 Likes

oh yeah i was just more curious how you updated nothing to do with the thread above. i do agree though it would be nice to track them somewhere outside of the palette

1 Like

In Node-RED I’ve started encountering automation errors with TTS (Alexa Media Player) and Google Home (MP3 sound effects). I believe the problem occurs both with grouped media players (Alexa and Google Home) as well as flows using template nodes to construct output. I suspect the problem began with the Node-RED upgrade to 11.0.0 but only noticed the issue last night with 11.0.1.

Google Home (which I use for MP3 sound effects)
= = = = = = = = = = = =
In Developer Tools I see

group.downstairs_wake_googles
entity_id: media_player.family_room_google, media_player.master_bedroom_google
order: 74
friendly_name: Downstairs Wake Googles

Those grouped entities used to be available as a target entity in the Node Red Call Service Node. That group is no longer selectable there.

So this flow, which sends an MP3 sound effect to a single Google device, works:

[{"id":"6a9cf30d2a417888","type":"inject","z":"922c617359cdf6d0","name":"Google Home MP3","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":480,"wires":[["c4cd7732e5ca71a5"]]},{"id":"c4cd7732e5ca71a5","type":"function","z":"922c617359cdf6d0","name":"msg_func","func":"msg.payload =\n    {\n            \"data\":{\"media_content_id\":\"https://[redacted].duckdns.org:8123/local/audio/hween/01.mp3\",\"media_content_type\":\"audio/mp3\"}\n    }\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":480,"wires":[["bbdfff2d8bb89841"]]},{"id":"bbdfff2d8bb89841","type":"api-call-service","z":"922c617359cdf6d0","name":"MBR Google","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"media_player","service":"play_media","target":{"entityId":["media_player.master_bedroom_google"],"areaId":[],"deviceId":[]},"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":490,"y":480,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

This flow does not work:

[{"id":"168afc25c160dca8","type":"inject","z":"922c617359cdf6d0","name":"Downtstairs Googles MP3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":560,"wires":[["246e393bee5c1329"]]},{"id":"246e393bee5c1329","type":"function","z":"922c617359cdf6d0","name":"msg_func","func":"msg.payload =\n    {\n            \"data\":{\"media_content_id\":\"https://[redacted].duckdns.org:8123/local/audio/hween/01.mp3\",\"media_content_type\":\"audio/mp3\"}\n    }\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":560,"wires":[["6b6be1ae6c81cc1d"]]},{"id":"6b6be1ae6c81cc1d","type":"api-call-service","z":"922c617359cdf6d0","name":"Downstairs Googles","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"media_player","service":"play_media","target":{"entityId":["group.downstairs_wake_googles"],"areaId":[],"deviceId":[]},"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":560,"y":560,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

Alexa TTS (which I use for announcements)
= = = = = = = = = = = =
In Developer Tools I see

group.alexa_wake_downstairs
entity_id: media_player.master_bedroom_echo, media_player.family_room_echo
order: 56
friendly_name: AM Alexa Downstairs Alarms

This works (single entity):

[{"id":"0775f8a57ecb829e","type":"inject","z":"922c617359cdf6d0","name":"Alexa TTS (no \"ding\") - single","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":160,"wires":[["fa99b483d58d2920"]]},{"id":"fa99b483d58d2920","type":"api-call-service","z":"922c617359cdf6d0","name":"Test","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"notify","service":"alexa_media","target":{"entityId":[],"areaId":[],"deviceId":[]},"data":"{\"message\":\"Testing the tts function on the family room echo.\",\"data\":{\"type\":\"tts\",\"method\":\"all\"},\"target\":\"media_player.family_room_echo\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":160,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

This fails with an API error (grouped entities):

[{"id":"753287c077f86a13","type":"inject","z":"922c617359cdf6d0","name":"Alexa TTS (no \"ding\")","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":200,"wires":[["3765324511a9ab75"]]},{"id":"3765324511a9ab75","type":"template","z":"922c617359cdf6d0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\"data\":{\"message\":\"This is a test of TTS with a template node.\",\"data\":{\"type\":\"tts\",\"method\":\"all\"},\"target\":\"group.alexa_wake_downstairs\"}}","output":"str","x":360,"y":200,"wires":[["21dfb3b0c16fe3a9"]]},{"id":"21dfb3b0c16fe3a9","type":"api-call-service","z":"922c617359cdf6d0","name":"Downstairs Wake Group","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"notify","service":"alexa_media","target":{"entityId":[],"areaId":[],"deviceId":[]},"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":550,"y":200,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

This fails with no error (grouped entities):

[{"id":"38b0859440b77d4f","type":"inject","z":"922c617359cdf6d0","name":"Alexa TTS (no \"ding\")","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":240,"wires":[["7fcb836c72b94ea1"]]},{"id":"7fcb836c72b94ea1","type":"api-call-service","z":"922c617359cdf6d0","name":"Downstairs Group","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"notify","service":"alexa_media","target":{"entityId":[],"areaId":[],"deviceId":[]},"data":"{\"message\":\"Test announcement to the downstairs Alexa wake group.\",\"data\":{\"type\":\"tts\",\"method\":\"all\"},\"target\":\"media_player.alexa_wake_downstairs\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":240,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

This also fails with no error (grouped entities):

[{"id":"1971062eb1fb99e4","type":"inject","z":"922c617359cdf6d0","name":"Alexa Announcement (\"ding\")","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":280,"wires":[["a07fa7edce14e693"]]},{"id":"a07fa7edce14e693","type":"api-call-service","z":"922c617359cdf6d0","name":"Downstairs Group","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"notify","service":"alexa_media","target":{"entityId":[],"areaId":[],"deviceId":[]},"data":"{\"message\":\"Announcing to the downstairs wake group.\",\"data\":{\"type\":\"announce\",\"method\":\"all\"},\"target\":\"media_player.alexa_wake_downstairs\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":280,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

EDIT: After rolling back, I can verify that everything works as it did previously with Node-RED 10.4.0 running on HA Core 2022.2.6.

After the last update my Node Red Add-on got stuck in the initialization process (no errors in the logs, just a loop). I had a feeling that the problem was in the Serialport node and removed it from my flows and the problem was gone, but after puting it back in my flow, aftter I pressed deploy I instantly got 402 Nginx error and in the logs I could see the initialization process looping again. I restored the backup and updated the Serialnode using the Node Red UI, and initialization loop unless I remove the serial port node.

So my conclusion is: the updated Serialport node is crashing the add-on initialization.

I need the Serialport node to control my AVR. Is there something I can do? is it possible to rollback the node version?

This is the updated version:
image

Before it was 0.something and it was working flawessly.

My Hardware is a Raspberry Pi 4 running Home Assistant OS.

This is the initialization loop:

2 Likes

Anyone else has reeeeaaally slow text inputs inside Node Red after last update?

Hi
I hope someone could try help me troubleshoot my node-red high cpu usage. It wouldn’t bother me but it seems that this is causing problems with lights triggering/delays in automations.

I found some old threads on the web, pointing to one node palette that could help record demanding flows but that won’t work in my installation unfortunately (won’t install).

Is there a way to track down what causes high cpu usage?

I thought this could be alexa virtual home but can’t see anyone on their github complaining about it.

I have disabled flow by flow (cards) - still there.

Also - reinstalling and importing flows didn’t cause any difference.

from time to time I see ‘Resetting connection’ message in NR logs and thats about it really.

thanks!

How do I get to the configuration page? I installed with HCAS and Integration is loaded in the configuration menu. There is just no way to actually enter it from any menu. What am I missing?

I don’t have that section. It goes from Blueprints to Dashboard.

You obviously aren’t running a Supervised version of Home Assistant. This thread is for the Node-Red add-on, which is only available for Supervised versions.