Hacking on Ford's OpenXC Platform
Guest Post by Bob Pielock, Systems Administrator at Mashery
A snapshot of our awesome Graphite/Raspberry PI OpenXC hack:
Two weeks ago, Nick Williams and I went out to the Ford Electrified Vehicle Hackathon to hack on cars and data.
Saturday was spent with some of the other teams that were present – I loaned out my Vehicle Interface for one team to borrow and test their API. It was obvious that many of the groups that showed up were way into their devices and had great ideas. I was happy to see so many people talking about Mashery APIs, too!
Greg Gamp, Solutions Architect at Mashery, spoke a bit with the guys on site regarding some additional safety items that could be used to setup facial recognition and verification if someone was sleeping or distracted, taking data from the Android system and the steering wheel + vehicle speed + cruise control. It was a pretty awesome idea, but my developer skills were not up to par with the amount of code needed for Android.
Nick and I built a Raspberry Pi device running Raspbian, Graphite, node.js + Mashery IO Docs + redis, with two bluetooth dongles to allow for a passive passthrough of the OpenXC data.
OpenXC Data -> Serial Port -> parsed via the script on github written by Mashery's own Ben Lau – I forked the openxc-pthon code as I was not able to commit for the current code:
https://github.com/sigkill/openxc-python/tree/master/openxc/metrics
Auto hackers hard at work
Serial Port a Hardlinked via rfcomm, and sending to a soft loopback device (Ram Disk), then scripted to cat output to the 2nd bluetooth dongle and show up as an available VI. (Anyone that was at the event would have been able to have paired to my device and continue to use their system, also this gives the ability to rate limit certain messages as needed, for power draw issues etc.) A PI could also log this data and send it over the net via Carbon.
Ford Electrified Hackathon winners, including team @drivencomputing (pictured center)
Mashery APIs such as World Weather Online could have also been used to pull weather data and topography data, which in turn could have been injected to an Android device, and elements such as outside air temperature and pressure could have been graphed as well. And, since World Weather Online leverages IO Docs, it would allow for external devices to poll data via the Mashery API from the internet. (If you were able to route this traffic via peer to peer say from thousands of other cars or wireless networks, you could then have performance metrics for all of your vehicles on the road, over time building up a huge array of information, and recalling it via the API if needed. The data pairing then would allow for the OpenXC write API to make corrections to cruise control settings and give better fuel consumption info and reason why it would perform or under perform.
The Ford C-Max Energi had a lot more interesting data available, and the Mashery team and myself were lucky enough to get to take one for a test drive!
Great times had by all. As a dedicated automotive techie, was excited to be involved in this innovative weekend!