meatpiHQ / wican-fw

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

Mapping PID's to raw data #224

Open Almer opened 1 month ago

Almer commented 1 month ago

I connected the Wican module to my MQTT broker. Now, I want to map some specific data to readable names like "doors locked," "which door is open," or "key in ignition." Where do I start? I've been able to see a lot of incoming data through the monitor tab in the interface, but the IDs are coming in so fast that it's hard for me to track. Is there a way to find the IDs somewhere? This is for a Renault Master.

I've tried finding the id's on this page: https://en.wikipedia.org/wiki/OBD-II_PIDs but this looks different how these id's are build.

Thanks!

meatpiHQ commented 1 month ago

@Almer CAN ID is not the same as PIDs.

The values you see in the monitor tab are CAN IDs. Some cars continuously broadcast CAN messages on the bus. To decode these messages, you need a DBC file or someone who has already mapped these values. Once you understand what these CAN messages represent, you can add them to the WiCAN CAN filter, which filters by CAN ID and interprets the value based on a formula or expression you specify.

When we refer to PIDs, we're typically talking about codes used to request data from the ECU. It's a request-response protocol, meaning you need to send a CAN frame as a request and then listen for a response frame. The ELM327 protocol was designed to simplify vehicle interaction, and it's what most apps use.