henrywhitaker3 / Speedtest-Tracker

Continuously track your internet speed
GNU General Public License v3.0
1.54k stars 121 forks source link

[Feature Request] Pause / Unpause speedtests #420

Open CurlyFlow opened 3 years ago

CurlyFlow commented 3 years ago

Describe the feature Hi there really nice docker! Installed it on unraid and literally worked just right away... like... wow!

I have a unstable (like LTE + DSL) internet so i would like to disable speedtests when certain devices are online. I have everything working for that... but docker start / stop doesnt seem to be clever, because when some devices are online... i cant see the speedtest because docker is stopped, so could you give me some sort of ip:port/?(un)pause

So i can trigger start and stop of testing and can still access GUI?

henrywhitaker3 commented 3 years ago

Try the latest dev tag for this mate. It's in Settings -> General -> Schedule Enabled

CurlyFlow commented 3 years ago

Try the latest dev tag for this mate. It's in Settings -> General -> Schedule Enabled

Hey, thanks.

Sorry i cant find out how this helps me.

I want to start / stop testing from outside. So when pcs are online there is no test. Currently i use a simple start container, stop container, but problem is, then i cant view the stats... bc to watch the stats i need a pc online.. ;-)

henrywhitaker3 commented 3 years ago

If you uncheck that box and save, then speedtests will only run when you click the test again button. Can look at adding an API endpoint for this when I'm next working on it

CurlyFlow commented 3 years ago

Okay.. now i understand what you mean.

That would make it kinda hard for me.

I mean, i would need to make a own clock to start tests every 1h.

What about users can set time frames in settings (like 1h, 30min, what ever) and a simple "start and pause" function (maybe with a extra api for individual tests)

This way you would have everything covered someone need

henrywhitaker3 commented 3 years ago

Not really sure what you are getting at here. If you're running tests every hour manually, why not just use the Cron scheduler?

If you want to run them manually, you can make a GET request to /api/speedtest/run and it will queue a new test.

Will have a think about adding a "pause for x minutes" type thing though

CurlyFlow commented 3 years ago

Dont make it so complicated. I literally only want a way to enable and disable the checkbox for "Schedule enabled [ ]" (found under /settings)

Im using your script to monitor my connection because im alittle bit in trouble with my ISP.

Currently i start and stop your docker, which means i cant view stats when my pc is online... i need to start and stop it because when im online doing stuff i cant have a speedtest running while i do things (because im on LTE)

When all PCs are offline, i want your script to monitor the connection.

Thansk for your time and sorry for the whole confusion.

henrywhitaker3 commented 3 years ago

All you need to do is check/uncheck that box and click save. Instead of stopping the container, just uncheck the box and save

CurlyFlow commented 3 years ago

yeah, i understand that, but im asking your if you could gimme some sort of "/api/speedtest/sheduler/on" or "/api/speedtest/sheduler/off"

That way i can automate it.

henrywhitaker3 commented 3 years ago

Ah, I got you, yeah will add this in later today (sorry it's been so long)