Home Assistant Community Add-on: Node-RED

Yes i understand that, however these errors are not occuring during a restart or an upgrade but during normal use. The second log i posted shows hassio logging:

Home Assistant WebSocket API error: Received message 257:None is not str

followed shortly by:

Watchdog found a problem with Home Assistant Docker!
19-07-29 17:21:17 INFO (SyncWorker_34) [hassio.docker.interface] Start homeassistant/qemux86-64-homeassistant

upon which time home assistant does an unscheduled restart

HA crashes, you have to find out why, but that is not related to the add-on. The add-on just looses connection (because well… that) and starts the reconnect procedure.

Hi Frenck,

Since the last update V 4.0.6 i’m having difficulties with using a ‘variable’ when using a ‘call service node’ on an input select
afbeelding

This results in
msg : string[136]

“Call-service API error. Error Message: Entity ID input_select.{{topic}} is an invalid entity id for dictionary value @ data[‘entity_id’]”

It feels like it’s not making the use of a variable anymore, but actually using {{topic}} as a value

While using the same variable in a ‘current state node’ it works just fine.

This used to work at least in version 4.0.2 and prior.
Running HASSIO 0.96.5

Thanks
Dominic

i think there might still be something going on with node red, this happened during my last crash:

19-08-01 21:15:10 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-08-01 21:15:10 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-08-01 21:15:10 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-08-01 21:15:10 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request running
19-08-01 22:05:21 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API error: Received message 257:None is not str
19-08-01 22:05:21 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API connection is closed
19-08-01 22:05:26 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-08-01 22:05:26 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-08-01 22:05:26 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host 172.30.32.1:8123 ssl:False [Connection refused].
19-08-01 22:05:30 WARNING (MainThread) [hassio.tasks] Watchdog found a problem with Home Assistant Docker!
19-08-01 22:05:30 INFO (SyncWorker_22) [hassio.docker.interface] Start homeassistant/qemux86-64-homeassistant
19-08-01 22:05:31 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-08-01 22:05:31 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered

i was able to get my system to stop crashing by using a long lived access token instead of hass.io websockets. I went through every node and wasn’t able to source the problem other than the issue where the log shows:

Home Assistant WebSocket API error: Received message 257:None is not str

:tada: Release v4.0.7

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Updates node-red-contrib-home-assistant-websocket to v0.14.2 (#282)
  • :arrow_up: Updates snyk to v1.208.0 (#279)
  • :arrow_up: Updates node-red-contrib-http-request to v0.1.14 (#284)
  • :arrow_up: Upgrades patch to 2.7.6-r6
  • :arrow_up: Upgrades add-on base image to v4.0.3

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

Just throwing a question out there in case anyone’s tried this.

I’ve gotten the add on to run nicely, but I’m trying to connect Node Red directly to Deconz running on the same Pi (with a hassio add on as well) using its pallette (node-red-contrib-deconz). Have anyone managed to integrate these?

Yes, but I used the web socket node.

I managed to get it working! I couldn’t get magick to automatically fill in the API key so I retrieved the key manually. Here’s what I did:

  • Open SSH terminal (via the SSH & Web Terminal add-on under Hassio)
  • Open the Phoscon App (open web-ui in the deCONZ add-on under Hassio)
  • In the Phoscon App goto: Hamburger menu -> Gateway -> Advanced -> Click ‘Authenticate app’ (This will open the gateway for 60 seconds)
  • In the SSH terminal type:
    curl -d ‘{“devicetype”: “[give the application name, for instance Node-RED]”}’ -H “Content-Type: application/json” -X POST http://[your local ip address for Hassio / deCONZ]:40850/api
  • This should result in:
    [{“success”:{“username”:"[this is the api-key]"}}]#
  • Goto Node-RED and install the ‘node-red-contrib-deconz’ pallette
  • Drag the ‘deconz-event’ node in a flow
  • Fill in the server details:
    Name: Conbee2
    IP Adress: [your local ip address for Hassio / deCONZ]
    Port: 40850
    API key: [the api-key from above]
    WebSocket Port: 40860
    SSL: not selected

Hope this helps.Good luck!

4 Likes

Sounds perfect! Thank You!

I’ll give it a go :grinning:

Hi,
Trying to install the addon on latest Hassio .
Any help with the following error will be great:
ERROR (SyncWorker_2) [hassio.docker.interface] Can’t install hassioaddons/node-red-armv7:4.0.7 -> 500 Server Error: Internal Server Error (“readlink /mnt/data/docker/overlay2/l: invalid argument”).

Where do I change the htaccess password? I get a 401 when I try my HA details

I just noticed that running Node Red in a separate tab is not working anymore. I can start Node Red from the sidebar via Ingress without any problem, but running it in a separate tab gives me a 401 Access denied error (when entering my login and password from HA). The port 1880 for the Web interface is correctly configured in the add-on. Any ideas what is going on?

Same issue. works through ingress though

Same problem here. No one any idea about that problem?

It’s working fine for me.
Have you tried to clear cache?

:tada: Release v4.1.0

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades nginx to 1.16.1-r0
  • :arrow_up: Updates node-red-dashboard to v2.16.0 (#287)
  • :arrow_up: Updates node-red-contrib-theme-midnight-red to v0.2.12 (#286)
  • :arrow_up: Updates node-red-contrib-bigtimer to v2.2.5 (#285)
  • :arrow_up: Updates snyk to v1.217.0 (#283)
  • :arrow_up: Upgrades add-on base image to v4.1.1
  • :hammer: Updates HA Auth URL in NGinx LUA script
  • :hammer: Use Hass.io DNS as NGinx resolver
  • :arrow_up: Updates node-red-dashboard to v2.16.1 (#292)
  • :arrow_up: Updates node-red-contrib-home-assistant-websocket to v0.15.0 (#293)
  • :arrow_up: Updates node-red-contrib-cast to v0.2.9 (#294)

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

Hi folks
Overnight my automations in Node Red stopped working. In my node red log I see the Websocket connecting and the immediately closing. If I look in the Hassio Log I see the following error with message 258? I have pasted the Node Red startup log below if that also helps. Any ideas? I dont recall changing anything - “It just happened” :slight_smile: Today I have removed the add on, deleted the Node-Red folder, Restarted the server and also then reinstalled the addon (without adding any of my nodes back in - and I still see the exact same error…
Thanks in advance.
Neil

19-08-25 17:41:36 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API connection is closed
19-08-25 17:41:41 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-08-25 17:41:41 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-08-25 17:41:41 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request running
19-08-25 17:41:41 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API error: Received message 258:WebSocketError(‘Message size 5246459 exceeds limit 4194304’) is not str

[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: 4.1.0
You are running the latest version of this add-on.
System: Ubuntu 18.04.3 LTS (amd64 / intel-nuc)
Home Assistant version: 0.97.2
Supervisor version: 183

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…
patching file nodes/ui_base.html
Hunk #1 succeeded at 1243 (offset 712 lines).
npm notice created a lockfile as package-lock.json. You should commit this file.
up to date in 1.184s
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.
[18:36:51] 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”

25 Aug 18:36:54 - [info]

Welcome to Node-RED

25 Aug 18:36:54 - [info] Node-RED version: v0.20.7
25 Aug 18:36:54 - [info] Node.js version: v10.16.0
25 Aug 18:36:54 - [info] Linux 4.15.0-58-generic x64 LE
25 Aug 18:36:54 - [info] Loading palette nodes
25 Aug 18:36:58 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
25 Aug 18:36:59 - [info] Dashboard version 2.16.1 started at /endpoint/ui
25 Aug 18:36:59 - [info] Settings file : /etc/node-red/config.js
25 Aug 18:36:59 - [info] Context store : ‘default’ [module=memory]
25 Aug 18:36:59 - [info] User directory : /config/node-red/
25 Aug 18:36:59 - [warn] Projects disabled : editorTheme.projects.enabled=false
25 Aug 18:36:59 - [info] Flows file : /config/node-red/flows.json
25 Aug 18:37:00 - [info] Starting flows
25 Aug 18:37:00 - [info] Started flows
25 Aug 18:37:00 - [info] Server now running at http://127.0.0.1:46836/
[18:37:00] INFO: Starting NGinx…
nginx: [alert] detected a LuaJIT version which is not OpenResty’s; many optimizations will be disabled and performance will be compromised (see GitHub - openresty/luajit2: OpenResty's Branch of LuaJIT 2 for OpenResty’s LuaJIT or, even better, consider using the OpenResty releases from OpenResty - Download)
25 Aug 18:37:05 - [info] [server:Home Assistant] WebSocket Connected to http://hassio/homeassistant
25 Aug 18:37:05 - [info] [server:Home Assistant] WebSocket Closed http://hassio/homeassistant
25 Aug 18:37:10 - [info] [server:Home Assistant] WebSocket Connected to http://hassio/homeassistant
25 Aug 18:37:10 - [info] [server:Home Assistant] WebSocket Closed http://hassio/homeassistant
25 Aug 18:37:15 - [info] [server:Home Assistant] WebSocket Connected to http://hassio/homeassistant
25 Aug 18:37:16 - [info] [server:Home Assistant] WebSocket Closed http://hassio/homeassistant

Just to close the loop here - I think I figured it out. I had HACS installed with the Unifi Gateway. As soon as I enabled the sensor for it in my config.yaml I started seeing this issue. Once removed, all was working again. So I can only assume the Unifi HACs component was causing the issue? Possible?

I don’t see how it related but I have the Unifi gateway by HACS installed and I am getting the same error …so lets try this out.

I uninstalled the HACS Unifi component and rebooted. I’ll report back.

Edit: The error is still showing for me.