We've all seen in movies and tv series how smart homes talk to their inhabitants and make their lives easier by helping with household chores. On one of the latest ones I caught, Castle (series 3, episodes 8 onwards), the writer has conversations with a feminine bot that even prepares his coffee the way he likes it, making his wife jealous. Science fiction aside, this is already a reality.
For a few years now there have been homes with different levels of automation that employ expensive systems in which interaction is done by the use of sounds - e.g: clapping or whistling. Some of these are made by brands like KNX and Lonworks, the latter used even in homes of racing pilots on top of trucks. However, due to their steep installation and maintenance prices, they are usually outside the reach of the majority of users.
Lately however, boosted by the proliferation of mobile and IoT (Internet of Things) devices, a new range of personal assistants have emerged such as Google Now, Apple's Siri and Microsoft's Cortana. Since these are readily available on our mobile devices, why not then have them available in our homes as well? In fact, that's exactly what these companies have done with Google's Home, Harman Kordon with Cortana and Amazon with Alexa. Let's dive a bit deeper into Alexa.
Alexa devices
There are several models that work with Alexa: Echo, Echo Dot and Echo Tap, the main differences being connectivity and the ability to transport the device to another location, as some of them are battery-operated while others require a power source. Another difference is the ability to connect the device to external speakers. For our internal testing, we've used the most compact version known as Dot (v2) which has left us with quite a good impression.
It's worth nothing that the devices are only available in those countries where English (UK / US) is spoken and also Germany. As it is known, although growth is gradual, they will incorporate more languages as intelligence and natural way of speaking evolve. In fact, at the time of this writing, it was already possible to make the device whisper, show signs of joy and emphasise certain words with changes in tone, volume and speed.
The "apps" in Amazon Alexa are known as "skills" and these run on servers and not on the device itself, making it possible to develop both on Amazon's platform and other private or public hosting services. There is also an SDK to facilitate development and communication with Alexa in different programming languages such as Node.JS, java, C #, etc. along with additional ones for connecting to Alexa-compatible home automation devices. An SDK developed by the community is widely utilised for its ease of integrating it with other Node.JS servers through the Express module, although it does not have all the same options as the official one has. And above all the possibility of running tests locally and debugging with your favourite Node.JS IDEs like Visual Studio Code, which will allow you to build a working Skill in just minutes.
A curiosity that came up during our testing was the need to know the location of the user, as is the typical use case with apps like Uber, Domino Pizza, etc., which are used in countries where Alexa is distributed. Since the device does not have a GPS tracker it is not possible to determine its current location, nor it is possible to obtain the IP address of the device which would in turn allow us to derive it's location. Fortunately, as of April 2017, Amazon provides an API call that allows access to the user's location as it was entered on their Amazon account. Another option of course is to simply pose the question to the user.
Our use-case for testing Alexa is the one discussed in the Oracle Bank Bot blog post: the idea is to interact with Alexa to perform bank operations such as topping-up mobile phones, moving money, paying bills, applying for loans, getting the balance of your accounts or even making enquires such as the status of a particular operation, the cost of an international transfer or how to find a Swift identifier.
If you would like to see or try it and you have an Alexa-compatible device, just search for the Bank Bot skill in the Amazon mobile and enable it, as shown in the screenshot below. Enjoy!