I recently tried Amazon Echo / Alexa (specifically an Echo Plus and an Echo Spot) for my home automation (home automation that, on my own small scale, I consider ‘serious’ — not just a couple of IoT gadgets like Ikea or Hue lights).
Overall it is an excellent product. I am setting up several Echo units around the house for wide coverage: I liked it so much that I will NOT bother checking whether Google’s solution is better or worse. Feedback is very welcome anyway.
Is it artificial intelligence?
No. Any sentence outside its pattern matching fails.
>Alexa, are you better than Cortana?
>I like all artificial intelligences.
>Alexa, are you an artificial intelligence?
>Unfortunately I cannot find an answer to that question.
>Alexa, what is 2+2?
>2 plus 2 equals 4
>Alexa, what is 5-20%?
>The result of the calculation is -1.995.
(Both Wolfram Alpha and — note carefully — Windows Calc.exe answer 4.)
Is it a home-automation control system?
Not right now.
At best it can be seen as a minimal system in that sense. Better to treat it as an extension, a helper for a third-party home-automation system.
It seems limited and aimed at people with a handful of devices, very few types, very few supported features.
Roughly speaking it looks more like a target-market choice than an early-product shortcoming.
In my specific case I have over 70 devices listed in the Alexa app: alphabetical order only, with none of the organisation typical of other home-automation systems (rooms, areas, and so on).
UI usability is very poor. For example, to remove them all during testing I had to click them one by one, plus assorted crashes.
As an example, thermostat control: it accepts
>Alexa, set thermostat to 20
or
>Alexa, raise the temperature by 3 degrees
and a bit about modes and scheduling. Nothing else.
Homes with more than one thermostat (say one per floor) do not seem to be considered, let alone different temperatures per room (usually handled with radiator valves, at radiator level or at manifold level for underfloor heating). Stuff that any Z-Wave hub (from Fibaro to Domoticz on a Raspberry Pi) handles easily.
If you have a supported thermostat, please let me know in the comments or on Twitter whether there is a way to ask for the set temperature or the measured temperature that is not an invocation of an external skill.
A
>Alexa, ask Nest for the set temperature”
can be acceptable, but it means Alexa does not support it natively (as a Smart Home feature).
Is it real home automation? Does it work without internet?
No. Which in my view permanently disqualifies it as a “home-automation management system”.
No other closed home-automation system (Fibaro, for example) or open one (Konnex, Domoticz, OpenHAB, for example) requires the internet: they obviously work on the LAN.
In practice it is a helper, a gateway, nothing more.
Besides basic operation, which needs cloud-side speech recognition, all Skills that extend it are necessarily cloud-based as well.
If you have an IoT device or more generally controllable hardware at home (say a boiler over serial or Modbus), you must hope the manufacturer supports Alexa (via the cloud, necessarily) or implement it yourself (good luck).
I find it inconceivable that a home-automation system that must work IN MY HOUSE should depend on something OUTSIDE MY HOUSE.
You end up needing a backup system no matter what (imagine having to open a gate with no internet connection).
To be clear, even a Philips Hue or Ikea bulb controlling a light in a ceiling fixture is not real home automation: if you cannot turn it back on from the app after pressing the wall switch, it is a toy, not home automation. Imho.
Customisation, adapting to custom home-automation systems
Here is my use case.
As already described here, I have a custom system I built myself as a hobby just for my house, mainly based on an open hardware standard called Konnex, which — incredibly — Alexa does not support natively (and it is the gold-standard home-automation protocol, supported by most electrical-component manufacturers).
So integration between Alexa and my home-automation system necessarily (or simply…) means Alexa is an interface that issues REST/API HTTP requests to a local Raspberry Pi of mine that in turn manages everything (including Konnex).
There are basically two distinct approaches: a Custom Skill or a Smart Home Skill.
- A Custom Skill can potentially handle any interaction, but must be invoked explicitly by name.
- A Smart Home Skill can control devices (only the ones you define in advance) without an invocation name, but supports very few commands.
For an idea of how this plays out, Fibaro supports both, so they had to create two separate skills: Smart Home for basic commands and Custom for everything else.
My Custom Skill
Linux “uptime” output via Custom Skill, “Raspberry” as the invocation name
A Custom Skill means giving your skill a name (in my case Memole) and invoking it.
I called it “Memole” to make my home automation user-friendly and family-friendly. I seriously considered putting a Memole plush toy on top of every Alexa, to give it a face.
On the other hand, what alternatives do I have? “Raspberry” or “House” would be worse as invocation names (Ask House for the temperature? … come on).
So:
> Alexa, ask Memole for the temperature in the kitchen
means implementing in the Alexa Developer Console a skill Memole, an intent MyGetTemperature, and then matching an utterance — a phrase Alexa can recognise — such as
> Alexa, ask {skill-name} for the temperature in {parameter}
That way Alexa can call a URL on my Raspberry Pi, passing intent GetTemperature and parameter=kitchen
And that for EVERY pattern I want to handle.
- There is no way for the URL to be LAN-only. It must be reachable from AWS. It must be valid HTTPS, and — amazingly — Let’s Encrypt is not accepted. In my case I set up a reverse proxy from my domain to the home Raspberry Pi.
- There is no way to receive the full sentence spoken to Alexa. Worse, parameters must be specific types. Apparently they once supported a generic AMAZON.Literal as a string, allowing something like
> Alexa, ask Memole {Amazon.Literal string}
so I could handle free-form requests on the Raspberry Pi side, but it was deprecated because Amazon wants utterances to be as explicit as possible in their cloud.
My Smart Home Skill
The goal is to be able to say to Alexa
Alexa, turn on kitchen light
which means, at minimum:
- Alexa must call a URL on my Raspberry Pi to turn it on
- Alexa must call a URL to learn the current state
The steps are:
- Create a Smart Home skill in the Alexa Console
- Create a Lambda function on AWS
- Link the Alexa skill to the AWS Lambda function (plus all the auth setup, OAuth2, AWS roles, and so on…)
- Enable the skill on my Alexa
At that point a Discovery procedure starts: the Lambda function calls my Raspberry Pi for a device list so Alexa knows which capabilities each supports and how to invoke them. The list is here.
I will not dig into the Lambda implementation for now; just a few sticking points:
- Ordinary on/off devices (lights or switched outlets) are mostly grunt work.
- Same for dimmable or RGB lights, though I have not tackled those yet.
- To this day I still have not figured out which Controller is recommended / equivalent to a plain simple click. For example, the Fibaro The Button.
Take my electric gate: I can only send an “Open” pulse — it is not an on/off switch and I cannot read its state, and I still have no idea how to handle it with Alexa. - I still have not figured out how to handle motors. In general home automation they usually have “start/stop/direction (open/close)” functions. Maybe I need a LockController, but I have not succeeded yet.
For a hopper window, for example, a basic need is to start opening and say ‘stop’ at the right moment. Same idea for garage tilt doors.
Alright, I will stop here for now; if I get feedback I may expand some of the explanations.
Ciao!