Q: Alexa Skill. Can an alexa skill bind with multiple lambda functions? [duplicate] - aws-lambda

I'm developing a hardware that obeys voice commands from an Alexa skill.
The skill is associated with a lambda function that has the name of the AWS iot object and the endpoint of the skill.
Everything works very well.
But when I want to distribute my skill, it will obviously only work for my hardware.
I want to build multiple devices, that means creating multiple objects in AWS iot.
My question when the user downloads the Skill, how can it be configured so that he can enter the name of the object, of the hardware that the user has purchased.
So far the most absurd and crappy solution I can think of is to create a skill for each of the devices.
Any suggestions or comments?

The best way to do this is through the smart home skill API. The pattern it defines decouples the skill logic with the logic to control individual devices. This makes your system more complicated, but as you've pointed out any solution using a single skill lambda is going to be pretty "crappy."
This documentation article explains how to use the smart home skill API better than I could.
https://developer.amazon.com/en-US/docs/alexa/smarthome/understand-the-smart-home-skill-api.html

Related

How can a single skill be linked for multiple objects created in AWS IoT independently?

I'm developing a hardware that obeys voice commands from an Alexa skill.
The skill is associated with a lambda function that has the name of the AWS iot object and the endpoint of the skill.
Everything works very well.
But when I want to distribute my skill, it will obviously only work for my hardware.
I want to build multiple devices, that means creating multiple objects in AWS iot.
My question when the user downloads the Skill, how can it be configured so that he can enter the name of the object, of the hardware that the user has purchased.
So far the most absurd and crappy solution I can think of is to create a skill for each of the devices.
Any suggestions or comments?
The best way to do this is through the smart home skill API. The pattern it defines decouples the skill logic with the logic to control individual devices. This makes your system more complicated, but as you've pointed out any solution using a single skill lambda is going to be pretty "crappy."
This documentation article explains how to use the smart home skill API better than I could.
https://developer.amazon.com/en-US/docs/alexa/smarthome/understand-the-smart-home-skill-api.html

How to host BF Skills in Teams App Store?

We have a bunch of Microsoft BF Bot Skills that we are using with our Virtual Assistants. Not all skills are applicable to all our users. Teams being our collaboration platform, I was thinking if we could host these skills in our Teams enterprise app store and then let our users dynamically add them to the VA as needed. Is this even possible? Has anyone tried something like this?
Unfortunately, I don't believe this would work as they are currently designed. The relationship from bot:skill is managed, primarily, by the bot via AppId's, keys, endpoints, etc., shared between the two. The issue is each skill uploaded into Teams would require it's own manifest whereas normally only one is promoted, the primary bot. By each skill having its own manifest, Teams is going to treat it as an individual app. I believe this would interfere with the bot and skill properly connecting.
That being said, you could forgo the current bot:skill design and create smaller independent bots. By using proactive messages, it is perfectly feasible to send messages between bots. As a user interacts with the HR bot and answers some question about payroll, that message is forwarded as a proactive message to the Payroll bot which does stuff and then returns a message back to the HR bot and, subsequently, to the user.
Hope of help!

Is it possible to create a Cortana skill that is available only within a single enterprise?

Is it possible to create a Cortana skill that is limited to users on a particular company's network?
For example, I would be interested in building a Cortana skill for the Harman Kardon Invoke smart speaker, but this skill would not be published globally.
Are all skills always published globally or is there a way to control this?
Currently this isn't possible as a built in functionality for Cortana. There are some ways to deploy to only certain email addresses however. You can use the "deploy to group" functionality outlined here:
https://learn.microsoft.com/en-us/cortana/skills/publish-skill
Alternatively, you can publish the skill "to world" and force users to authenticate the first time they access the skill, thus limiting it to people with your approved credentials.

Deploy Hubot on AWS Lambda?

I'm a noob using Hubot, so please bear with me.
I was going through Hubot's documentation ( https://hubot.github.com/docs/deploying/ ) and saw that we can deploy to Heroku, Unix systems and others.
May I know how can Hubot be deployed on AWS Lambda ?
Best Regards.
I was wondering the same thing. I think the answer is probably "yes, if your chat system can send you http when traffic happens". I think Lambda is probably a great choice, since each message in chat is an event to process according to the rules that your bot has. So, the Lambda function invocation model is a good fit - lots of tiny invokes. You might, though, want to filter the traffic that gets to the function, though, if your chat system is high-traffic.
For example Slack's Events API lets you subscribe to all of the things you might need the bot to see, I think. You'd then need to route those requests to your lambda function, which you could do via AWS API Gateway.
The existing hubot-slack adapter uses the Real-Time Messaging API, though, so you'd need to write your own adaptor for the Events API http that the API Gateway receives.
The same approach (and requirement) applies to other chat systems.

How to test the amazon alexa custom skill through your computer while in development phase?

I am trying to use the sample code provided for Amazon Alexa API, and trying to run hello world / history buff examples through the computer. How do I test from my local machine, about the request and response formats. In the README file it is given to visit this website : http://echo.amazon.com/#skills, but I could see nothing there as it mentions more about connecting to the device. I dont have the device, but I would like to test things locally through my laptop.
We have a tool that we built specifically for this purpose:
https://bespoken.tools/blog/2016/08/24/introducing-bst-proxy-for-alexa-skill-development
Requests and responses from Alexa will be sent directly to your development laptop, so that you can quickly code and debug without having to do any deployments. We have found this to be very useful for our own development.
Our Github project is here:
https://github.com/bespoken/bst
We are also adding other useful commands for Alexa development.
Yes, the Test tab in the Alexa Developer Console allows you to interact completely with your skill during development.
You will type in your utterances instead of speaking them, but from a program logic perspective, there is no difference.
The Test page also provides a place to type in your skill's reponses, to see what they'll actually sound like. I recommend that you do so if you don't have an actual device. Sometimes adding or removing a comment can help make the responses easier to understand, or sound more natural.
Use http://ngrok.com
See my video for a tutorial:
https://youtu.be/eC2zi4WIFX0?t=108
I'm guessing the key point in OP's question is "dont have the device".
There is a web simulator at https://echosim.io
It behaves just like any other Alexa 'device'. Login with your Amazon account and it picks up all your selected skills, etc. Shows up as just another device in the Alexa app.
Only downsides: You have to click to talk, and it's pretty slow, presumably because it has to receive, buffer, convert and re-ship the audio.
Also, I'm not sure how you register/connect to the Alexa service in the first place without an Echo/Dot device, but I assume there is a way.
UPDATE:
More recently, there are a number of free 3rd-party apps on Android and iOS devices to also simulate an Alexa/Echo device. It can be less klunky than the web site. Search for 'Alexa' in your App/Play store and try a few of them out. "Reverb" is one: https://itunes.apple.com/us/app/reverb-for-amazon-alexa/id1144695621
Good luck.
I dont have the device, but I would like to test things locally
through my laptop.
If you are developing the skill using an AWS Lambda function in Python, have a look at: https://pypi.python.org/pypi/FirstAlexaSkills/0.1.2
It can generate custom Alexa events based on your parameters (utterances, slot variables) and allows you to create test cases against your local code, as well as against AWS Lambda itself.
You can also test your skill locally by following this tutorial:
How to test your Alexa skill locally

Resources