Speedtest node - "No server found, verify your proxy/network"

Hi all,
I'm encountering a strange behaviour of the node-red-contrib-speedtest-updated-node:

I've put the node behind a cron-node to perform a speed test every full hour.
Every time the speedtest node runs, it throws a No server found, verify your proxy/network error.
Whenever I trigger the node manually (either via an inject node or a button from the dashboard) it runs without any problems.

Couldy anyone give me a hint on why this might happen?

Here is my flow:

[{"id":"a4513d9cc8f71afe","type":"speedtest","z":"4c683dfcd3fa70e5","name":"","serverId":"12046","maxTime":5000,"x":480,"y":680,"wires":[["903bc7716db1225a","ea14bfe2d0bde8b8","3a3401210d5cd002"]]},{"id":"903bc7716db1225a","type":"change","z":"4c683dfcd3fa70e5","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.speeds.download","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":620,"wires":[["de226e2581e59ca8"]]},{"id":"ea14bfe2d0bde8b8","type":"change","z":"4c683dfcd3fa70e5","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.speeds.upload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":680,"wires":[["975156d2acc82a5d"]]},{"id":"3a3401210d5cd002","type":"change","z":"4c683dfcd3fa70e5","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.server.ping","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":740,"wires":[["4178a162a339d1d2"]]},{"id":"1bf645b83496b6f2","type":"cronplus","z":"4c683dfcd3fa70e5","name":"Every hour","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"Speedtest","topic":"Speedtest","payloadType":"date","payload":"","expressionType":"cron","expression":"0 0 * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":270,"y":680,"wires":[["a4513d9cc8f71afe"]]},{"id":"a30e184e3ca2e16c","type":"inject","z":"4c683dfcd3fa70e5","name":"Manual","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":270,"y":740,"wires":[["a4513d9cc8f71afe"]]},{"id":"6fc13643bdecb7c0","type":"server-state-changed","z":"4c683dfcd3fa70e5","name":"Speedtest Now","server":"3acdbfb8.d5aa3","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_button.speedtest_now","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"date"}],"x":260,"y":580,"wires":[["a4513d9cc8f71afe"]]},{"id":"da4f5bc30c182e90","type":"comment","z":"4c683dfcd3fa70e5","name":"Button on Home Assistant Dashboard","info":"","x":330,"y":540,"wires":[]},{"id":"975156d2acc82a5d","type":"debug","z":"4c683dfcd3fa70e5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":930,"y":680,"wires":[]},{"id":"de226e2581e59ca8","type":"debug","z":"4c683dfcd3fa70e5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":930,"y":620,"wires":[]},{"id":"4178a162a339d1d2","type":"debug","z":"4c683dfcd3fa70e5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":930,"y":740,"wires":[]},{"id":"3acdbfb8.d5aa3","type":"server","name":"Home Assistant","version":2,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]

Thanks,
Damos

That node hasn't been updated in over two years. There is another you might try called node-red-contrib-speedtest and it was updated 3 weeks ago.

P.S. I just tried your floe and it works with node-red-contrib-speedtest however the the bottom debut returns no data - look's like the returned object has changed

This thread might be relevant, but I am not sure if it came up with a reliable solution

I will give it a try. Thanks!

I saw that, yes. But it wasn't really useful.

It doesn't even install. It's using some deprecated packages... :frowning:

What version of NR nd node.js? I installed it on Node-RED V3.0.0 and node.js v16.16.0 on a Raspberry Pi 3 Model B Rev 1.2

Whoops, I installed it on my Mac Mini. I just tried to install in on the Pi and it failed. Let me see what is different...

Ok originally the install failed so I installed nr v3.0.0 again but used the --node14 option to go back to node.js v14.20.0 and then the node installs fine and works (except what I said above).

Ok. Assuming that the node needs an update, I opened an issue.

Thanks, @zenofmud!

I’ve got no reply on the Speedtest node issue in GitHub.

Anyway, there must be something in the NR runtime environment that’s different when the node is triggered when the node is triggered manually and when the flows are running “in the background”.

Because, I’m always getting an error when the node is triggered in the background (eg by a chron or inject node) and never when the node is triggered manually (eg pressing a button in the UI).

Any idea?
Thanks!

Add a debug node (set to display the complete msg object) to the output of the inject and cron nodes to see what the msgs look like.
I'd also (if you haven't done it yet) add a catch node debug node (set to display the complete msg object) to see if it sees anything.

I’ve done all that, Paul. When the NR Editor is visible I can watch the flow going through without any problem. I’m even triggering the UI button press which I’m using and when the browser is closed the very same flow results to an error.
The catch node gives that message:

speedtest - 5a43591b139aa050 - Speedtest: Error: No server found, verify your proxy/network

Do you happen to know what changes when the editor is closed?

Do you mean the dashboard button (in the browser) works if you have both the editor and dashboard windows open, but not if the editor window is closed and only the dashboard window is open?

In your sample flow, you have no UI nodes so this is new information.
Did the msg's coming out of the cron node and the inject node look any different?

and what version of node-red-contrib-cron-plus are you running?

I have your sample flow loaded and cron-plus just ran the 11:00 inject fine and I got results. So back to basics

  1. what device and OS is running NR?
  2. what version of NR and node.js? - you can get this from the startup log
  3. what version of node-red-chron-plus are you running (you are running that node..correct?)
  4. what happens if you send the output of the cron-plus node thru a change node and remove
    msg.cronplus and msg.scheduledEvent? It should then match the output of a inject node.

@zenofmud, this will be a rather lengthy post :wink:

My Node-RED instance is an add-on to a Home Assistant installation, which itself is running as a VM on a Synology DS920+ (since 1,5 years). So, here is my stack:

  • Synology DSM 6.2.4-25556
  • Home Assistant 2022.8.1 (as a VM on Synology Virtual Machine Manager)
    • Supervisor 2022.07.0
    • Operating System 8.2
    • Frontend 20220802.0 - latest
    • NodeRed Add-on Current version: 13.3.1, which is
  • Node-RED 3.0.2: Maintenance Release)
  • node-red-contrib-cron-plus 1.5.6
  • node-red-contrib-speedtest-updated 2.0.2

Regarding your suggestion, to match the output of cron-plus with the inject node: my first attempt was an recurring inject node anyway. Didn't work either.
Now, I'm not even calling directly the speedtest node. I'm rather simulating a UI-button-press.

My setup is as follows:


Where (1) is a node which reacts on a button-press-event in the Home Assistant UI, and (2) calls exactly that service. So, cron-plus calls (2), which calls (1).
The reason why I configured this that way is to eliminate any message injection faults (like the one you are mentioning). The human press on the dashboard fires the speedtest every time I click on it. When the cron-plus node "clicks" it it does never work. :frowning:

Here is the HA dashboard:


The cron-plus node is configured to fire a button-press event every four hours:
image

I appreciate your time you invest in my issue. Thanks!

Do the Speedtest Now and the Manual inputs consistently give ok and fail results at the speedtest node? If so then set debug 3 to output complete message and add a debug node showing what is coming out of the Manual node. Show us what you get in the two debug nodes and in debug 4 node.

Don't run speedtests on the hour, they often fail.

1 Like

I changed it to 17 minutes past the hour. Let's see! :slight_smile:

Yes. Manual and Speedtest Now works all the time.
The output of debug 3 (hence the "Speedtest Now") is a timestamp, because I configured the Home Assistant state node to deliver it:

image

The Manual node delivers
image

debug 4 (Speedtest result) is the Speedtest object with all containing data:
image

I'll report if @TotallyInformation's hint avoiding the full hour run is maybe the solution...