Home Assistant Community Add-on: Node-RED

If you have the Samba addon running, you can access your data in the ‘/config/node-red’ folder:

In Windows Explorer:
\\HASSIO\config\node-red

/edit after your edit:

Why not the flows.json? It should be more recent than the .backup?

Since i updated HA to 0.76.1 and the addon to 0.6.1 it wont start

[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.6.1
 Flow-based programming for the Internet of Things
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
 armhf / HassOS 1.7 / HA 0.76.1 / SU 127 / 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!
FATAL: You need to set a http_node username!
[cont-init.d] 10-requirements.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.

Have you set that in the config for the addon?

I havent configured it before. Is it necessary? What is it used for?

It was mentioned by Frenck in the change-log of a recent update, I believe.
Always read them (and the documentation for the addon of course).
:wink:

/edit
And check the error itself, not to forget. It tells you what’s wrong.

Seems to fix the problem. Thank you for your help

1 Like

Haha. I must be blind. I may have deleted it while dicking with the package fails, or more likely I’m a moron.

FYI, got the same boot looping immediately after installing alexa-local again. I guess it could also be the imported flow for it.

The default location for dashboard images is: \\hassio\config\node-red\node_modules\node-red-dashboard\dist\

1 Like

It’s only necessary if you make use of node’s HTTP endpoint APIs but since 0.6.0 the fields now have to have something in them.
I don’t have a use for them so I just mashed the keyboard in all 4 fields so it would make a random enough string to pass the password database check.

I’m using httpNodes with IFTTT webrequests. How do I setup IFTTT that it can access the http_node? Also, my mqtt does not seem to get through anymore either. Any ideas?

EDIT: Got it: “https://user:[email protected]

1 Like

Am I completely stupid or what. Since going to 0.6.1 Node Red I can’t deploy anything because it says “not authorized”. Docs say * or read so assume * is all.

"users": [
{
      "username": "*******",
      "password": "*********",
      "permissions": "*"
    },
    {
      "username": "********",
      "password": "**********",
      "permissions": "*"
    }
  ],
  "http_node": {
    "username": "*************",
    "password": "*************"
  },
  "http_static": {
    "username": "*****************",
    "password": "****************"
`

I upgraded hass to 0.76.2 and node red to 0.6.1 on my rpi3 and now nodered not working:

CONFIG:
{
“log_level”: “info”,
“credential_secret”: “test”,
“users”: [
{
“username”: “test”,
“password”: “test123”,
“permissions”: “*”
}
],
“http_node”: {
“username”: “test”,
“password”: “test123”
},
“http_static”: {
“username”: “”,
“password”: “”
},
“port”: 1880,
“ssl”: false,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_ssl”: false,
“system_packages”: [],
“npm_packages”: [],
“init_commands”: []
}

Error:

[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.6.1
 Flow-based programming for the Internet of Things
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
 armhf / Resin OS 2.3.0+rev1 / HA 0.76.2 / SU 127 / 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... 
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
[cont-init.d] 10-requirements.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 figured out I entered user and pass for http_static.

Now is working.

I feel like I am out here alone. First had the problem above (my post) that no one answered. Read ip2007’s post and removed the user and pass from http_static. didn’t work so I set them up again and now getting another fatal error . Everything I have including the log is as follows. Can anyone help me.

`{
“log_level”: “info”,
“credential_secret”: “KJHhfdhiFRENCKfsdfdsDHFHDJS”,
“users”: [
{
“username”: “budlyte”,
“password”: “mypassword”,
“permissions”: “"
},
{
“username”: “budlyte”,
“password”: “mypassword”,
“permissions”: "

}
],
“http_node”: {
“username”: “budlyte”,
“password”: “mypassword”
},
“http_static”: {
“username”: “budlyte”,
“password”: “821126$ski*!”
},
“port”: 1880,
“ssl”: true,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_ssl”: true,
“system_packages”: [
“ffmpeg”
],
“npm_packages”: [
“node-red-admin”
],
“init_commands”: [
“echo ‘This is a test’”,
“echo ‘So is this…’”
]
}

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

armhf / null / HA 0.76.2 / SU 127 / 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!
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…
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/armhf/APKINDEX.tar.gz
v3.8.0-95-g244b823930 [http://dl-cdn.alpinelinux.org/alpine/v3.8/main]
v3.8.0-95-g244b823930 [http://dl-cdn.alpinelinux.org/alpine/v3.8/community]
v3.8.0-1648-g34aea8221b [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v3.8.0-1647-g9994a48b74 [http://dl-cdn.alpinelinux.org/alpine/edge/community]
v3.8.0-1643-g5d768aafdf [http://dl-cdn.alpinelinux.org/alpine/edge/testing]
OK: 21606 distinct packages available
ERROR: unsatisfiable constraints:
x265-libs-2.8-r1:
masked in: @edge
satisfies:
ffmpeg-libs-3.4.4-r0[so:libx265.so.160]
FATAL: Failed installing system package ffmpeg
[cont-init.d] 80-system-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 would like to close my previous post. My basic problem that once I got node red working was I was unable to change/create any flows when at home using my duckdns address. I would try to change/create a flow and deploy it and I would get a message indicating I was not authorized. If I did exactly the same thing when at my office it worked. I thought there wad a duckdns issue but upon further study it turns out that it looks like it is browser related. Chrome and FireFox would not work at home but the TOR browser would. I also tried, from home, Chrome with my external tcp address and it worked. Then I tried Microsoft Edge at home and low and behold, like the TOR browser it worked. I am running window 10 my home and office computers.

So basically it seems it is a browser issue not a node red or duckdns issue. I will keep trying to pinpoint the problem and update this if I find anything. If anyone can point me in the right direction it would be much appreciated.

Hi. After updateing to latest home assistant My nodered cannot connect to HA. It shows password retracted in log.

I have solved it by changing HA adress as posted before.

After updating my Hassio to 0.77.1 today, I keep getting errors in the log.

“[error] [server-state-changed:xxxxxxxxx] TypeError: Cannot read property ‘state’ of null”

This repeats for all devices.
Any ideas here please?

Edit:
So can’t explain this one, but I was getting a login attempt failed from the supervisor IP 172.130.32.2.
To troubleshoot I thought I’d disable a few components.
I disabled the embedded mqtt broker and this resolved the login attempt failed and also no more errors from nodered. :+1:t4:

Still getting errors. Any ideas please?

Errors only appear when embedded mqtt is enabled.

I am receiving this error in log, no matter which pallette. I can ping registry.npmjs.org just fine … any clue?

Sep 15:58:37 - [warn] ------------------------------------------
1 Sep 15:59:42 - [info] Installing module: node-red-contrib-scheduler, version: 1.0.5
1 Sep 15:59:44 - [warn] Installation of module node-red-contrib-scheduler failed:
1 Sep 15:59:44 - [warn] ------------------------------------------
1 Sep 15:59:44 - [warn] npm ERR! request to https://registry.npmjs.org/node-red-contrib-scheduler failed, reason: Hostname/IP doesn’t match certificate’s altnames: “Host: registry.npmjs.org. is not in the cert’s altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net”

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-09-01T13_59_44_877Z-debug.log

I also did ping from the container (I hope it make sense)

root@a0d7b954-nodered:/opt$ ping registry.npmjs.org
PING registry.npmjs.org (151.101.0.162): 56 data bytes
64 bytes from 151.101.0.162: seq=0 ttl=54 time=74.720 ms
64 bytes from 151.101.0.162: seq=1 ttl=54 time=29.564 ms
64 bytes from 151.101.0.162: seq=2 ttl=54 time=82.004 ms

Not an issue with the add-on itself, but with npm: https://status.npmjs.org/history