bitfocus / companion-module-generic-speedtest

MIT License
1 stars 1 forks source link

No Upload Speed for Cloudflare #14

Closed joezimjs closed 1 month ago

joezimjs commented 3 months ago

Companion v3.3.1 When I run a Cloudflare speed test, the upload speed variable never gets filled.

image

bryce-seifert commented 2 months ago

I've finally found the root of the issue, it looks like the format of the server-timing response has changed, and this is not accounted for in the module, universal-speediest, we use which is causing it to not process the upload data.

I'm going to look at fixing this this weekend, whether by patching that module or transitioning to the official Cloudflare module

joezimjs commented 2 months ago

Awesome. I was just looking at it today and noticed you were using a dependency to run the tests that hasn't been updated in 2 years... If I had the time I'd be jumping on this fix myself.

bryce-seifert commented 2 months ago

I looked at fixing this weekend, but was having issues building the speedtest library after implanting the fix, probably due to its age.

I also tried the Cloudflare library, but it doesn’t seem to play nicely with Node.

I can’t find an obvious better library, so I’m going to keep investigating the build issues

ChrisSW58 commented 1 month ago

As a matter of interest, is Speedtest.net working correctly - just loops for me....

joezimjs commented 1 month ago

As a matter of interest, is Speedtest.net working correctly - just loops for me....

Nope. Never seems to finish a speed test.

ChrisSW58 commented 1 month ago

Hi Bryce - any update on this please?

ChrisSW58 commented 1 month ago

I understand the 3.4.0 stable release is imminent… presumably a fix for this won’t make it, unfortunately?

bryce-seifert commented 1 month ago

@ChrisSW58 I'm going to try to my best to get it patched, it's just been a busy couple of weeks.,

If you're able, can you download this test build and run it in Companion using the Developer Modules patch in the main window, and let me know if that build works for you?

joezimjs commented 1 month ago

I tried it and it works for me! Thanks @bryce-seifert

ChrisSW58 commented 1 month ago

That has sorted the issue Bryce - many thanks and very well done. Just FYI, the SpeedTest.net option still loops and never ends, but I assume you have not looked at that code. Many thanks once again.

ChrisSW58 commented 1 month ago

@bryce-seifert - just updated to Companion beta 7240 with your module version 1.0.3. SpeedTest starts and then stops immediately. Was working fine in the test build.

bryce-seifert commented 1 month ago

@ChrisSW58 What OS are you on? Are there any errors in the module log?

Also can you confirm cloudflare is still good in the build for you? It’s just Speedtest?

ChrisSW58 commented 1 month ago

@bryce-seifert It's very weird - your test build is now timing out even if I go back beta builds. Test build on 5 sec timeouts. Am running on MacOS. Logs attached. 7240 1.0.3 module-log-30_08_2024-13_08_46.csv 7240 with test build module on SpeedTest-log-30_08_2024-13_06_00.csv

bryce-seifert commented 1 month ago

And this is only for Speedtest option? Cloudflare is still fine?

ChrisSW58 commented 1 month ago

Here's the full log same for either service.

Screenshot 2024-08-30 at 1 18 52 pm
bryce-seifert commented 1 month ago

Just to verify, in the latest beta, are you running the “Run Speedtest” action after starting the module? I changed it from running automatically in order to try and avoid the “call timed out” error

ChrisSW58 commented 1 month ago

I'm clearing the log file and then starting the connection from there. I reverted to your test module and did the same and it now seems to be OK - maybe I cocked it up before!

Screenshot 2024-08-30 at 1 26 47 pm
ChrisSW58 commented 1 month ago

Here is the log from the 7240 having started the module the same way, and also the variables from it

Screenshot 2024-08-30 at 1 30 58 pm Screenshot 2024-08-30 at 1 31 21 pm
ChrisSW58 commented 1 month ago

Thanks for your prompt response by the way - much appreciated

bryce-seifert commented 1 month ago

In the latest beta (different from the test build), you will need to run the “Run Speedtest” action after starting the module. Perhaps I should change the “Stopped” variable to “Not Yet Run” or similar to indicate this behavior change

ChrisSW58 commented 1 month ago

Yes!!! That's the issue...it's connected but you now need an explicit run SpeedTest command.... Sorry for my stupidity!! That is a big change - I didn't see it documented in the button help....You might get others confused by this....But seriously, very many thanks - I can sort that now.

bryce-seifert commented 1 month ago

No worries, yes I agree that I need to update the help documentation now that it’s functional.

Just curious, are both Speedtest and cloudflare services working for you now?

ChrisSW58 commented 1 month ago

No - Speedtest looping as always on 5 sec timeout - here's the log

Screenshot 2024-08-30 at 1 49 23 pm
bryce-seifert commented 1 month ago

Got it , thank you for the log on that that is a helpful error. I will try and diagnose that next

bryce-seifert commented 1 month ago

@ChrisSW58 I believe speedtest.net tests should be fixed in the latest Companion beta.

patrichard commented 1 month ago

Just updated to the latest beta and seems to be fine for me. Thanks for all of the hard work.

ChrisSW58 commented 1 month ago

Yes! Both options working successfully. Many thanks for all your hard work