Reading EV Data - how?

Discussion about software developed by Freematics, including Freematics Builder and Freematics Emulator GUI
Post Reply
seb
Posts: 12
Joined: Sat Oct 01, 2022 2:34 am

Reading EV Data - how?

Post by seb »

Did anyone manage to read EV data with a 29bit Bus with the ONE+ Model H? There are a lot of questions around this on this forum, but none has a response.

My goal is to get the SOC and other data from my EV (like the various ELM327 apps around in the appstore). I know what CAN message to send on the OBD2-Port, and I know how to interpret the response. I wonder why no function is implemented in the firmware. It looks like it was intentionally blocked - and questions for this date back to 2016. The hardware is really great, and has everything needed to provide the data needed for solar optimized charging. But no way to get it.

A helpful function would be (for example)
obd.send FC007B#03221E3B

And get the response (17 FE 00 7B 05 62 1E 3B 06 87 AA AA)

My last resort is now to solder a CAN-Transceiver on the Dongle and use the GPIOs to control ist. But this sounds terrible, there must be a software solution for this.

The potential for the dongle is huge: every EV owner with PV needs the state of charge, and the dongle would be a perfect way to get it, it only needs to support sending commands to the CAN bus.
PavloPonomarov
Posts: 1
Joined: Thu Jun 01, 2023 11:34 pm

Re: Reading EV Data - how?

Post by PavloPonomarov »

You can use FreematicsOBD function

Code: Select all

readPID(byte pid, ind& result)
. It will take PID as argument. Alternatively you can look into the source code (FreematocsOBD.cpp) of this function and tweak it to send your message and wait for the answer.
I have a question to you. Where did you get that CAN-message you have to send to your EV?
seb
Posts: 12
Joined: Sat Oct 01, 2022 2:34 am

Re: Reading EV Data - how?

Post by seb »

Hi Paolo,

both ways don't work because you cannot send CAN messages by this.

For example, to get the odometer reading, you send a CAN-Message to (for ID-Series) 0x17fc0076. The vehicle will respond immediately with the odometer reading. But ReadPID cannot do this.

Which is really annoying. Because you need to send a request to all modern EVs to get an answer. There are hundreds of values, including state of health information.

For example, to open a door for my Tesla, I send the Can-Message 800000 to #268. How to I now? Because you can put the Freemcatics dongle into sniff mode, and open the door manually. The command shows in the Freematics log.

The process to get all the nice numbers is pretty straightforward.

1) Connect an Y-Cable to your OBD Port. Put the freematics on one plug, and a cheap $10 Bluetooth ELM Dongle to the second one.
2) Install an app to read vehicle data (the App Store is full with this)
3) Put the Freematics in Sniff mode. You will find all the codes (100+ for your vehicle super easy).

But: You cannot replicate this with the Freematics ONE hardware because there is no way to send an CAN bus command. This is what is missing, and I honestly don't know why.

I spend todays Sunday in my polestar, and I can read all values - from Odometer to SOC, charging Current everything, with any $5 ESP32 that I connect to the Pins 6 and 14 of the OBD-Port via a $2 Transceiver. But The Freematics One Package is not able to do it. You can sniff the CAN-Bus, but you cannot send any messages, which is necessary for the values to show up in the sniffing mode.

It has so mich potential, but is is blocked - and I don't know the reason for this.

Best,
Sebastian


PS: Here is the full list of codes for the MEB Platform: All the nice things we want.
https://github.com/spot2000/Volkswagen- ... 20list.csv
seb
Posts: 12
Joined: Sat Oct 01, 2022 2:34 am

Re: Reading EV Data - how?

Post by seb »

The best way to read Data from modern vehicles (like BMW i3 from 2013 onwards, VW ID Series, Volvo, Polestar, etc..) would be a function like

Code: Select all

frame obd.readPID(request_ecu, request_frame, response_ecu) 
(just dreaming here)

This way, we could retrieve all the information like SoC, Battery Health, Currents, Pack voltages. Any cheap ELM-Dongle can already do this.
The registers to get the data are vehicle dependent, but available on the net.

Charging the UART.cpp does not work, because it would require knowledge of the Freematics software ruuning on the STM32 of the ONE+ H, but this is closed source it seems.
Alessandro71
Posts: 1
Joined: Sat Dec 02, 2023 9:55 pm

Re: Reading EV Data - how?

Post by Alessandro71 »

I'm also interested in reading Polestar data.
Is there any PID/DID list available as for ID.x models?
Billie34
Posts: 1
Joined: Thu Mar 21, 2024 3:52 pm

Re: Reading EV Data - how?

Post by Billie34 »

Alessandro71 wrote: Sat Dec 02, 2023 10:07 pm I'm also interested in reading Polestar data.
Is there any PID/DID list available as for ID.x models?
I also want to request geometry dash lite these lists, can anyone share?
Post Reply