Home Assistant Community Add-on: Node-RED

and node-red-contrib-home-assistant-llat

Remove: node-red-contrib-home-assistant-llat, that is manually installed and conflicts with the connector provided by this add-on.

Thanks for the advice! And do not tell me how to remove there is no such kind of option or I found. Written In Use

  • Go into your /config/node-red folder. There is a file in there, called package.json. Open it, and remove the line with node-red-contrib-home-assistant-llat in it. Save the file.
  • Remove the node_module folder from your /config/node-red folder.
  • Restart the add-on.
1 Like

Thanks for the new release. The upgrade went smoothly.

Does v1.0.0 allow projects to be enabled again?

Well, in theory: yes. Although, this is untested.

Great, I am happy to test it and report back.

1 Like

Anybody else have this error in node red “Error calling service, home assistant api error” it can connect to home assistant but it just not run any automations. was working fine untill the update

Please read the release notes for v1.0.0: https://github.com/hassio-addons/addon-node-red/releases/tag/v1.0.0

sorry dont know how i missed that thank you i will give it a read

1 Like

i have already got the url as http://hassio/homeassistant its pulling back the correct status just when i call a service i get the error. I also am running 0.81.2 home assistant

3 Nov 10:55:34 - [info] [server:Home Assistant] WebSocket Connected to http://hassio/homeassistant
3 Nov 10:55:34 - [info] [server:Home Assistant] WebSocket Closed http://hassio/homeassistant (node:612) UnhandledPromiseRejectionWarning: #<Object> (node:612) 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: 58105)

Getting this error, I redone the configuration as per FAQ, but still

18-10-30 18:27:07 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
18-10-30 18:27:07 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
18-10-30 18:27:07 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host 172.30.32.1:8123 ssl:False [Connection refused].

{
“log_level”: “info”,
“credential_secret”: “xxx”,
“http_node”: {
“username”: “xx”,
“password”: “xxx”
},
“http_static”: {
“username”: “”,
“password”: “”
},
“port”: 1880,
“ssl”: false,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_ssl”: true,
“system_packages”: [],
“npm_packages”: [],
“init_commands”: []
}

I had this to after upgrading the addon. It was working for me. Then an update for HA came out so I updated and I started getting this. Try restarting just node red to see if it resolves the issue as that worked for me.

Matter of fact, it just happened again. Just updated to 81.4 and my system log is full of those 3 lines. Restarted the Node-RED add-on and it’s good again.

Well…

Just updated to 81.4 and my system log is full of those 3 lines.

That is kinda expected, since an upgrade makes HA unavailable for a moment… and the add-on tries to reconnect… Hence the connection errors in the log.

That’s kind of what I figured. I’ll be more patient next time to see if it automatically reconnects without any intervention. Guess I got a little paranoid.

@frenck Can you give me a hint how I need to adjust my settings.js to authenticate against home assistant? (i am running a docker-based setup, not hass.io)

Also, for that kind of setup, how would i need to setup for token-based access? I am still using Legacy API Password.

Thanks!

Well the answer can be really short: You can’t.
Authentication is provided by the Hass.io API, which is not available on non-hassio setups.

For reference, this is the auth plugin: https://github.com/hassio-addons/addon-node-red/blob/master/node-red/rootfs/etc/node-red/ha-auth.js

1 Like

Hi frenck

Firstly can I say thanks for all the hard work in making this addon.

Now why did you break it :slight_smile:

Since upgrading to version 1.0.1 everything was working great but now none of my Alexa local devices are getting picked by alexa.

Node red and hassio are talking to each other fine.

I can trigger an entity within hassio using the alexa home plugin and by using a timestamp button.

Below is the config (masked my passwords) I am running and a log file. If there anything you need then i’m happy to provide.

Thanks in advance

{
“log_level”: “info”,
“credential_secret”: “",
“http_node”: {
“username”: “paul.vickers”,
“password”: "
"
},
“http_static”: {
“username”: “paul.vickers”,
“password”: "
********”
},
“port”: 1880,
“ssl”: false,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_ssl”: false,
“system_packages”: ,
“npm_packages”: ,
“init_commands”:
}

Reset to defaults
Save
Log
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-banner.sh: executing…


Hass.io Add-on: Node-RED v1.0.1

Flow-based programming for the Internet of Things

From: Community Hass.io Add-ons
By: Franck Nijhof [email protected]

armhf / Raspbian GNU/Linux 9 (stretch) / HA 0.81.2 / SU 138 / stable

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing…

INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing…
INFO: Password is NOT in the Have I Been Pwned database! Nice!
INFO: Password is NOT in the Have I Been Pwned database! Nice!
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 20-config.sh: executing…
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] 80-system-packages.sh: executing…
[cont-init.d] 80-system-packages.sh: exited 0.
[cont-init.d] 81-npm-packages.sh: executing…
[cont-init.d] 81-npm-packages.sh: exited 0.
[cont-init.d] 82-user-scripts.sh: executing…
[cont-init.d] 82-user-scripts.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

[email protected] start /opt
node $NODE_OPTIONS node_modules/node-red/red.js “–settings” “/etc/node-red/config.js”

3 Nov 23:06:48 - [info]

Welcome to Node-RED

3 Nov 23:06:48 - [info] Node-RED version: v0.19.5
3 Nov 23:06:48 - [info] Node.js version: v8.12.0
3 Nov 23:06:48 - [info] Linux 4.14.34-v7+ arm LE
3 Nov 23:06:49 - [info] Loading palette nodes
3 Nov 23:06:54 - [info] Settings file : /etc/node-red/config.js
3 Nov 23:06:54 - [info] Context store : ‘default’ [module=memory]
3 Nov 23:06:54 - [info] User directory : /config/node-red/
3 Nov 23:06:54 - [warn] Projects disabled : editorTheme.projects.enabled=false
3 Nov 23:06:54 - [info] Flows file : /config/node-red/flows.json
3 Nov 23:06:54 - [info] Server now running at http://127.0.0.1:1880/
3 Nov 23:06:54 - [info] Starting flows
3 Nov 23:06:55 - [info] Started flows
3 Nov 23:06:55 - [error] [alexa-home-conf:b551b0c3.0bf4a] Error: connect ECONNREFUSED 34.240.81.189:8883
3 Nov 23:06:55 - [info] [server:Home Assistant] WebSocket Connected to http://192.168.0.32:8123
3 Nov 23:08:12 - HA Auth - paul.vickers authenticated

With the most recent update to Hassio I figured I’d apply the update and be patient to see if Node-RED starts working after the update. So far for me at least I still need a restart of Node-RED to get it working again. During the restart of HA of course I get all of those errors. I’ve waited over 30 mins (52 as of right now) to see if NR would reconnect and as far as I can tell it hasn’t.

Most recent info from the System Log
18-11-04 18:00:07 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
18-11-04 18:00:07 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
18-11-04 18:00:07 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host 172.30.32.1:8123 ssl:False [Connection refused].
18-11-04 18:00:36 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
18-11-04 18:00:36 INFO (MainThread) [hassio.homeassistant] Successful run Home Assistant 0.81.5
18-11-04 18:02:27 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services access from core_configurator
18-11-04 18:02:27 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/events access from core_configurator
18-11-04 18:02:27 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/states access from core_configurator
18-11-04 18:06:42 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
18-11-04 18:06:42 INFO (MainThread) [hassio.addons.git] Update add-on GitHub - hassio-addons/repository: Home Assistant Community Add-ons repository
18-11-04 18:06:42 INFO (MainThread) [hassio.addons.git] Update add-on GitHub - home-assistant/addons: ➕ Docker add-ons for Home Assistant repository
18-11-04 18:06:43 INFO (MainThread) [hassio.addons] Load add-ons: 45 all - 0 new - 0 remove
18-11-04 18:31:50 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
18-11-04 18:48:53 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services access from core_configurator
18-11-04 18:48:53 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/events access from core_configurator
18-11-04 18:48:53 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/states access from core_configurator

Here’s the last bit of the log from NR
4 Nov 13:00:32 - [info] [server:Home Assistant] New WebSocket http://hassio/homeassistant
4 Nov 13:00:32 - [info] [server:Home Assistant] New WebSocket http://hassio/homeassistant
4 Nov 13:00:32 - [info] [server:Home Assistant] New WebSocket http://hassio/homeassistant
4 Nov 13:00:32 - [info] [server:Home Assistant] New WebSocket http://hassio/homeassistant
4 Nov 13:00:32 - [info] [server:Home Assistant] New WebSocket http://hassio/homeassistant
4 Nov 13:00:32 - [info] [server:Home Assistant] New WebSocket http://hassio/homeassistant

Also if it helps, here’s my config…
{
“log_level”: “info”,
“credential_secret”: “xxxxxxxxxx”,
“http_node”: {
“username”: “”,
“password”: “”
},
“http_static”: {
“username”: “”,
“password”: “”
},
“port”: 1880,
“ssl”: false,
“certfile”: “”,
“keyfile”: “”,
“require_ssl”: false,
“system_packages”: ,
“npm_packages”: ,
“init_commands”:
}

After a restart of NR, here’s the NR log.
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-banner.sh: executing…

Hass.io Add-on: Node-RED v1.0.1
Flow-based programming for the Internet of Things
From: Community Hass.io Add-ons
By: Franck Nijhof [email protected]

armhf / HassOS 1.12 / HA 0.81.5 / SU 138 / stable

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing…
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing…
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 20-config.sh: executing…
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] 80-system-packages.sh: executing…
[cont-init.d] 80-system-packages.sh: exited 0.
[cont-init.d] 81-npm-packages.sh: executing…
[cont-init.d] 81-npm-packages.sh: exited 0.
[cont-init.d] 82-user-scripts.sh: executing…
[cont-init.d] 82-user-scripts.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

[email protected] start /opt
node $NODE_OPTIONS node_modules/node-red/red.js “–settings” “/etc/node-red/config.js”
4 Nov 14:00:53 - [info]
Welcome to Node-RED
===================
4 Nov 14:00:53 - [info] Node-RED version: v0.19.5
4 Nov 14:00:53 - [info] Node.js version: v8.12.0
4 Nov 14:00:53 - [info] Linux 4.14.78-v7 arm LE
4 Nov 14:00:55 - [info] Loading palette nodes
4 Nov 14:01:02 - [info] Settings file : /etc/node-red/config.js
4 Nov 14:01:02 - [info] Context store : ‘default’ [module=memory]
4 Nov 14:01:02 - [info] User directory : /config/node-red/
4 Nov 14:01:02 - [warn] Projects disabled : editorTheme.projects.enabled=false
4 Nov 14:01:02 - [info] Flows file : /config/node-red/flows.json
4 Nov 14:01:03 - [info] Server now running at http://127.0.0.1:1880/
4 Nov 14:01:03 - [info] Starting flows
4 Nov 14:01:03 - [info] Started flows
4 Nov 14:01:03 - [info] [server:Home Assistant] New WebSocket http://hassio/homeassistant

And here’s the corresponding log from the System Log
18-11-04 19:00:21 INFO (SyncWorker_17) [hassio.docker.interface] Stop hassioaddons/node-red-armhf Docker application
18-11-04 19:00:21 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API connection is closed
18-11-04 19:00:22 INFO (SyncWorker_17) [hassio.docker.interface] Clean hassioaddons/node-red-armhf Docker application
18-11-04 19:00:24 INFO (SyncWorker_12) [hassio.docker.addon] Start Docker add-on hassioaddons/node-red-armhf with version v1.0.1
18-11-04 19:00:28 INFO (MainThread) [hassio.api.security] /addons access from a0d7b954_nodered
18-11-04 19:00:30 INFO (MainThread) [hassio.api.security] /addons access from a0d7b954_nodered
18-11-04 19:00:32 INFO (MainThread) [hassio.api.security] /supervisor/info access from a0d7b954_nodered
18-11-04 19:00:33 INFO (MainThread) [hassio.api.security] /host/info access from a0d7b954_nodered
18-11-04 19:00:34 INFO (MainThread) [hassio.api.security] /homeassistant/info access from a0d7b954_nodered
18-11-04 19:00:34 INFO (MainThread) [hassio.api.security] /supervisor/info access from a0d7b954_nodered
18-11-04 19:00:35 INFO (MainThread) [hassio.api.security] /supervisor/info access from a0d7b954_nodered
18-11-04 19:01:03 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
18-11-04 19:01:03 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
18-11-04 19:01:03 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request running
18-11-04 19:01:03 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API error: Received message 8:0 is not WSMsgType.TEXT
18-11-04 19:01:03 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API connection is closed
18-11-04 19:01:03 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/config access from a0d7b954_nodered
18-11-04 19:01:03 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
18-11-04 19:01:03 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
18-11-04 19:01:03 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request running
18-11-04 19:01:50 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
18-11-04 19:03:15 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services access from core_configurator
18-11-04 19:03:15 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/events access from core_configurator
18-11-04 19:03:15 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/states access from core_configurator