Home Assistant Community Add-on: Node-RED

I’m trying to get Node-Red up and running, but for some reason I’m getting the following errors:

[warn] Error loading credentials: SyntaxError: Unexpected token Y in JSON at position 0
[warn] Error loading flows: Error: Failed to decrypt credentials

I’m using Hassio with DuckDNS and NGINX

Hello !
I’m trying to install node-red-contrib-freebox. I can’t find it in “Manage palette”, so I tried to install it via the config file.

I get this error on startup.

npm ERR! code E404
npm ERR! 404 Not Found: node-red-contrib-freebox@latest
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-03-13T16_15_17_185Z-debug.log
FATAL: Failed installing npm package node-red-contrib-freebox

Is it possible to install this node on hass.io node-red ?

Thank you for your help

According to the documentation,

Adding to flows.nodered.org

If all of the packaging requirements are met, the Node-RED Flow Library will automatically index your node within a couple of hours. If it does not appear after that time, you can ask for help on the Node-RED forum or slack.

I think this package doesn’t meet packaging requirements… How can I do ?

Hello,
I need to install the npm package node-red-contrib-serial-modbus, I’m running node red on hassio last version and since I inserted the package in the config I permanently got this log:

https://hastebin.com/arimigodoz.sql

I’m totally new with Hassio so every help could be very appreciated!

Same here. Cant start node-red after the update :frowning:
Does it need an update from the developer?

[cont-init.d] 81-npm-packages.sh: executing... 
npm WARN deprecated [email protected]: use node-fetch instead
npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-15T17_25_12_312Z-debug.log
FATAL: Failed installing npm package node-red-contrib-chatbot
[cont-init.d] 81-npm-packages.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

Edit: today its working again

I’m trying to install node-red-contrib-rfxcom 2.8.1, but that fails:

-----------------------------------------------------------
2019-03-15T18:22:50.603Z Install : node-red-contrib-rfxcom 2.8.1

2019-03-15T18:22:50.616Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production [email protected]
2019-03-15T18:23:16.741Z [out] 
2019-03-15T18:23:16.741Z [out] > [email protected] install /config/node-red/node_modules/serialport
2019-03-15T18:23:16.741Z [out] > prebuild-install || node-gyp rebuild
2019-03-15T18:23:16.741Z [out] 
2019-03-15T18:23:18.395Z [err] prebuild-install
2019-03-15T18:23:18.396Z [err]  WARN 
2019-03-15T18:23:18.396Z [err] install No prebuilt binaries found (target=8.14.0 runtime=node arch=arm64 platform=linux)
2019-03-15T18:23:21.203Z [err] gyp
2019-03-15T18:23:21.204Z [err]  
2019-03-15T18:23:21.204Z [err] ERR! build error
2019-03-15T18:23:21.205Z [err]  
2019-03-15T18:23:21.207Z [err] gyp
2019-03-15T18:23:21.208Z [err]  ERR! stack
2019-03-15T18:23:21.208Z [err]  Error: not found: make
2019-03-15T18:23:21.208Z [err] gyp ERR!
2019-03-15T18:23:21.208Z [err]  stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2019-03-15T18:23:21.208Z [err] gyp 
2019-03-15T18:23:21.208Z [err] ERR! stack
2019-03-15T18:23:21.208Z [err]      at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2019-03-15T18:23:21.208Z [err] gyp
2019-03-15T18:23:21.209Z [err]  ERR! 
2019-03-15T18:23:21.209Z [err] stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2019-03-15T18:23:21.209Z [err] gyp ERR!
2019-03-15T18:23:21.209Z [err]  stack
2019-03-15T18:23:21.209Z [err]      at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2019-03-15T18:23:21.209Z [err] gyp 
2019-03-15T18:23:21.209Z [err] ERR! 
2019-03-15T18:23:21.209Z [err] stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2019-03-15T18:23:21.210Z [err] gyp ERR!
2019-03-15T18:23:21.210Z [err]  stack
2019-03-15T18:23:21.210Z [err]      at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2019-03-15T18:23:21.210Z [err] gyp 
2019-03-15T18:23:21.210Z [err] ERR! 
2019-03-15T18:23:21.210Z [err] stack     at FSReqWrap.oncomplete (fs.js:152:21)
2019-03-15T18:23:21.211Z [err] gyp
2019-03-15T18:23:21.211Z [err]  ERR! System Linux 4.19.15
2019-03-15T18:23:21.212Z [err] gyp
2019-03-15T18:23:21.212Z [err]  ERR! command
2019-03-15T18:23:21.212Z [err]  "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2019-03-15T18:23:21.213Z [err] gyp 
2019-03-15T18:23:21.213Z [err] ERR! 
2019-03-15T18:23:21.213Z [err] cwd /config/node-red/node_modules/serialport
2019-03-15T18:23:21.213Z [err] gyp
2019-03-15T18:23:21.213Z [err]  ERR! 
2019-03-15T18:23:21.213Z [err] node -v v8.14.0
2019-03-15T18:23:21.213Z [err] gyp
2019-03-15T18:23:21.214Z [err]  ERR! 
2019-03-15T18:23:21.214Z [err] node-gyp -v v3.8.0
2019-03-15T18:23:21.214Z [err] gyp
2019-03-15T18:23:21.214Z [err]  ERR!
2019-03-15T18:23:21.214Z [err]  not ok 
2019-03-15T18:23:22.503Z [err] npm
2019-03-15T18:23:22.504Z [err]  ERR! code ELIFECYCLE
2019-03-15T18:23:22.505Z [err] npm
2019-03-15T18:23:22.505Z [err]  ERR! errno
2019-03-15T18:23:22.505Z [err]  1
2019-03-15T18:23:22.510Z [err] npm
2019-03-15T18:23:22.510Z [err]  ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
2019-03-15T18:23:22.510Z [err] npm ERR!
2019-03-15T18:23:22.510Z [err]  Exit status 1
2019-03-15T18:23:22.511Z [err] npm
2019-03-15T18:23:22.511Z [err]  ERR! 
2019-03-15T18:23:22.511Z [err] npm
2019-03-15T18:23:22.512Z [err]  ERR! Failed at the [email protected] install script.
2019-03-15T18:23:22.512Z [err] npm
2019-03-15T18:23:22.512Z [err]  ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-03-15T18:23:23.001Z [err] 
2019-03-15T18:23:23.002Z [err] npm
2019-03-15T18:23:23.002Z [err]  ERR! A complete log of this run can be found in:
2019-03-15T18:23:23.002Z [err] npm ERR!     /root/.npm/_logs/2019-03-15T18_23_22_604Z-debug.log
2019-03-15T18:23:23.055Z rc=1

I am running hass.io on an Odroid C2. Seems to me build-essentials (make) is not installed? Any way to fix this?

1 Like

:tada: Release v2.0.0

Full Changelog

Major upgrade!
Most noticeable: ARMv7 support, modbus support, NodeJS v10 as the base and a lot more!

Changed

  • Adds node-red-contrib-modbus (#162)
  • Updates dark theme to v0.2.9 (#165) (@bonanitech)
  • Updates node-red to v0.20.2 (#166)
  • Updates node-red-contrib-modbus to v4.1.3 (#167)
  • Upgrades add-on base image to 3.0.0
  • Upgrades g++ to 8.2.0-r2
  • Upgrades gcc to 8.2.0-r2
  • Upgrades linux-headers to 4.18.13-r1
  • Upgrades Python PIP to 18.1-r0
  • Upgrades Python to 2.7.15-r3
  • Upgrades git to 2.20.1-r0
  • Upgrades NodeJS to 10.14.2-r0
  • Upgrades openssh-client to 7.9_p1-r4
  • Adds modclean for reducing resulting image
  • Removes support for legacy tags
  • Adds support for ARMv7
  • Makes log_level optional
  • Rewrite add-on onto Bashio
  • Pins down modclean version in Dockerfile
  • Use unsafe-perm for npm to fix aarch64 issues
  • Updates node-red-contrib-cast to v0.2.6 (#169)
  • Updates badges, addon is no longer experimental, but stable. :tada:

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

:tada: Release v2.0.1

Full Changelog

Changed

  • Workaround Docker issue by reinstating legacy tags

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

Thanks for the work!

I have v2.0.1 installed on latestest hassio. I can’t start node-red now. There are no error messages from the interface or CLI. When I attempt to start from the UI, the webpage in chrome eventually hangs and has to be killed.

Hi, did you manage to find a solution as I have the same problem. I also looked on the discord server and there did not seem to be any solution there either.

I think there are two things happening, at least on my end: some of the pages are now dying (browsers give option to wait or kill). RE: node-red, I ended up un-installing the add-on, rebooted and re-installed node-red and things are fine. Well, had to re-plumb credentials, but other than that working OK.

:tada: Release v2.0.2

Full Changelog

Changed

  • :arrow_up: Updates node-red to v0.20.3 (#172)
  • :arrow_up: Updates js-yaml to v3.13.0 (#173)
  • :arrow_up: Upgrades add-on base image to 3.0.1

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like

Hi,

I have a problem,
I previously connected an ESP32 dev board to my RPI.

now node-red will not start when the device is disconnected

19-03-28 08:33:56 INFO (SyncWorker_8) [hassio.docker.interface] Clean hassioaddons/node-red-armv7 Docker application
19-03-28 08:33:57 ERROR (SyncWorker_8) [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")

when i connect the device to the usb port, node-red starts up normally…
any ideas how I can solve this issue?

edit: uninstalling and reinstalling solved the issue, but I am afraid I will constantly be reinstalling this as I need to connect/disconnected different ESP32 devices to program with ESPHome

thanks

Release v3.0.0

Full Changelog

This release adds Hass.io Ingress support to the add-on :tada:

Changed

  • :arrow_up: Updates node-red-contrib-home-assistant-websocket to v0.10.2 (#183)
  • :arrow_up: Updates js-yaml to v3.13.1 (#182)
  • :arrow_up: Updates node-red to v0.20.5 (#181)
  • :arrow_up: Upgrades base image to v3.1.0
  • :arrow_up: Upgrades gcc to 8.3.0-r0
  • :sparkles: Adds Hassio Ingress support
  • :hammer: Simplifies add-on code logic
  • :books: Updates README for Hassio Ingress
  • :books: Updates README installation instructions
  • :books: Removed obsolete embedding and FAQ sections from README
  • :arrow_up: Updates node-red-node-serialport to v0.8.1 (#185)

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

After updating to the latest release, I can no longer open Nodered.
I am running hass.io 0.91.3 on a raspi 3b+. Whenever I try to open it via hassio, it tries to open through the panel iframe, it says duckdns cannot connect. When I try to open it through hassio.local:1880 and 192.168.x.xxx:1880, it says the site cannot be reached.

[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
Flow-based programming for the Internet of Things

Add-on version: 3.0.0
You are running the latest version of this add-on.
System: HassOS 2.11 (armv7 / raspberrypi3)
Home Assistant version: 0.91.3
Supervisor version: 159

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing…
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing…
[19:46:05] INFO: Password is NOT in the Have I Been Pwned database! Nice!
up to date in 1.882s
found 0 vulnerabilities
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] user.sh: executing…
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[19:46:11] INFO: Starting Node-RED…

hassio-addon-node-red@ start /opt
node $NODE_OPTIONS node_modules/node-red/red.js “–settings” “/etc/node-red/config.js”
14 Apr 19:46:16 - [info]
Welcome to Node-RED
===================
14 Apr 19:46:16 - [info] Node-RED version: v0.20.5
14 Apr 19:46:16 - [info] Node.js version: v10.14.2
14 Apr 19:46:16 - [info] Linux 4.14.98-v7 arm LE
14 Apr 19:46:17 - [info] Loading palette nodes
14 Apr 19:46:23 - [info] Settings file : /etc/node-red/config.js
14 Apr 19:46:23 - [info] Context store : ‘default’ [module=memory]
14 Apr 19:46:23 - [info] User directory : /config/node-red/
14 Apr 19:46:23 - [warn] Projects disabled : editorTheme.projects.enabled=false
14 Apr 19:46:23 - [info] Flows file : /config/node-red/flows.json
14 Apr 19:46:23 - [info] Server now running at http://127.0.0.1:46836/
14 Apr 19:46:24 - [info] Starting flows
14 Apr 19:46:24 - [info] Started flows
[19:46:24] INFO: Starting NGinx…
14 Apr 19:46:29 - [info] [server:Home Assistant] WebSocket Connected to http://hassio/homeassistant
[14/Apr/2019:19:52:19 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET / HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:19 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/bootstrap/css/bootstrap.min.css HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:19 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:19 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/font-awesome/css/font-awesome.min.css HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/vendor.css HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET /red/style.min.css HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET /red/images/node-red.png HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 200 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET /red/images/spin.svg HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 200 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/jsonata/jsonata.min.js HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/vendor.js HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 200 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/ace/ext-language_tools.js HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 200 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/ace/ace.js HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 200 192.168.1.1, 172.30.32.1(172.30.32.2) GET /red/main.min.js HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:20 -0500] 200 192.168.1.1, 172.30.32.1(172.30.32.2) GET /red/red.min.js HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:22 -0500] 304 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0 HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)
[14/Apr/2019:19:52:22 -0500] 200 192.168.1.1, 172.30.32.1(172.30.32.2) GET /vendor/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0 HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36)

Just saw this tonight.

Node-RED 3.0.0 is available
You are currently running version 2.0.2
This update is no longer compatible with your system.

I believe i’m running HASSIO on a rpi3.

*never mind, just restarted and I can update.

Ingress support has been added, which means the add-on works via the cloud connection as well, simply by clicking the “OPEN WEB UI” button on the add-on page.

You can still enable the “old” direct access method, by setting a port in the network section of the add-on configuration panel.

Hey Frenck, On the direct access method on port 1880, the HA credentials are failing upon login. keeps asking for credentials.

1 Like

Updated and everything seems to work. However, there is no info anymore showing when I node was last triggered and the Debug node does not show any information in the Debug panel.

Update, got Debug and Statuses to work by accessing hassio directly (ip:port) instead thru reverse proxy - so seems to be an issue when going thru reverse proxy server.

Same issue here.