Internet Speedtest Flow - Function Error

Hi all,

I am trying to get the above flow working (

I have changed the wget request to the correct url as one stated was outdated:
wget -O speedtest-cli chmod +x speedtest-cli

I have also installed NodeRedDashboard.

When running I am getting the following debug errors:

{"code":2,"message":"Command failed: /home/pi/speedtest-cli\n/home/pi/speedtest-cli: 7: /home/pi/speedtest-cli: Syntax error: newline unexpected\n"}

Error: ENOENT: no such file or directory, open 'speedtestData.json'

Error: ENOENT: no such file or directory, open 'speedtestDataPD.json'

TypeError: Cannot read property 'split' of undefined

Any ideas what the problem may be?

Well the error is teling you that the file doesn't exist.

Add a catch node connected to a debug node (set to display the complete msg object) and you will get an indication of which node is the culprit.

Did you try change the file names to the full path to the file?

Hi, thanks for your assistance.

I'm a complete beginner sorry but I think I have managed to add the catch which is showing two errors:

{"topic":"","payload":"","_msgid":"bc276840.11d028","filename":"speedtestData.json","error":{"message":"Unexpected end of JSON input","source":{"id":"63a0c3bd.82248c","type":"json","count":1}}}

2nd message:
{"topic":"","payload":"","_msgid":"bc276840.11d028","filename":"speedtestDataPD.json","error":{"message":"Unexpected end of JSON input","source":{"id":"330c9ca3.cd2e44","type":"json","count":1}}}

I've not changed any filename paths (will have to look up how to do that if i need to)

Both nodes are the JSON nodes

At a guess,

  • the "restore" inject is set to operate at start up & as the first time you download this flow, the files wont exist - you will get an error.


Add to that, I suspect this flow is quite old (it refers to old dashboard...
... and may require some tweaking to work with new node-red and new dashboard

thanks for your help. I ended up giving up on it and used a different flow that is working fine.

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