Closed OverZealous closed 2 years ago
Same here
I have the same error. I'd reported it in issue #28, but closed that as a duplicate.
This is not specific Home Assistant 2022.11.1. I'm still running 2022.7.7.
v0.5.1 is not working for me so far -- API errors similar to the above.
I manually downgraded the rivian-python-client
package to the prior release (0.0.1a5) and reverted the version requirement in manifest.json
, and it started working again, so I suspect there may be an issue with v0.1.3 of the underlying Python package.
Just noticed that v0.1.4 has been published. I tried that one as well, but it isn't working for me either.
Sadly, I'm still seeing the error, too, even after removing and re-adding the integration.
One thought I had is possibly the client ID/secret we have isn't valid anymore, but I've only ever found the one pair.
The issue for me is pretty clearly the underlying Python package. If I edit manifest.json
to hardcode rivian-python-client==0.0.1a5
, everything works. If I allow the integration to install a subsequent version of the package (e.g., 0.1.3 or 0.1.4), the integration is unable to access the API.
{
"domain": "rivian",
"name": "Rivian (Unofficial)",
"config_flow": true,
"documentation": "https://github.com/bretterer/home-assistant-rivian",
"requirements": [
"rivian-python-client==0.0.1a5"
],
"codeowners": [
"@bretterer"
],
"iot_class": "cloud_polling",
"loggers": [
"rivian"
],
"version": "0.5.1"
}
I haven't had time to do a deep dive, but quickly comparing the source code of 0.1.3+ of rivian-python-client
with 0.0.1a5, I believe line 250 is the source of the issue:
async def get_vehicle_info(
self, vin: str, access_token: str, properties: dict[str]
) -> dict[str, Any]:
"""get the vehicle info"""
url = CESIUM_BASEPATH + "/vehicle/latest"
headers = dict()
headers.update(BASE_HEADERS)
headers.update({
"Authorization": "Bearer " + self._access_token,
})
When I revert the change to line 250 by changing self._access_token
back to access_token
and rebuild the Python package, the integration starts working again.
Edit: Oops, I see that @tmack8001 has already submitted a PR for this upstream. I believe that PR will resolve the issue, at least for me.
Yes, that is right @krazos that is the error and was a mistake on my part in adding some new endpoints and structure for reuse with the graphql endpoints we will be migrating over to.
Talking with @jrgutier and @bretterer we should lock the version of the python-client and only release updates to the HA integration when intended vs getting these changes reflected auto-magically since the python-client for the most part is stable now.
Grateful for the work you all have done to date, and excited to see how this project grows and develops. It looks like the new endpoints may return some additional data, including more granular charging data from the Rivian wall charger. Looking forward to that!
Looks like we may have a fix for this with the integration 0.5.2. Please update and it should be resolved
Confirming that all is well on my end with 0.5.2. Thanks!
Works for me, too! I'll close this out, thank you all!
My integration has been stuck in a loop since I upgraded to
2022.11.1
. It's possible this was a coincidence, but I haven't tried rolling back yet. The integration was working up until I rebooted after the core update.The error in the logs is: