Noticed today that my websockets stopped after the update to HA core 0.112.x. After deploying I’m getting “Node-RED custom integration needs to be installed in Home Assistant for this node to function correctly.” and the node says “Registered”. When checking the webhook address it was not created and the integration page don’t show no entity on the Node-Red integration.
I am a big Node-Red fan and have a lot of flows etc written in it. I am in the process of slowly implementing HA (running on a Virtual Machine with the official Virtual machine config of HASSoS etc)
I intend to continue running NR in a seperate Virtual machine - is this a support config for your node i.e. two seperate Virtual machines instead of Docker containers etc ?
go to configuration/integrations and choose node-red…you have to install it (again)…apparently HACS brings the package in, but doesn’t actually install it…you have to do the extra step.
Just updated and now I’m getting an error on restart of node red.
4 Aug 17:18:09 - [info] Waiting for missing types to be registered:
4 Aug 17:18:09 - [info] - server
And in node-red:
Appears to be stuck, not sure what to do.
*edit: tried console rolling back to version 0.22.0 but still stuck with the same error now
*edit 2: console update to version 0.22.6 and now it appears to be working.
*edit: Ran Node-Red -V and got this message in the console:
12 Aug 22:26:42 - [warn] [node-red-contrib-home-assistant-websocket/server] Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/[MyUsername]/.node-red/node_modules/home-assistant-js-websocket/dist/haws.umd.js
require() of ES modules is not supported.
require() of /Users/[MyUsername]/.node-red/node_modules/home-assistant-js-websocket/dist/haws.umd.js from /Users/[MyUsername]/.node-red/node_modules/node-red-contrib-home-assistant-websocket/lib/ha-websocket.js is an ES module file as it is a .js file whose nearest parent package.json contains “type”: “module” which defines all .js files in that package scope as ES modules.
Instead rename haws.umd.js to end in .cjs, change the requiring code to use import(), or remove “type”: “module” from /Users/[MyUsername]/.node-red/node_modules/home-assistant-js-websocket/package.json.
Solution: Thanks to @Kermit for his help, updating NodeJS to version 12.18.3 eliminated the error.
2020-08-06T09:15:19.473Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production [email protected]
2020-08-06T09:15:28.325Z [err] npm ERR! code E404
2020-08-06T09:15:28.328Z [err] npm ERR! 404 Not Found - GET https://registry.npmjs.org/@hapi%2Fjoi - Not found
2020-08-06T09:15:28.328Z [err] npm ERR! 404
2020-08-06T09:15:28.328Z [err] npm ERR! 404 ‘@hapi/[email protected]’ is not in the npm registry.
2020-08-06T09:15:28.328Z [err] npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
2020-08-06T09:15:28.328Z [err] npm
2020-08-06T09:15:28.328Z [err] ERR! 404 It was specified as a dependency of ‘node-red-contrib-home-assistant-websocket’
2020-08-06T09:15:28.328Z [err] npm
2020-08-06T09:15:28.328Z [err] ERR! 404
2020-08-06T09:15:28.329Z [err]
2020-08-06T09:15:28.329Z [err] npm
2020-08-06T09:15:28.329Z [err] ERR! 404
2020-08-06T09:15:28.329Z [err] Note that you can also install from a
2020-08-06T09:15:28.329Z [err] npm ERR!
2020-08-06T09:15:28.329Z [err] 404 tarball, folder, http url, or git url.
2020-08-06T09:15:28.337Z [err]
2020-08-06T09:15:28.337Z [err] npm ERR! A complete log of this run can be found in:
2020-08-06T09:15:28.337Z [err] npm
2020-08-06T09:15:28.337Z [err] ERR! /home/pi/.npm/_logs/2020-08-06T09_15_28_331Z-debug.log
2020-08-06T09:15:28.354Z rc=1
Unfortunately due to the 115 update, I had to setup a complete new ha instance.
But anyway, currently everything is running quite nice, except Node-red websocket which is quite critical for me.
My HA system + proxmox
arch x86_64
chassis vm
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.13
installation_type Home Assistant OS
os_name Linux
os_version 5.4.63
python_version 3.8.5
supervisor 245
timezone Europe/Berlin
version 0.115.2
virtualenv false
NodeRed addon: Current version: 7.2.0
HACS Node Red: v0.4.4
I followed the instucktions:
Installed Node Red in HACS
Restarted HA
Opend Integrations,
but Node-RED is not listed. Whatever I do, tried all avaliable versions but always same result. In my old HA 114 its working perfect. Just have no idea what to try. Btw. can’t find any error in logs regarding Node red…
Any advise is much appreciated.
Thanks
Edit:
after few hours suddenly it just worked, I’ve just tried everything in different order, so I can’t tell what exactly fixed my issue, but anyway thanks
The hassio add-on picked up 0.27.0, and a lot of my flows use the msg.data.new_state.attributes which was fixed in 0.27.1. When I try to use the latest package by configuring hassio with npm_packages overrides (below), the log shows that it installs 0.27.1 OK, but with lots “does not exist” errors. Then, unsurprisingly, node-red says the nodes are missing.
[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...
-----------------------------------------------------------
Add-on: Node-RED
Flow-based programming for the Internet of Things
-----------------------------------------------------------
Add-on version: 7.2.3
You are running the latest version of this add-on.
System: HassOS 4.13 (armv7 / raspberrypi3)
Home Assistant Core: 0.115.6
Home Assistant Supervisor: 246
-----------------------------------------------------------
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...
Log level is set to WARNING
[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 1178 (offset 647 lines).
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
audited 2 packages in 1.002s
found 0 vulnerabilities
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] user.sh: executing...
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
added 33 packages from 23 contributors, updated 1 package and audited 1065 packages in 77.401s
48 packages are looking for funding
run `npm fund` for details
found 6 vulnerabilities (3 low, 3 moderate)
run `npm audit fix` to fix them, or `npm audit` for details
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
> addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
/bin/sh: /opt/node_modules/node-red-node-pi-gpio/testgpio.py: not found
6 Oct 20:35:11 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
6 Oct 20:35:12 - [warn] ------------------------------------------------------
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/server] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/config-server/config-server.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/server-events] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/events-all/events-all.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/server-state-changed] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/events-state-changed/events-state-changed.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/trigger-state] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/trigger-state/trigger-state.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/poll-state] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/poll-state/poll-state.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/ha-webhook] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/webhook/webhook.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/ha-zone] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/zone/zone.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/api-call-service] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/call-service/call-service.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/ha-entity] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/entity/entity.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/ha-fire-event] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/fire-event/fire-event.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/api-current-state] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/current-state/current-state.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/ha-get-entities] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/get-entities/get-entities.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/api-get-history] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/get-history/get-history.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/api-render-template] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/render-template/render-template.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/ha-wait-until] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/wait-until/wait-until.html does not exist
6 Oct 20:35:12 - [warn] [node-red-contrib-home-assistant-websocket/ha-api] Error: /opt/node_modules/node-red-contrib-home-assistant-websocket/nodes/api/api.html does not exist
6 Oct 20:35:12 - [warn] ------------------------------------------------------
6 Oct 20:35:12 - [warn] Projects disabled : editorTheme.projects.enabled=false
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)