Home Assistant Community Add-on: Node-RED

I am having problems by installing packages.

My config is:
{
“log_level”: “info”,
“credential_secret”: “Mypassword”,
“http_node”: {
“username”: “”,
“password”: “”
},
“http_static”: {
“username”: “”,
“password”: “”
},
“port”: 1880,
“ssl”: false,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_ssl”: false,
“system_packages”: [],
“npm_packages”: [
“node-red-contrib-telegrambot-home”
],
“init_commands”: []
}

But then I get the following errors when I try to start the add-on:

[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.2.5
Flow-based programming for the Internet of Things
From: Community Hass.io Add-ons
By: Franck Nijhof [email protected]

armhf / HassOS 1.13 / HA 0.86.3 / SU 142 / 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] 50-remove-conflicts.sh: executing…
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
up to date in 3.008s
found 0 vulnerabilities
[cont-init.d] 50-remove-conflicts.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…
npm ERR! code ENETUNREACH
npm ERR! errno ENETUNREACH
npm ERR! request to https://registry.npmjs.org/node-red-contrib-telegrambot-home failed, reason: connect ENETUNREACH 2606:4700::6810:1a23:443 - Local (:::0)
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-01-29T15_30_35_905Z-debug.log
FATAL: Failed installing npm package node-red-contrib-telegrambot-home
[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.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

I can’t seem to find the error log - but how to fix it? If I remove the node-red-contrib-telegrambot-home it starts fine. I did uninstall the add-on and then installed it again, and it seems to remember my flows, so it wasn’t completely uninstalled. Can I somehow remove Node Red completely and then install it again (I need to redo the flows anyway)?

For those who still struggle with “login failed” problems:
There is an issue with the Node RED login, when special characters are used in the HA password.
See: https://github.com/hassio-addons/addon-node-red/issues/80

This problem hit me today (I’m new to Node Red) and all I had to do was change my HA password and avoid any special characters that would get URL-encoded.

:tada: Release v1.2.6

Full Changelog

Changed

  • Updates node-red-contrib-home-assistant-websocket to v0.7.0 (#124)
  • Updates node-red-contrib-bigtimer to v2.1.4 (#125)

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

19-02-04 11:15:39 ERROR (SyncWorker_6) [hassio.docker.interface] Can’t install hassioaddons/node-red-armhf:1.2.6 -> 404 Client Error: Not Found (“no such image: hassioaddons/node-red-armhf:1.2.6: No such image: hassioaddons/node-red-armhf:1.2.6”).

@Vlad The tag exists, see: https://hub.docker.com/r/hassioaddons/node-red-armhf/tags

Another reason why a 404 can occur in Docker: Not enough disk space to download, extract & install the requested image.

:tada: Release v1.3.0

Full Changelog

Changed

  • Add option for dark mode (#122) (@tjorim) (@bonanitech)

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

SEE UPDATE Botttom

I just upgraded to 1.3.0

my node red now just loops and i cant get to the dashboard.

this is the error log

6 Feb 16:38:43 - [error] [server-state-changed:512098c4.3b3038] TypeError: Cannot read property 'addListener' of undefined
6 Feb 16:38:43 - [error] [server-state-changed:a0a3ef7b.154cc] TypeError: Cannot read property 'addListener' of undefined
6 Feb 16:38:43 - [warn] [chatbot-telegram-send:4f702743.252888] Missing or incomplete configuration in Telegram Receiver
6 Feb 16:38:43 - [error] [server-state-changed:94f8716e.17665] TypeError: Cannot read property 'addListener' of undefined
6 Feb 16:38:43 - [error] [server-state-changed:1ba2715.274898f] TypeError: Cannot read property 'addListener' of undefined
6 Feb 16:38:43 - [warn] [chatbot-telegram-send:b849cbb4.932ea8] Missing or incomplete configuration in Telegram Receiver
6 Feb 16:38:43 - [info] Started flows
6 Feb 16:38:45 - [red] Uncaught Exception:
6 Feb 16:38:45 - TypeError: Cannot read property 'getHours' of undefined
    at bigTimerNode.<anonymous> (/opt/node_modules/node-red-contrib-bigtimer/bigtimer.js:205:23)
    at emitOne (events.js:116:13)
    at bigTimerNode.emit (events.js:211:7)
    at Timeout._onTimeout (/opt/node_modules/node-red-contrib-bigtimer/bigtimer.js:866:9)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hassio-addon-node-red@ start: `node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hassio-addon-node-red@ start 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/2019-02-06T03_38_45_387Z-debug.log

> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"

6 Feb 16:38:48 - [info] 

If i delete my flows.json i can get to the dashboard no problems, but when i import them back in it crashes almost straight away.

I rolled it back using hassio snapshot but im getting similar errors, but i can get to the dashboard but the flows arent working.

help please…

UPDATE:

seems to be working stable now having disabled all the flows with big timer, then recreated them all with new ones. I had big timer installed previously via NPM would this have caused the issue ?

3 Likes

I have the asme problem with BigTimer after going to 1.3.0

I’m having the same errors since the last update. Home Assistant was down when I got up this morning, have seen the same error messages as posted above with BigTimer. Thanks for the update for a fix, I will give it a try then I’m home from work tonight.

:tada: Release v1.3.1

Full Changelog

Changed

  • Updates node-red-contrib-bigtimer to v2.1.6 (#130)

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

Thanks @frenck.
Big diffrence in cpu use when bigtimer works :slight_smile:

Before (Trouble started at midnight for me)

After latest release:

:tada: Release v1.3.2

Full Changelog

Changed

  • Updates node-red-contrib-home-assistant-websocket to v0.7.1 (#131)
  • Updates node-red-contrib-bigtimer to v2.1.7 (#132)

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

[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] 50-remove-conflicts.sh: executing... 
[cont-init.d] 50-remove-conflicts.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.
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
Error loading settings file: /etc/node-red/config.js
Error: Cannot find module '/config/node-red/settings.js'
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
Error loading settings file: /etc/node-red/config.js
Error: Cannot find module '/config/node-red/settings.js'
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
Error loading settings file: /etc/node-red/config.js
Error: Cannot find module '/config/node-red/settings.js'
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
Error loading settings file: /etc/node-red/config.js
Error: Cannot find module '/config/node-red/settings.js'
> hassio-addon-node-red@ start /opt

No idea what I did wrong. The log kept saying that over and over again. I uninstalled and reinstalled and it’s still the same error. Deleted the node-red folder in hassio and it’s still the same. Running hassio 0.87.1 and the latest node-red version. The only thing I edited was the credential secret and disabled ssl. It worked in previous versions, so no clue I did?

Scratch that. Renamed the node-red folder into something else (it was still there even when I tried deleting it), reinstalled without issues.

Hey all

does anyone know how to reset this error

The workspace contains some nodes that are not properly configured
there is 24 of them
most start with * [Alert Group] Change Lights (api-call-service)

So I imported someone else’s flow to play around i have since deleted them all but when I deploy i get this message

any help please ?

1 Like

How do you access !secrets in node red?

:tada: Release v1.3.3

Full Changelog

Changed

  • Updates node-red-node-serialport to v0.7.0 (#133)
  • Updates node-red-contrib-bigtimer to v2.1.8 (#135)
  • Updates dark theme to v0.2.7 (#140) (@tjorim)
  • Updates node-red to v0.19.6 (#141)
  • Upgrades add-on base image to 2.3.2

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

:tada: Release v1.3.4

Full Changelog

Changed

  • Updates node-red-contrib-bigtimer to v2.1.9 (#143)
  • Updates js-yaml to v3.12.2 (#145)
  • Updates node-red-contrib-home-assistant-websocket to v0.8.0 (#146)

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

:tada: Release v1.3.5

Full Changelog

Changed

  • Updates node-red-node-serialport to v0.7.1 (#153)
  • Upgrades openssh-client to 7.7_p1-r4
  • Updates node-red-contrib-home-assistant-websocket to v0.9.1 (#154)

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

:tada: Release v1.4.0

Full Changelog

Upgrade Node-RED to v0.20.0! :tada:

Read Node-RED’s announcement for more information:

https://nodered.org/blog/2019/03/12/version-0-20-released

Changed

  • Updates node-red to v0.20.0 (#160)
  • Updates node-red-contrib-cast to v0.2.5 (#158)
  • Updates node-red-contrib-moment to v3.0.2 (#156)

Questions? Join our Discord server! Community Hass.io Add-ons | Discord Me
Enjoying my add-ons? Consider supporting my work: Franck Nijhof | Patreon

3 Likes

Hello,

I’ve try install node-red-contrib-chatbot but i’ve this error:

12 Mar 20:08:15 - [info] Installing module: node-red-contrib-chatbot, version: 0.16.5
12 Mar 20:09:34 - [warn] Installation of module node-red-contrib-chatbot failed:
12 Mar 20:09:34 - [warn] ------------------------------------------
12 Mar 20:09:34 - [warn] 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

> [email protected] install /config/node-red/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.19.0/node-v57-linux-arm-musl.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, musl) (falling back to source compile with node-gyp) 
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/isexe/index.js:42:5
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.14.28+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl/grpc_node.node" "--module_name=grpc_node" "--module_path=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd /config/node-red/node_modules/grpc
gyp ERR! node -v v8.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl/grpc_node.node --module_name=grpc_node --module_path=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/config/node-red/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.14.28+
node-pre-gyp ERR! command "/usr/bin/node" "/config/node-red/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /config/node-red/node_modules/grpc
node-pre-gyp ERR! node -v v8.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl/grpc_node.node --module_name=grpc_node --module_path=/config/node-red/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
npm WARN [email protected] requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
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/2019-03-12T20_09_34_839Z-debug.log

12 Mar 20:09:34 - [warn] ------------------------------------------

How i can resolve this error?

thank you for help