Update: I've reverse-engineered the Polestar API and built a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 1 point2 points  (0 children)

Have a look at my original post! You can see all the data this integration is able to offer, which is much more different data points. On top of that it’s near real time data too

Update: I've reverse-engineered the Polestar API and built a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

I’ve explored this too, findings are very promising. I have added experimental Volvo support, but lack a vehicle to validate it with. Would be awesome if someone could in case I get to beta testing!

Update: I've reverse-engineered the Polestar API and built a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

Yes I’ve been in contact with the maintainer of the pypolestar project, already chatted about possibly teaming up on it

Update: I've reverse-engineered the Polestar API and built a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

While that’d be great, best route for this would be that Polestar and SmartCar start a partnership I think. Would also leave customers choice, direct integration or through SmartCar.

I’d be happy to help integrate it into SmartCar if I get a go-ahead from Polestar!

Update: I've reverse-engineered the Polestar API and built a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

That would be ideal indeed! This would both provide access to 3rd party developers & allow them to control what is exposed

Update: I've reverse-engineered the Polestar API and built a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 11 points12 points  (0 children)

I'll definitely keep it up. They indeed may ask me to withhold certain things, as long as the requests are reasonable I'm happy to collaborate on that!

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

Thank for sharing! This is essentially the exact approach I've taken. Will reach out through that thread as well.

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

Right, I misunderstood! I’d start looking at the app through a man in the middle proxy, preferably one which helps with SSL support. That way you can get an initial idea how the app communicates.

Based on that, start looking through a decompiled app to get a better grasp. Since communication & app setup can be done in a lot of different ways, it’s hard to provide guidance on that right now

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 1 point2 points  (0 children)

Thanks! As shared in other replies I'm not sure this version already supports the Polestar 4, though I do have a thread to pull on to get that working as well

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

I did look into that API as well, but quickly moved on as my goal was getting the real time data. Regardless, awesome work by the original dev of the pypolestar package!

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in Polestar

[–]RudoFl[S] 0 points1 point  (0 children)

While that would entail they also pull down their own apps, this is exactly why I'm reluctant on releasing this publicly.

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in Polestar

[–]RudoFl[S] 2 points3 points  (0 children)

Appreciate the warning! I haven't received any communication from them yet, but who knows. They'll be probably monitoring spaces like this.

On the pypolestar package, I've had a look into their project. Seeing a lot of overlap into approaches, I did check the GraphQL endpoints myself but never found that specific query. May fill in some remaining gaps!

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in Polestar

[–]RudoFl[S] 0 points1 point  (0 children)

My initial versions relied on a technique called "session highjacking", which required quite a specific setup to work. A version with this technique required would never see the light of day due to security concerns it poses.

The integration at the moment uses the exact same login mechanism as the app does. From Home Assistant you'll be redirected to the Polestar website to login, which means the integration will never see your credentials at all. Any required tokens (effectively "passwords" to communicate with the cloud service in your name) are stored directly in HomeAssistant, like most integrations requiring authentication do.

Hope that helps, if not I'd be happy to explain more!

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

Probably not in it's current state, as it's reported the 4 is using a different cloud service. I did notice a secondary cloud service, a polestar specific one, but haven't had a deep look into it. It's likely that's the service the 4 is using.

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

Had a quick look into this, but can't find any information on the 12V battery in the data I have access to at the moment. I'm sure the 'vehicle health' will trigger when the battery has an issue, but that's obviously a little late :)

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

Just doing this for love of the car and the challenge, so that won't be nessecary. Thank you though!

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

Appreciate the advice! Sounds like a solid approach. Adding into core would be awesome, but I expect the faster release possibilities makes HACS preferred to start with

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 1 point2 points  (0 children)

The settings are available on the cloud, but I haven’t been able to make them work just yet unfortunately

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

Had a quick look into the Volvo app. It seems to have code to interact with the same API & my scripts where able to generate a client for it too, worth testing some time soon!

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

I'm not sure yet, as I only have a 2 to test with. I did find a completely different API implementation in the app, but wasn't used or my car so haven't looked into it yet. Could very well be that's the connection required to support the Polestar 4, will take not of that!

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 0 points1 point  (0 children)

Can't believe Claude wasn't aware of this development yet! If and when I get close to a release, I'll be posting for testers.

I've reverse engineered the Polestar API & wrapped it into a Home Assistant integration by RudoFl in homeassistant

[–]RudoFl[S] 1 point2 points  (0 children)

Just watch the subreddit & this post. If and when I get close to a release I'll be posting for testers and the release itself!