WiCAN ESP32-based open-source OBD2/OBD-II Vehicle (car or truck) CAN Bus Diagnostics to WIFi/BLE/USB adapter for Home Assistant integration?

I do not have a hotspot in any of my cars, only a Wi-Fi access point in my garage/car-port. But I was initially only planning on using the device tracker part as an arrival sensor in order to “presence” and/or “proximity” detect when the cars arrive and leave my garage/car-port based on if they are connected to WiFi or when MQTT

1 Like

FYI, looks like the WiCAN founder has now started to work on adding support for Home Assistant, see:

https://www.crowdsupply.com/meatpi-electronics/wican/updates/low-battery-alerts-with-wican-and-home-assistant

I have a plug-in hybrid SUV. It’d be very useful if I could get battery state-of-charge into HA, but there’s no published library for my vehicle. How easy would it be to reverse engineer the ID for the parameter.

1 Like

FYI, the developer posted an update to the campaign saying that the initial batching will soon ship to Crowd Supply for distribution and that the latest firmware now has initial MQTT protocol support:

Pre-order for the next batch is now also available

Not received mine yet but FYI developer posted video and instructions for WiCAN with Home Assistant:

https://github.com/meatpiHQ/wican-fw#home-assistant

Home Assistant

WiCAN is able to send CAN bus messages to Home Assistant using MQTT protocol. I found that using Node-RED is the simplest way to create automation based on the CAN messages received. This short video highlights some of the steps https://youtu.be/oR5HQIUPR9I

1. Install Home Assistant Mosquitto broker add-on
2. Create Home Assistant new user account for WiCAN. These user credentials will be used to set up the MQTT setting for WiCAN.
3. Connect to WiCAN access point WiCAN_xxxxxxxxxxxx then, using a web browser, go to http://192.168.80.1/
4. Set the “Mode” to Ap+Station
5. Fill in your Home WiFi network SSID and Password.
6. Enable MQTT and fill in the Home Assistant credentials created in step 2
7. Install Home Assistant Node-RED Add-on
8. Download “wican_example_flow.json” and replace device_id with your WiCAN ID.
9. Open Node-RED Add-on and import the edited “wican_example_flow.json”
10. Double click on the subsction Node and edit the server fill in MQTT broker IP address and credentials created in step 2
11. Click deploy.
12. To create a new MQTT sensor, you’ll need to edit the configuration.yaml file by adding the following lines:

mqtt:
sensor:
- name: “Amb Temp”
state_topic: “CAR1/Amb_Temp”
unit_of_measurement: “C”
value_template: “{{ value_json.amb_temp }}”
- name: “Fuel Level”
state_topic: “CAR1/Fuel_Level”
unit_of_measurement: “%”
value_template: “{{ value_json.fuel_level }}”

11. Restart Home assistant
12. After restart go to dashboard and Add new Card entity.

1 Like

Does anybody knows if the Wican OBD2 BLE dongle is also compatible with the famous EV routing application ABRP ?

Hello : i found this code, of direct acces in BT to a dongle, from a Rasberry : GitHub - greenenergyprojects/obd2-gateway: OBD2 / HTTP Gateway

Any volonteer to port it to HA ?

It woud allow to use cheaper ODB2 BT4.0 dongle on the market (with the limitation of distance between car & rasberry)

2 Likes

Hi Hedda! Have you received your Wican Esp32 yet?

I just received my first wican! I’m very impressed with this project. I love it! Thanks for sharing it in the community. I have been a Home Assistant user for years and both my house and my motorhome work thanks to it.

Yesterday, I implanted the Wican in my Peugeot Expert Motorhome which is 2 years old. The vehicle has a 4G Router and Homeassistant as its brain. This morning I just received the outside ambient temperature for the first time by MQTT/Node Red (following his instructions).

And I’m looking forward to see more Canbus information on Homeassistant.
Who knows, maybe one day we can turn the car volume up and down from Home Assistant!

I will closely follow the project and the future integration with Home Assistant.

1 Like

I have recieved both of mine however not yet had time to actually test/try any them yet with our two old cars.

Other than for reading diagnostic alarm messages and help with reminders to fill up the fuel tank I am thinking about trying to also use them as arrival sensors as well, if can figure out when to set assumed state of a car as gone and when assumed states should be set to arrived.

1 Like

Do they put a bluetooth LE signal out?

@pocket I have the same use case, I’d love to send state of charge (SoC) to HA while my vehicle is charging and on WiFi. Did you ever figure out if this is possible?

I’m intrigued by this project but find the documentation somewhat lacking. It’s not clear if (1) it will work at all with my specific make / model of car, (2) if it will read SoC, or (3) if it will work while the car is powered off.

1 Like

@danep Check out meapiHQ discussion in link below. I was able the pull the generic pid for state of charge (%) on my Pacifica and plot it in HA. However, I after a while the device would seem to lock up and I would not get further readings until I reseated it. I haven’t had time to play with it much, but may not be an issue in newer firmware or maybe I was overwhelming the bus with polls. I wasn’t able to figure out the more advanced statistics as my understanding how to accesses it is beyond my understanding.

https://github.com/meatpiHQ/wican-fw/discussions/23

Unfortunately, I’ve made an initial attempt to get it working, but haven’t been able to follow through. Like @smurf12345’s experience, the WiCAN would lose connectivity. From what I’ve read, the process of charging the traction battery on my car doesn’t charge the starter battery. I may need to power the WiCAN externally to keep it online.

I have been trying to find SOME way to get basic info like SOC and battery levels of my Huyndai Electric to Home Assistant. I found out EQNotify could do that (and I have ODB-II -reader with BT but that needs Android phone in between. I do have one but I am not standing next to my car 24/7 with the phone in my hand :slight_smile: I would like if there was some device that I could plug into ODB port on my car and it would take the power it needs from that port (and would consume very little when in sleep mode).

This WiCAN thing could be what I need, but before I order something from around the globe, I would like to know if it keeps connection (or at least wakes up automatically when car is charging), and works with my car. Not too much information available…

I submitted this Github Issue to the WiCAN repo regarding overwhelming the bus with polls. Thought it might interest you too.

Hey boys i ordered this one today. Did anyone actually got it working ? I’m expecting to use this to automate the garage door along with reading some info from it about my hyundai i30. Did anyone make it work with hyundai? Or anyone with actual screen shots from HA showing that it works ?

I installed one in my wife’s 15 Sienna and my '18 Fusion Energi yesterday and have started to receive MQTT messages from it.

Haven’t integrated it yet with HA as my wifi has been spotty and I don’t want to deal with that ATM.

Will update as I get some usable data.

Any updates from ya’ll? I’d love to get the battery charge and fuel amount of my cars into HA

It’s been a long time since I’ve had time to play with this. Using the MeatPi WiCAN, I’ve updated to firmware 2.80 today. It seems the lock up problem I was having a long time back on version 1.74 has been resolved. The web interface remains alive and was able to poll throughout the charge window.

Edit: As expected, it seems my 12v battery is charged while the big battery is charged. After charge complete the 12v voltage drips to normal levels (not charging) and I am not able to poll the big battery charge state anymore.


1 Like

Just throwing some support behind this project. I bought the MeatPi OBD a while back but couldn’t get it functional until this awesome feature update allowing us to bypass NodeRED and calculate/send JSON vars straight from the WiCan. Refer strongly to this HomeAssistant example.

As a lifelong sw engineer, still took me a while, and the docs aren’t super well explained, so I wanted to dump my resources for other OBD2 newbies:

  • The documentation here seems to be somewhat outdated given the release info linked above, the “V” variable is now B# referring to a zero indexed reference to the 8 length “data” array, but this part of the docs is accurate and super helpful understanding shape of the request
  • use this PID code calculator/tinker space (still have to reverse engineer some of their values) with the calculations listed on this wiki
  • Don’t go down the rabbit hole of binary or hex stuff. For PID requests, start bit & bit length can be 0 & 1 aka ignored (I think)
  • Use CarScanner and MQTT Explorer, as suggested, super helpful. Keep in mind per this info again you really just need to change the PID and the calculation, the other JSON values don’t really change
  • Remember to have HA actually consume the vars from MQTT after you’ve automated the request, as the aforementioned “HA” example doesn’t remind that, but the outdated NodeRED example explains it.

It’s basic but here’s my setup for reference (my van OBD2 doesn’t report ODO sadly but thats the equation):

Using this automation:


FuelTankLevel Payload: {"bus":"0","type":"tx","ts":37698,"frame":[{"id":417018865,"dlc":8,"rtr":false,"extd":true,"data":[2,1,47,170,170,170,170,170]}]}

And this entry to read the json formatted value back from my MQTT broker (your_value_here is the string after “WICAN_” in the wifi AP the device creates):

Sorry if this post is basic and spammy level for everyone working on the integration but I would’ve loved a post like this 3 days ago. Happy tinkering and I’d love to work with an actual integration if we make it there!

11 Likes