I am working on Amazon smart home skill for controlling the smart home appliances. I am done with creating a skill for that. Now I want to test my skill with any type of virtual device. Is there any way (or virtual devices) for testing the smart home skill without using the physical device.
There's 2 options I use for testing without having physical hardware in front of me.
While editing the skill in the developer console (developer.amazon.com) there's a 'Test' tab that allows you to test out your skill and see payloads sent/returned too.
There's also a cool online tool called Echoism (https://echosim.io/welcome) that will allow you to log into your Amazon account and interact with Alexa through the browser. To use this you'll need to make sure tests are enabled for the skill through the developer console in your account.
There are also some libraries depending on what language you're writing in that will allow you to test locally without having to deploy to lambda first. If you're using Node.js try out node-lambda (https://www.npmjs.com/package/node-lambda). You can create your own payload and test that against your skill locally. You can also package up your skill, test it and then deploy to lambda via terminal. If you're using Python then try out PythonLambda (https://github.com/nficano/python-lambda). It has the same features as node-lambda.
Related
I have an alexa skill which was previously working fine in smartphone and echo dot with same account in developer mode. I went ahead with distribution and added beta testers and enabled beta testing. Now I'm not able to invoke this skill from my smartphone while it is working in echo dot, both linked to my developer account. Also none of the beta testers are able to invoke the skill even after enabling it. Any idea what might be the problem here?
There is a locale discrepancy between your skill, your account, and your Alexa App. In order to use a skill, the skill's language model must match the user's account location as well as the app's location.
This means on one account, you will only be able to see and test skills from one marketplace at a time. So, if you've got your developer account configured for the US, and your skill only has a en-IN language model, you won't be able to see and test it in your Alexa app.
There are two options available to fix this issue:
-Option 1-
The simplest solution is to create a new language tab for your skill within developer portal that matches the language setting of your app and device. For information on creating a new language model for your skill, please follow this link: https://developer.amazon.com/en-US/docs/alexa/custom-skills/develop-skills-in-multiple-languages.html#add-a-language-to-an-existing-skill
-Option 2-
You can configure your account for a region that matches the language model you currently have set up for your skill. To do this, first make sure the device you're testing on is registered to your developer account, and then that it is set up for the correct language and location in its device settings. For actually configuring your account itself for that marketplace, you'll need to go through the retail Amazon site. Follow these steps:
Navigate to https://www.amazon.com/
Go to "Your Account" > "Your devices and content" > "Change your digital and device settings" > “Preferences”
In "Preferences" click on the "Country/Region Settings" section
If the country is not the same as the marketplace you need to test, change it to match
I've found this amazing site to generate my first Alexa skill.
I've uploaded the standard template they have and it passes all the checks.
Please note that this skill has not published yet
and When I say (to the device), Alexa, open api starter, Alexa (device) cannot find that. I have an echo dot 2nd gen.
Do we need to publish a skill to be available for the Alexa device?
In my test mode, I've already enabled the Test for this skill.
Yes, you can use the skill locally for development purposes. If you go to the Alexa apps you should see your app located in there and you can then install it. Once installed you can ask Alexa to open the app.
Although, you can't use other peoples apps that are in development because the app is associated with the Amazon account.
You need to register your device to the development account that you are using.
Once logged in from your development account go here (alexa.amazon.com)
Go to the settings tab and click set up a new device
You will be guided through simple instructions on how to connect your device.
Once you successfully connected the device, you can use all skills from your developer account.
Note: You can have more devices connected to the same developer account, but each device can be connected to just one developer account at a time.
Unfortunately this doesn't work all the time - not sure if it's missing information (for instance on the Echo Screen you have to tap the serial number repeatedly to put the device into dev mode - there doesn't seem to be the same thing for the dot - and if there is it's not mentioned here.)
It could also just be the sheer number of variables in both the alexa ecosystem, the app and what phone it is on and the network the device is connected to and the dec console. One set of instructions doesn't always cover all the possibilities.'
I have found that when using the skill kit with vscode that I have to go into the web-based skill editor and do a build before it works with an echo device.
I've been developing an Alexa skill and I need to keep some state between requests on a per-user basis. I'm using the flask-ask framework and it works well with a single user, but clearly I need to test with multiple users, preferably in a simulated environment at first so I can hammer it with multiple requests for multiple users. I don't consider the app ready to go to beta testing yet.
I've scoured the web for this but I can't seem to find an answer; short of setting up multiple Amazon accounts, is there an easy way to test a development skill for multiple users in a simulated environment?
Currently we doesnt have feature to test with multiple user in simulated environment in development environment. In addition, the simulator is not supported for use in multiple browser tabs at the same time. Rather you can use simulator, voice using an Alexa-enabled device linked to developer account, ASK CLI or Use the skill testing features of the Skill Management API simultaneously to test as multiple users. for more details please refer documentation .
Hope this Helps you
For my project is ideally suited Smart Home Skill from Amazon. Tell me please, can I add additional commands (eg turn left, close door, show last video etc.) or only commands which are presented on this page (link) is available to me?
I have in the lambda function my commands but Alexa only recognizes standard. I have studied the documentation, but I did not find the information about how to Smart Home Skill, can add additional commands. But also I didn't find the information that it cannot be done.
Through the Smart Home Skill, only the designated actions are available.
To create an expanded feature set, create a custom skill. It will require the user to use the skill name (e.g. Alexa, ask my service to turn left) as part of the activation.
Note, depending on your use case, you could do both to cover all needs.
Update triggered from comment:
With this approach, you are building two skills. A Smart Home skill and traditional Alexa Skill. They will each have their own entry points into your code. The Smart Home Skill is usually a subset of features in your Alexa skill.
The Home Skill requires implementation as an AWS Lambda, so it would probably be easier to build the ASK front end for both skills in AWS. My solution started as an ASK skill prior to the availability of the Home Skill so my architecture is different.
For me, I route all Home skill requests through the AWS Lambda (mostly just the sample shell code) and then to my hosted service that performs the actual function and builds the appropriate ASK response. So, the Lambda logic is mostly just a proxy/wrapper for my code hosted elsewhere.
The number of "directives" available through the Smart Home Skill API is regularly increasing. At this time only Amazon can create new directives, but, as noted this list is growing.
Three weeks ago Amazon completely revamped the developer documentation for the Alexa Smart Home Skill API (and added new directives). You can find the updated landing pages with overview info here:
https://developer.amazon.com/alexa/smart-home/build
Updated reference material is here:
https://developer.amazon.com/docs/smarthome/smart-home-skill-api-message-reference.html
It's my first few hours today to use Alexa so please bear with me for now.
I followed a tutorial that I found and was able to configure Alexa skills upto the Lamdba function. I was able to use the Test section inside Lamdba service and it worked really well. It can pull data from the external api. I was able to click the Listen button too.
However, I can't figure out how I will deploy this so that I can call the utterances using my real physical Alexa device. Not sure what to do next. And is it possible that I'll be the only one to use it?
You don't have to publish it to use it on your physical alexa device. As long as the alexa device is configured with the same Amazon account that you use to configure your skill then you can use the skill 'live' on your device.
In the configuration, I believe you must have progressed to the 'test' tab, but you don't need to fill in the publishing info to test the skill both virtually and on the device.