OpenSource Python OBDII Software Feature Complete
HTML-код
- Опубликовано: 8 фев 2025
- OpenSource OBDII Vehicle Diagnostic Software, can be found here:
github.com/Bir...
Patreon To Support The Content On This Channel:
/ _developit
GitHub Repository:
github.com/Bir...
Web Site:
www.newsdownloa...
I seriously want to say thank you for you work. This is what open source spirit is like and what platform like RUclips should be used. Amazing!
Thank you for the feedback.
Nice work!
Random thoughts:
1. It would be nice to resize graphs/charts with a s, m, L icon set (small, medium, large).
2. Add ability to auto-refresh on some second time interval for various textual data. ("Frame of data" for instanced)
3. Have the device attempt to load the correct Vehicle ToubleCodes based on the data you get from the device (if that file exists)
4. Units (you're showing Celcious and KPa) what about other unit types, F and PSI.
5. Provide option to pick CAM vs ODB for pulling data for faster information (At users risk)
6. Preset Meters (Save/load meter setups) - Provide a way to save and then load multiple different preset meters so perhaps the user can flip between different displays quickly.
7. To prevent screen resolution oddity, you could tie the positions to % of screen vs an exact X/Y position
8. Ask for users to provide you with details for their car's PID codes perhaps? (New to car readings.)
I want to do some car data reading so I might branch your code, not sure yet which library I wanted to use.
They are good ideas. The reading CAN bus data directly for rapid data logging, item 5 in your list, is where I will be looking next. I think the ELM327 interface is supposed to be able to read directly from the CAN BUS, so it should be doable by expanding this application. Documentation I used about the ELM327 can be found here:
www.elmelectronics.com/products/dsheets/
However I will probably be switching to a PIC microcontroller for the next stage because of the instant boot, no issues with just powering down, ultra low power consumption and cheap low power PIC and LCD displays. But I'll explain how I am achieving things if I do, so it can be applied back to something like a Raspberry Pi with an ELM327 interface.
I am a total noob with github/code. How do I run the program? Thank you, looking forward to using the software!
This is some very impressive work. Definitely spot on for most folks needs.
Thanks mate, you are awesome!
Thank you.
thank you very much for all your hard work.
No problem, thanks for the comment.
Great work!
I'm trying to figure out a good way to accomplish something similar. This is going to sound weird, but its for a 95 Eclipse GSX. I've got a chip for tuning (ECMLINK) which uses a special OBDII to USB adapter. My ultimate goal is to be able to run that software for datalogging/flashing tunes, but also be able to use that same OBDII port for live gauges to replace my ancient looking cluster. I'm just not very familiar with how the old style OBDII works or if itll let me use that same source for two purposes at once.
does it work only on Raspberry PI? I think it could work easily on a x86/x64 PC with Linux as well.
As far as I remember it's just using Python libraries and I don't think any are specific to Raspberry Pi. I haven't tried it but it may well work on any Linux with Python.
This is top tier!
Hello! I got your software working with my OBD2 Link SX adaptor! I had to change the baud rate and set the protocol to auto and then it started working! I have a question about the meters. When I select the meters icon that page is blank...no meters show up at all. Has anyone seen this before?
Thank you!
I just answered my own question...Somehow my ./CONFIG/METERS.CFG file got deleted. Once I replaced it the meters came back!
Great work , thank you! Is it supporting also j1939 protocol?
It uses an ELM327 device plugged into the OBDII port. I haven't used J1939 myself, but according to the following link ELM327 devices support that protocol:
en.wikipedia.org/wiki/ELM327#Protocols_supported_by_ELM327
What cable do you recommand? Can your software reprogram Toyota Highlander 2022 to allow one key down all windows? thank you very much
The OBDII standard cannot reprogram, it only provides diagnostics. It's a long time since I purchased a cable so I can't recommend one.
I learned Python, I think i want to help with this project for practice and resume building, how do I learn to script and access the obd system to change fuel tables etc.. Dm me seriously.
With OBDII protocol fuel tables can not be modified. Usually each different make and model has their own way of modifying tuning parameters. So with BMW they tend to use a connection that is available on the OBDII connector called K-Line. Other systems may use custom manufacturer extensions to the ODBII protocol. It's a project that I haven't looked at for a while and don't currently have plans to expand further than it is. However the code is all public on GitHub, and other people have forked the project, so you may find some extra stuff in their branches.
I have a problem. I installed the powertrain from a 2004 truck into my 1994. This included the PCM. When I try to start the truck it shuts down after about a second or running. I believe I have everything hooked up properly, but I believe it is shutting down because it doesn't see the other modules like the BCM and such. Would it be possible that this software can help me?
I don't think this software is likely to help. The OBDII information is provides is generally values from the engine sensors as the engine runs. It will show logged errors, but I think the errors are generally to do with the running of the engine rather than faulty or missing modules.
Ok, this is just a code and live data reader. Thought it was more. I didn't watch it all yesterday, forced myself to today, you are very hard to listen to, fuckin slow, and maybe if you spoke up I can understand you better. But ok. Not the software for me. Thank you
in file ELM327.py i did not find bluetooth connection method..
In Linux the software connects to a terminal device, something like: /dev/ttyS0
This video shows how to pair the BuleTooth device into a terminal device: ruclips.net/video/lHwvoFLbAkM/видео.html
is there any way to use this windowed instead of full screen? I have other windows for my dashcam that I would like to be able to see
In Display.py, an argument to pygame.display.set_mode is pygame.FULLSCREEN. You could try removing this argument. I haven't tried it, I can't remember if I scale the displays, probably not, so it probably wont work. It may allow you to put the other application in front of this one though.
Hi, does it works with kkl cable?
I would like to ask you another thing, i have a kkl cable with ftdi chip, i choose erase the cable eeprom through ft program and program changed auto my pid & vid from 0403 & 6001 to 0000 & 0002, the ftdi it isn't break, it is blank but it can't read and load driver software, trying connecting again throuhg ft program & mprog but it doesn't read my device because it changed my pid from 0403 to 0000, any chance or program to write my device harware pid & vid please?
It only works with ELM327 devices, they usually come in USB and Bluetooth variants. I think the ELM327 chip may have UART pins, but I have never used the chip directly outside of a USB or Bluetooth device.
how to apply that program to car ecu.?
The source code is here: github.com/BirchJD/PiOBDII
It runs on a Raspberry Pi, information is here: www.raspberrypi.com/
It uses an ELM327 device to connect to the car, search Google for more information.
Hey man! There is really impressive work you guys did! Awesome... And i seen that you have a R53 Mini cooper which is i have and working on it. My OBD2 connector and harness completly missing on my car. And im only able to communicate via Can_Bus from RPM Gauge, is there any way to communicate via Can_Bus? i have already got Can_Bus connection with Arduino and making my own RaceDash with Arduino. I just want to onboard computer like this but like i said, i cant use EML or any other OBD2 connector.. Helps would be awesome :)
The wiki page below, under protocols, shows ELM327 can use some CAN protocols. However I don't know if this would be helpful. I haven't used CAN BUS directly myself yet:
en.wikipedia.org/wiki/ELM327
is it bi-directional?
It sends OBD-II commands to the ECU via the ELM327 device and receives information back from the ECU.
Well done!
Thank you
@@DevelopIT does it work with a Cantact device?
I haven't used a Cantact device, but I'm sure this software would not work with one. Its for ELM327 compatible devices only.
do you update it when was last update
I haven't done any updates to the code, the date of the last check in in GitHub will be the last update. There are currently 65 branches for other GitHub users, they may have updated the code in their branches.
@@DevelopIT how read parameters from other car ecu and add it in this python
@@ولدزايد-ذ2غ There are a set of standard codes which will work with all vehicles, these will be scanned by default. Then there are additional car specific codes. See the text file PiOBDII/DATA/TroubleCodes-R53_Cooper.txt for an example. Make a text file in the same format for your car. The config file PiOBDII/CONFIG/CONFIG.CFG specified which code file is being used, I think the application can also set this. Then the file PiOBDII/ELM327.py defines how to handle each PID code. Search for "# PID0102" in this file to find where the codes are handled. You existing codes as a starting point for coding your codes.
doest it work on 24v too?
The part that plugs into the vehicle is the ELM32 device, this part would have to be 24V compatible. And the vehicle OBDII compliant.
hi ı do not get pdf ı was getting "no such file directory" what can ı do for this
It saves the PDF files in a sub directory called SAVE, make sure the directory exists and the software has permission to write to the directory.
@@DevelopIT how can ı directory permission or
which should ı install raspibian verisyon
@@omerozdemir6919 I think it is something like this when in the application directory:
sudo mkdir SAVE
sudo chmod -R +rwx SAVE
sudo chown -R pi:users SAVE
@@DevelopIT thx for support
I might have missed it but what is your gethub? the link is not in the description
The GitHub URL for this project is:
github.com/BirchJD/PiOBDII
@@DevelopIT Thank you so much.
I want to make a similar interface to this for a bluetooth OBDII any guidelines ?
It is the same, here is the video for pairing the Bluetooth device: ruclips.net/video/lHwvoFLbAkM/видео.html
Let's say that i have 5 variables at a ecu simulator, they are temperature, pressure and volume at two different times. I want to compute another. How can i make it in your elm327.py script? Let's say that 5 pids are for temp(1), volume(2), and pressure(2). I want to know the temp. This is a deviation from a thermodinamics law. At your script it only returns the result... Can you help?
What do you think?
If you look in file: PiOBDII.py
And search for "VehicleData", this function gets the data for all valid PIDs, the PIDs the vehicle reports that it supports, by calling:
ThisELM327.GetValidPIDs()
It then iterates though the list of PIDs returned and gets the data for each of the PIDs by repeatedly calling:
ThisELM327.DoPID(PID)
Or you can call this function directly with a specific PID number e.g.:
ThisELM327.DoPID("0101")
Can i add one pid that computes the result of five or six pids? I have MAF, Throttle Position, RPM, Intake air temp, Speed and coolant temp. I want to compute their result into one! How can i do it? Can you help?
If you read the history of your comment on this video:
"I'm getting invalid literal for int() with base 16: 'CH'"
From four months ago, it covers how to do this.
For that pids it does... You are not getting me! How do i get one pid that computes all the six pids? If you look at it differently you can catch. You can assume that one of the previous is for pressure other for volume and other for temperature. You can compute at each admission time the ideal amount of O2 and fuel.
Is this using the CAN bus? Or K-Line over OBD2?
It goes via an ELM327 device. The device detects the correct interface to use. Search Google for the term "ELM327 protocols" and you will get a list of the interfaces it tries to negotiate with.
Does this allow you to disable o2 sensors?
O2 sensors can't be disabled with this device.
What wire are you using?
Typically 16/0.2mm and Kynar wire.
where is exe ? or how to create it
Source code is here: github.com/BirchJD/PiOBDII
It is Python script, so place it on a Raspberry Pi and run it there.
@@DevelopIT thx man. nut i want to run on my laptop. I am new to python
@@jagp9642 I think it should be able to run on a laptop, though I have only ever run on a Raspberry Pi. The required Python libraries are listed in the ReadMe.txt file in GitHub repository. If there are issues getting running on another platform, it's not something I would be able to help with as the intended platform is a Raspberry Pi.
@@DevelopIT thx for reply im using python and got lukc with connecting and access data, yiu know how to erase the codes?
@@DevelopIT i found how to erase the codes but how to connect to any car ? that protocalls giving me erros
I'm getting invalid literal for int() with base 16: 'CH'
Which ELM device are you using?
@@DevelopIT it's working. I've edited your code on line 345 elm327.py ! It's working... 😆
Thank you for letting me know, it's good to know for future reference.
I know nothing about coding! It was luck. Any references for learning?
@@YoMaMenWhatsSnake I picked up coding over a long period, these days I tend to just read the reference documentation which comes with the language. I'm not really familiar with current learning material. The Raspberry Pi web site may be a good place to start, they have a free PDF magazine called "The Mag Pi" which covers coding, all back issues are available for free download.
After trying to connect to a ecu simulator
Olá ... Eu não entendo python, eu sou novo para ele, mas eu queria saber como fazer um aplicativo móvel. Você pode me ajudar com isso?
Não é algo que eu possa ajudar com tutoria, você provavelmente encontrará outros canais com o propósito de ensinar Python.
I've sent you a reply to this tópic! Still not replied! Hope to hear from you!
This is some very impressive work. Definitely spot on for most folks needs.
is it bidirectional?
Only as far as it can reset the OBDII error codes.