Home Assistant Community Add-on: Node-RED

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.

I have the same, serialport not working anymore after update

Hi all,
I found interesting problem. During to running NodeRed perfectly, my NodeRed become death in yesterday with this Error.
I using RPi 4B + without problem, I not making upgrade NR, and not making upgrade other addons…: - / Can you help me? This starting run is repeat continously… Thanks.

Add-on version: 11.1.1
System: Home Assistant OS 7.5 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2022.3.5
Home Assistant Supervisor: 2022.03.5

[20:24:13] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
23 Mar 20:24:17 - [info] 
Welcome to Node-RED
===================
23 Mar 20:24:17 - [info] Node-RED version: v2.2.2
23 Mar 20:24:17 - [info] Node.js  version: v16.14.0
23 Mar 20:24:17 - [info] Linux 5.10.92-v8 arm64 LE
23 Mar 20:24:19 - [info] Loading palette nodes
23 Mar 20:24:27 - [info] Dashboard version 3.1.6 started at /endpoint/ui
23 Mar 20:24:29 - [info] Settings file  : /etc/node-red/config.js
23 Mar 20:24:29 - [info] Context store  : 'default' [module=memory]
23 Mar 20:24:29 - [info] User directory : /config/node-red/
23 Mar 20:24:29 - [warn] Projects disabled : editorTheme.projects.enabled=false
23 Mar 20:24:29 - [info] Flows file     : /config/node-red/flows.json
23 Mar 20:24:29 - [info] Server now running at http://127.0.0.1:46836/
23 Mar 20:24:30 - [info] Starting flows
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Chodba 2] Connecting to Yeelight 192.168.1.74:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Chodba 1] Connecting to Yeelight 192.168.1.77:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Kuchyn 1] Connecting to Yeelight 192.168.1.76:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Obývák 3] Connecting to Yeelight 192.168.1.70:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Obývák 1] Connecting to Yeelight 192.168.1.71:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Obývák 2] Connecting to Yeelight 192.168.1.73:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Ložnice 1] Connecting to Yeelight 192.168.1.72:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Ložnice 2] Connecting to Yeelight 192.168.1.75:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Toaleta 1] Connecting to Yeelight 192.168.1.78:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Kuchyn jidelni stul] Connecting to Yeelight 192.168.1.79:55443
23 Mar 20:24:30 - [info] [yeelight-compat-hue-config:YEELIGHT Koupelna 1] Connecting to Yeelight 192.168.1.81:55443
23 Mar 20:24:31 - [info] [daylight-rgbw:Vzorkuj světlo] Configured colorTempUnit:K
23 Mar 20:24:31 - [info] [daylight-rgbw:57a6c6eb.2655d8] Configured colorTempUnit:M
registering node 62141e2.c3270e
registering node 090f1a1ae028fba2
registering node 378ae69fef226317
registering node 999e7b9e69ba73f0
registering node e7958499456826db
registering node 41b7bd2bc8c31983
registering node 518a86d9f061d826
registering node eca01a8b9512ce4a
registering node 84d352e00c860a71
registering node a4d6c480d6305943
registering node 9fd67e52e93cbf13
registering node df412e9.fbb2cd
registering node 417734ed.4660ac
registering node e3660b5f.e6b008
registering node d136072c.25e9e8
registering node 346ae215.6cf56e
registering node aac8dd1d.d2ab7
registering node 12b6800a.0e4c4
registering node 15794712126a4bca
registering node 6b0e348.7607bcc
registering node 1dae634c1874b39c
registering node a9c8b75928bf40ea
registering node ecc33037f0c4e4c0
23 Mar 20:24:37 - [info] Started flows
23 Mar 20:24:38 - [info] [server:Home Assistant] Connecting to http://supervisor/core
23 Mar 20:24:38 - [info] [server:Home Assistant] Connecting to http://supervisor/core
23 Mar 20:24:38 - [info] [server:Home Assistant - HTTPS] Connecting to http://supervisor/core
23 Mar 20:24:38 - [error] [api-current-state:Je někdo doma?] Entity could not be found in cache for entity_id: input_boolean.person_je_nekdo_doma
23 Mar 20:24:38 - [error] [api-current-state:Je nekdo pohovka01 ?] Entity could not be found in cache for entity_id: input_boolean.obyvak_pohovka_01
23 Mar 20:24:38 - [error] [api-current-state:Je voda na podlaze?] Entity could not be found in cache for entity_id: binary_sensor.koupelna_senzor_vody_water_leak
23 Mar 20:24:38 - [error] [api-current-state:Napájení RPi] Entity could not be found in cache for entity_id: binary_sensor.rpi_power_status
23 Mar 20:24:38 - [info] [daylight-rgbw:Vzorkuj světlo] Received Topic:date-time
23 Mar 20:24:38 - [info] [daylight-rgbw:Vzorkuj světlo] Received dt:1648063478834
23 Mar 20:24:38 - [info] [daylight-rgbw:Vzorkuj světlo] Sun position:-0.3491264079261405
23 Mar 20:24:38 - [info] [daylight-rgbw:Vzorkuj světlo] Sun position fraction:-0.22226077434145095
23 Mar 20:24:38 - [info] [daylight-rgbw:Vzorkuj světlo] Color-temp:3200
23 Mar 20:24:38 - [error] [api-current-state:Jakub - stav] Entity could not be found in cache for entity_id: bodymiscale.jakub
23 Mar 20:24:38 - [info] [daylight-rgbw:Vzorkuj světlo] Received Topic:item-switch
23 Mar 20:24:38 - [info] [daylight-rgbw:Vzorkuj světlo] Color-temp:3200
23 Mar 20:24:38 - [error] [api-current-state:ZAP spínač obývák 01 1/2 ?] Entity could not be found in cache for entity_id: switch.obyvak_spinac_01_1_2
23 Mar 20:24:38 - [error] [api-current-state:Obývák - svítí světlo? ] Entity could not be found in cache for entity_id: input_boolean.obyvak_sviti_svetlo
23 Mar 20:24:38 - [info] [yeelight-compat-hue-config:YEELIGHT Chodba 2] Connected to 192.168.1.74:55443
23 Mar 20:24:38 - [info] [yeelight-compat-hue-config:YEELIGHT Kuchyn 1] Connected to 192.168.1.76:55443
23 Mar 20:24:38 - [info] [yeelight-compat-hue-config:YEELIGHT Obývák 3] Connected to 192.168.1.70:55443
23 Mar 20:24:38 - [info] [yeelight-compat-hue-config:YEELIGHT Obývák 1] Connected to 192.168.1.71:55443
23 Mar 20:24:38 - [info] [yeelight-compat-hue-config:YEELIGHT Obývák 2] Connected to 192.168.1.73:55443
23 Mar 20:24:38 - [info] [yeelight-compat-hue-config:YEELIGHT Ložnice 2] Connected to 192.168.1.75:55443
23 Mar 20:24:38 - [info] [yeelight-compat-hue-config:YEELIGHT Toaleta 1] Connected to 192.168.1.78:55443
23 Mar 20:24:39 - [info] [tasmota-mqtt-broker:mqtt-tasmota] Connected to broker: mqtt://192.168.1.244:1883
23 Mar 20:24:39 - [info] [mqtt-broker:mqtt] Connected to broker: mqtt://192.168.1.244:1883
23 Mar 20:24:39 - [red] Uncaught Exception:
23 Mar 20:24:39 - [error] UnhandledPromiseRejection: 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(). The promise rejected with the reason "#<Object>".
[20:24:39] INFO: Starting Node-RED...

I recently upgraded HA to 2022.4.5 from 2022.3.8. Since the upgrade, the custom home assistant attributes on the entities created in node-red are no longer exposed to home assistant. Am I the only one with this issue or is this known already?

i am having the same issue

I have the same issue. After install HA and nodered, when use node serial, nodered bad gateway. I use RFLink…
How downgrade version of addon nodered?

in case anyone needs to add custom python modules and persist them after add-on updates :

Add-on configuration:

init_commands:
  - /config/node-red/init-air.sh

init-air.sh

# Philips Air Purifier

python3 -m ensurepip --default-pip
python3 -m pip install -U pip
python3 -m pip install py-air-control
python3 -m pip install -U git+https://github.com/rgerganov/CoAPthon3