iternio / ovms-link

14 stars 6 forks source link

Getting 404 trying to send data #6

Closed werdnum closed 1 year ago

werdnum commented 1 year ago

I've been trying to use the OVMS-ABRP integration.

I tried both the previous version on the OVMS website and the 'new' version. I did regenerate a new 'generic' token to replace the 'torque' token in between.

When I try to send data...

OVMS# script eval abrp.onetime()
(2022-12-20 15:03:27.000+11:00) INFO: Sending telemetry to ABRP {"utc":1671509007,"soc":99,"power":0.41,"speed":0,"lat":-33.XX,"lon":151.XXX,"is_charging":false,"is_dcfc":false,"is_parked":true,"kwh_charged":0,"soh":100,"heading":0,"elevation":154.3,"ext_temp":18,"batt_temp":20,"voltage":406,"current":0,"odometer":3672,"est_battery_range":436}
I (545228) ovms-duk-util: [lib/abrp.js:25:log] (2022-12-20 15:03:28.000+11:00) WARN: Non 200 response from ABRP {"statusCode":404,"statusText":"Not Found","body":"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The requested URL was not found on this server.</p>\n<hr>\n<address>Apache/2.4.41 (Ubuntu) Server at api.iternio.com Port 80</address>\n</body></html>\n","headers":[{"Date":"Tue, 20 Dec 2022 04:03:29 GMT"},{"Content-Type":"text/html; charset=iso-8859-1"},{"Transfer-Encoding":"chunked"},{"Connection":"keep-alive"},{"CF-Cache-Status":"DYNAMIC"},{"Report-To":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=%XX%XX%2BkL%XX%XX%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"NEL":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"Set-Cookie":"__cflb=XX; SameSite=Lax; path=/; expires=Tue, 20-Dec-22 05:03:29 GMT; HttpOnly"},{"Server":"cloudflare"},{"CF-RAY":"77c57d08fc5ea86b-SYD"},{"alt-svc":"h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"}]}

Same problem with the old version of the script.

mikeiimura commented 1 year ago

The 404 error is a new thing that just started this week. My last ABRP data was updated 4 days ago. I have been using the OVMS-ABRP integration for 8 months and this is the first time this issue has come up.

werdnum commented 1 year ago

I see, sounds like an ABRP server side issue. Hopefully they can get on it :)

werdnum commented 1 year ago

See https://abrp.upvoty.com/b/report-a-bug/live-data-upload-from-torque-no-longer-possible/

Edwintenhaaf commented 1 year ago

+1 Same issue here Upload via browser with same data works.

iternio commented 1 year ago

Sorry, we upgraded our web server configuration and dropped support for non-SSL API calls. Now fixed!

mikeiimura commented 1 year ago

Thanks for the fix. My data started updating immediately since it was actively charging at the time.

Edwintenhaaf commented 1 year ago

Sorry, we upgraded our web server configuration and dropped support for non-SSL API calls. Now fixed!

thx for the fix but .... Why not change 'http://api.iternio.com/1/tlm/send?api_key=' + to 'https://api.iternio.com/1/tlm/send?api_key=' + Seems to work fine.

iternio commented 1 year ago

Our API is normally only used with SSL (https://) - I assume the non-SSL http used here is only for legacy reasons and other telemetry methods which do not support SSL. Feel free to switch to SSL.

jason-abrp commented 1 year ago

If you want to submit a pull request with that change, I'm happy to approve.