HowTo: Voice control of BCS with Amazon Alexa
Posted: Wed Feb 15, 2017 2:54 pm
I have created a JavaScript function that allows you to control your BCS using Amazon Alexa.
Example voice commands could be:
Alexa, turn on Mash Process.
Alexa, turn on Boil Kettle Pump.
Alexa, set Strike Temperature to 162.
Alexa, set Boil Element to 55
This interface uses the Amazon "Smart Home Skill" to define the voice interaction with devices. This includes using the On, Off, set (level) commands for outputs and the set temperature commands for setpoints and useful in state exit conditions. Note that the "Smart Home Skill" only includes pre-defined commands used to control devices and as such, you are limited to working within the "Smart Home Skill" framework. Please see this link for details on the complete Smart Home Skill API: https://developer.amazon.com/public/sol ... -reference.
You will be required to setup a (free) Amazon developer account in order to use this skill.
The steps for doing the setup are located here: https://developer.amazon.com/public/sol ... home-skill . Note: When following those instructions, there are a couple of changes to be made. At step 8, choose "Node.js 4.3' as the runtime instead of "Python 2.7". Also, at step 10, do not copy and paste their example code, instead substitute the contents of the file "Alexa_BCS.txt" that I have included. This is a JavaScript file that includes the definitions of your BCS device and functions for controlling the BCS.
All defined processes, outputs, temp settings, etc. are listed in the JSON structure near the end of the provided file in the function handleDiscovery. You will want to modify those names to be more Alexa friendly (e.g. instead of "Process 0", you may want "Mash Process"). Additionally, you may want to define custom voice commands to allow you to switch states or even set a temperature and map it to multiple outputs or exit conditions. (see examples in function).
At a minimum, you will need to change the "host", "port" and "user" variables. It is also suggested to change the "friendlyName" for each device as that is the voice command name that you use. If you leave the defaults, you would need to say "Alexa, turn on Process 0", but if you change it, you could instead say, "Alexa turn on Mash Process".
Below is an overview of the communications that occurs when you ask Alexa to control your BCS.
Example voice commands could be:
Alexa, turn on Mash Process.
Alexa, turn on Boil Kettle Pump.
Alexa, set Strike Temperature to 162.
Alexa, set Boil Element to 55
This interface uses the Amazon "Smart Home Skill" to define the voice interaction with devices. This includes using the On, Off, set (level) commands for outputs and the set temperature commands for setpoints and useful in state exit conditions. Note that the "Smart Home Skill" only includes pre-defined commands used to control devices and as such, you are limited to working within the "Smart Home Skill" framework. Please see this link for details on the complete Smart Home Skill API: https://developer.amazon.com/public/sol ... -reference.
You will be required to setup a (free) Amazon developer account in order to use this skill.
The steps for doing the setup are located here: https://developer.amazon.com/public/sol ... home-skill . Note: When following those instructions, there are a couple of changes to be made. At step 8, choose "Node.js 4.3' as the runtime instead of "Python 2.7". Also, at step 10, do not copy and paste their example code, instead substitute the contents of the file "Alexa_BCS.txt" that I have included. This is a JavaScript file that includes the definitions of your BCS device and functions for controlling the BCS.
All defined processes, outputs, temp settings, etc. are listed in the JSON structure near the end of the provided file in the function handleDiscovery. You will want to modify those names to be more Alexa friendly (e.g. instead of "Process 0", you may want "Mash Process"). Additionally, you may want to define custom voice commands to allow you to switch states or even set a temperature and map it to multiple outputs or exit conditions. (see examples in function).
At a minimum, you will need to change the "host", "port" and "user" variables. It is also suggested to change the "friendlyName" for each device as that is the voice command name that you use. If you leave the defaults, you would need to say "Alexa, turn on Process 0", but if you change it, you could instead say, "Alexa turn on Mash Process".
Below is an overview of the communications that occurs when you ask Alexa to control your BCS.