That doesn´t work
It´s still in seconds.
Number spdPing "Ping [%.2f ms]" {channel="speedtest:speedtest:binding:pingLatency"}
Item 'spdPing' changed from NULL to 0.008957000000000001
Hmm. Thanks @MikeTheTux - those are the instructions I followed - but let me give it another go over the weekend.
Some progress.
I’ve got the right version installed now
Speedtest by Ookla 1.2.0.84 (ea6b6773cf) Linux/x86_64-linux-musl 5.15.0-82-generic x86_64
The official command line client for testing the speed and performance
of your internet connection.
and when i run /usr/bin/speedtest -f json I get a response. I also get a successful response when I run /usr/bin/speedtest -f json --accept-license --accept-gdpr
In OpenHab (v4.0) I can trigger Speedtest_TriggerTest and my logs say
2023-09-02 18:44:14.283 [DEBUG] [.speedtest.internal.SpeedtestHandler] - handleCommand channel: speedtest:speedtest:myspeedtest:triggerTest command: ON
2023-09-02 18:44:14.286 [DEBUG] [.speedtest.internal.SpeedtestHandler] - Getting Speed Measurement
2023-09-02 18:44:14.290 [DEBUG] [.speedtest.internal.SpeedtestHandler] - Passing to shell for parsing command.
2023-09-02 18:44:14.294 [DEBUG] [.speedtest.internal.SpeedtestHandler] - OS: *NIX (Linux)
2023-09-02 18:44:14.296 [DEBUG] [.speedtest.internal.SpeedtestHandler] - The command to be executed will be ‘[sh, -c, /usr/bin/speedtest -f json --accept-license --accept-gdpr]’
but that’s it. No other logging and none of the items are updated (they remain NULL).
The Thing is ONLINE?
During initialization the binding perfoms a version check:
speedtest -V
Do you see a “Speedtest Version: ...
” line during init in the logs? Type DEBUG.
I see this
2023-09-03 11:38:04.711 [DEBUG] [.speedtest.internal.SpeedtestHandler] - Passing to shell for parsing command.
2023-09-03 11:38:04.712 [DEBUG] [.speedtest.internal.SpeedtestHandler] - OS: *NIX (Linux)
2023-09-03 11:38:04.714 [DEBUG] [.speedtest.internal.SpeedtestHandler] - The command to be executed will be ‘[sh, -c, /usr/bin/speedtest -V]’
…but nothing else.
Which version of the Binding / which OH version are you using?
Can you post your item status from the rest API:
{
"link":"http://nas:8080/rest/items/Speedtest_Ping",
"state":"5.822 ms",
"stateDescription":{
"pattern":"%.2f ms",
"readOnly":true,
"options":[
]
},
"unitSymbol":"ms",
"metadata":{
"unit":{
"value":"ms"
},
"semantics":{
"value":"Point",
"config":{
"isPointOf":"Speedtest"
}
},
"stateDescription":{
"value":" ",
"config":{
"pattern":"%.2f ms"
}
}
},
"editable":true,
"type":"Number:Time",
"name":"Speedtest_Ping",
"label":"Ping",
"category":"",
"tags":[
"Point"
],
"groupNames":[
"Speedtest",
"gPersist"
]
}
openHAB 3.3.0
org.openhab.binding.speedtest 3.4.0.202212030850
{
"link": "http://<local>:8080/rest/items/spdPing",
"state": "0.008398999999999998",
"stateDescription": {
"pattern": "%.2f ms",
"readOnly": false,
"options": []
},
"editable": false,
"type": "Number",
"name": "spdPing",
"label": "Ping",
"tags": [],
"groupNames": []
}
Edit: Changing the type to Number:Time
fixed it
@AndyH_UK, is the sh
shell available? What happens if you call sh -c "/usr/bin/speedtest -V"
on the console?
@MikeTheTux
I get this -
andy@server$ sh -c “/usr/bin/speedtest -V”
Speedtest by Ookla 1.2.0.84 (ea6b6773cf) Linux/x86_64-linux-musl 5.15.0-82-generic x86_64The official command line client for testing the speed and performance
of your internet connection.
Does speedtest binding work with OH 4.1?
Sure. There is an official openHAB Binding for Speedtest in OH4.