mitch-dc / volkswagen_we_connect_id

Apache License 2.0
200 stars 52 forks source link

Force Update or Update when Service is called #172

Open adriy-be opened 1 year ago

adriy-be commented 1 year ago

Is your feature request related to a problem? Please describe. Hi, that can be interesting to force an updating. For example, I take the app and edit some settings, I need to wait the update interval. Also, if I call a service like "start climate", the climate is updated when the update interval is reached. So how to know if the command is right received by the car ?

Describe the solution you'd like

t112013 commented 1 year ago

I completly agree. unless there is a way on how to "know" that changes will be updated ? like, there is no update button right now no ? In my case, when i plug the car i wait for the charger status to change to connected (i have two cars so i need to guess which car is connecting) so when the status from the charger changes to "car connected" (my easee charger is quite inmidiatly updating its value) then i wait for either car to update. We have one Tesla and one ID. Buzz, the tesla integration has a service to update o fetch data on demand, when you call that one (or press the button on the device page) the value upates super fast like latest after 15 sec uasually after 5. then if the tesla is connected i change the polling invertall to much shorter value since i know the car is connected and wont drain battery if the integration will polls more often. Can the polling values of this integration be changed? or how do we force update the sensors values ? Thanks

adriy-be commented 1 year ago

I tried some things from ha and app, I conclude the propagation time to the car is around 30 seconds. So the update interval is set to 30 seconds. @t112013 What is the time you need to wait to see the refresh of the value ?

t112013 commented 1 year ago

I more or less agree on 30 sec, but i havnt done anything anywhere, where can you edit the update intervall ? What my automation does is when the charger-box status changes to connected then i wait for one of the cars to change its charger value to connected so i guess the car that is connected, also i we cannot connect both cars at the same time.

adriy-be commented 1 year ago

@t112013 you can edit here: https://github.com/mitch-dc/volkswagen_we_connect_id/blob/main/custom_components/volkswagen_we_connect_id/__init__.py line 69

Here is more info about the update, it seems the car sends these updates every 10 mins, I am currently trying a small modification to change the update time to 15 mins without losing the update when we call a service.

adriy-be commented 1 year ago

A related PR : https://github.com/mitch-dc/volkswagen_we_connect_id/pull/72

t112013 commented 1 year ago

if you add a button or just a service to call, to update data then you can default it to 10 min if you ask me. How it is now is actually fine but i agree that sometimes, you dont need suck a shot time

mitch-dc commented 1 year ago

The data in de API is not that fast. There is a big delay in sending thr request (ex stop/start charging) and see it in the app or api.

It's not something a "force update" will fix. :(