forked from jbnunn/Alexa-MyQGarage
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathInstructions.txt
217 lines (139 loc) · 9.47 KB
/
Instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
1. Create a free Amazon developer account via url "developer.amazon.com"
2. On the Amazon developer main page, click on the "Alexa" tab and select "Alexa Skills Kit"
3. Add a new skill using the following settings:
NOTE: Settings not mentioned below can be left as is
----------------------------------------------------------------------------
Skill Information
----------------------------------------------------------------------------
Skill Type : Custom Interaction Model
Name : <Your Own Custom Skill Name>
Invocation Name : <A Custom Device Name For Alexa to Recognize>
Example: Garage
NOTE:
In my experience, it is better to give the skill a single
word invocation name because it will shorten your command
instruction.
It is easier to say "Alexa, ask GARAGE door one to close"
than to say "Alexa, ask MY GARAGE door one to close"
----------------------------------------------------------------------------
Interaction Model
----------------------------------------------------------------------------
Intent Schema : <Paste the contents of the intent_schema.txt file here>
Custom Slot Types: <Add TWO slot types using the info below>
<1st Slot Type>
Enter Type : DOOR_NUMBERS
Enter Values : <Paste the ENTIRE contents of the DOOR_NUMBERS.txt file here>
<2nd Slot Type>
Enter Type : DOOR_STATES
Enter Values : <Paste the ENTIRE contents of the DOOR_STATES.txt file here>
Sample Utterances: <Paste the ENTIRE contents of the sample_utterances.txt file here>
----------------------------------------------------------------------------
Configuration
----------------------------------------------------------------------------
You will need an ARN to get pass this step so you will come back to this
step only after you have created your lambda function which will provide
the ARN information that you need. For now, proceed to step 4
------
4. Click on the "Skill Information" navigation link on the left side to navigate back to
the "Skill Information" section of the skill you are trying to create and copy the
"Application ID" of the skill onto a notepad as you will be needing it in step 8c.
Sample Application ID: amzn1.ask.skill.2dc3256e-f143-41a6-ab8f-194c3df2d789
5. Create a free/Basic Amazon webservice (AWS) account via url "aws.amazon.com"
6. On the upper right corner of the AWS main page, just beside your AWS account name,
shows a location that you may need to click and select "US East (N. Virginia)"
7. Still on the AWS main page, search for AWS Services called "lambda"
8. Click the "Create a Lambda Function" button and follow the steps below:
a. On the "Select Blueprint" page, choose "Blank Function"
b. On the "Configure Triggers" page, click on the dotted square box and choose
"Alexa Skills Kit", then click the "Next" button
NOTE: If "Alexa Skills Kit" is not available, it is because your location
is not set correctly (Please refer back to step 6 for more info)
c. On the "Configure function" page, enter the following information:
NOTE: Settings not mentioned below can be left as is
Name : <Your Custom Function Name Without Spaces>
Example: OperateGarage
Runtime : Python 2.7
----------------------------------------------------------------
Lambda function code
----------------------------------------------------------------
Code Entry Type : Upload a .ZIP file
Function Package : <Click the "Upload" button and select the
"lambda-upload.zip" file located in the directory
were you extracted the files I provided
Environment Variables:
Key Value
------------- ---------------------------------------
username <Enter your MyQ account username here>
password <Enter your MyQ account password here>
skill_id <Paste the Application ID of your Alexa Skill here (The one from step 4)>
inv_name <Enter the exact same Invocation Name you used to create the Skill in step 3>
no_open <Enter a "Y", if you only want Alexa to close but never open doors for security reasons>
----------------------------------------------------------------
Lambda function handler and role
----------------------------------------------------------------
Handler : main.lambda_handler
Role : Create new role from template(s)
Role name : <Your Custom Role Name>
Example: GarageOperator
Policy templates : Simple Microservice permissions
----------------------------------------------------------------
Advanced Settings
----------------------------------------------------------------
Timeout : 15 seconds
d. Click the "Next" button
e. Click the "Create function" button
f. On the page that comes up immediately after clicking the "Create function"
button, notice that you now have the ARN information provided to you located
at the upper right section of the screen, just below your AWS account name.
This will look something like the sample below and you will need to copy this
information in order to proceed to the next step.
Example: arn:aws:lambda:us-east-1:563954059256:function:OperateGarage
9. Return to your Amazon developer account >> Alexa >> Alexa Skills Kit project and
edit the custom skill that you have already started creating back in step 3 and
navigate to the "Configuration" section of the skill and enter the information
below:
NOTE: Settings not mentioned below can be left as is
----------------------------------------------------------------------------
Configuration
----------------------------------------------------------------------------
Service Endpoint Type: AWS Lambda ARN (Amazon Resource Name)
For Geographical Region, choose "North America" and
on the text box that popped up immediately underneath,
enter the ARN information similar to the one shown
below and then click on the "Next" button.
arn:aws:lambda:us-east-1:563954059256:function:OperateGarage
----------------------------------------------------------------------------
Test
----------------------------------------------------------------------------
On the "Test" section, just make sure that the skill is ENABLED and that's it!
You may proceed to the next step and try out the commands directly with Alexa
or you may opt to do a simulation test to verify that you did everything
correctly by scrolling down to the "Text" tab of the "Service Simulator"
section and typing in command "if door 1 is open" in the "Enter Utterance" text
box and clicking on the "Ask <YourFunctionName>" button.
10. Congratulations! You are now ready to test your skill by giving Alexa the
command below:
Assuming that your skill invocation name is "Garage"
----------------------------------------------------------------------------
If your MyQ unit is only linked to a single garage door, you would say
----------------------------------------------------------------------------
"Alexa, ask GARAGE if DOOR is open"
OR
"Alexa, ask GARAGE DOOR to close"
----------------------------------------------------------------------------
If your MyQ unit is linked to two garage doors, you would say
----------------------------------------------------------------------------
"Alexa, ask GARAGE if DOOR ONE is open"
OR
"Alexa, ask GARAGE if DOOR TWO is closed"
OR
"Alexa, ask GARAGE DOOR ONE to close"
OR
"Alexa, ask GARAGE DOOR TWO to open"
----------------------------------------------------------------------------
In addition, for units linked to two garage doors, you may also drop the
DOOR keyword and just say
----------------------------------------------------------------------------
"Alexa, ask GARAGE ONE to close"
OR
"Alexa, ask GARAGE if TWO is open"