Inspiration

If you own an electric vehicle you don't always know where the next charging station is located, especially if you are driving or in an unknown area. Alexa for the rescue!

What it does

This Alexa Skill is build for Germany, Austria and Switzerland. When opening the Skill it asks for the users permission to either the localization services or the device address the user entered via the Alexa companion App. If those permissions are not granted the Skill will ask the user to enter an address. The user enters either city, zip code or street and zip code or city.

Alexa will then respond with the three charging stations that are located in the surrounding of the user. Three chargers will be named by Voice or in a Card in the Alexa companion App. If used on an APL-capable device the user will see a Map from OpenStreetMap and five markers that show the nearest charging stations. The result will also be persisted for the next time the user asks without giving permission or stating an address.

How I built it

The Skill is built by using the Alexa Developers Console and using AWS Lambda. The source is written in node.js using the latest ask-sdk v2 by Amazon. The skill queries a geo-location REST web service to calculate the latitude and longitude of the users location / address, sends this geo-data to another REST-API to get the Map as a JPG image as well as the chargers from a third REST-API. Alexa then replies with the data and also shows it via APL.

Challenges I ran into

Alexa users tend to talk to Alexa like a human. So Alexa has to understand the different ways an address can be voice-entered. Zip codes and housenumbers were tricky to implement because I'm using the SearchQuery SlotType and I have to convert numbers (Alexa understands them as string) to real numbers. So I built a function to convert spoken numbers to integer numbers.

Accomplishments that I'm proud of

Using all of those three APIs as well as the Alexa localization or user-entered address and return the result in a nice APL-way. This will be quite helpful when Alexa car is launched or more and more cars will be shipped with Alexa built-in.

What I learned

This was my first skill written in ask-sdkv2 after only using the alexa-sdk (v1). Getting the REST-APIs to respond back and correctly using those data was very interesting.

What's next for Alexa APL Skill: Stromtankstellen | EV-Charging

I plan on expanding to other countries like UK, US and maybe include gas stations. Maybe also a zoom mode or ways to touch the map and get more information.

Built With

Share this project:

Updates