Alexa Skill not recognized when tested on Echo - aws-lambda

I was doing one of the tutorials (HelloWorld) to make a skill for the Echo and I followed the directions. When I tested the skill using the Service Simulator, I typed in
Alexa, tell Greeter to say hello
and that returned the following JSON response:
{
"version": "1.0",
"response": {
"outputSpeech": {
"type": "PlainText",
"text": "Hello World!"
},
"card": {
"content": "Hello World!",
"title": "Greeter",
"type": "Simple"
},
"shouldEndSession": true
},
"sessionAttributes": {}
}
I think that is the correct output. However, when I tried testing the skill on my Echo, Alexa replies "Sorry, I didn't your question." I went on the history and Alexa interpreted my command as "alexa tell greeter to say hello." It seems that Alexa is not recognizing the skill?
I am using Amazon Lambda to execute the code, so I checked the logs and the code was not executed when I spoke the command to above.
I replaced the app_id in the javascript file to the one that corresponds to my skill. I have also put the amazon skills kit as a trigger.
I also tried the other tutorials (ChemistryFlashCards and HistoryBuff), and Alexa replies "I'm not sure what you meant by that."
Not sure what is happening! Any guidance is appreciated!!

For your Echo / Dot / Tap device to correctly invoke your custom skill, the Language of your Interaction Model needs to match the region your lambda resource is deployed in. I had this issue, as I deployed lambda in EU-West1 (Ireland) but the default alnguage for the Interaction model is English (US). In the interaction model I added a new language of English (UK) and copied over my intents and utterances, then deleted the English US language, and my Echo Dot now correctly invoked my custom skill intents

Your device language and the language you are using in developer account for creating custom skills should be same. If your device is registered in English India then you have to add English india language in your custom skill.
Check language on your alexa app settings -> Your Echo device -> Language

Have you enabled testing with your device for your skill?
Once you have this enabled, you can check if it is properly associated with your device by going to the Skills section of the Alexa app and hitting "Your Skills" to see the list of skills that your Echo recognizes. You should see your skill with a little green dev tag on it.

I was developing in default en-US language with North Virginia region (for Lambda function) but was based in India. I even tried using US address in Alexa app, but it didn't worked.
At the end I added all the english languages(en-IN, en-CA, en-GB, en-EU) and copied the model JSON file which was created for en-US. Build each one of them separately and fill the Description -> Skill Preview details for each of them. This worked.

Most of the time, you cannot open your skill because it is not the same language as your current language you set for your Amazon echo device. Then if that doesn't work, you might have not enabled testing for your skill.
Also if you want to quickly enable your skill if you haven't done so, say Alexa(or whatever your wake word is), enable

I use the 5 point check list below and it always works:
1. Under Alexa Language Settings, add all the languages like English-US and English-IN that your Echo devices are likely to be configured with.
2. Freshly build the interaction model and deploy again.
3. Tell Alexa to ignore the Alexa-hosted skill: Instead of its auto-generated lambda code, it should use the external custom lambda that you created.
4. Ensure that the service end point is correct: Under the AWS Lambda ARN, enter your custom lambda ARN for each and every region you will be invoking the skill.
5. In the Alexa simulator, select all the languages one by one in the drop down and test them individually.

One problem related to Language settings.
Correct the language settings in your Echo Device using https://alexa.amazon.in/ or alexa app. Make sure language enabled in skill and device are equal. For example, use English India.
Reenable the skill
Go to https://alexa.amazon.in/. Make sure device appears online. Disable the skill in Your Skill section. Enable it again.
This should solve the problem.

Related

Google Analytics not sending any events or custom dimensions data to dashboard

Scenario:
I am using this module: https://www.drupal.org/project/google_analytics version 3.1
It is using Google Analytics 4. Drupal version 8.9.x
We followed the documentation https://developers.google.com/analytics/devguides/collection/gtagjs/custom-dims-mets to create some custom dimensions and added in the Google Analytics configuration accordingly.
When view the page source, I see code is added there:
gtag("config", "G-MESUREMENT-KEY", {
"custom_map": {
"dimension1":"user_company",
"dimension2":"user_role",
"dimension3":"user_badge_access"
}
}
);
gtag("event", "custom", {
"user_company":"TEST Company",
"user_role":"authenticated, member_administrator, administrator",
"user_badge_access":"Office"
}
);
Using some Chrome GA debugger "GTM/GA", I see parameter is passing there. In the request "Pay Load" of Chrome debugger it shows its sending the values:
en=page_view&ep.anonymize_ip=true
en=page_view
en=custom&ep.user_company=Surface%20Oncology&ep.user_role=authenticated%2C%20member_administrator%2C%20administrator&ep.user_badge_access=Office
BUT I don't see the data when I open DebugView in the GA dashboard! And Interesting part is, some chrome debugger like "Google Analytics Debugger 2.8" when enabled, which seems open a debugger and connect to GA dashboard, DebugView is showing the events and parameters data. So there must be something which restricting or refusing to connect with GA Dashboard to push the data.
Reads lot of documentation, did lot of test but failed to find a reason for that. The site is fully login protected but event /user/login page which is accessible to all, not sending the data at all.
If some one can shed some light on the issue, it will really really help for me. Thanks in advance.
Actually this is my mistake of my understanding. All data is pushing to GA dashboard no confusion. The reason why I don't see data when creating a comparison report based on custom dimension parameters is due to "scope" difference.
So if you want to create a report based on event scoped parameters, please go to Engagement->Events, and if you want to create a report based on user scoped parameters, please go to Audience tab, but user scoped report will not show data if captured users record is less than 10.
A documentation for reference: https://support.google.com/analytics/answer/2709828?hl=en

Can aws-lex be used to build a conversation flow bot to reply with different answers based on user's input?

Can aws-lex be used to build a conversation flow bot?
For example:
Thank you very much!
Reason for all this: So we have our own "dialogue builder" and "bot-service".
Our own "Dialogue Builder": is maybe similar to Amazon Connect dialogue builder, and our own "Bot-service" is similar to Microsoft bot framework. Before we were using microsoft-luis to get "intention" of a sentence while using our own dialogue builder and our own bot-service to build a conversation/dialogues flow like if a user says "yes" then go to another flow and if a user says "no" then go to different flow (can this be done in slots?) === Binary tree :)
So now we are switching from luis to aws-lex and trying to think if it is possible to just use aws-lex UI and not our (dialogue builder/bot-service) anymore. But what I am understanding is that to use aws-lex without some kind of dialogue builder we would need to write alot of if/case statements if it contains large data, right? what is your suggestion? One way would be to just use "Amazon Connect" to utilize their dialogue builder so we don't have to write alot of if statements but then if we are using dialogue builder we can just use our own (old one) dialogue builder? what do you think?
Questions:
1)Is there a way to do something like this in aws-lex or not? I tried using slots/prompts/lambda but I am not able to go to 2nd or 3rd level depth in diagram. can be done somehow?
2) Do I have to use lambda and use "switch/if conditions each time it has to change the flow (ex: if answer is yes then reply this, and if no then reply this)?
3) If #2 is true, then is it possible for it to be used by non-developer. Even if I write if/conditions ~1k - 2k if conditions, then if a person (non-developer) tries to edit a dialogue/or-something through UI won't able to do it, right? (So does this mean that we are't really using UI of aws-lex, we are just writing "if conditions" in programming + using aws-lex "intention" to get intention, right?
4) Would it be possible to give example and show how making a flow is possible? So far using slots replies/responses don't change based on user's input. It doesn't matter if users says "no" or says "yes" it is going to reply with same path/answer. Is there a way to change reply based on user's input.
5) If #3 is not possible (non-developer) can't use aws-lex UI to make something like this, should we use custom dialogue builder which does this?
Thank you very very much!
It sounds like you're switching from the Microsoft Bot Framework to find a simpler solution to structured flows without entity recognition.
You may want research Microsoft's QnAMaker multi-turn ability. It's supported in the QnA Maker online editor, but not in the bot framework SDK (yet). They do have an example bot that uses it through the Web API.
https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/how-to/multiturn-conversation
I realize this doesn't answer you Lex question, but might address your concern.

Unable to find Alexa-skill-kit-sdk-factskill blueprint on aws lamda

I'm quite a beginner to Alexa skill set. Trying to add a node.js skill to Alexa following few nuggets from the internet. I have created skill on amazon developer console and trying to create aws lambda function on aws console. Surprisingly, when I tried creating a lambda function, I could not find any blueprint matching to "Alexa" keyword.
Here are the steps -:
1.Got to aws.amazon.com and log in
2. Search for the Lambda service and go to it
3. Click on Create a function
4. Click on Blueprints
5. Search for “Alexa”
I did some research and it says, changing to North. Virginia region could help but no luck so far.
Any such leads would be really appreciated.
if you are unable to find "alexa-skills-kit-nodejs-factskill" under the section "Use a blueprint",
please look for it under the section "Browse serverless app repository",it doesnt matters whatever the location you choose.
Use cloudformation application templates instead. Though they are still outdated (like the blueprints out there). My advice is that you create an Alexa Hosted Skill instead

how to send a request to google home\assistant like IFTTT+webhooks

Please direct me the right way. I'm stuck with some documentation issue. Going to code a small service with Google HOME for everyone to add a new phrase and make a POST request or answer with specific "TEXT" (like IFTTT run with WEBHOOKS) (fe: "Hey Google switch my kitchen light" -> service will send POST request to my own HTTP server). I know that IFTTT works but - I would to code the target service for tiny cases with fast response.
I tried to understand all Google Assistant layers - but still no luck and didn't find the clear path.
What I learned are:
1. connect to Google Account using OAuth 2
2. .... save the phrase and action for that in my DB - it's ok and simple way
3. ...??? how to send and to where? in (json?) a specific format
4. receive the answer from google home to understand the right case and make my action.... (for example: turn on\off the kitchen light)
It should be not so hard as I can image.... anyway Please help :).
Appreciate your time and answers and have a nice day!
To learn about extending the Google Assistant, you should look into the documentation for Actions on Google: https://developers.google.com/actions/extending-the-assistant
Although it also seems like you want to use it for Smart Home: https://developers.google.com/actions/smarthome/
You can run the Smart Home sample if you want to see how it works: https://github.com/actions-on-google/actionssdk-smart-home-nodejs

beta invite code + codeigniter

I'd like to limit access to my app (in Codeigniter) for beta users. Wondering if anyone knows of a library, spark or other option that can help me get started.
Would prefer not to reinvent the wheel if there's something out there already. My searches on Google and other resources haven't yielded anything.
Just use ANY of the Authentication libraries - and add a field called "Beta Code" on the registration page. If "beta code = your secret beta code" then allow registration. If the code is incorrect, then dont allow them to sign up.
You could extend if further when you are ready to go live, and turn it into a "promotion code", and if code = X, then apply 10% discount, extra free time etc (if this is a paid service when you go live).

Resources