Integration of Polestar 2

My Polestar arrives tomorrow. I think a Home Assistant add-in would be brilliant as it appears there are lots of available datapoints going to the Polestar app, plus of course control options back to the car.

Automation 1: If outside air temp below 8 degrees C, and time after 6:00am and before 7:00 am warm up drivers seat and turn on heating to 21 degrees.

Then step into a warm car on the morning commute at 6:30

1 Like

I’m all in on Home Assistant and I have 32,000 km on my Polestar. Needless to say I can’t wait for an integration.

Afraid I can’t help much with the development though. Keeping an eye on this thread.

1 Like

I would love an integration for the Polestar App.
The need is growing indeed.

1 Like

Same here, Polestar 2 on order and will be delivered Q4.
Really like to run an integration in HA.
Once arrived, I might help with iPhone and analysis.

1 Like

We’ve had our P2 for 5 months. I thought I had figured out a way to track the car’s presence with UniFi, but it turned out the random MAC I was seeing was my partner’s Apple Watch with privacy turned on.

The car really really does not like to connect to WiFi, and I think it might also profile dependent, so when you lock the car, I don’t think it even tries to establish a WiFi connection at all. This is just to be able to track its presence in my case.

It would be great if we could pull information into HA. These days you even get parking location in the Polestar app, so that could be used to detect if the car is at home.

I bought an Emporia EVSE that does the charging automations I wanted. You can add a $30 dongle that talks to the meter over Zigbee (in supported markets) and with it you can do things like charge using excess Solar energy, or track TOU rates automatically and charge when it’s cheaper. Someone made an Emporia integration that would allow other controls via HA.

I can pull the actual charging rate, status and total kWh consumed from the EVSE, so I have a dashboard that can show all that data. Seeing the battery level would be a nice addition.

I have this going in my HA, but still missing the car’s current battery level.

Has anyone had a chance to do more sniffing?

3 Likes

Did you ever get any joy with this?

My Polestar order is theoretically arriving in February but with how things are, no idea if it will get delayed again.

image

I managed to get information into Home Assistant from Tasker using AutoInput. It’s not the right solution, but this seems to be the only way to make this work as of today. I only got this working in one direction. I haven’t tried making things happen from Home Assistant through Tasker on the Polestar app.

AutoInput has an UI Query feature that can pull information from a screen. My task looks like this:

  • Launch Polestar App
  • Wait 10 seconds (the Polestar app can be very slow to update, especially the first time)
  • AutoInput UI Query
  • Clean up Variables by removing the % from the battery percentage and “Range” “.0 miles” from range so tha they are a valid integer
  • Send value to Home Assistant variables using HA call-service (uses an HTTP post with an API key. Info here)

Pulling the Lock and Climate state can be done the same way, but it seems the output of the app differs when Locked vs Unlocked and Off vs Active. The values aren’t always pulled correctly, so it needs some tweaking.

I thought about maybe running this on an old Pixel, but, it really isn’t worth that much effort because it will break when the app can’t talk to the car and needs to be force closed (which I have to do very often). So this is more of a Proof of Concept

edit: added details about how this is done

3 Likes

Well done . That is a major step forward. Can you elaborate on how that works please. Thx.

Thanks. I added more details to my post above

1 Like

Something like this …

YES -that`s what i really like to see in my HA :blush:

It works for the Fiat 500e now. Still a bit work in progress.

But at least now I can determine which car is charging. When the charger changes to ‘Charging’, I query the Fiat to check if it is connected to the charger, if so it’s the Fiat, if not it’s the Polestar (or a guest …).

Can’t compare the Fiat with the Polestar, but when it comes to ‘satisfaction’ 100x better than the Polestar.

But this is the feature request for Polestar, not for Fiat

Now that the Polestar works with Google assistant, can we integrate it in Home Assistant?

I had never looked into how Google Assistant integrates with HA, but it doesn’t look like you can query information from Google Assistant into HA.

I added the car to my Google Assistant and I can ask GA to get me things like Charge Level, Door Lock and Window Status, Climate Control Status. I can also ask it to lock/unlock the car, and start/stop climate control. Not sure if I can roll down the windows.

I found a reference to an Assistant Relay project that would allow you to send commands to Google, and I assume you could read the response back, but the dev that created it stopped updating almost 3 years ago. GitHub - greghesp/assistant-relay: A Node.js server that allows for sending commands to Google Home/Assistant from endpoints

I might be able to use Tasker on my phone for this in a more reliable manner than AutoInput to read the data from the Polestar app.

Just as information.
The Swedish electricity provider Tibber is now able to read battery status through Polestars API in their app.

First a login to Polestars API (I guess)
Authorize the request of “vehicle state”
See your battery state

As a new user I could only post one image

Maybe someone can monitor what happens? how they do it?

They announce it here: Smart charge your Polestar with Tibber | Tibber Support Center

Apparently, this is coming… Is that another shot we have at integrating with HA?

Since HA 2023.1 we can use google_assistant_sdk.send_text_command to send commands to Google Assistant. So once we do have an integration with GA, we’d be able to create some switches like this:

  - platform: template
    switches:
      polestar_preheat:
        friendly_name: Switch Preheat Polestar
        turn_on:
          service: google_assistant_sdk.send_text_command
          data:
            command: "Preheat the Polestar please"
        turn_off:
          service: google_assistant_sdk.send_text_command
          data:
            command: "Stop the preheating in the car"
3 Likes