FilipDem / Domoticz-BMW-plugin

Domoticz plugin working with BMW Connected Drive
4 stars 2 forks source link

no update since 5 days #12

Closed tsrz closed 2 years ago

tsrz commented 2 years ago

hi Filip,

is there a new sync issue witch bmw servers ? since 5 days no data for me, if i read the log, i see 429 Too many request :-(

log :

plugin

2022-06-11 08:50:25.684 Mini: (Mini) Login done! MyBMW object: MyBMWAccount(username='tsr@free.fr', region=<Regions.REST_OF_WORLD: 'row'>, config=MyBMWClientConfiguration(authentication=<bimmer_connected.api.authentication.MyBMWAuthentication object at 0x6f65ecd0>, log_response_path=None, observer_position=None, use_metric_units=True), vehicles=[]) 2022-06-11 08:50:25.592 Status: Mini: (Mini) Initialized version 3.1.0, author 'Filip Demaertelaere' 2022-06-11 08:50:32.046 Mini: (Mini) Pushing 'onHeartbeatCallback' on to queue 2022-06-11 08:50:32.096 (Mini) Processing 'onHeartbeatCallback' message 2022-06-11 08:50:32.096 Mini: (Mini) Calling message handler 'onHeartbeat'. 2022-06-11 08:50:33.064 Mini: (Mini) Login error: Client error '429 Too Many Requests' for url 'https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=120.0&appDateTime=1654930225747&tireGuardMode=ENABLED' 2022-06-11 08:50:33.064 Mini: (Mini) Finished handling task: Login. 2022-06-11 08:50:33.064 Mini: (Mini) Handling task: StatusUpdate. 2022-06-11 08:50:33.064 Mini: (Mini) Finished handling task: StatusUpdate. 2022-06-11 08:50:33.064 Error: Mini: (Mini) Error login in MyBMW for user tsr@free.fr and region rest_of_world.

with bimmerconnected (0.9.4, latest version)

root@raspberrypi:~# bimmerconnected status tsr@free.fr mypassword rest_of_world DEBUG:asyncio:Using selector: EpollSelector DEBUG:bimmer_connected.account:Getting vehicle list DEBUG:bimmer_connected.api.authentication:Authenticating with MyBMW flow for North America & Rest of World. DEBUG:httpx._client:HTTP Request: GET https://cocoapi.bmwgroup.com/eadrax-ucs/v1/presentation/oauth/config "HTTP/1.1 200 OK" DEBUG:httpx._client:HTTP Request: POST https://customer.bmwgroup.com/gcdm/oauth/authenticate "HTTP/1.1 200 OK" DEBUG:httpx._client:HTTP Request: POST https://customer.bmwgroup.com/gcdm/oauth/authenticate "HTTP/1.1 302 Found" DEBUG:httpx._client:HTTP Request: POST https://customer.bmwgroup.com/gcdm/oauth/token "HTTP/1.1 200 OK" DEBUG:httpx._client:HTTP Request: GET https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=120.0&appDateTime=1655104042940&tireGuardMode=ENABLED "HTTP/1.1 429 Too Many Requests" DEBUG:bimmer_connected.api.authentication:Sleeping 2 seconds due to 429 Too Many Requests DEBUG:httpx._client:HTTP Request: GET https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=120.0&appDateTime=1655104042940&tireGuardMode=ENABLED "HTTP/1.1 429 Too Many Requests" DEBUG:bimmer_connected.api.authentication:Sleeping 3 seconds due to 429 Too Many Requests DEBUG:httpx._client:HTTP Request: GET https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=120.0&appDateTime=1655104042940&tireGuardMode=ENABLED "HTTP/1.1 429 Too Many Requests" DEBUG:bimmer_connected.api.authentication:Sleeping 3 seconds due to 429 Too Many Requests DEBUG:httpx._client:HTTP Request: GET https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=120.0&appDateTime=1655104042940&tireGuardMode=ENABLED "HTTP/1.1 429 Too Many Requests" Traceback (most recent call last):

thanks for your help Fred

FilipDem commented 2 years ago

Hi,

Did you update to the latest version of the plugin and the bimmer_connected? !! take the latest version of bimmer_connected. There were quite some changes done as it switched to an asyncio library that had some problems with Domoticz. Finally works at my side since one month. I just checked and still got the today's update. Before switching to the new version, I had also from time to time the "too many requests" (caused by a change of the BMW API). Btw: the latest version of the plugin has some extra functionality. All can be found in the readme.

So my conclusion: switching to the lastest bimmer_connected and plugin should solve your problem.

Filip

tsrz commented 2 years ago

as you can see in the log i already have latest version of bimmerconnected and domoticz plugin sorry, just solved with configuration in the plugin 'Minutes between update' i set it to 5 minutes (before, it was 1 minute) thanks, you can close this issue

FilipDem commented 2 years ago

Are you sure you are using the latest domoticz plugin? In the log I see verions 3.1.0, while the latest version is is 3.2.1. 2022-06-11 08:50:25.592 Status: Mini: (Mini) Initialized version 3.1.0, author 'Filip Demaertelaere' (!! you also need the domoticz_tools.py) In my opinion it is really required to use the new plugin with the version 0,9,4 of bimmer_connected. The 5 minutes is indeed the standard value, however normally if you changed the value afterwards, I don't see no reason why it should go back to 5 minutes...