ESPHome, CAN bus, and a Jeep Grand Cherokee 2012 (UPDATE)

******************* Original post *******************

Hello everyone. Providing an update after I’ve solidified the problems I was experiencing. Here’s an overview of what I have exposed from my vehicle.

Along with updated GPS location.

Control System Overview

I have access to a modem with cellular access that I am using for a constant data connection. This modem is plugged into a Pi4 running OpenWRT with a Wireguard connection back to my home network. The ESP32 used for controls is connected to the WiFi AP of the Pi4. The ESP32 has constant power from the vehicle battery. The modem and Pi4 are powered from an external source which I will expand on.

Original Post Problems

I originally had problems with the CAN bus shutting down randomly and the ESP32 rebooting. Analyzing forum posts and logs, it appeared that the CAN bus was overwhelming the log service. After changing

 logger:
   logs:
     canbus: INFO

I didn’t experience anymore problems. This also updated the problem I had with the updating of states.

Power Management

After figuring out getting a constant connection with the vehicle, powering the devices became the top priority. I solved this with an EcoFlow RIVER 2 Pro. When the vehicle is on, all control systems are powered by the vehicle battery and the vehicle charges the battery bank using the 11-56v input. When the vehicle is off, the modem and firewall switch to the 12v output from the battery bank. I have a capacitor hooked up to keep constant power during the relay switch between vehicle power and battery bank.

The system consumes about 5-6w when in standby. With the battery bank, I get about 5-6 days of the system running. Eventually, I will be running a script on the ESP32 that will only turn the modem on every hour or so when the vehicle is off to provide an update of location and check if there is any updates from HA.

Conclusion

I will post more updates as winter comes and I get more time along with the overall controls diagram now that I have everything solidified.

Let me know if you have any questions or if you have suggestions.

Automate on!
DaviBoi

3 Likes

Hi DaviBoi,

Maybe you can help me, I struggle a bit to find the info: I’m building a campervan based on a Renault Master II (2004) and I would like to read the canbus to be able to use the information in HA (which I use for about everything electrical related, locks, lights, sensors etc.). I would like to read the speed, if the doors are locked, etc.
I have an ESP32 with a canbus adapter on the OBD2 port, when the ignition is on I get a lot of messages, so that part is working. But I would like to be able to check some info when the ignition is off and the bus is parked. Do I need to ‘wake-up’ the canbus via the OBD2 port, or do I need to connect the can-hi and lo wires on a different place p.e. behind the dashboard?

Some vehicles (such as my grand cherokee) don’t sen info on the OBD2 port unless something is plugged in and sending “requests” or “commands” on it. I don’t think this is the case with your vehicle if you are seeing data flowing.

I would guess (complete shot in the dark) that your van would wake up when there is a state change. For instance, you could try waiting until the van goes into deep sleep, then open a door to see if messages start coming again.

Let me know how that goes and if that is successful.

DaviBoi

Thanks! I’m gonna check it tomorrow!

How did it turn out for you?

DaviBoi

Haven’t find the time to check it out :unamused: