Home Assistant Community Add-on: Node-RED

@frenck how can I rebuild this addon? I imported someone else’s flow and now I have a constant debug message of "Home assistant connection failed with error: Connection to home assistant could not be established with config: https://Fake_HA_Server.duckdns.org:8123 ". I just want to start over but uninstalling doesn’t seem to fix it.

Upgraded to HA v0.75.0 this morning and the node-red addon log is full of messages about bad auth:

4 Aug 12:26:57 - [error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant <password redacted>

I tried to edit the server data, deleting the API pass, deploying and restarting node-red but no luck.

The api pass is suposed to be updated by the addon:
[cont-init.d] 30-auto-api-token.sh: executing... INFO: API token is incorrect in the Node-RED configuration, fixing...

Still getting these sporadically as well, but it stops out of nowhere, no idea why.

Have tried downgrading hass.io to v0.74.2 but no luck, same errors regarding node-red auth errors.
Back to v0.75.0 the problem persists, I don’t know if it is related to hassio supervisor, now in v123 (haven’t managed to downgrade supervisor to 121)

@frenck did you experience this behaviour? Is it possible meanwhile to connect to Home Assistant specifying the ip and password with https?

I’m experiencing the exact same behavior as foraster since moving to v0.75.0. I’m running hassio on an Intel NUC. I’m on supervisor 123. I’ve tried a wide variety of server addresses in node-red, but couldn’t get anything to work.

Temporary solution found: use the external home assistant url: https://whatever.domain.is and the password defined for home assistant. Using the https address with the internal ip and the port did not work for me.

I get the following error when changing the URL: “TypeError: states.reduce is not a function”, any idea how to solve this?

-edit-

My bad, wrong password usage. But still wondering what a permanent solution would be.

Hello, I have a fresh 0.75.1 installation on RP pi 3b+, with nodered add-on I reveive que error "[error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio.local:8123 "

  1. Try using your ip == > http://192.168.1.xxx:8123
  2. In case you have configured SSL => https://192.168.1.xxx:8123

hi frenck , i met new problem on this add-on

every time after i restart home assistant (not include restart supervisor) ,node-red addon couldn’t get any changing state of components. any state change of components never trigger in node-red

everything would be fixed after i reboot the server of ha …

is it just the comnuication problem between node-red and supervisor ?

supervisor version : 123
hassio version: 0.74.1
node-red addon version: 0.5

I tried to install node-red-contrib-modbus but the latest error in the log is:

In file included from …/src/./serialport.h:6:0,
from …/src/serialport.cpp:1:
…/…/nan/nan.h:1618:3: note: declared here
Call(int argc, v8::Localv8::Value argv[]) const {
^~~~
CXX(target) Release/obj.target/serialport/src/serialport_unix.o
…/src/serialport_unix.cpp:26:26: fatal error: linux/serial.h: No such file or directory
#include <linux/serial.h>
^
compilation terminated.
make: *** [serialport.target.mk:96: Release/obj.target/serialport/src/serialport_unix.o] Error 1
make: Leaving directory ‘/config/node-red/node_modules/serialport/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)

Is that because it can’t reach the serial port?

Constantly getting errors ““Home assistant connection failed with error: Connection to home assistant could not be established with config: xxxx””

It works for about 10mins perfectly, then goes in a spin.

Beyond frustrated with all of this.

Well, to add to the deluge of problems, here my error log.

(node:554) UnhandledPromiseRejectionWarning: TypeError: states.reduce is not a function
    at _get.then.states (/opt/node_modules/node-home-assistant/lib/ha-api.js:38:31)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:554) 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(). (rejection id: 1)
(node:554) [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.

Happens each time the service is restarted.
Running on HassOS 74.2

Looks to be easy enough to trace back the try/catch issue.

Runs fine otherwise for about 1-2 days then locks and requires a restart.
Havn’t been able to get a log for the locking event :-/

Otherwise great work @frenck. Was using the korylprince version, but this is much more stable.

How do I change server path? I’m just getting a log full of these error messages since I did a fresh install to get HassOS…

[error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant

I started using this node-red add-on versus the one that was just deprecated (NotoriousBDG). I seem to be having an issue where the flows are triggering to HA slowly (about 10 seconds delay). Even if I setup a new flow (versus imported) it delays 10 seconds. On the other one it was instant.

I turned on debugging and the flow is running immediately but there seems to be a delay between node-red and HA. I also re-installed the deprecated one with same flows and they are instant. Any ideas?

I have had to shut this down. Simply unusable

I’ve noticed that the community version is slower in responding / automation comparing to the notoriousbdg version, on my pi 3b . The difference is very noticable . Currently doing some tests so I’ll have some hard data to report.

I had to switch back to notoriousbdg version for now.
I hope this isn’t just me.

You do that inside Node Red, double click any of the Home Assistant items in a flow, click on the little pencil next to server and change the Base URL.

1 Like

Sorry to hear you are having “speed/response” issues.
Nevertheless, I’m unable to reproduce it myself.

Not sure how you are connected, but if you’d use the external URL in the server config, does it improve?

Hi everyone,

I tried searching why the telegram library (node-red-contrib-telegrambot) wouldn’t work. No much luck.
I get errors:

8 Aug 22:39:21 - [warn] [telegram bot:2b05a5ba.e677ba] EFATAL: Error: connect ENOENT /bot/getUpdates
8 Aug 22:39:21 - [warn] [telegram bot:2b05a5ba.e677ba] Unknown error. Trying again.

I found an answer what can be done to fix this but since I can’t enter commands myself:

npm install --save request
npm install --save request-promise-native

Can someone please advise me what I can do to get rid of this error? I believe this worked on an older version of this addon but my microSD card died and I just reinstalled Hass.io from scratch.

Thanks in advance for any clues on what to look for or what to do :slight_smile: