Update Vehicle status with MyBMW (new API) #343
-
Hi @rikroe! First of all a big thanks! I want to get regularly updates, but perhaps it is not useful to start the complete authentication phase as long as the token is valid. And I see that this can only be done by using the function _get_vehicles(). Seen the underscore it is normally an internal function however I would suggest to make a public one so that it can be called directly. Moreover the function _get_vehicles() cannot be used as it appends always all vehicles to the list... So the list gets bigger and bigger with same vehicles... Therefor another public function to get just the new update vehicle information would be nice. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi Filip, I was thinking about your issue again and have a question: How are you integrating it into Domoticz? Are you just calling our CLI? If so, I could imaging adding a global parameter to the CLI that stores token & token expiry to a file (that you could put wherever needed) and that of course could be loaded each time before making any other calls. |
Beta Was this translation helpful? Give feedback.
-
Hi, I am not using the CLI, but the python APIs... The complete documentation/instructions for Domoticz can be found at Domoticz Plugin. But thanks again for the work and the suggestion to help. Filip |
Beta Was this translation helpful? Give feedback.
-
If I understand your code correctly, you are storing As all other functions are executed from So basically, everything should be all right? There was the issue with |
Beta Was this translation helpful? Give feedback.
-
Indeed this is all solved and is working very well. |
Beta Was this translation helpful? Give feedback.
Hi, I am not using the CLI, but the python APIs...
You can find the implemenation on plugin.py. Mainly the function
handleTasks
andupdateVehicleStatus
are using the APIs... So recreation of the tokens is managed by the bimmer_connected as far as I understood.The complete documentation/instructions for Domoticz can be found at Domoticz Plugin.
But thanks again for the work and the suggestion to help.
Filip