Managed to figure out the authentication flow which took me quite a few hours! I will document this properly tomorrow.
I’ve just plugged my car in and taken a look at the data whilst it’s on charge:
I’ve not written a Home Assistant component before, but if someone does I hope this helps. I will probably use this module to write something that just spits the car data out over MQTT.
Thank you for your work!
I had the beta version when it worked, until it didnt…
i updated to 1.0.4. After entering login credentials i get an unknown error, Unexpected error creating api.
I did delete the whole integration from hacs, and a second, third and forth time i tried manually delete from file explorer and hacs and different combinations. Older versions give the same error.
How do I delete the old settings so i can start off fresh?
Hello
I have just installed the HACS integration and have not used it before.
I can log in on the Polestar website, but the HA integration is also returning Unknown Error with me.
I have really nåbeen looking forward to this integration as I have just picked up my Polestar 2
if you see in the log, do you see the reason for the error?
on the latest beta version, there is more logging added to troubleshoot. maybe add the log or put your issue in the gitlab issue for better followup
Fantastic! I now have data from my Polestar from three sources, from the HA AAOS app (although I think that broke recently), from Tibber EV and now from the Polestar API. The latter two both thanks to @leeyuentuen. Thank you indeed!
While charging, ‘charging current’ and ‘charging power’ remain “Unknown”, and ‘charging time’ just sits at “240 minutes” for me. Is that just me?
When I first started the integration ‘Model’, Vehicle registration’, and ’ VIN’ showed correctly very briefly, ever since they just show ‘Unknown’. Is that just me?
And, can I make a few suggestions:
The unit for energy consumption should be “kWh/100km”.
“Average Speed Per Hour” is weird, should be “Average Speed” with the unit “km/h”.
“Odometer Meter” should be just “Odometer”
Default odometer number of decimals should probably be 0
Generally the capitalization of the friendly names is inconsistent.
To clarify some of my own queries after finishing a charge:
The ‘Charging time’ shows the estimated time to finish the charge, first at a resolution of hours (60 min) and then at a higher resolution (first 15 and then 5 min) towards the end of the charge. Makes sense.
The ‘Model’, ‘Registration’ and ‘VIN’ showed up correctly a few times just after installing the integration, but then never again. Don’t know what’s up with that.
The API seems to be a bit flakey and goes up and down a lot, but isn’t detected. If you find a lot of unknowns for the sensors etc, then just reload the integration and it will pull the information in.
I have seen the information go quickly as well, the API token expiry time is usually old, so it hasn’t refreshed correctly.
thanks for review. There are already few beta changes in the last 24 hours,
can you take a look at this version: Release 1.2.9 · leeyuentuen/polestar_api · GitHub
and see if the issue still exists.
Also some comments from you above should also changed.
if there is still some issue, just open an issue ticket on github for better follow-up
i have tried to catch the exception (timeout, read errors) to make sure that we don’t need to reload the integration. if you still have the issue on the latest beta, just create an ticket with the log that you have, so i can investigate and prevent this issue happend again.