Help with options on Speedtest node

the node in question

Folks,

I don't mind putting in the work but also don't want to re-invent the wheel.

Recently it has been said that that node is not compatible with new versions.

I could contact the people who made it, or try myself to update it.

What's the mechanics of doing that myself?

Never done it before. :slight_smile:

  • Click the link you provided.
  • Look for: "View on GitHub" link & click that
  • In GitHub, select "issues"
  • Click new issue button

While you are in the github issue tracker, you might spot the answer yourself or there may be an open issue already.

Such an issue has already been submitted.

S-o-o-o-o-h-h-h......

How hard is it to update the dependencies?

I've looked at one of the files shown.

It is like 8000 lines long.

That looks like a list of things required. And I get it.... They are old.
So the mechanics of updating that list...

All should be good.

  1. fork the repository (press the fork button)
  2. pull the code to your dev PC (git clone https://github/your-fork)
  3. update the dependencies in package.josn
  4. npm install
  5. install locally in your node-red
    • cd ~/.node-red
    • npm install /path/to/where/your/local/clone/lives
  6. start node-red & test
  7. if good, commit & push changes back up to github

Once you have done that, you can install your version anywhere by using npm e.g. npm install your-github-id/your-fork

1 Like

Thanks.

As easy as that sounds, I may need to research all the stuff needed.

As said, the 8000 line bit of code listing all the dependencies.... That scares me. :wink:

So to fork it.... I don't need anything pre-installed?

I'd do the pull from an empty directory where I want to build the new version?

this is one of things that Gemini/ChatGPT excel at IMO.

Try putting this into a chatbot:

"Hi, I need to update the dependencies of an out of date node-red contrib node. It is a github repository located here: https://github.com/steffenmllr/node-red-contrib-speedtest. Can you guide me through forking, cloning, updating dependencies, committing and pushing the changes back to my fork. I already have GIT and NODE installed."

1 Like

Again, thanks.

I'm starting to use chatgpt a bit now and then.

It kind of blows my mind.

So it knows that kinda stuff..... Wow.

Ok, slow progress is being made.

A real can of worms.

I am updating things and it seems more in the global part of things.

npm install -g npm-check-updates
npm error code EACCES
npm error syscall mkdir
npm error path /usr/lib/node_modules/npm-check-updates
npm error errno -13
npm error Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/npm-check-updates'
npm error     at async mkdir (node:internal/fs/promises:858:10)
npm error     at async /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:624:20
npm error     at async Promise.allSettled (index 0)
npm error     at async [reifyPackages] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
npm error     at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5)
npm error     at async Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:150:5)
npm error     at async Npm.exec (/usr/lib/node_modules/npm/lib/npm.js:207:9)
npm error     at async module.exports (/usr/lib/node_modules/npm/lib/cli/entry.js:74:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'mkdir',
npm error   path: '/usr/lib/node_modules/npm-check-updates'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: /home/me/.npm/_logs/2025-06-20T08_19_56_262Z-debug-0.log

I installed NR with the official install script.
No offence meant by that.... Maybe I should have made it BOLD and not italic.

The install script.
That doesn't use sudo, so these errors WRT permission are a bit worrying.

I'd prefer to stop here and check what's going on.

Looking a bit more at the errors....
(I'm on Ubuntu BTW)
WHY are there .exe files mentioned?

Oh the log...

0 verbose cli /usr/bin/node /usr/bin/npm
1 info using npm@10.8.2
2 info using node@v20.19.2
3 silly config load:file:/usr/lib/node_modules/npm/npmrc
4 silly config load:file:/home/me/.npmrc
5 silly config load:file:/usr/etc/npmrc
6 verbose title npm install npm-check-updates
7 verbose argv "install" "--global" "npm-check-updates"
8 verbose logfile logs-max:10 dir:/home/me/.npm/_logs/2025-06-20T08_19_56_262Z-
9 verbose logfile /home/me/.npm/_logs/2025-06-20T08_19_56_262Z-debug-0.log
10 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 silly idealTree buildDeps
14 silly fetch manifest npm-check-updates@*
15 silly packumentCache full:https://registry.npmjs.org/npm-check-updates cache-miss
16 http fetch GET 200 https://registry.npmjs.org/npm-check-updates 227ms (cache miss)
17 silly packumentCache full:https://registry.npmjs.org/npm-check-updates set size:undefined disposed:false
18 silly placeDep ROOT npm-check-updates@18.0.1 OK for:  want: *
19 silly reify moves {}
20 verbose stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/npm-check-updates'
20 verbose stack     at async mkdir (node:internal/fs/promises:858:10)
20 verbose stack     at async /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:624:20
20 verbose stack     at async Promise.allSettled (index 0)
20 verbose stack     at async [reifyPackages] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
20 verbose stack     at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5)
20 verbose stack     at async Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:150:5)
20 verbose stack     at async Npm.exec (/usr/lib/node_modules/npm/lib/npm.js:207:9)
20 verbose stack     at async module.exports (/usr/lib/node_modules/npm/lib/cli/entry.js:74:5)
21 error code EACCES
22 error syscall mkdir
23 error path /usr/lib/node_modules/npm-check-updates
24 error errno -13
25 error Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/npm-check-updates'
25 error     at async mkdir (node:internal/fs/promises:858:10)
25 error     at async /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:624:20
25 error     at async Promise.allSettled (index 0)
25 error     at async [reifyPackages] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
25 error     at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5)
25 error     at async Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:150:5)
25 error     at async Npm.exec (/usr/lib/node_modules/npm/lib/npm.js:207:9)
25 error     at async module.exports (/usr/lib/node_modules/npm/lib/cli/entry.js:74:5) {
25 error   errno: -13,
25 error   code: 'EACCES',
25 error   syscall: 'mkdir',
25 error   path: '/usr/lib/node_modules/npm-check-updates'
25 error }
26 error
26 error The operation was rejected by your operating system.
26 error It is likely you do not have the permissions to access this file as the current user
26 error
26 error If you believe this might be a permissions issue, please double-check the
26 error permissions of the file and its containing directories, or try running
26 error the command again as root/Administrator.
27 silly unfinished npm timer reify 1750407596540
28 silly unfinished npm timer reify:createSparse 1750407596843
29 verbose cwd /home/me/github/node-red-contrib-speedtest
30 verbose os Linux 5.15.0-141-generic
31 verbose node v20.19.2
32 verbose npm  v10.8.2
33 verbose exit -13
34 verbose code -13
35 error A complete log of this run can be found in: /home/me/.npm/_logs/2025-06-20T08_19_56_262Z-debug-0.log

I'm asking because when I search
npm install -g npm-check-updates

I am getting links that talk about nvm - which is deprecated.
So probably not the way to go.

Are you saying there are 8000 lines of code in package.json in the repository?

Edit, I see 35 lines

In one of the files.... yes.

I did a bit of a look-see at the listed files.

One of them has a LOT of lines.

When I got to the bottom I am sure I saw a 4 digit number starting with 8.
(Or was it eight HUNDRED?)

Sorry...

Hang on.
package-lock.json 8516 lines.

Rather than updating the speedtest node, you could install and use speedtest-cli:

sudo apt update && sudo apt install speedtest-cli

And in Node-red

Which returns eg

{
    "download": 62807661.90499479,
    "upload": 29006001.41970083,
    "ping": 44.88,
    "timestamp": "2025-06-20T09:59:23.343488Z",
    "bytes_sent": 36675584,
    "bytes_received": 79157201,
    "share": null
}

Upload and Download are bits per second so best rounded and divided by 1024*1024 for Mbps

2 Likes

Thanks, I'll look at that.

Not sure if I have in the past and ....

Anyway, I'll look now.

Oh, sorry.

It is not a node-red one.

Ok. Yeah. Hang on a sec as I go through the motions.

Could you elaborate on the JSON node's settings?

Although speedtest-cli --json is requesting json output, the exec node delivers it into Node-red as a string, so the json node just converts it back into json.

I have not changed any settings for this node, all default.

Here's the flow

[{"id":"f77909d8dd071c67","type":"inject","z":"32c594e46f312b73","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":40,"wires":[["467c01c066a58cb2"]]},{"id":"467c01c066a58cb2","type":"exec","z":"32c594e46f312b73","command":"speedtest-cli --json","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":270,"y":40,"wires":[["a20245501a5ef6c3"],[],[]]},{"id":"408a0048a4cee966","type":"debug","z":"32c594e46f312b73","name":"output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":40,"wires":[]},{"id":"a20245501a5ef6c3","type":"json","z":"32c594e46f312b73","name":"","property":"payload","action":"","pretty":false,"x":450,"y":40,"wires":[["408a0048a4cee966"]]}]

Ok. Sorry.

Thanks.

I may go down this path then.

(Though there is a huge feeling of De Ja Vous somewhere in my mind.)