I downloaded the .tgz for Linux now, extracted it and placed it for testing purposes into my openHAB folder assuming I have chosen the right .tgz version. I am not 100% sure which one I have to choose for my NAS after some research.
/docker/openHAB/speedtest mounted to /speedtest:
But still the thing is not able to find the executable. Which is placed in that folder. execPath: /speedtest
Pretty sure it is an easy fix but I need to dig deeper. As usual
I am wondering what happens on a Synology NAS system in the switch case statement evaluating the operating system:
Ah crap came too late. Yes the binding is looking for the executable in a specific location, you you can’t mount it to /speedtest, but instead to the whole path.
Synology DS918+ runs a Intel Celeron J3455 CPU. ookla-speedtest-1.2.0-linux-x86_64.tgz should be the right one for your docker installation. Don’t forget to extract the *.tgz.
I am wondering what happens on a Synology NAS system in the switch case statement evaluating the operating system
Linux.
Therefore it’s using /usr/bin/speedtest as a default (if not configured / configuration empty).
If /speedtest is a directory (mounted from directory /docker/openHAB/speedtest) and the executable in the docker is /speedtest/speedtest, you need to configure /speedtest/speedtest in the binding. Could this have been the problem in your case?
Always make sure that the speedtest program is executable from the user that runs openhab in the docker. The latest version of speedtest should report an issue if this is not the case.
Any clue how I can use the Speedtest_Download_Bandwith in a rule comparing it to a threshold?
I will do something like this but I am struggling with the if-statement. I have read the UnitOfMeasurement documentation but was not able to find anything for actually comparing the different QuantityTypes/UoM to other values.
rule "Send an email when downstream < 300"
when
Item Speedtest_Download_Bandwith received update
then
if (Speedtest_Download_Bandwith.state <= 300.0) { // this is broken
// send an email
}
end
In DSL something like the following should do the trick:
val Double downloadBandwith = (Speedtest_Download_Bandwith.state as QuantityType<Number>).toUnit("Mbit/s").doubleValue
if (downloadBandwith <= 300.0) {
// send an email
}
Thank you for this, its working great for me (openHAB in Docker on Synology).
The only thing that throws me off is Speedtest_TriggerTest. After setting the switch ON Speedtest runs as expected but leaves the switch on which seemed a little confusing to me. I tried using a one second expire on the Item but that caused the speedtest to run a second time as soon as the first run finished…
Perhaps the binding could set Speedtest_TriggerTest OFF at the end?
You are right. The binding reacts on any command (ON or OFF) on that channel.
In addition it does not reset the switch to OFF.
I will update the binding and let you know once done.
The speedtest related repo seems to have a problem.
There is no release file that needs to be downloaded by the update command.
This release file is required to tell your package management where to get a package from.