Closed tkamaal closed 6 years ago
@tkamaal did you perform a device discovery? When you look at the Smart Home section of your Alexa app (or alexa.amazon.com) do you see any devices? If not, do you see any errors in your Lambda CloudWatch logs when you run a discovery?
@briankel I don't see any devices on alexa.amazon.com. As far errors are concerned. Please see below if the image helps you. This is a snap shot of Monitoring tab on Lambda Console. I don't see any errors in cloudwatch logs I believe.
Thanks, the graphs seem to confirm that your skill is getting invoked which is good. You'll need to dig into the actual CloudWatch logs though (not just the graphs) to see what errors you might be getting when the Discovery request is received. Click on "Jump to logs" and dig through those logs. Unfortunately CloudWatch can be time consuming to browse through, especially if you have never done this before, so be prepared to spend a bit of time here exploring and looking for clues. :-)
@briankel Do I need to add CloudWatch Logs Trigger ? I get this following error. Please provide some information about logs or some reference link so it would helpful to debug the situation.
@briankel I think AWS Lambda fails to import module 'Lambda'. Please see the image for error message. This is error I get when I click Discover in Smart Home -> Devices.
That's the info we needed. This most probably indicates you have named your file or function wrong. If your'e following the 15 minute smart home sample please ensure you have named everything correctly: https://github.com/alexa/alexa-smarthome/wiki/Build-a-Working-Smart-Home-Skill-in-15-Minutes
See Handler = lambda.lambda_handler
@briankel Sure. Will check everything again. Thanks for help.
@briankel I did a thorough check of the naming's provided in AWS Lambda function setup. I didn't see any wrong name provisions.
@tkamaal the error messages for this type of error are confusing, but I'm relatively confident that you have a naming problem here. Are you following the 15 minute Smart Home sample? Do you have a file named lambda.py in the .zip you uploaded? What does your Handler property say in your Lambda configuration?
@briankel Yes, I'm following 15 minutes Smart Home Sample wiki page. Their is lambda.py file in the uploaded zip folder.
Handler property on lambda configuration page says lambda.lambda_handler as mentioned in the wiki page.
According to me, I believe I have no naming errors. But if you can be more specific about which file names are you referring too then I can verify again.
@tkamaal I'm perplexed! One more idea, do you have lambda.py in the root of your environment (as opposed to in a subfolder)? Here's what my screen looks like:
@briankel Thank you so much. That fixed the issue. As a suggestion, I think it's better to update your wiki page cos it took me 2 days to get it working instead of 15 mins, although I followed every step carefully provided on your documentation.
@tkamaal good point, I've added a clarifying note to https://github.com/alexa/alexa-smarthome/wiki/Build-a-Working-Smart-Home-Skill-in-15-Minutes. Let me know if you think it can be more clear.
I'm glad you were able to get this working and I'm sorry that the steps weren't clear to begin with!
I'm going to close this issue but please open a new one if you have more questions.
@briankel Yes, it is clear now and will be helpful for users. No need to be sorry @briankel !!!
Hello,
I have followed the instructions provided on your wiki to build Smart Home Skill in 15 minutes. I was able to complete the process without any issues until configure skills section.
But when I went over test instructions. Smart Home Devices didn't recognise any virtual device. When I say "Alexa, turn on switch" -> It responds back saying "Sorry, I didn't find switch"