Update long-term live Node-RED in readiness for testing the new Matter node

Your attention is most welcome Colin. erm, before I start...

modules - did you mean ~/.node-red/node_modules - I don't have a .node_modules in the pi folder... or am I missing something....

I've started..... mv /home/pi/ etc then from .node-red folder npm install and it seems to be doing something...coffee - more like full blown dinner....

and that midnight-red - can you give me an exact example of the first one... ie..
in the .node-red folder?
npm uninstall @node-red-contrib-themes/midnight-red
is that it or do I need it quoted as your example and with the version on the end?

Academic..

pi@mainpi:.node-red:18:51[0]> npm install
npm ERR! code ENOVERSIONS
npm ERR! No versions available for node-red-contrib-theme-midnight-red

npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-08-31T16_51_40_804Z-debug-0.log
pi@mainpi:.node-red:18:53[1]>

That took only a few mins and no /home/pi/.node-red/node_modules has been created....

Yes, sorry, typo

So that doesn't even exist, or the version it is asking for doesn't exist. Delete that line from package.json

right - done that... and with package-lock.json and node-modules renamed, running npm install - it's taking longer this time...and...
Good grief...

pi@mainpi:.node-red:19:16[0]> npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'particle-api-js@9.4.1',
npm WARN EBADENGINE   required: { node: '>=12.x', npm: '8.x' },
npm WARN EBADENGINE   current: { node: 'v18.17.1', npm: '9.6.7' }
npm WARN EBADENGINE }
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated string-similarity@4.0.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated node-red-node-darksky@0.1.19: Support for the Dark Sky API will be ending on March 31st, 2023
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-red-contrib-ibm-watson-iot@0.2.8: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @node-red-contrib-themes/midnight-red@1.5.2: Use @node-red-contrib-themes/theme-collection instead. See https://github.com/node-red-contrib-themes/theme-collection for installation and usage instructions.
npm WARN deprecated superagent@5.3.1: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated ibmiotf@0.2.41: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated viz.js@2.1.2: 2.x is no longer supported, 3.x published as @viz-js/viz
npm WARN deprecated axios@0.5.4: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 799 packages, and audited 1377 packages in 8m

102 packages are looking for funding
  run `npm fund` for details

46 vulnerabilities (25 moderate, 21 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
pi@mainpi:.node-red:19:25[0]>

Wait for it... I'm not seeing a serial error.. but is it running?

pi@mainpi:.node-red:19:25[130]> node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.19:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
31 Aug 19:26:05 - [info]
Welcome to Node-RED
===================
31 Aug 19:26:05 - [info] Node-RED version: v3.0.2
31 Aug 19:26:05 - [info] Node.js  version: v18.17.1
31 Aug 19:26:05 - [info] Linux 5.10.103-v7l+ arm LE
31 Aug 19:26:07 - [info] Loading palette nodes
31 Aug 19:26:17 - [info] Worldmap version 2.42.2
31 Aug 19:26:17 - [info] Dashboard version 3.5.0 started at /ui
31 Aug 19:26:19 - [warn] ------------------------------------------------------
31 Aug 19:26:19 - [warn] [node-red-node-rbe/rbe] 'rbe' already registered by module node-red
31 Aug 19:26:19 - [warn] ------------------------------------------------------
31 Aug 19:26:19 - [info] Settings file  : /home/pi/.node-red/settings.js
31 Aug 19:26:19 - [info] HTTP Static    : /home/pi/.node-red/public > /
31 Aug 19:26:19 - [info] Context store  : 'default' [module=localfilesystem]
31 Aug 19:26:19 - [info] User directory : /home/pi/.node-red
31 Aug 19:26:19 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
31 Aug 19:26:19 - [info] Flows file     : /home/pi/.node-red/flows.json
31 Aug 19:26:19 - [info] Server now running at http://127.0.0.1:1880/
31 Aug 19:26:19 - [warn] Using unencrypted credentials
31 Aug 19:26:19 - [info] Starting flows
31 Aug 19:26:19 - [info] [alexa-remote-account:Peter Scargill] intialising "Peter Scargill" with the PROXY method and NO saved data...
31 Aug 19:26:21 - [info] Started flows
31 Aug 19:26:22 - [warn] [alexa-remote-account:Peter Scargill] open 192.168.1.19:3456 in your browser
Shelly gen1 server is listening on port 10000
31 Aug 19:26:22 - [info] [sqlitedb:6e9a0125.59bc4] opened /home/pi/dbs/iot.db ok
31 Aug 19:26:22 - [info] [sqlitedb:fdbe27fe.fb7848] opened /home/pi/dbs/iot.db ok
31 Aug 19:26:22 - [info] [sqlitedb:33875a87.57ade6] opened /home/pi/dbs/iot.db ok
31 Aug 19:26:23 - [info] [zigbee2mqtt-server:zigbee bridge] MQTT Connected
31 Aug 19:26:23 - [info] [mqtt-broker:4c682b3a.2ab5c4] Connected to broker: mqtt://127.0.0.1:1883
31 Aug 19:26:23 - [info] [zigbee2mqtt-server:zigbee bridge] MQTT Subscribed to: "zigbee2mqtt/#
31 Aug 19:26:23 - [warn] [zigbee2mqtt-server:zigbee bridge] Bridge offline
31 Aug 19:26:24 - [info] [vsh-connection:maureen@scargill.org] Attempting MQTT connection: a1pv0eq8s016ut-ats.iot.eu-west-1.amazonaws.com:8883 (clientId: vsht-35299d51-81e1-425e-941f-0fc7a2d05aba)
31 Aug 19:26:24 - [info] [vsh-connection:maureen@scargill.org] MQTT subscribe to topics: ["$aws/things/vsht-35299d51-81e1-425e-941f-0fc7a2d05aba/shadow/get/accepted","vsh/vsht-35299d51-81e1-425e-941f-0fc7a2d05aba/+/directive","vsh/service","vsh/version/3.0.9/+","vsh/vsht-35299d51-81e1-425e-941f-0fc7a2d05aba/service"]
31 Aug 19:26:24 - [error] [ewelink-event-listener:RFBridge] [object Object]
31 Aug 19:26:24 - [error] [ewelink-event-listener:WiFi door sensor] [object Object]
31 Aug 19:26:24 - [error] [ewelink-devices:pete] [object Object]
31 Aug 19:26:24 - [error] [ewelink-power-state-write:sonoff usb mini] [object Object]
31 Aug 19:26:24 - [error] [ewelink-devices:newewelink] [object Object]
31 Aug 19:26:24 - [error] [ewelink-power-state-write:Sonoff POWR3] [object Object]
31 Aug 19:26:24 - [error] [ewelink-event-listener:48c32274c372c9f2] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-power-state-write:Sonoff  MiniR3] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-event-listener:7cedf82b00c48363] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-power-state-write:dab620394d937261] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-power-state-write:6a4b363d3f37c745] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-power-state-read:nspanel] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-event-listener:3c81fc76128f5a0c] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-generic-device:ns panel] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-power-state-read:3ab817c96eac57e1] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-event-listener:MiniR2 state] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-power-state-write:MiniR2] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-power-state-write:Sonoff ZBMINIL2] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-event-listener:4a0ceb0ff33845fc] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-power-state-write:NSPANEL out2 on off] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-event-listener:cd94f107300258ed] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-devices:hmm] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [error] [ewelink-event-listener:683fecb41fe999ea] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 19:26:24 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
31 Aug 19:26:24 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
Error: Connection closed
    at /home/pi/.node-red/node_modules/mqtt/lib/client.js:206:29
    at Array.forEach (<anonymous>)
    at flushVolatile (/home/pi/.node-red/node_modules/mqtt/lib/client.js:204:24)
    at TLSSocket.<anonymous> (/home/pi/.node-red/node_modules/mqtt/lib/client.js:475:5)
    at TLSSocket.emit (node:events:526:35)
    at node:net:323:12
    at TCP.done (node:_tls_wrap:588:7)
31 Aug 19:26:30 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
^C
pi@mainpi:.node-red:19:26[130]>

THANK YOU FOR YOUR PERSISTENCE.....

It seems ok, now put that SD in my original Pi - no apparent serial issues ... but there is one issue apparent - NONE of my eweLink stuff works and I know some of it is plugged in...
From the web ui....

So something in the new setup has changed.... maybe another post in a relevant area unless anyone in here has come across this - note the invalid json response bit - nspanel is DEFINITELY connected and on..
image

That is this issue Unsupported engine warning, even when node + npm versions meet requirement Ā· Issue #163 Ā· particle-iot/particle-api-js Ā· GitHub but it is only a warning so you can probably ignore it.

I don't know anything about ewelink so can't help you there I am afraid.

I ditched Particle - not used it for years. No problem - if the Matter node works I can control eWeLink (Sonoff) devices by the Matter virtual devices - well, that's the hope. All nodes now up to date, it's not crashing, everything else seems ok. Thanks again Colin.

Well something is pulling it in. This should show you what is using it so you can uninstall it.
npm list particle-api-js

I uninstalled - sorry didn't say.

now - gone I think

pi@mainpi:.node-red:21:11[0]> npm list particle-api-js
node-red-project@0.0.1 /home/pi/.node-red
ā””ā”€ā”€ (empty)

pi@mainpi:.node-red:22:16[1]>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.