Sponsored
OP
OP

mr.Magoo

Well-known member
Joined
May 27, 2022
Threads
20
Messages
545
Reaction score
616
Location
Michigan
Vehicles
2022 Lariat ER, AMB
I'm using this box / case.
https://www.waveshare.com/product/r...ts/compute-module-4-cat/cm4-io-base-box-a.htm

They do have a very similar one with UPS/ backup but it has some flaws(been there done that) so I wouldn't recommend it, the previous one is much better and half the cost.
Plus with the delayed power off on the accessory power you don't really need a UPS / backup.

I'll probably post an image of my setup this weekend, I'm at a point where it works quite well - although it isn't pretty.
Sponsored

 

viennaxmas

Well-known member
First Name
Sarah
Joined
Jan 17, 2023
Threads
3
Messages
103
Reaction score
95
Location
Vienna, VA
Vehicles
2023 F150 Lightning Lariat
Thanks for sharing all the information. I use Apple Car Play, so I will not be able to do the split screen easily. I may still try to add such a setup.

At the moment, I use Home Assistant to control charging to balance overall power consumption of the house (e.g. pause charging when the dryer is turned on.) Unfortunately, I have not yet found a good way to capture the SOC while charging. Maybe your suggestion would help.

Ford F-150 Lightning Lightning Flight Recorder / Black Box 1691103014643
 
OP
OP

mr.Magoo

Well-known member
Joined
May 27, 2022
Threads
20
Messages
545
Reaction score
616
Location
Michigan
Vehicles
2022 Lariat ER, AMB
At the moment, I use Home Assistant to control charging to balance overall power consumption of the house (e.g. pause charging when the dryer is turned on.) Unfortunately, I have not yet found a good way to capture the SOC while charging. Maybe your suggestion would help.
There's not really any "good" way of doing it, not that I know of anyway.
If you go the OBD route you'll have to keep the truck on.
If you go the Ford web-scraping route they'll kick you off FordPass

The best route is probably your charger IF it supports it.

The "hacked together" version would be to have an OBD reader / black box report SoC and remaining kW to home assistant while you're driving (I do this), and then calculate a guesstimated SoC based on the charge level when you plugged in and how much juice you have added.
 

theUNSTABLE

Well-known member
First Name
Ryan
Joined
Feb 5, 2023
Threads
7
Messages
85
Reaction score
109
Location
Florida
Website
github.com
Vehicles
2023 F150 Lightning Lariat
Occupation
Cyber Engineer
Hey @mr.Magoo

I have just stumbled upon this thread while I am researching OBD data.
I recently posted about my setup for better charge logs, which I'm calling LightningROD (link to my post).

I am looking into either supporting OBD, or downloading from OBD, but it is 100% new to me.

I think I've gathered your setup goes as following:
  • RaspberryPi connected to vehicle via OBD
  • Pi is either logging live data, or reading recorded data via OBD
  • Pi is uploading data to InfluxDB / Hass
  • Grafana for display
Do you know if the vehicle is logging this data, and your Pi is reading from the log?
Or is the Pi logging the data from the live stats?
- If it's live view you would obviously need to have this powered nearly all the time, and only be able to get data from install forward.​
- This is the hurdle I am trying to overcome​

I'm curious if using an OBD reader would allow the user to get historical data from any "onboard" logs - if there are any.

I'm also curious what type additional data there is available.

While playing around with the API I found the charge logs, and these contained so much more data than what was presented in the FordPass app, which lead me to create my own thing.

Ideally I would LOVE to integrate an OBD reader - download all data that's in the truck and send it to my database.

Theoretically there could be potential for data logs with
  • ProPower Onboard
  • Miles gained from braking regen
  • Battery temperature
  • Coolant temperature
  • Temperatures during charging
  • etc
This would bypass the API and the "Lock Out" potential, contain more stats to display in graphs, and be able to be 100% self hosted for privacy.


You have made tremendous progress and I'd love to tap your knowledge about possibly integrating more data points for LightningROD, or work with you to create something fellow Lightning / FordEV owners can use.
 
Last edited:
OP
OP

mr.Magoo

Well-known member
Joined
May 27, 2022
Threads
20
Messages
545
Reaction score
616
Location
Michigan
Vehicles
2022 Lariat ER, AMB

Howdy !
I noticed your project here and on Reddit and it's very nice indeed, my concern would be the "lockout" so I'm carefully observing at this point ;)

One of the "flaws" (nature of the beast) of the black box is that if the truck isn't "running" you're not getting any data, it's not my fault, it's just how OBD operates.

So, yes, I do have a Pi4 CM because it supports m2 SSD natively (via PCI) rather than USB like the standard PI's, now, with the new (launched this week) Pi5 things will change.
But, you can do it with any Pi, I don't think it's that resource heavy, so you could probably get away with a Pi3 or even a Pi Zero, but the SSD comes in handy when storing data.

The "link" is Truck >> OBD >> Adapter >> Pi >> InfluxDB >> Grafana, and I use CustomApp on Android to get it on the screen in the car (it allows you to turn any web-link to an Android Auto App).

I do all this through Node-Red running on a Pi Lite OS.

OBD is by request, nothing is stored, so what you request / ask for is then and there.
It's a pretty basic ping-pong protocol, in the sense that you set the module you want the data from, and then request a specific data (PID), the truck (OBD) responds with the values and you then process them.

Check out this thread for PID's (data you can ask for).
https://www.f150lightningforum.com/forum/threads/pid-list-to-monitor-your-lightning.13563/
It's by no means complete, but it's a starting point and, quite frankly, I haven't found that many worth adding that isn't in that list.
But, as you mention, all the temperatures are there, if you're DC fast charging you can see that when the battery reaches a certain temp it starts to throttle the charge rate.

There's a bunch of stuff though, one thing I always found "annoying" is that we/they/Ford doesn't display distance on the parking sensors (Tesla does this and it's helpful to know if your "RED" warning is 3ft away or 1"... I blew it off as poor implementation, not having the information, etc.
But, oh, no... there's data (PIDs) in/for the truck giving you distance in 0-1000cm !?:eek:

Miles gained by regen would be VERY hard to figure out, you can read current from/to motors along with battery capacity, etc. but these are all snapshots in a moment in time, over serial communication with a relatively low baudrate, so any type of "realtime" processing of data ain't happening.

I log the data every 20s, unless you activate "sport mode" in which case I log a subset of parameters every second, still no way near realtime and OBD never will be, it wasn't intended to...

I'm all for a project and I'm happy to share anything you could use.
I'm more of a basement hacker, I don't code for a living and most my stuff isn't all that pretty but it gets the job done - if you know what I mean.
 

Sponsored

kraxner

Member
Joined
Aug 6, 2023
Threads
1
Messages
21
Reaction score
9
Location
Colorado
Vehicles
2023 Ford F-150 Lightning Platinum
I've read through a bunch of great threads on here as well as the Mach-E forums but the one thing I can't get past is the initial "Hello, World!" approach to get something out using a python or shell script.

I've been trying to figure out how to use the proper PIDs/code (yes, I’ve been looking at the spreadsheet for those codes) to pull down the data from the truck but having trouble getting started with OBD-II as I have zero knowledge in the automotive CAN bus/OBD-II architecture.

I live full-time in a 25ft Airstream Travel Trailer that I pull with my Ford Lightning. My use case is rather simple, I want to log drive-time metrics (battery level, power output/etc, mileage/odometer) in real-time while I drive. I’d prefer not to use my phone but use my laptop or Raspberry Pi instead.

At this point I just want to get started logging the data in any format (.csv/.txt/Node-RED/InfluxDB/Grafana/etc) and I'm happy to make iterations or improvements later.

Anyone care to help me (and possibly many others on here) get started?

Thanks!
 

Zprime29

Well-known member
First Name
Brandon
Joined
Jul 26, 2022
Threads
37
Messages
1,982
Reaction score
2,073
Location
Tucson, AZ
Vehicles
Honda Pilot, 2022 Lightning ER
I've read through a bunch of great threads on here as well as the Mach-E forums but the one thing I can't get past is the initial "Hello, World!" approach to get something out using a python or shell script.

I've been trying to figure out how to use the proper PIDs/code (yes, I’ve been looking at the spreadsheet for those codes) to pull down the data from the truck but having trouble getting started with OBD-II as I have zero knowledge in the automotive CAN bus/OBD-II architecture.

I live full-time in a 25ft Airstream Travel Trailer that I pull with my Ford Lightning. My use case is rather simple, I want to log drive-time metrics (battery level, power output/etc, mileage/odometer) in real-time while I drive. I’d prefer not to use my phone but use my laptop or Raspberry Pi instead.

At this point I just want to get started logging the data in any format (.csv/.txt/Node-RED/InfluxDB/Grafana/etc) and I'm happy to make iterations or improvements later.

Anyone care to help me (and possibly many others on here) get started?

Thanks!
It likely isn't the most efficient route to take, but you could install an Android emulator on the laptop and then use OBDII apps to log the data. I'd have to research what is available for non-mobile apps. I haven't delved into how they work to tinker with a homebrewed version.
 

kraxner

Member
Joined
Aug 6, 2023
Threads
1
Messages
21
Reaction score
9
Location
Colorado
Vehicles
2023 Ford F-150 Lightning Platinum
It likely isn't the most efficient route to take, but you could install an Android emulator on the laptop and then use OBDII apps to log the data. I'd have to research what is available for non-mobile apps. I haven't delved into how they work to tinker with a homebrewed version.
Yeah, that might be possible, thanks for the idea. I'd prefer to see what others are doing in the same direction I'm trying...I know there is someone out there. :)
 

theUNSTABLE

Well-known member
First Name
Ryan
Joined
Feb 5, 2023
Threads
7
Messages
85
Reaction score
109
Location
Florida
Website
github.com
Vehicles
2023 F150 Lightning Lariat
Occupation
Cyber Engineer
I'm currently still using Home Assistant with the `fordpass-ha` integration.
I haven't had any time to improve on the integration or anything but it is still working for me.

I have HA setup to store all of the `fordpass` sensor data - as well as piping it into InfluxDB.
I don't have a graph, and I would still like to get my LightningROD project up and working to get the charge logs.

The main problem with this setup (aside from Ford breaking things) is it is dependent upon the API and vehicle connection. So this will only get what the API has available.

As far as my research into more of a "Black Box" there are many projects on Github that deal with grabbing the CAN Bus Data and viewing it - but like you I have 0 experience or knowledge on those things so I'm hesitant to try those because most are outdated.

However, for your use case this may be a good option. https://www.csselectronics.com/
Depending on your budget though.
 

kraxner

Member
Joined
Aug 6, 2023
Threads
1
Messages
21
Reaction score
9
Location
Colorado
Vehicles
2023 Ford F-150 Lightning Platinum
I'm currently still using Home Assistant with the `fordpass-ha` integration.
I haven't had any time to improve on the integration or anything but it is still working for me.

I have HA setup to store all of the `fordpass` sensor data - as well as piping it into InfluxDB.
I don't have a graph, and I would still like to get my LightningROD project up and working to get the charge logs.

The main problem with this setup (aside from Ford breaking things) is it is dependent upon the API and vehicle connection. So this will only get what the API has available.

As far as my research into more of a "Black Box" there are many projects on Github that deal with grabbing the CAN Bus Data and viewing it - but like you I have 0 experience or knowledge on those things so I'm hesitant to try those because most are outdated.

However, for your use case this may be a good option. https://www.csselectronics.com/
Depending on your budget though.
I was using HA but when it broke, I didn't feel like trying to keep it alive with all of the API changes I was hearing about.

I looked at the CSS gear but man it's expensive, and I think I already have everything I need except a script or command to pull down the data via OBD-II.
 

Sponsored

theUNSTABLE

Well-known member
First Name
Ryan
Joined
Feb 5, 2023
Threads
7
Messages
85
Reaction score
109
Location
Florida
Website
github.com
Vehicles
2023 F150 Lightning Lariat
Occupation
Cyber Engineer
I was using HA but when it broke, I didn't feel like trying to keep it alive with all of the API changes I was hearing about.
It has been quite a challenge trying to keep it working with just the two of us and all the various issues. I haven't had any free time to even look at the issues that keep compounding and I haven't really heard back from Ford when I was trying to schedule a meeting about possibly being supported.


I looked at the CSS gear but man it's expensive, and I think I already have everything I need except a script or command to pull down the data via OBD-II.

Yeah, I didn't know what your budget was when I posted those. If you already have everything you need except a script or something to pull down the data - what is the setup currently?

Not remember what you said earlier, I know most OBD readers on Amazon say they work with XYZ Android App so a quick thought I had:

- Use an old Android Phone with whatever app grabs the data and automate it to back up to some file. File could be stored on device, or externally to whatever drive you have (I recall a Pi being mentioned or something)
- Then use python to parse the data and put it into your desired database.

Again just throwing ideas out. I'm currently home sick so my brain is fairly scattered
Sponsored

 
 





Top