HowTo: Voice control of BCS with Amazon Alexa

Describe your system and processes, and post your config file.
Post Reply
User avatar
oakbarn
Posts: 839
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by oakbarn » Sun Mar 26, 2017 10:06 am

Success.

Alexa, Bring me a beer!

The issue was account linking and not the Javascript in the Amazon AWS Portal.

User avatar
oakbarn
Posts: 839
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by oakbarn » Tue Mar 28, 2017 1:32 pm

Are the Alexa, Increase Brew Kettle by 2 degrees" implemented? I cannot get my Voice commands to work for setpoints.

User avatar
oakbarn
Posts: 839
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by oakbarn » Sun Apr 02, 2017 8:44 am

oakbarn wrote:
Tue Mar 28, 2017 1:32 pm
Are the Alexa, Increase Temperature Brew Kettle by 2 degrees" implemented? I cannot get my Voice commands to work for setpoints.
I have retried several times and cannot get this command to work. Basically Alexa tells "that command does not work on device Brew Kettle"

I did notice that the commands were:

https://developer.amazon.com/public/sol ... y-messages
"getTargetTemperatureRequest",
"GetTemperatureReadingRequest",
"SetTargetTemperatureRequest",
"IncrementTargetTemperatureRequest",
"decrementTargetTemperatureRequest"


with the request added on the end of what you had. That change had no effect.

Also does not understand "Alexa, what is temperature of Brew Kettle?" Can't find answer to that question so is not seeing it as a device for that question.

User avatar
JonW
Site Admin
Posts: 1687
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by JonW » Sun Apr 02, 2017 11:51 am

The increment/decrement temps is not implemented - only setting to specific temperatures is implemented.

I also have issues asking Alexa what some of the current temperatures are. I get the feeling that they've created certain words/names to use for temperature devices and those work very well, but other custom names do not work so well. As an example, change the name of your brew kettle to something like "living room" and (after re-running discovery) test retrieving the temperature. It will usually work.

User avatar
oakbarn
Posts: 839
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by oakbarn » Sun Apr 02, 2017 5:35 pm

:lol: I now have to rename all my Probes to Rooms :lol:

Living Room for Brew Kettle did work.

User avatar
JonW
Site Admin
Posts: 1687
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by JonW » Sun Apr 02, 2017 5:59 pm

oakbarn wrote:
Sun Apr 02, 2017 5:35 pm
:lol: I now have to rename all my Probes to Rooms :lol:

Living Room for Brew Kettle did work.
I'm telling you, there is something weird with their recognition for certain words! I really think they've sampled and built matches for certain words that have a much better recognition rate than other words.

I have seen that things are progressively getting better and I know they are also actively hiring for several positions right now to expand on the automation interface capabilities.

I will add, my Siri voice interface has proven to be better at understanding the words we use for brewing. e.g. kettle, sparge, strike, fermenter, etc. Additionally, the Siri interface allows you to use the Homekit app to turn things on/off and set temperatures. As soon as I can get a little time to clean it up, I'll release it also.

User avatar
oakbarn
Posts: 839
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by oakbarn » Mon Apr 03, 2017 6:30 am

I am having an issue with Output 0.

If I ask it to turn on Output 0, it does but also turns on 1 and 2 as well. If I ask it to turn off, it turns on all 3. I have copied the code from other Outs
and just changed it back to "applianceId": "OUTPUT_0", but it still turns on all 3 so I am sure it is not the Javascript.

I also switched the appliance Id between 0 and 6, it still has the issue as it follows Output_0


It is really cool to talk to my Brewery. 8-)

User avatar
JonW
Site Admin
Posts: 1687
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by JonW » Mon Apr 03, 2017 9:09 am

You're running the example code. There's an example on how to turn on multiple outputs with one command.

That example uses Output0. Comment that section out. You'll find that code around line 215.

There's also an example on how to set the temperature in multiple places. You need to look through the code to see what each section is doing.

I guess maybe I'll comment out the examples by default.

User avatar
oakbarn
Posts: 839
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by oakbarn » Mon Apr 03, 2017 4:24 pm

Should have looked at it more. I did just copy and paste. I did create lots of variables at the top so I could quickly change things. As a result of the Voice control, I have renamed some of my Processes, States and Outputs.

I just commented out the code. I will see if there are others that I need to do that to.

Right now, I can only command a State in a Process that is already on. That is really not an issue as all my states follow numeric order and would be on if I want to jump to a State regardless.

I also just got my propane burners working on auto. With the voice control, that will be my safety as they are all High Pressure. I played with flame detectors and some other ideas but could not get them to work well. I will just command them on now versus going and lighting manually.

Now if AWS will fix the Temp issues although I rarely mess with SetPoints more than a couple of times when brewing.

Still have not figured out

Alexa, bring me a home brew. :lol:

User avatar
oakbarn
Posts: 839
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by oakbarn » Tue Apr 04, 2017 12:47 pm

I also commented out this code but do have a question about this:

Where is the "Set Strike" utterance that is in // Alexa, set Strike Temperature to 162 in the code?

I want to play a little more using this structure vs the extradetails and see if I have better luck with Setting Setpoints. I do know that you can use the Recipe Utility like the Temperature Setpoint Adjustment page of the GUI, but set several SetPoints at the same time.

/**
* Most control requests will be sent by the "default" handler below.
*
* Only define and send commands in response to a specific applianceId
* if you need to fire multiple events or some custom event.
* Examples of this would be if you wanted to turn on multiple outputs
* or start multiple processes with a single command, or if you wanted
* to set a temperature at multiple places with a single voice command.
* (FYI setting the temps can be used much like the web recipe utility.)
*
* You can override the "url" and/or "cmd" that is sent to the BCS.
* In these cases, the values stored in extraDetail2 , extraDetail3
* or extraDetail4 are not used and you would instead define your
* required values for the "url" and "cmd" parameters.
*/
switch (applianceId) {

// This example sets a temperature in two states plus an exit condition.
// You set the API URL for the state/process/object you're updating.
// This can be used instead of the recipe utility by simply saying:
// Alexa, set Strike Temperature to 162.
case 'STRIKE_TEMP':
// This sets the setpoint value in Process 0, State 1, Output 1.
//url = '/api/process/0/state/1/output_controllers';
// cmd = JSON.stringify({"key": 1,"value": {"setpoint": setValue}});
// new BCS_Command(context, url, cmd, function (BCS_Response1) {
// context.succeed(result);
// });

// This sets the setpoint value in Process 0, State 1, ExitCondition 0.
// url = '/api/process/0/state/1/exit_conditions';
// cmd = JSON.stringify({"key": 0,"value": {"value": setValue}});
// new BCS_Command(context, url, cmd, function (BCS_Response2) {
// context.succeed(result);
// });

// This sets the setpoint value in Process 0, State 2, Output 1.
// url = '/api/process/0/state/2/output_controllers';
// cmd = JSON.stringify({"key": 2,"value": {"setpoint": setValue}});
// new BCS_Command(context, url, cmd, function (BCS_Response3) {
// context.succeed(result);
// });

break;
// */

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests