[Ovmsdev] Historical data download tool
Michael Balzer
dexter at expeedo.de
Thu Jul 15 18:48:04 HKT 2021
Users are having issues downloading CSV telemetry data from the
openvehicles.com server.
On my server, CSV tables can be downloaded directly from the vehicle
page. Unfortunately I cannot provide a similar feature for the Drupal
module, as I've never used Drupal.
As a workaround I have implemented a simple download tool for other servers:
https://dexters-web.de/downloadtool
The tool uses the HTTP(S) API, and adds known headers automatically.
Forum thread: https://www.openvehicles.com/node/2832
FYI: the JSON to CSV step is done using "jq":
curl -s -X GET -b $(_tmpdir)/.cookiejar
"$(_server2)/api/historical/$(URL:_vehicleid)/$(URL:_type)" \
| jq -r 'map([(.h_timestamp|tostring), (.h_recordnumber|tostring),
(.h_data|tostring)] | join(",")) | join("\n")'
Regards,
Michael
--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20210715/fc9fe8ad/attachment.sig>
More information about the OvmsDev
mailing list