Home Assistant Community Add-on: Node-RED

Hi!

I just started exploring Node-Red.
Since I have home assistant it looked like a good idea to use in it.
I would like to work with some modbus devices (moxa iologik e1212) on tcp.

When I try to install node-red-contrib-modbus “palette” I get the following error every time:

[email protected] install /config/node-red/node_modules/serialport
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=8.11.4 runtime=node arch=arm platform=linux)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.14.66-v7
gyp ERR! command “/usr/bin/node” "/usr/lib/node_modules/npm/node_modules/node…

Is it possible to install this from the web ui or do I have to install it in an other way?

Thanks!

Add the package to config pane of the node red plugin panel:

  "npm_packages": [
"node-red-contrib-modbus"
  ],

More info here: https://github.com/hassio-addons/addon-node-red/blob/master/README.md

Hope that helps,
Benjamin

Hi,

all sems to be correct in log but i cannot open the web-gui, it say “connection refused”

This is my 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 v0.7.0
 Flow-based programming for the Internet of Things
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
 armhf / HassOS 1.10 / HA 0.79.3 / SU 134 / 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!
INFO: Password is NOT in the Have I Been Pwned database! Nice!
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 11-warning.sh: executing... 
[cont-init.d] 11-warning.sh: exited 0.
[cont-init.d] 20-config.sh: executing... 
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] 30-auto-api-token.sh: executing... 
[cont-init.d] 30-auto-api-token.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.

Are you using DuckDNS? If so, set up port forwarding.

Edit: Looks like it just wasn’t done starting up. The last message should read “Server now running at https://…”

Hi… Is anyone having an issue with Node-Red since installing the latest Hass.io version 8.0? I could not connect to my home assistant nodes. I got this error: Cannot GET /homeassistant/services

I tried un-installing Node-red on hass.io and deleting the node-red folder in Samba… But now, after rebooting Hass.Ios, and having re-installed node-red I can’t access Node-red any more… In fact, in Samba, the folders have not been re-created. Not sure what to do, to get it all back.

Cannot login :frowning:

Just a little update. I’ve been working on the add-on today and have some big changes pending.
Nevertheless, one of the issues seems to be caused by Hass.io.

I’m currently working with the HA/Hass.io devs to find a solution for these issues. As soon as they are addressed, I’ll push out the new version.

4 Likes

Hi guys,
I believe you have the same problem with accessing the Node-Red UI as I just had.
As Owi found out this may be caused by Bitdefender that silently blocks access.

Can’t login in to Node-RED

Hope it helps. In my case adding Bitdefender rule did the trick! :wink:

Great to hear.

When the new version comes out will NR projects be supported?

I have read the reddit page and this thread, but still dont understand what i need to do to solve this

  1. Set a credential_secret , which is used to encrypt sensitive data.

Can some please explain it to me in the very basic form?

Thank you

In the config there’s a key that says “credential_secret”. Just set it to anything you want.
Like this:
"credential_secret": "thisisacredentialsecret",

1 Like

@Skeletorjus
Thank you

Quick question. I’m new to Node-RED and fairly new to HA. Just wondering if it’s normal for a restart of HA after installing NR to take about 3 times longer for the UI start responding again. I’m on HA 80.3 running on an RPi3 on HassOS 1.11.

I’m trying to install node-red-node-serialport but I’m running into some problems:

22 Oct 19:45:26 - [info] Installing module: node-red-node-serialport, version: 0.6.8
22 Oct 19:46:03 - [warn] Installation of module node-red-node-serialport failed:
22 Oct 19:46:03 - [warn] ------------------------------------------
22 Oct 19:46:03 - [warn] npm WARN tar ENOENT: no such file or directory, open '/config/node-red/node_modules/.staging/expand-template-b53f0dfb/package.json'
npm WARN tar ENOENT: no such file or directory, open '/config/node-red/node_modules/.staging/expand-template-b53f0dfb/.travis.yml'
npm WARN tar ENOENT: no such file or directory, open '/config/node-red/node_modules/.staging/expand-template-b53f0dfb/index.js'
npm WARN tar ENOENT: no such file or directory, open '/config/node-red/node_modules/.staging/expand-template-b53f0dfb/README.md'
npm WARN tar ENOENT: no such file or directory, open '/config/node-red/node_modules/.staging/expand-template-b53f0dfb/test.js'
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/ansi-bold/-/ansi-bold-0.1.1.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-22T17_46_03_067Z-debug.log
22 Oct 19:46:03 - [warn] ------------------------------------------

Does anyone know how to solve this?

Great news @frenck thank you for all the help here! I desperately want to get this back to being stable.

Thank you thank you!

It just depends on so many different variables. You can check the status of the Node-Red Add-on in the node red add-on configuration screen scroll down all the way to the bottom where it says log then click refresh.

That way you can know exactly what is happening.

I keep getting different error messages when trying to install node-red-node-serialport

23 Oct 19:07:17 - [warn] Installation of module node-red-node-serialport failed:
23 Oct 19:07:17 - [warn] ------------------------------------------
23 Oct 19:07:17 - [warn] 
> [email protected] install /config/node-red/node_modules/serialport
> prebuild-install || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=8.11.4 runtime=node arch=arm platform=linux)
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: getaddrinfo EAI_AGAIN nodejs.org:443
gyp ERR! stack     at Object._errnoException (util.js:992:11)
gyp ERR! stack     at errnoException (dns.js:55:15)
gyp ERR! stack     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
gyp ERR! System Linux 4.14.66-v7
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /config/node-red/node_modules/serialport
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-23T17_07_17_877Z-debug.log
23 Oct 19:07:17 - [warn] ------------------------------------------

I understand that to the trained eye some of these messages seem clear but i do not know how to fix them.

Since this afternoon my node’red addon does not start, below the error in the log. Was working yesterday, hadn’t done anything (that I know of) to cause this issue.
I am on HASSIO 0.80.3

18-10-23 18:55:27 INFO (SyncWorker_9) [hassio.docker.interface] Clean hassioaddons/node-red-amd64 Docker application
18-10-23 18:55:29 ERROR (SyncWorker_9) [hassio.docker] Can’t start addon_a0d7b954_nodered: 500 Server Error: Internal Server Error (“linux runtime spec devices: error gathering device information while adding custom device “/dev/ttyUSB0”: no such file or directory”)

EDIT: unistalling and reinstalling did the trick. Not sure what happened

1 Like

Honestly I had LOADS of errors, both in Node-RED and in HA after a restart, although once everything started responding, everything was working fine. Just for the heck of it, I exported all of my Flows to the clipboard and copied my NR config to a blank notepad as well. Uninstalled, then reinstalled NR, plugged the config back in, saved it, then started NR and it came up fine with no errors. Didn’t even have to re-import all of my flows. Gave HA a reboot, and it was fine. Came up nice and quick with no errors. Sooooo, I don’t know what to say. But definitely boots much cleaner now.

HI Team,

very new to HA, newer to NR - Ive come a long way in the last few weeks, installing HA onto a Pi3, flashing tasmota onto some sonoffs, installed some trial garden irrigation solenoids, interfaced a Google home, reverse engineering some Get URL commands to control some legacy IP switch devices, so Im chuffed with that, ( very steep learning curve). - My next step seems to be automation, and I’m keen to experiment with NR. ( seems easier that the automations in HA.) but I’ve come up against an overwhelming wall. Security / password/ SSL type acronyms. :frowning: - Currently my HA is running on my LAN, with no plans to remote access until I lock down the system. - But before I do this, I am wanting to play with NR. - Ive tried, read, experimented, reread, retried, but for th life of me, cannot get NR connected to HA.
to date, I can:
see the NR web gui, (local Ip:1880)
Log into NR;

but when I try to call a service node ( per a youtube set up video) i get the following error:

[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>

In the NR addon config I have set SSL to false;
and here is where I am confused.

What password is what in the NR addon config?? and where are these passwords located in HA? - the best ive done is the API password in the secrets.yaml, but once entered into the edit/call/servcei node edit server node area ( where the API password seems to go, restatt everything, still no joy.

{
“log_level”: “info”,
“credential_secret”: " I understand this can be anything?",
“users”: [
{
“username”: “Is this a specific user, or do I just create one?”,
“password”: “Same here?”,
“permissions”: “*”
}
],
“http_node”: {
“username”: “Which is the Node password, and is it set elsewhere?”,
“password”: “as above”
},
“http_static”: {
“username”: “As above”,
“password”: “As above”
},
“port”: 1880,
“ssl”: false,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_ssl”: false,
“system_packages”: [],
“npm_packages”: [],
“init_commands”: []
}

Ive stuffed around so much, de-installing, attempting to delete folders, reinstalling, changing credential secrets, HA passwords etc etc, that I’ve stuffed this up better than grandma’s cushions.

I thought an uninstall / reinstall may have helped, but it didn’t. - I tried to delete folders from HA thinking the reinstall may reinstall them - probably stuffed this up to.

Any advice on how to get out of this mess, with a brief ordered dot point check list, would be very appreciated by a non coding type of guy…

My longer term goal is to have HA, NR and a dashboard running in one of the fancy pants docker doo-dads on my NAS. (OK being silly here) Ive actually installed container station on the QNAP and have a HA and a NR docker set up. need to get the NR / HA 'pallette? installed, but I’ll figure that out for myself… been a steep curve, so much to learn… but damn fun!!

thanks guys,

Jarrod.
Australia.