Alexa on the Raspberry Pi

2016-06-15 16.43.38

UPDATE June 16th 2016: I was wrong about Alexa not being able to access my UK Amazon account. It appears that my UK an USA accounts are linked, so when I said “Read my Kindle”, Alexa started reading me my current Kindle book. It did it at about one sentence every few minutes, with no obvious way to stop it, so it was not that useful. I still don’t think it can access Amazon Prime music. 

Also, although the Alexa app is not available in the UK, you can go to alexa.amazon.com and control things from there. In particular, it shows me my history of interactions with Alexa.

A couple of things that the alexa web site showed me I could do were shopping lists and to-do lists. They are quite fun, but you have to go to the alexa web site to delete things from them.

It also reminded me that I could get a voice remote for my Amazon Fire stick, so I have ordered one of those. Perhaps at some time I can use it for voice control of my home automation.

I still could not get any smart home devices to work with my Alexa setup. When I tried “Discover devices” on the alexa web site, it did not discover my Wemo devices, although they are supported.  I suspect an Amazon Echo would find them. I wonder if this could be added to the Raspberry Pi application. It needs to do a UPnP Wifi search. It would be possible for either the Raspberry Pi or my Amazon Fire stick to do this.

SECOND UPDATE: The Alexa app is more useful than I thought it would be, now that I have looked at what it can do on alexa.amazon.com. It will now read and update my Google Calendar, and I have added several skills so it tells me about Beer, Cricket and a few other things. It will play a lot of radio stations via TuneIn, which does not need an account.

Unfortunately you can only set US addresses for devices (even Amazon Fire TV or sticks). This means I can’t default locations for things like weather. However, the traffic update does allow UK addresses. Amazon are going to have to do a lot of work on this to make it truly international.

I thought I would try the instructions on Github for Alexa on the Raspberry Pi.

My Kitchen Raspberry Pi, which is a Pi 3 with a Touch Display, and a camera, microphone and speaker, seemed a good choice. (I have Raspberry Pis in most of my rooms).

It took several hours to set up.

Here is is telling me a joke:

To use an Alexa with your own device, you have to set up a developer account using a USA Amazon account, and do a lot of configuration of your own custom device and security profile on the developer site. This results in a device type, and an oauth2 client id and secret, which you then use to configure the Raspberry Pi application.

The Raspberry Pi application is odd. It uses a node.js server and a Java client. The node.js server seems to only be used for the oauth2 authentication.

You have to install node.js, a recent version of the Oracle Java JDK, Maven, VLC, and a few other things. You need self-signed certificates to access the applications. It is all very involved, and the instructions are not very good. It is not at all clear why VLC is installed, particularly as it is configured, and then the configuration is discarded.

The main problem with the instructions is that they are for a very specific old version of Raspbian, and are misleading for the latest Jessie release of Raspbian.

The resulting application is a bit difficult to use and very fragile. It does not have much useful error reporting.

It looks like you need to re-authenticate the application every time you reboot the Raspberry Pi, and authentication is a non-trivial process.

This video explains some of the difficulties of the instructions and the application. The author of the video was setting the application up on a Pi Zero, which has its own issues:

Is the application useful for someone in the UK, who can’t yet officially buy an Amazon Echo? Well, not really.

Its OK for asking about the weather (which defaults to Seattle, if you are not specific), telling jokes, and asking some general knowledge questions. But is is currently pretty useless for playing music, and doing home automation.

There are several issues for UK users:

  • It is not linked to your UK Amazon account, so it can’t read your Kindle books, or play your Amazon music.
  • The Alexa application that configures it for home automation, music etc. is not available in the UK
  • It seems to use iHeartRadio for internet radio and that is not available in the UK.

When the Amazon Echo is eventually available in the UK, and other countries, some of these issues should be fixed. It might then  be worth developing a more robust application, which is easier to configure and use.

 

Advertisements
This entry was posted in Home automation, Raspberry PI and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s