Ericsson Research connected car driven by Restlet Framework and IFTTT
Early May, the Restlet team sat down with Kristoffer Gronowski, a principal at Ericsson Research’s facility in San Jose, California, to talk about the Internet of Things and the Connected Car. Kristoffer gave us a fun demo of a Lego Mindstorm car that receives instructions from his phone to turn its light on or toot the horn!
Kristoffer is pictured with his colleague Thao Nguyen with their cool connected toy car.
Although we got to see a Lego car that day, Kristoffer has actually hacked his own personal car to be able to command it from his phone! So it’s not just a grown-up kids’ proof of concept, but it works for real.
But let’s step back a little and see how the jigsaw pieces fall into place.
A central piece of the puzzle is IFTTT, a web-based service that allows users to create chains of simple conditional statements, called “recipes”, which are triggered based on changes to other web services, called “channels”, such as Twilio for sending / receiving text messages, Facebook, Twitter, and others.
Another important element of the story is how to actually interact with the car. Nowadays, all modern cars have an onboard computer that reports key data points about the status of the car (mileage, gas consumption, etc.), but also allows to control various aspects of the car (lights, horn, air conditioning, engine on/off…) One can access the computer through a special plug, the OBD (On-Board Diagnostics) port.
So how does the phone to car interaction actually work? The driver sends an SMS text message with his phone to a special phone number. The message is received through IFTTT, which then triggers a call to a Web API backend which is powered by Restlet Framework. The API then connects to the car and relays the commands through an OBD bridge wirelessly using cellular networks.
Conversely, the car reports back useful information to the driver’s phone by going the other way around: the car contacting the Restlet Framework backend through the OBD bridge’s cellular connectivity, which then triggers another IFTTT recipe, which then triggers the sending of a text message with the diagnostics details.
Kristoffer and his team were able to build the middleware API backend thanks to Restlet Framework, by exposing a nice Web API that is elegant and easy to work with. A special IFTTT channel was created to let IFTTT interact with the Restlet backend.
“We chose Restlet Framework to implement our experimental Web API backend as it was the easiest and most lightweight framework to work with,” said Kristoffer during the meeting. “I feel that the combination of Restlet’s open technology and existing Java and API development community can help to accelerate the creation of Connected Car and IoT technology communities in the future.”
In the context of Ericsson’s Garage initiative, Kristoffer ran a hackathon to let developers and hackers play with the Connected Car, through the REST Web API built with Restlet Framework. Using the Swagger UI, developers were able to easily invoke the API, innovate with the various commands supported by the car’s onboard computer, and of course have fun!