Hey everyone! I wanted to share something I’ve been working on with my VW ID.5. I’ve always been a bit of a car enthusiast, and now with the ID.5, I wanted to take it to the next level by automating my journey logs. I’ve heard about Trinity before, but I wasn’t too keen on paying a monthly fee. So, I decided to try and build my own system using Home Assistant (HA) and WeConnect ID. Here’s how I did it!
First off, I needed to connect HA to WeConnect ID. I stumbled upon this GitHub repository (https://github.com/mitch-dc/volkswagen_we_connect_id), but it didn’t provide all the data I needed. After some research, I settled on the WeConnectID addon for IOBroker. It’s super stable and gives me access to a ton of data, including charging info from WeCharge. The only downside is that I have to set up the sensors manually using REST API calls in HA’s YAML file. But hey, that’s a small price to pay for all the data I get!
Here’s what I added to my YAML file to pull in the necessary data:
yaml
-
platform: rest
resource: http://192.168.2.77:8087/getPlainValue/vw-connect.0.WVGZZZE2ZPP509644.position.address.displayName
name: “IOB - ID5_Address”
unique_id: sensor.IOB_ID5_Address -
platform: rest
resource: http://192.168.2.77:8087/getPlainValue/vw-connect.0.WVGZZZE2ZPP509644.status.odometerStatus.odometer
name: “IOB - ID5_Odometer”
unique_id: sensor.IOB_ID5_Odometer -
platform: rest
resource: http://192.168.2.77:8087/getPlainValue/vw-connect.0.WVGZZZE2ZPP509644.parkingposition.carCapturedTimestamp
name: “IOB - ID5_Parking_Time”
unique_id: sensor.IOB_ID5_Parking_Time -
platform: rest
resource: http://192.168.2.77:8087/getPlainValue/vw-connect.0.WVGZZZE2ZPP509644.status.batteryStatus.currentSOC_pct
name: “IOB - ID5_SOC”
unique_id: sensor.IOB_ID5_SOC
Once I had all the sensors set up, I created an automation in HA that triggers whenever my car’s parking position or charging status updates. Here’s the automation setup:
yaml
alias: Journey Log
trigger:
- platform: state
entity_id:- sensor.iob_id5_address
- sensor.iob_id5_ladestatus
action:
- service: google_sheets.append_sheet
data:
config_entry: ***
data:
Date: “{{states(‘sensor.iob_id5_parking_time’)}}”
VIN: “{{states(‘sensor.iob_id5_vin’)}}”
Location: “{{states(‘sensor.iob_id5_address’)}}”
Odometer: “{{states(‘sensor.iob_id5_odo’)}}”
SOC: “{{states(‘sensor.iob_id5_soc’)}}”
worksheet: HA
mode: single
This automation appends the data to a Google Sheet every time my car updates its position or charging status. I’ve also included a trigger for the charging status because I want to track when my car is charging, which could be useful for calculating energy consumption later on.
In Google Sheets, I’ve set up a second worksheet where I pull in the data from the HA sheet and do some calculations. For example, I calculate the distance driven between each update and estimate the energy consumption based on the change in SOC. It’s pretty cool to see all this data laid out in front of me!
I’m really happy with how this project turned out. It’s not only giving me a detailed journey log but also helping me understand my car’s usage patterns. Plus, it was a great learning experience working with IOBroker, REST APIs, and Google Sheets integrations.
If anyone has suggestions on how to improve this setup or wants to know more about a specific part of the process, feel free to ask! I’d love to hear your thoughts and maybe even collaborate on some enhancements.
Cheers,
Christian