FWIW, I ended up trying to do this on my own from scratch, but instead of using the haaska/HA cloud approach of automatically mapping certain types of HA entities to certain types of Alexa interfaces, I decided to use AppDaemon instead and let the user decide what exactly to expose to the Alexa Smart Home Skill. The main advantage to this is that I could use some Alexa interfaces like ChannelController that don’t natively map to any HA entities but can very easily correspond to an AppDaemon app. The second big advantage is that all the message processing happens locally in AppDaemon instead of in the lambda function (which just dumbly forwards requests and patiently waits for responses to dumbly forward back to the Alexa Cloud), which makes testing a hell of a lot easier. The obvious disadvantages are that users will have to install AppDaemon, know python to configure things themselves, and familiarize themselves with the Alexa Smart Home API, but the tradeoff is that it’s way more flexible and powerful. I think down the line it would be relatively easy to automatically map HA entities to Alexa interfaces, but that can be done later.
Anyway, I’m pretty much done, but frankly a lot of the issues seem to be caused by how flaky the Alexa Smart Home Skill infrastructure actually is. I’m able to parse a message, execute the corresponding command, and send a response, but more often than not, the Alexa cloud doesn’t like the response for some reason and Alexa will say something along the lines of " isn’t responding". Worse, there’s no way to tell why the Alexa cloud doesn’t accept the responses, which is absolutely unacceptable. The documentation and samples are often just plain wrong or contradictory, and the actual dev support on their forums is pretty much non-existent. Here are some examples of things that just don’t work:
- Alexa can recognize “set thermostat to heat” but cannot recognize “set thermostat to 70”, which is exactly what the documentation says should work.
- For entertainment skills, the Alexa cloud refuses to accept responses to operations that contain the actual data with what changed. For example, when turning off an entity, the Alexa cloud expects a response that includes the new state of the entity (eg, off), but it only accepts the response if the state is not included!
- Entertainment interfaces have a different version (1.0) than all other interfaces (3, not 3.0) for discovery only. This difference isn’t explicitly noted anywhere. And yes, the “.0” of 1.0 actually matters!
That’s just a few of the problems I’ve run into.
Until I’m able to get things to work end-to-end properly, I don’t think I’ll be releasing it, but just a heads up for those who are trying to get things to work.