Jump to content

Recommended Posts

Alfred Wifi Speedtest

Alfred Wifi Speedtest is a workflow for Alfred 4, that uses speedtest-cli and reports back in a notification the upload/download speeds of the current wifi you're on.

 

alfred-speedtest-results.thumb.png.a32810a55cb6ba188848d82aaaf76d12.png

 

Why?


Since COVID hit, my wifi speeds have plummeted (Verizon cap/bottleneck maybe?). I hate needing to google for a wifi speedtest every time I have to check if my wifi speed will be good enough for the call I'm about to join. I have to open another tab, ads clutter my screen while running the speedtest, and it's one more thing cluttering my screen. This workflow makes a wifi speedtest just an alfred keyword away.

 

Important

You will always find the latest version, changelog and updated documentation on GitHub as is difficult to use the forum to keep track of updates and support. 

 

Download


Download directly from Github releases page, make sure to download the latest release. Download here.

 

Installation Instructions

After downloading the workflow from the release page, be sure to install the wifi speedtest-cli using the command below

 

brew install speedtest-cli

 

Then, simply run the Alfred workflow by summoning Alfred and typing speedtest.

 

This is my first real contribution to any sort of open source community so suggestions are welcome! I thought about adding automatic updates, but figured something is better than nothing to start and I can iterate on this if people have suggestions/feature requests. Thanks in advance for any suggestions to improve this workflow!

Link to comment

Nice job. Works well.

 

16 hours ago, mmroczka said:

This is my first real contribution to any sort of open source community so suggestions are welcome!

 

Generally, you should put the source code of the workflow (i.e. the unzipped workflow) in the GitHub repo, not the packaged workflow.

 

git/GitHub are for source code (i.e. text files), and most of their features (diffs, pull requests) just don't work on binary blobs.

 

Also, for your download link, you can use https://github.com/mmroczka/alfred-speedtest/releases/latest, which will always point to the latest version, so you never have to update the link when you publish a new version.

 

The way you’re calling speedtest-cli also seems a bit odd. Is there are reason you don’t just run /usr/local/bin/speedtest-cli?

Edited by deanishe
Link to comment
  • 2 months later...
  • 4 weeks later...
On 6/9/2020 at 12:51 AM, mmroczka said:

Alfred Wifi Speedtest

Alfred Wifi Speedtest is a workflow for Alfred 4, that uses speedtest-cli and reports back in a notification the upload/download speeds of the current wifi you're on.

 

alfred-speedtest-results.thumb.png.a32810a55cb6ba188848d82aaaf76d12.png

 

Why?


Since COVID hit, my wifi speeds have plummeted (Verizon cap/bottleneck maybe?). I hate needing to google for a wifi speedtest every time I have to check if my wifi speed will be good enough for the call I'm about to join. I have to open another tab, ads clutter my screen while running the speedtest, and it's one more thing cluttering my screen. This workflow makes a wifi speedtest just an alfred keyword away.

 

Important

You will always find the latest version, changelog and updated documentation on GitHub as is difficult to use the forum to keep track of updates and support. 

 

Download


Download directly from Github releases page, make sure to download the latest release. Download here.

 

Installation Instructions

After downloading the workflow from the release page, be sure to install the wifi speedtest-cli using the command below

 

brew install speedtest-cli

 

Then, simply run the Alfred workflow by summoning Alfred and typing speedtest.

 

This is my first real contribution to any sort of open source community so suggestions are welcome! I thought about adding automatic updates, but figured something is better than nothing to start and I can iterate on this if people have suggestions/feature requests. Thanks in advance for any suggestions to improve this workflow!

When I use the command line:

brew install speedtest-cli

 

I get this error:  

brew: command not found

 

 

Link to comment
  • 1 month later...
  • 8 months later...

Can't get notification cause of this error. Need help

[12:48:42.658]
Logging Started...

[12:49:02.656] Speedtest[Keyword] Processing complete

[12:49:02.657] Speedtest[Keyword] Passing output '' to Run Script

[12:49:02.658] Speedtest[Keyword] Passing output '' to Post Notification

[12:49:03.016] ERROR: Speedtest[Run Script] Traceback (most recent call last):

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 2000, in <module>

    main()

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 1986, in main

    shell()

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 1875, in shell

    secure=args.secure

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 1091, in __init__

    self.get_config()

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 1174, in get_config

    map(int, server_config['ignoreids'].split(','))

ValueError: invalid literal for int() with base 10: ''

[12:49:03.022] Speedtest[Run Script] Processing complete

[12:49:03.023] Speedtest[Run Script] Passing output '' to Post Notification

Link to comment

Yeah for M1 Macs the script should be 

 

/opt/homebrew/Cellar/speedtest-cli/$(ls /opt/homebrew/Cellar/speedtest-cli | grep "." | sort -V -r | head -n 1)/bin/speedtest | grep "Download\|Upload"

 

I don't know shell well enough to fix it with a check in terminal for processor. Sorry.

Link to comment
  • 1 month later...
On 7/15/2021 at 11:51 AM, genosse said:

Can't get notification cause of this error. Need help

[12:48:42.658]
Logging Started...

[12:49:02.656] Speedtest[Keyword] Processing complete

[12:49:02.657] Speedtest[Keyword] Passing output '' to Run Script

[12:49:02.658] Speedtest[Keyword] Passing output '' to Post Notification

[12:49:03.016] ERROR: Speedtest[Run Script] Traceback (most recent call last):

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 2000, in <module>

    main()

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 1986, in main

    shell()

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 1875, in shell

    secure=args.secure

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 1091, in __init__

    self.get_config()

  File "/usr/local/Cellar/speedtest-cli/2.1.2/bin/speedtest", line 1174, in get_config

    map(int, server_config['ignoreids'].split(','))

ValueError: invalid literal for int() with base 10: ''

[12:49:03.022] Speedtest[Run Script] Processing complete

[12:49:03.023] Speedtest[Run Script] Passing output '' to Post Notification

I got that error too. I solved updating speedtest-cli, just with the command 

brew install speedtest-cli

 

Link to comment
  • 1 month later...

I can't get it to run on my M1 MacBook Air.  I'm sorry, the home-brew stuff is a bit new to me.  I'm confident I installed it and have run the brew command and linked my speedtest-cli

 

When I debug Alfred I get this result:

 

[12:45:01.363] Logging Started...

[12:45:11.629] Speedtest[Keyword] Processing complete

[12:45:11.631] Speedtest[Keyword] Passing output '' to Run Script

[12:45:11.631] Speedtest[Keyword] Passing output '' to Post Notification

[12:48:03.048] Speedtest[Run Script] Processing complete

[12:48:03.053] Speedtest[Run Script] Passing output 'Download: 0.00 Mbit/s

Upload: 0.00 Mbit/s

' to Post Notification

 

Thank you for any help.

 

- Rich

Edited by richhudak
Link to comment
  • 2 months later...

hi guys, everything worked great until 2 days ago when it stopped notifying the result. The debug mode shows this error: is it script's fault or api?

hope you can help, this workflow was really useful

 

[21:05:27.796] Logging Started...
[21:05:38.633] Speedtest[Keyword] Processing complete
[21:05:38.636] Speedtest[Keyword] Passing output '' to Run Script
[21:05:38.637] Speedtest[Keyword] Passing output '' to Post Notification
[21:05:48.855] ERROR: Speedtest[Run Script] Cannot retrieve speedtest configuration
ERROR: <urlopen error timed out>

[21:05:48.860] Speedtest[Run Script] Processing complete
[21:05:48.861] Speedtest[Run Script] Passing output '' to Post Notification

 

 

Link to comment
  • 2 weeks later...
6 hours ago, Archenemy said:

However no notification.

 

Have you granted Alfred permission to show notifications? Open System Preferences > Notifications > locate Alfred 4 and check that you have notifications allowed and banners or alerts on, as per your personal preferences.

 

Cheers,
Vero

Link to comment
8 hours ago, Vero said:

 

Have you granted Alfred permission to show notifications? Open System Preferences > Notifications > locate Alfred 4 and check that you have notifications allowed and banners or alerts on, as per your personal preferences.

 

Cheers,
Vero

That did the trick. Thanks!

Link to comment
  • 10 months later...

i had problems with path to the installed speedtest-cli, fixed with replacing all the path-estimation part.

 

steps to follow:

1. install speedtest-cli with homebrew (as shown in instruction to this script)

2. in terminal enter: `which speedtest-cli` (without quotes). The output is the path to where your homebrew installed the cli-tool.

3. copy the output and paste in script before the part with grep (don't remove the pipe |, it chains the commands in terminal, so you need it).

 

my shortened script looks like this:

 

/opt/homebrew/bin/speedtest-cli | grep "Download\|Upload"
Edited by mhorn
replaced "script" in 2. with "cli-tool" for more clarity
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...