Ixam97 / CarStatsViewer

MIT License
98 stars 54 forks source link

Odometer in HTTP API #193

Closed jschlyter closed 1 year ago

jschlyter commented 1 year ago

Would it be possible to add the current odometer value to the HTTP API? Together with batteryLevel this could be used to keep track of long term consumption.

Ixam97 commented 1 year ago

Sadly not. The odometer property ist protected with system privileges.

jschlyter commented 1 year ago

If some apps, e.g., Polestar Journey Log can read it, it ought to be connected to some sort of entitlement that can be discussed with the car manufacturer?

jschlyter commented 1 year ago

@Ixam97 we could post timestamp of manual trip reset, distance travelled during trip and energy consumed during trip. If one gather all these I believe one can calculate consumption without the odometer.

Ixam97 commented 1 year ago

The internal database already has all the data needed to calculate long time stats. It's just a matter of creating a sum. The Odometer is not needed for that (and also would be less percice since it's only a value in km). Consumption values from before the start of the database recording data obviously would not be available.

I'll look into it at some point.