I set up an Amazon Web Services (AWS) lambda function and a new Alexa Skill to control my home using Premise via an Amazon Echo. It works in a very generic and automatic fashion too.
The Echo sends to AWS a plain text command string of what you ask Alexa to have Premise do. Then an AWS lambda function and a new Alexa Skill I've defined send the command to my Premise server using HTTPS.
Premise then process the command string and even responds with a phrase of what was completed (for confirmation). You can also ask questions like: "is the front door open?"
What Premise is doing:
The command phrase (e.g. "turn on the master bedroom light") is processed using regular expressions to automatically find the room location, get the device type (e.g. light), automatically infer the property and requested state. All this is done by recursing locations under Home, and then recursing the objects for the matched location (to find a matching device type). After that the objects properties are recursed (to find the property and set the value).
It's even smart enough to infer a PropertyName based on the object type (e.g. for "turn on", the PowerState property is inferred (if the object has that property), and its value would be set to true). Since this method uses AWS, it's going to be very reliable and something that one could actually install for non-techie folks.
Finally no more Android kludge for voice control of my home using my Android Wear device (via Tasker + Autovoice + xposed framework + Google search api). That method is reliable, but relies on Google Now which is constantly updated, so one has to update the Google search api's hooks to ensure everything keeps working after each Google Now update. Google really missed the boat by not offering a Google Now sdk. It took me some time to study AWS and the Echo SDK, but overall, this method is the best so far as it will work (unless Amazon goes away which is unlikely).
The Echo sends to AWS a plain text command string of what you ask Alexa to have Premise do. Then an AWS lambda function and a new Alexa Skill I've defined send the command to my Premise server using HTTPS.
Premise then process the command string and even responds with a phrase of what was completed (for confirmation). You can also ask questions like: "is the front door open?"
What Premise is doing:
The command phrase (e.g. "turn on the master bedroom light") is processed using regular expressions to automatically find the room location, get the device type (e.g. light), automatically infer the property and requested state. All this is done by recursing locations under Home, and then recursing the objects for the matched location (to find a matching device type). After that the objects properties are recursed (to find the property and set the value).
It's even smart enough to infer a PropertyName based on the object type (e.g. for "turn on", the PowerState property is inferred (if the object has that property), and its value would be set to true). Since this method uses AWS, it's going to be very reliable and something that one could actually install for non-techie folks.
Finally no more Android kludge for voice control of my home using my Android Wear device (via Tasker + Autovoice + xposed framework + Google search api). That method is reliable, but relies on Google Now which is constantly updated, so one has to update the Google search api's hooks to ensure everything keeps working after each Google Now update. Google really missed the boat by not offering a Google Now sdk. It took me some time to study AWS and the Echo SDK, but overall, this method is the best so far as it will work (unless Amazon goes away which is unlikely).