I’ve been using Home Assistant for a couple of years, and Last week a bought a Polestar 2.
My previuous EV was a Hyundai Ioniq that does not have any app or other means to read the SOC. But I used evNotify to read the status and feed the battery status to both Home Assistant (using REST API sensor) and to ABetterRoutePlanner.com(ABRP) to get better planning for my road trips.
ABRP is also one of the few “native” Polestar apps, and when I log in on the web-page, I also see the SOC that ABRP has recorded. SO it got me thinking. Why not fetch SOC from ABRP.
If I debug the connection in firefox, I can see that through ABRP, I log in to the api at iternio.com: https://api.iternio.com/1/session/user_login
then https://api.iternio.com/1/session/get_tlm
which gives me
I’ve been testing with connecting my Polestar to Home Assistant using the google integration.
However, I cannot find a way to bypass voice match verification.
service: google_assistant_sdk.send_text_command
data:
command: "Are my polestar windows open?"
With the new Home Assistant App for polestar I’m capable of getting the cars location and speed. I do have a challenge though as the information is dependent of the actual user (driver). As such I have installed the app on the two users who are using the car the most (third one will be added along the way). Meaning that I have multiple device trackers for the car
The location and attributes are updated when the car is moving and shortly after. As such I need to get the last updated of the two (or more) device_trackers. The speed is calculated as
You could create an automation that is triggered by a state change of the device tracker attribute you are looking at and then store the value in an input_number as ‘last updated’?
Thx - that helps for the speed and direction.
Any guidelines for the location (to display in a Lovalace map) currently the car is shown two locations (last location of either user) - a thought would be to have conditional cards, but that limits the history of the cars position.
Ah. I take it you cannot just create an additional device tracker to display. But, is it possible to update the attributes from one device tracker with the data from another? Then you could make an automation to do that.
Trigger with a state of the device_tracker.polestar_anna and then let device_tracker.polestar_morten be equal to device_tracker,polestar_anna.
Once installed, it will run in the background, just like the app on your phone. You might have to change the settings in the app though - I cannot remember, as I just installed the app and then adjusted it like I do a phone, which was auto pilot (I change phones a LOT).
The app works well in my Polestar, but it does have some quriks, which I think are due to the way that the Polestar is using Android, rather than the app.
Location Updating - I cannot get it to do real time. I have tried lots of settings and the shortest it will do is about every two minutes. We have all seen the warnings about battery life for the app on a phone, so I ignored/reversed the settings, but it made no difference.
Location again - HA rarely shows the exact location of where the car was last. Right now, my car is reported about 300 yards away and a speed of 8mph, even though it has been on the drive for the last two hours. I think this is because the Polestar shuts down Android immediately, so there is no chance for HA to update the location. I can work around it by detecting it is at home in other ways, but still annoying.
Battery charge reading - real pity the app cannot see how much the car is charged, which is probably the biggest thing I would like to be able to integrate. Limitation of the system I guess.
Car in use - I haven’t found a way to reliable know the car is in motion (like engine on with a regular car). I thought it was Android Auto On, but that seems be the actual OS when the car goes in to deep sleep after a few days. For the navigation issue noted above, I cannot use speed as the indicator, plus it would false positive if sat at traffic lights or in a jam.
I like the speed template above, fortunately I had similar code already - @motionist you might want to post the actual code, rather than an image for others to use. Anyone else got anything interesting they have done with the app and their Polestar?
Of course the app was not intended for any of this. It is to access your HA installation. Unfortunately it is not very good for that either, using the Vivaldi browser is much better.
I managed to get the latest GPS coordinates for either of my profiles combined using the following action (when updating speed, altitude and course) - note that the individual device tracker is to be used for each automation:
It is in the beta release in Play now, but the only problem is that with that version the possibility to go into “native” mode to get to app settings has disappeared. So the sensors cannot be enabled as of now, waiting excitingly for a new beta to be released.
Now I’m confused… Just checked and compared the apple Vs android settings and not just didn’t had the Apple app no update since 4 month, but it has no sensors to select for cars etc…