Biz & IT —

OnStar gives Volt owners what they want: their data, in the cloud

GM rushed work on a new API to get a popular Volt owner site back on road.

The Web services supporting OnStar's applications for the Chevy Volt were hacked by developer Mike Rosack to create Volt Stats. a site for owners to brag about their milage. Now, OnStar has given him a new, approved API.
The Web services supporting OnStar's applications for the Chevy Volt were hacked by developer Mike Rosack to create Volt Stats. a site for owners to brag about their milage. Now, OnStar has given him a new, approved API.

You probably don't think of your car as a developer platform, but Mike Rosack did. A few days after buying his Chevy Volt, Rosack started slowly mining his driving data. But he eventually revved up his efforts and created a community platform for drivers to track their own efficiency. Today more than 1,800 Volt owners compare stats with each other, jockeying for position on Rosack's Volt Stats leader board.

The Volt is, in many ways, a natural fit for hacker car enthusiasts. GM already heavily "gamifies" the Volt with its Driver Information Center, a dashboard display providing immediate visual feedback on how efficiently the car is being driven. The car is also heavily instrumented for OnStar, which gives drivers access to performance information and other data through its RemoteLink mobile app for iOS and Android.

Rosack initially wanted to do more with his own driving data than just view it on his phone. So he built what eventually became Volt Stats to capture this data, then started sharing it with other Volt owners. There was just one small problem: Volt Stats relied on Rosack's reverse engineering of an interface for OnStar's RemoteLink mobile application (iOS and Android). When OnStar moved to shut down the Web services interface Rosack had plugged into in mid-October, Volt Stats arrived at a screeching halt.

Rather than leaving Volt Stats stalled on the roadside, GM and OnStar accelerated efforts to give developers a new public Web API to create services on top of OnStar data. The companies even worked with Rosack to get him onboard and get Volt Stats re-launched. Now, Volt Stats is back online and other would-be car data hackers will soon be able to connect their Web applications to GM owners' vehicle data (provided, of course, that they have privacy policies that meet with the approval of GM and OnStar lawyers).

OnStar had already developed an API for GM partners such as the car-sharing service RelayRides, who need to get access to some of the remote control and telematics elements of the service. But this new interface takes advantage of technologies such as OAuth and JAX-RS and it's a step toward turning OnStar into a broader platform for the "Internet of things." It's also a way to give car enthusiasts a new kind of access to something they've always thought of as their own—their cars' data.

The "Kleenex of telematics"

GM's OnStar has been around for 16 years, and it's established itself as an industry leader. "It's been the Kleenex of telematics for a long time," said OnStar Director of Advanced Technology Steve Schwinke. OnStar originally developed as a service for luxury cars that integrated safety with an on-demand driver concierge service. "It started with the basic promise that if the airbag deploys, we're going to provide you help," Schwinke said. "It's also the original 'app' in the vehicle, where you hit that OnStar blue button to get our call center."

Today, OnStar gets 150,000 calls a day from customers using that blue button. But Schwinke said there's nearly as much communication coming directly from vehicles on a daily basis: 130,000 times a day. That's how often OnStar hardware in GM cars "phones home" over a cellular packet data connection to OnStar's data centers to be interrogated for diagnostic and maintenance data.

OnStar has been on the bleeding edge of machine-to-machine communications since its launch. When someone pushes the blue button, Schwinke said, "we want to get information on why they're calling, then talk to them, then get more data. It requires the ability to decode data from the vehicle when the request is pressed, all the data you've collected on a vehicle, get their location, and then present that [to a call center employee] who can greet the customer by name. It's not for the faint of heart."

While 95 percent of its coverage is provided by Verizon Wireless in the US, the last five percent is made up of 29 different carriers with a wide range of network technologies. OnStar's proprietary Air Interface (AIX) Protocol is based on a Code Division Multiple Access (CDMA) 1x connection. AIX is designed to work anywhere there's cellular service, at essentially 2G-speed, with a 56 kilobit-per-second transfer rate.

To help reduce the chattiness of the protocol, OnStar uses the User Datagram Protocol for some of its data (which doesn't require an acknowledgement for each block of data sent). And to reduce the number of transmissions, the OnStar onboard computer can cache up to 100 kilobytes worth of diagnostic codes before dumping data back to the mother ship, or it can send alerts immediately when a severe problem is detected.

"We can send data at every ignition cycle, or periodically based on time or the odometer miles, or when something bad happens in the vehicle," Schwinke said. For a severe condition code (such as an air-bag trigger), the OnStar module automatically calls OnStar's call center.

Even within those small, cheap bursts of data, OnStar can collect a lot. "What people don't seem to know is that we have this deep integration with all the electronic components in the vehicle," Schwinke said. "We have access not only to trouble codes, but things like parameter IDs that give battery voltage, the outside air temperature—anything that (vehicle sensors) would record, the OnStar module can request all that data. We can even tell you if you left the gas cap open."

But it's just as valuable to OnStar and its customers as it is to GM, if not more so. Diagnostic data dumped from cars gets processed and put into GM's quality management database, which gives the auto maker an early heads-up on parts that fail too frequently. The instrumentation can identify problems in subsystems down to the part level, a feature used by GM during pre-production to track quality issues with parts before they start rolling en masse off assembly lines.

Thinking outside the car

Over the past few years, Schwinke said GM and OnStar have started "extending services to outside of the vehicle." This allows customers to interact with and control the vehicle even when they're not in it. That idea was given a jolt with the Volt, which demanded a higher level of information for owners when they weren't driving.

OnStar developed phone apps for the Volt's release that allowed owners to check on the charging status of their cars, control when they charge (to take advantage of off-peak utility rates), and get notifications pushed to them when charging was complete. First demonstrated at the 2010 International CES electronics show, the application also allowed drivers to lock or unlock the car, turn on heat or air conditioning, flash lights, and honk the horn remotely from their phone. On top of all that, it gave drivers access to a range of data about their car's performance.

The promotional video for the Volt's OnStar smartphone application at its release in 2010.

The work OnStar did to create software interfaces for the Volt—which became known as OnStar's Advanced Telematics Operating Management System (ATOMS)—was quickly expanded to incorporate GM's other OnStar-equipped vehicles. "We saw that opportunity," Schwinke said, "and saw we needed to extend that to the rest of our customers. Pretty much every GM vehicle since 2011 can be controlled by a remote app."

An illustration of the OnStar ATOMS environment and cloud API.
An illustration of the OnStar ATOMS environment and cloud API.
General Motors / OnStar

The ATOMS platform also gave OnStar the opportunity to get into the business of providing APIs to partners, creating a whole new line of business. Last January, OnStar announced the availability of its third-party API and its first partnership with RelayRides. In July, GM and OnStar announced OnStar's six million customers could participate in RelayRides without having to install additional hardware in their vehicles or hang around to exchange keys. The RelayRides phone app hooks into OnStar's remote control system, and remotely unlocks and starts the car for the renter.

Built with integration software from Apigee, OnStar's cloud APIs provide a REST-based gateway Web service for service providers to connect to ATOMS, rather than connecting directly to vehicle. "We do all of the security credentials through our back office systems," Schwinke said. "Communication to the vehicle isn't broadly exposed."

Schwinke said OnStar was already working with a number of other partners to leverage ATOMS' cloud interface—among them electric companies who were looking to extend their "smart grid" services to Volt vehicles. "We've been doing some demonstrations and prototyping with public utility companies for smart grid command and response," he said. "The utility companies can send instructions to the car to control when it charges and when it doesn’t. It can save the car owner money, and flatten electrical demand curves."

From tire-kicking to app hacking

While GM and OnStar were planning a broader rollout of access to the ATOMS APIs, customers had limited access to a controlled set of partners until recently. But that didn't stop Rosack from wanting access to his OnStar data and wanting more than just a look at it on his phone.

"Right after I got my Volt," Rosack said, "I started playing around with (the phone) app... I figured it'd be cool if I could find a way to store that data in a database, so I reverse engineered the service calls that the app makes and created Volt Stats."

Soon, he took the next logical step and launched Volt Stats as a website. Using the reverse-engineered Web service call, he allowed other Volt owners to gain access to their own data and share it on the site. It did more than track a vehicle's electrical and gas mileage—it allowed owners to share their location to show geographic differences in mileage performance and track driver "achievements" for the best performing cars. Cars here were ranked by energy efficiency history.

Volt Stats' owner map, showing the geographic distribution of Volt vehicles and their relative energy efficiency.
Enlarge / Volt Stats' owner map, showing the geographic distribution of Volt vehicles and their relative energy efficiency.

The site gained a good deal of notice within the Volt owner community and the automotive press. By September of 2012, there were more than 1,800 active registered users sharing their Volt data. But as OnStar continued to develop its API, it discovered a problem with how Volt Stats was connecting to the ATOMS cloud. Among the concerns was owner privacy, since the site used owners' OnStar usernames and passwords directly to access the data. It was also pulling location data.

On October 13, Rosack informed the Volt Stats community that GM was cutting him off. " GM has informed me that they'll be shutting down the interface I'm using to collect data for Volt Stats effective immediately," he wrote on Facebook.

Rather than leaving it at that, GM accelerated efforts to build a new public API. "They've promised to work with me to get an alternate API available," Rosack told his users, "so hopefully data collection won't be down that long. I'll keep you all updated as I hear more."

That new API uses JAX-RS (the Java API for RESTful Web services) and OAuth, the protocol for API access delegation used by Twitter and other social media and Web services providers. Doug Mutart, OnStar's Chief Architect, immediately put out a call for API developers to help build the public UI, and a group of contractors came on to rapidly scale up OnStar's API efforts. Meanwhile, Rosack needed to draft a privacy policy that would pass inspection with GM's legal department. A little more than a month later—November 20—Volt Stats was back up and running, though users had to re-register through the new API.

Where we're going, we don't need roads

With the new public API now up and running, OnStar has its sights on other applications for its infrastructure. Schwinke said OnStar is reexamining how vehicles communicate with the data center, and the company is looking at additional services that can be delivered in the vehicle.

"I've got a lot of cool stuff going on," he said. "We've built a 4G car, and did a cloud within the car." (OnStar also held a "hackathon" this summer to come up with new ideas for applications that can be built on the service.)

But Schwinke hinted OnStar's sights may be set beyond cars, and that the ATOMS platform could be applied to other machine-to-machine communication applications. While he wouldn't give details, Schwinke said OnStar's experience in this space places the company in a position to be a big player in the broader, emerging market for smart machines.

Listing image by OnStar

Channel Ars Technica