meatpiHQ / wican-fw

GNU General Public License v3.0
312 stars 67 forks source link

2023 Chevy Bolt - Trying to link and get SoC values #256

Closed SAUhrich closed 2 days ago

SAUhrich commented 4 days ago

I just last week received my WiCAN-ODB and have only gotten as far as connecting it to the local lan, setup and configured with Car Scanner and captured the ELM logs. I've also got the entities created in Home Assistant.

I've used the Automation tab and set my vehicle as "Opel Ampere-E" as it is closer than anything else in the predefined list. This will successfully connect and give good readings all the way through: WiCAN->WIFI->Home Assistant-HA Entities, here is an image of the device in HA: image

The primary purpose of this as a project is to get live State of Charge (SoC) values into Home Assistant. I am off grid with solar and a decent size battery bank. This will allow me to trigger my chargers charging cycle and adjust the current based on the cars SoC relative to the house batteries SoC over a given timeframe.

I have followed the instructions in the documentation under "New Vehicle Profiles" and captured the Car Scanner log output reading the SoC for a while right before unplugging the WiCAN [(attached).

I am ok at various syntaxes (yaml, xml, etc.) but I am pretty lost when it comes to interpreting PIDs and initialization codes :)

Looking for any guidance on how to fill in the init codes and special PID's to retrieve the SoC:

image

Thank you very much for any assistance!

2023ChevyBolt-SOC_focus_ELM_Logs.txt

SAUhrich commented 2 days ago

Welp, it is now working! I think that it must have been updates to the Opel Ampere-E vehicle profile settings, thank you @meatpiHQ.

I am getting the SoC value passed from the WiCAN-ODB through WiFi and into Home Assistant using auto_pid mode and not MQTT. Here is a view from within Home Assistant: image

I will continue to experiment, but so far this gives exactly the behavior I was looking for: The ECU will give continuous readings, even if the car is off as long as the car is at home/connected to my LAN. It is therefore giving live readings during charging and I can balance my electrical loads between the car battery charging and the home/solar battery charging.

If it is helpful for anyone else with a Chevy Bolt or Opel here are my config screens in the WiCAN config pages:

image

image

I left the values I was experimenting with in the Custom PIDs section of the Automate page of the configuration, but I think those are only MQTT communications (?), not sure. Either way, I'm leaving them in the config as it is working!

meatpiHQ commented 2 days ago

@SAUhrich That's awesome thanks for the update!

brjhaverkamp commented 1 day ago

Hi SAUhrich, meatpiHQ

This is also working on my Opel Ampera-E. The Bolt and Ampera-E have the same basic profile. I notice there are a few differences between the 2017-2018 version and the 2019+ version though. So somehow there should be two profiles, or alternatively, one profile could contain both PIDs, and the user can chose which one is . I would like to see the estimated capacity as well though. in my opinion Capacity in kWh is nicer than Ah.

From the Chevrolet Bolt OBD2 PID list:

!Battery - Pack - Capacity Ah Raw 2017-2018 | Bat Cap Raw | 2241A3 | ((A*256)+B)/10
!Battery - Pack - Capacity Ah Raw 2019+ | Bat Cap Raw | 2245F9 | ((A*256)+B)/100
!Battery - Pack - Capacity kWh estimated 2017-2018 | Bat Cap Est | 2241A3 | ((A*256)+B)*0.032
!Battery - Pack - Capacity kWh estimated 2019+ | Bat Cap Est | 2245F9 | ((A*256)+B)*0.0032
meatpiHQ commented 15 hours ago

@brjhaverkamp please feel free to submit a pull request to separate the two profiles