Home Assistant Community Add-on: Node-RED

For the 401 isn’t it the 401 Unauthorized code?

Yer I thought of that after. I was going to see if he came back with more log data and then go from there.

1 Like

Hello

Thanks for your patience ! There is nothing suspicious in the NR logs, just some unconfigured node.
Just when I try to login I have the same log entry.

16 May 15:34:48 - [info] [server:Home Assistant] WebSocket Connected to http://hassio/homeassistant
**16 May 15:34:48** - [error] [function:Generate list] TypeError: Cannot read property 'length' of undefined
**[16/May/2019:15:36:53 +0200]** 401 -(192.168.130.58) GET / HTTP/2.0 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0)
[16/May/2019:15:37:05 +0200] 401 -(192.168.130.58) GET / HTTP/2.0 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0)

What I noticed in the log anyway, is the different time format, maybe that is the problem. Any thoughts ?

Thanks again.

:tada: Release v3.1.0

Full Changelog

:tada: A packed Node-RED, with a bunch of package & system updates, including the Home Assistant Websocket node.

:sparkles:Node-RED Dashboard (UI) is now shipped by this add-on by default and has been patched to work better with Ingress.

:ambulance: The issue with ARM 64-bits is resolved. Which mean that the aarch64 architecture now also works.

:ambulance: The issue with accessing HTTP nodes has been addressed. HTTP endpoints are now freely available when using the /endpoint/ URL prefix. Please take that into account when using this.

:wrench: Direct access is now enabled by default. This is needed for HTTP nodes and Node-RED Dashboard as well.

:hammer: Changes

  • :arrow_up: Upgrades python to 2.7.16-r1
  • :arrow_up: Upgrades lua-resty-http to 0.13-r0
  • :arrow_up: Upgrades nginx to 1.14.2-r1
  • :arrow_up: Upgrades nginx-mod-http-lua to 1.14.2-r1
  • :arrow_up: Updates node-red-contrib-home-assistant-websocket to v0.11.0 (#219)
  • :ambulance: Turns of Lua Resty core in Nginx
  • :arrow_up: Updates node-red-node-serialport to v0.8.3 (#220)
  • :wrench: Adds configuration to allow http_node access (#214)
  • :sparkles: Adds Node-RED Dashboard
  • :ambulance: Allow for bigger file uploads during import
  • :warning:Adds warning to logout when using the Dark theme
  • :books:Adds known issues and limitation section to documentation
  • :rotating_light:Patches Denial of Service vulnerability in Axios package (#221)
  • :pushpin: Pin snyk to 1.165.1 (#222)

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

Great job… love this addon!
Only started using it recently and almost converted all my automations to node-red.

Thanks :beers:

Thank you for creating this amazing add-on. I’m interested in using !secret for the add-on config but don’t know how. For e.g. should I just use: “credential_secret”: “!secret node_red_crediential”

Also, I experienced the 502 Bad gate way with the following config and there’s no error in the log.
{
“credential_secret”: “xxxxxxx”,
“dark_mode”: false,
“http_node”: {
“username”: “xxxx”,
“password”: “xxxx”
},
“http_static”: {
“username”: “xxxx”,
“password”: “xxxx”
},
“ssl”: false,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_ssl”: true,
“system_packages”: [],
“npm_packages”: [],
“init_commands”: []
}

[Updated] It just magically works now. I guess I should be bit more patient. So all I want to learn now is how to use !secret in the config. Thanks!

Thanks for taking on board the comments/request for NR dashboard!
Enjoy your coffee’s :wink:

:tada: Release v3.1.1

Full Changelog

:ambulance: Small bugfix release, addressing an issue when using direct access + SSL enabled and having the certificates stored in a subfolder.

:hammer: Changes

  • :ambulance: Fixes path handling in certificates (#225) (@troykelly)

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

Hi

I still have the same login cycle problem as before. Here it is the hssio log

‘19-05-20 06:31:19 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request running
19-05-20 06:50:58 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_nodered for zoli
19-05-20 06:50:58 WARNING (MainThread) [hassio.auth] Wrong login from zoli
19-05-20 06:51:06 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_nodered for zoli
19-05-20 06:51:07 WARNING (MainThread) [hassio.auth] Wrong login from zoli
19-05-20 06:51:39 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_nodered for zoli
19-05-20 06:51:39 WARNING (MainThread) [hassio.auth] Wrong login from zoli’

What I have detected is that the hassio supervisor is using UTC time settings which is 2 hours behind my tme in homeassistant. This can’t be the source of the problem ?
I tried the soulution recommended by frenck, without success.
I use the credentials I gave in the node red addon config.

Please, help
Thanks a lot

I found the solution !
I have to use the following address : https://******.duckdns.org:1880/endpoint/ui/

Thanks for the great work !

1 Like

I’ running node red 3.1.1 (latest) addon on an rpi Hassio. Yesterday when I deployed the loading icon just looped. Then I tried closing the addon and login again and now I’m stuck on that loading loop when trying to access node red. Tried private mode, clearing site cache, clearing local storage.

The only strange thing I noticed in my NR log is this

nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)

Anyone know how to solve this? No automation is working so it’s not just that I cant reach the UI, it’s just down. Here is my config

{

    "credential_secret": "myoldpreingresspassword",

    "dark_mode": false,

    "http_node": { "username": "", "password": "" },

    "http_static": { "username": "", "password": "" },

    "ssl": false,

    "certfile": "fullchain.pem",

    "keyfile": "privkey.pem",

    "require_ssl": true,

    "system_packages": [],

    "npm_packages": [],

    "init_commands": [],

    "port": 1880,

    "log_level": "info" }
2 Likes

@frenck is it possible to install a node with canvas dependencies, I’m not sure of the permission levels of Node-RED addon this is the log output

> [email protected] install /opt/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp ERR! UNCAUGHT EXCEPTION 
node-pre-gyp ERR! stack Error: Cannot find module 'minizlib'
node-pre-gyp ERR! stack     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
node-pre-gyp ERR! stack     at Function.Module._load (internal/modules/cjs/loader.js:507:25)
node-pre-gyp ERR! stack     at Module.require (internal/modules/cjs/loader.js:637:17)
node-pre-gyp ERR! stack     at require (internal/modules/cjs/helpers.js:22:18)
node-pre-gyp ERR! stack     at Object.<anonymous> (/opt/node_modules/tar/lib/pack.js:28:14)
node-pre-gyp ERR! stack     at Module._compile (internal/modules/cjs/loader.js:689:30)
node-pre-gyp ERR! stack     at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
node-pre-gyp ERR! stack     at Module.load (internal/modules/cjs/loader.js:599:32)
node-pre-gyp ERR! stack     at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
node-pre-gyp ERR! stack     at Function.Module._load (internal/modules/cjs/loader.js:530:3)
node-pre-gyp ERR! System Linux 4.15.0-47-generic
node-pre-gyp ERR! command "/usr/bin/node" "/opt/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /opt/node_modules/canvas
node-pre-gyp ERR! node -v v10.14.2
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!     <https://github.com/mapbox/node-pre-gyp/issues>
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the [email protected] install script.

Please see the add-on documentation on that. It allows you to install custom system & npm packages to fulfil those dependency requirements.

1 Like

Did you get this configured? I have been attempting but I think the Canvas dependency the color thief plugin is calling is out of date…

I did not manage to get it working yet, I think you could be right I was thinking of trying this with Node-RED installed on my server as opposed to HASSIO I have been wanting to move off this dependency for a little while.

Hi,

my Node-Red stopped working some days ago with the error “Error: Cannot find module ‘ipaddr.js’”, i tried several repairs:

  • Uninstall Node-Red, delete node-red folder, reboot, install again - not working
  • copying node_modules/ipaddr.js/lib/ipaddr.js to node_modules/ipaddr.js/index.js - not working
  • recover Node-Red from an older snapshot - not working

Any hints, how this error can be fixed?

[07:02:25] 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”
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module ‘ipaddr.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/opt/node_modules/proxy-addr/index.js:24:14)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
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-05-29T05_02_29_379Z-debug.log

My config:

{
  "credential_secret": "my-secret-credential",
  "dark_mode": false,
  "http_node": {
"username": "",
"password": ""
  },
  "http_static": {
"username": "",
"password": ""
  },
  "ssl": false,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "require_ssl": true,
  "system_packages": [],
  "npm_packages": [],
  "init_commands": []
}

I just did a update and I am seeing this connection error?

server setup is just as normal:
image

on device tracker I have some log files:

Any ideas on what is broken would be highly appreciated

Best regards
Casperse

Update seems NR dosent see the binary sensors anymore?

Hey there, maybe this is a stupid question but i cant find a way to change the displayed language in node-red. The german translation is very annoying and often not correct translated. Can i change it back to english?