Speedtest
- async OPNsenseClient.get_speedtest()
Return the latest and average Speedtest result summaries.
- Returns:
- Mapping with
availablepluslastand averagesections for download, upload, and latency. Latest results include server, date, and URL metadata. Averages include min, max, sample count, and period bounds. A 404 fromshowlogreturns{"available": False}in either mode. Withthrow_errorsoff, a 403, HTTP or transport failure, or undecodable JSON fromshowlogreturnsNone. A failed or missingshowstatread leaves average fields unset while preserving the latest result. Withthrow_errorson, either read raisesOPNsenseErroron failures other than 404.
- Mapping with
- Return type:
- async OPNsenseClient.run_speedtest()
Start a Speedtest run and return the raw run response.
- Returns:
- Response mapping from the Speedtest
run endpoint, or an empty mapping when the availability check finds the endpoint absent (404 in either mode), or a 403/transient HTTP or transport failure with
throw_errorsoff. Those failures raiseOPNsenseErrorwhen enabled. The run request is ungated, so its HTTP/transport failures, including 404, raiseOPNsenseErrorwhen enabled and return an empty mapping otherwise. Non-mapping JSON also returns an empty mapping. Undecodable JSON returnsNonewhen errors are disabled and raisesOPNsenseErrorotherwise.
- Response mapping from the Speedtest
- Return type: