HowTo: Voice control of BCS with Amazon Alexa

Describe your system and processes, and post your config file.
berrywise
Posts: 40
Joined: Wed Dec 24, 2014 6:46 am
Bot?: No

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by berrywise »

Following Oakbarn's tutorial I get stuck when I get to step 5/6.

This is what the new layout looks like:

Step 5 Selecting Custom or Smart Home will bring you to the following screen which differs great from Oakbarn's tutorial.

This is what the next step in the process now looks like

Step 6

From what I have read in this thread we want to be using v2 but I don't understand the default endpoint pieces even after doing a couple hours of googling on the topic. Both the default end point and north american endpoint fields are required. I'm unsure if account linking is actually required because I have yet to actually get past filling in correct end points yet.

I have tried skipping this step and moving on to creating the Lambda Function and I'll see about posting up some screen shots from there in a few minutes.
berrywise
Posts: 40
Joined: Wed Dec 24, 2014 6:46 am
Bot?: No

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by berrywise »

Strep 15 - Create Lambda Function screen

Strep 15 - skill adapter Choosing "Use a Blueprint" doesn't show any results for the Skill adapter but choosing Browse serverless app repository does.

Strep 15 - skill adapter Choosing "Use a Blueprint" doesn't show any results for the Skill adapter but choosing Browse serverless app repository does.

Once you select to use the Skill Adapter you are next asked to enter in an Application Name and a TopicNameParameter I went ahead and used BCS_460 for the application name. Unsure what to put in TopicNameParameter (and it is required) I just put in the word brewery
berrywise
Posts: 40
Joined: Wed Dec 24, 2014 6:46 am
Bot?: No

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by berrywise »

Deployment Status Screen

On this screen it seems that if you click on alexasmarthomeskilladapter under Resource you can get to the configure screen (kind of like step 20)

At this point I really start getting lost :D

Designer Page

You now can see I have the ARN that I was looking for at Step 6 for my endpoints but taking that and copying and pasting it into both fields results in errors.
berrywise
Posts: 40
Joined: Wed Dec 24, 2014 6:46 am
Bot?: No

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by berrywise »

Scrolling down on that page I am able to edit code inline, change the runtime to Node.js 4.3 and leave the handler as index.handler

Function Code screenshot
berrywise
Posts: 40
Joined: Wed Dec 24, 2014 6:46 am
Bot?: No

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by berrywise »

After copying and pasting the code and changing the IP address, port and username/password I scroll down and come upon the execution role similar to step 28.

From there you don't get the option of choosing Lambda Basic Execution but you can create one which I did.

Lastly I added a Smart Home Skill from the designer menu, added in my application ID and clicked save.

Smart Home

and though the screenshot doesn't show it I clicked "enable" and then saved.

I think I'm around Step 33 now and where things seem to fall a part as I never really setup the smart home role on the developer console. I have that ARN now but going back and pasting that into the default endpoint gives me the following error and I'm not sure if I'm really supposed to be testing the Lambda function before getting that first part configured.

Error screenshot (this error occurs if I put the ARN in both endpoints (north america) and then hit save as well.


If I forgo trying to configure the developer console and do the test code I error out

Test Code Log

and I'm now stuck This is probably just too far over my head :D :D :D
JonW
Site Admin
Posts: 1726
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 »

I wish I could help you, but I just don't have the time at the moment to dig into their new console setup and figure this out. One of the issues I've had with Amazon over the period of time I've been doing smart home skills (I have 2 other ones) is that they are a continuous moving target. I applaud the changes they have made to the skills capabilities, but the setup UI where you're getting hung up seems to be an area where their changes have messed with a lot of people. They kind of assume you live and breathe AWS all day, every day and that you are a professional developer that will keep up.

Please keep at it and post your progress here as it will help others!
JonW
Site Admin
Posts: 1726
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 »

If I ever get time, my goal is to rewrite this as a plugin to another program called openHAB. It's mainly for home automation stuff, but controlling the BCS through there would give you Alexa, Homekit/Siri and other control options in one place.
JonW
Site Admin
Posts: 1726
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 »

berrywise wrote:
Sat May 25, 2019 8:15 am
If I forgo trying to configure the developer console and do the test code I error out

Test Code Log
Not sure if this is the same issue, but a previous user had the same error.
https://forum.embeddedcc.com/viewtopic. ... =10#p11744

Your attached pic doesn't show enough of the error to know if it is the same. I need to see info further down in the log output section.
berrywise
Posts: 40
Joined: Wed Dec 24, 2014 6:46 am
Bot?: No

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by berrywise »

I'll take a peek at the post you linked. In the meantime here is the full log

START RequestId: fe371e65-d546-4ddb-b855-b3c50c05b167 Version: $LATEST
2019-05-25T19:05:12.418Z fe371e65-d546-4ddb-b855-b3c50c05b167 ********** Event Request **********
2019-05-25T19:05:12.419Z fe371e65-d546-4ddb-b855-b3c50c05b167 {"header":{"namespace":"Alexa.ConnectedHome.Control","name":"TurnOnRequest","payloadVersion":"2","messageId":"4c6d29b1-b884-4fe2-a077-8b89d96e573e"},"payload":{"accessToken":"111222333444555666777888999000","appliance":{"applianceId":"PROCESS_0","additionalApplianceDetails":{"extraDetail3":"(not used)","extraDetail4":"(not used)","extraDetail1":"(not used)","extraDetail2":"(not used)"}}}}
2019-05-25T19:05:12.444Z fe371e65-d546-4ddb-b855-b3c50c05b167 ********** Event Response **********
2019-05-25T19:05:12.444Z fe371e65-d546-4ddb-b855-b3c50c05b167 {"header":{"namespace":"Alexa.Connectedhome.Control","name":"TurnOnConfirmation","payloadVersion":"2","messageId":"4c6d29b1-b884-4fe2-a077-8b89d96e573e"},"payload":{}}
2019-05-25T19:05:12.525Z fe371e65-d546-4ddb-b855-b3c50c05b167 ********** BCS Request **********
2019-05-25T19:05:12.525Z fe371e65-d546-4ddb-b855-b3c50c05b167 {"running":true}
2019-05-25T19:05:12.646Z fe371e65-d546-4ddb-b855-b3c50c05b167 Error: connect ECONNREFUSED (edited by me but the IP listed here doesn't look like anything I use):46001
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
END RequestId: fe371e65-d546-4ddb-b855-b3c50c05b167
REPORT RequestId: fe371e65-d546-4ddb-b855-b3c50c05b167 Duration: 323.38 ms Billed Duration: 400 ms Memory Size: 128 MB Max Memory Used: 47 MB
RequestId: fe371e65-d546-4ddb-b855-b3c50c05b167 Process exited before completing request
berrywise
Posts: 40
Joined: Wed Dec 24, 2014 6:46 am
Bot?: No

Re: HowTo: Voice control of BCS with Amazon Alexa

Post by berrywise »

JonW wrote:
Sat May 25, 2019 11:42 am
If I ever get time, my goal is to rewrite this as a plugin to another program called openHAB. It's mainly for home automation stuff, but controlling the BCS through there would give you Alexa, Homekit/Siri and other control options in one place.
I completely understand. I'm amazed at the amount ya'll put into just answering questions on this forum to begin with. I have been pretty amazed at what I have been able to put together for my brew days and I'm pretty sure I am using like 5 percent of the power of my system :D Ladder logic? Hah never figured it out but I sure can make some beer with this thing!

I'll keep playing around and see if I can get lucky. I have port forwarding so I can check on things when running errands or starting up my water on my way from work so that shouldn't be the issue but....I feel like I'm so close haha.
Post Reply