hacf-fr / renault-api

https://readthedocs.org/projects/renault-api/
MIT License
106 stars 38 forks source link

[Discussion] Zoe (phase 1) no longer displays instantanousPower #1213

Closed oliv3r closed 3 months ago

oliv3r commented 4 months ago

Last week my car stopped connecting to the backend. Strangely enough, after driving for half an hour one day on Wednesday, I had a connection for a short while.

Having been offline for 5 days generally, I pulled the TCU fuse, and once backup, I had connectivity again. However since, I no longer have access to 'instantanousPower from the API. I only get

--------------  -----------------------
Battery level   61 %
Last updated    2024-06-05 09:01:20
Range estimate  194 km
Plug state      PlugState.PLUGGED
Charging state  ChargeState.UNAVAILABLE
Time remaining  85 min
Charge mode     always_charging
Total mileage   55822.0 km
--------------  -----------------------

Also, the ChargingState is always showing ChargeState.UNAVAILABLE.

Looking at this in more detail, I get the following json from the API.

Cockpit:

{'data': {'id': 'VF1AAAAA555777999', 'attributes': {'totalMileage': 55822}}}

battery status

{'data': {'id': 'VF1AAAAA555777999', 'attributes': {'timestamp': '2024-06-05T09:01:20Z', 'batteryLevel': 61, 'batteryAutonomy': 194, 'plugStatus': 1, 'chargingStatus': -1.1, 'chargingRemainingTime': 85}}}

hvac-status no longer produces anything, where the hvac history does show the start/stop times of hvac.

The official app doesn't have an update yet, but shows equally broken behavior. Starting HVAC still works (haven't checked HASS yet) as it shows in the logs, but I no longer get 'time until full' which is interesting, because we do still have the chargingRemainingTime in the response, but the app appearantly pukes.

Maybe it's just me, and the TCU reset caused it to go back to some old version (A/B firmware?) but it sounds weird for this to cause the API on the backend to 'change'.

The fact that the modem was online for a brief time, makes me think they changed something on their end. Either they rolled back something accidentally, or they are removing things from the app over time and removing the endpoints (to save cost?!?)

Unless everybody else still has fully functional API's (for the reneault Zoe ZE40), which means I'll have to get the TCU firmware looked at!

oliv3r commented 3 months ago

So I've been thinking, and if it's true, that renault removed this from their API and not an issue with my TCU; this would be a fix for the hass part anyway. Thinking outloud, whenever hass retrieves an update from the backend, get the time-diff from the last measurment, get the percentage-diff (and while not the range-diff), with that we know the 'instantanous' charge/range over the past period, e.g. %/minutes; km/minutes 60, for 'km/h added' and '%/hour' added; Finally, with the (user-configurable to adjust for reduced battery capacity if applicable) 41kW for example (my case of the Renault ZE40), we'd know roughly the w/h. So that would be three sensors.

I suppose one could do this 'manually' in HASS as well, but it feels to me it would be much nicer if the extension handles this mathy bit.

epenet commented 3 months ago

Closing this - as it's not fixable here.