Polestar Forum banner
21 - 40 of 67 Posts
Apparently it supports both UDS and pure CAN communication. I found the Odometer in the data - it's the 1FFF0120 entry:

can0 1FFF0120 [8] E0 7E 53 00 00 C0 00 00

My odometer is at 32.339 which equals 0x7E 53. I wonder what will happen if it hits 65535 km (FF FF) - will the E0 value change, or will It shift to the next two digits (00).
 
Apparently it supports both UDS and pure CAN communication. I found the Odometer in the data - it's the 1FFF0120 entry:

can0 1FFF0120 [8] E0 7E 53 00 00 C0 00 00

My odometer is at 32.339 which equals 0x7E 53. I wonder what will happen if it hits 65535 km (FF FF) - will the E0 value change, or will It shift to the next two digits (00).
You don't have to use byte size chunks. I would imagine that 65536 would be E1 00 00 and EF FF FF would be a million km's.
 
And 1FFF00A0 contains the gear:


can0 1FFF00A0 [8] 00 00 00 00 00 00 58 19 => P
can0 1FFF00A0 [8] 00 00 00 00 00 00 59 16 => R
can0 1FFF00A0 [8] 00 00 00 00 00 00 5A 16 => N
can0 1FFF00A0 [8] 00 00 00 00 00 00 5B 16 => D
 
You don't have to use byte size chunks. I would imagine that 65536 would be E1 00 00 and EF FF FF would be a million km's.
Correct! Did another test today, odometer is 32.725 (which is 7F D5) and #1FFF0120 reads

can0 1FFF0120 [8] E0 7F D5 00 00 C0 00 00

So I can now build my OBD2 dongle to report the VIN and Odometer reading automatically. Nice service from polestar to provide this info on the OBD-Port without the need to ask for it.
 
If it helps anyone I have written an application for reading data over ODB2 that runs on a Wifi-enabled ODB2 dongle (Macchina A0) which I use in my Polestar 2 to log SoC, ODO, 12V battery voltage, outside temperature, VIN, speed and gear.
The accelerator pedal position readings could also be added since these are part of the standard PIDs and easy to find information about (I.e. https://en.wikipedia.org/wiki/OBD-II_PIDs).
I have implemented the ODO and gear reading using the information found on this forum in this thread and others.
My main use for it is to read SoC and from that calculate how long time it will take to charge and control when the car charges from that information.
In any case, I guess it could serve as an example for anyone trying to get this information from the car.

I have tried to write it in a general way so that it could work on other cars which is why it includes some 11 bit addressing things. Polestar 2 uses 29 bit addresses so it is not really relevant for Polestar 2 specifically.

You can find it on GitHub: GitHub - olalid/esp32_EVSoCReader: Reads electric or hybrid vehicle battery state of charge and sends to MQTT server.
 
If it helps anyone I have written an application for reading data over ODB2 that runs on a Wifi-enabled ODB2 dongle (Macchina A0) which I use in my Polestar 2 to log SoC, ODO, 12V battery voltage, outside temperature, VIN, speed and gear.
The accelerator pedal position readings could also be added since these are part of the standard PIDs and easy to find information about (I.e. https://en.wikipedia.org/wiki/OBD-II_PIDs).
I have implemented the ODO and gear reading using the information found on this forum in this thread and others.
My main use for it is to read SoC and from that calculate how long time it will take to charge and control when the car charges from that information.
In any case, I guess it could serve as an example for anyone trying to get this information from the car.

I have tried to write it in a general way so that it could work on other cars which is why it includes some 11 bit addressing things. Polestar 2 uses 29 bit addresses so it is not really relevant for Polestar 2 specifically.

You can find it on GitHub: GitHub - olalid/esp32_EVSoCReader: Reads electric or hybrid vehicle battery state of charge and sends to MQTT server.
Very nice! I'm looking to integrate the P2 in my home assistant installation. Already have the Fiat500e integrated. Already show added % SoC for the P2 on my dash, calculated as you suggest on GitHub. Interesting: when the charger (Wallbox) starts charging, HA queries the Fiat to see if that is the connected car, if not, HA assumes it is the PS. Long way around, but it works.

Image
 
I've tried to get some information true the OBD2 but it's not giving any info. Anyone tried it also?
I use the OBDLink LX scanner with Car Scanner Pro app and you do get useful info but not as much as some other EVs but at least you get important temperature and charging data.

View attachment 1000010299.png
 
With Car Scanner you get a lot of data, except for the SOH.
You are can contact the app support via Settings > Contact developer and see if it is possible to add the State of Health metrics. They did help me put in a configuration parameter for the Polestar EVs as I used to choose the Volvo configuration.
 
You are can contact the app support via Settings > Contact developer and see if it is possible to add the State of Health metrics. They did help me put in a configuration parameter for the Polestar EVs as I used to choose the Volvo configuration.
I did that almost a year ago.
 
I finally figured out how to read the SoH with OBD2 by picking up bits and pieces here and there on the internet and snooping the CAN bus.

So, in short, you need to send the following CAN message: 0x1DD01635: 0x03 0x22 0x49 0x6d 0x00 0x00 0x00 0x00

0x1DD01635 is the address of the "BECM" (Battery management control module). 0x03 is the number of valid bytes following, 0x22 indicates an UDS message, and 0x496d is the DID we want to read.

The BECM will then respond with: 0x1EC6AE80: 0x07 0x62 0x49 0x6d XX XX XX XX.

0x1EC6AE80 is the "tester address", where responses are sent. 0x07 is the number of valid bytes following, 0x62 indicates that it is a response to a 0x22 request (bit 0x40 set + 0x22) and 0x49, 0x6d is the DID it is responding to. The 4 bytes after that is the SoH in 0.01% units.

My car responds with 92.10% after 160000 km.
 
21 - 40 of 67 Posts