[OH3] New Binding - Speedtest

For me its not working. I tested also newest snapshot with and without serverid.

Will sudo -u openhab /usr/bin/speedtest work for you?!

in that same vein su to whatever user openhab runs as and make sure you can run it.

Ah ok… I found the problem.
Need to accept License with user openhab, thx for help

.

1 Like

Thats weird, the license should be accepted on its own. I call speedtest with --accept-license which is supposed to work. Worked here on windows, openHabian, and a Linux box.

Glad you figured it out though!

Sorry, for asking this basic question.
How must this add-on be installed?
To be placed in /usr/share/openhab/addons/ ? Which owner? which permissions?
What must be done to have it available as binding in openhab?

Sorry I was confused by the UI in OH3 as the manually installed bundle does not appear neither in the list of installed nor in the list of uninstalled bundles.

I placed the jar in /usr/share/openhab/addons/, chowned to openhab:openhab.
Bundle got activated as verified with karaf:
244 │ Active │ 80 │ 3.1.0.202101180434 │ openHAB Add-ons :: Bundles :: speedtest Binding
Now I hope to get some values from it

Got it working. Great work!!!

1 Like

You did that all on your own, haha… glad you got it going.

Anyone have any features, comments, requests, or spelling mistakes that they see?

I am getting the following error is there some configuration I need to set?

You need to install the Ookla version of speedtest. Explained here :

Thank you

1 Like

I’m on it. Should have that done either tonight or tomorrow. Thanks for the feedback!

2 Likes

This will add in a trigger channel to allow you to manually do a speed test. I also added an item in the listbox for the refresh interval for “Don’t run”, in the event you want to schedule it via rules or something to run instead of the predetermined intervals.

@RGroll This should solve your issue.

https://github.com/bigbasec/openhab-addons/releases/download/v0.4/org.openhab.binding.speedtest-3.1.0-SNAPSHOT.jar

2 Likes

Thanks for that, looks fantastic! I’d gone the other way and converted the old DSL rule into Javascript in the MainUI, but I’ll replace it with the binding. Should be much neater.

1 Like

Thanks for this, @bhomeyer. I don’t really need it, but hey, why not? :wink:

For the refresh rate, could I suggest that you use a fill-in field instead of a dropdown list? That would provide maximum flexibility for users. I personally think you could drop minutes (more than once an hour seems like overkill) and just go with hours, though others might disagree. Of course, people can also just set it to “don’t run automatically” and use their own rules, so feel free to ignore this.

Here’s a decent icon in case anyone wants it.

I didn’t need it either, but well here I am using it. haha.

I could, but I wanted to be able to prevent people from putting “1”, or something silly and just killing their network bandwidth. Again, I was going to “drop in and go” and very little chance of screwing something up. I could also put a check in the code to check for things like this, but felt that it was easier to have the most common intervals there.

I did minutes because I figured some people might want it to be fast updating their charts and such, and some people might just want a daily. I could have done hours, but then that makes you have to do a rule to get it to go faster. Again, this was 100% with simplicity in mind.

Thanks for the input!

1 Like

I suppose if you never come close to your monthly data cap, you might as well run it every 15 minutes. :slight_smile:

I set it up for once a day, but I think I might change to a cron rule so that I know what time it’s going off at. I’d rather not have it fire up while I’m in a Zoom meeting.

1 Like

Actually, here’s a question for you: how is “Once per day” determined? Does the refresh rate reset every time you save the configuration or restart openHAB, meaning that changing to “Once a day” will trigger a speedtest exactly 24 hours after you save an edit or reboot the system? Or is the binding taking note of the last time it ran (including/excluding manual tests)?

It’s just a timer that is set when you start up the binding, nothing crazy fancy. I could schedule it differently, though I ran into a mild annoyance with that because I’d setup the binding and it wouldn’t run until that night, so it was hard to see what was going on and I didn’t want that to be confusing to anyone.

It is very simply binding loaded, test every “x minutes”. I guess if you want to go nuts and have it fire at specific times you can setup a rule and trigger it. For my needs it works as is. I’m open to suggestions without anything complicating the setup and use of it as that was and still is the main purpose.

I run one every hour here, but I’m on Gb internet and we don’t have data caps here in my part of the US. I really just run it that often for the cool graphs, lol… Grafana has an hourly graph to look cool, and I have a daily to see if for some reason my speed has been dropping off.

1 Like