hypermoose / AlexaForSonos

Amazon Alexa voice layer on top of the amazing NodeJS component https://github.com/jishi/node-sonos-http-api
10 stars 0 forks source link

Issues with Lambda #1

Open jacobwtyler opened 6 years ago

jacobwtyler commented 6 years ago

Hey, @hypermoose I'm really looking forward to checking out your implementation of @jishi Sonos Node server. I've been using his implementation for a while now with SmartThings and Webcore to automate my Sonos speakers but I'm wanting to take it to the next level with my echo dots! The only skills I've built through AWS are the AskAlexa smartthings skill and a Hue skill back in the day and I was able to get them up and running pretty quick but for some reason, I’m having issues setting this up. I uploaded the zip file to the Lambda side but it seems like that’s where it’s failing. I've only ever pasted code into the Lambda functions so I'm not sure that I'm doing it correctly. In the Function Code panel, after the upload and save of the zip file, it gives me a message:

The deployment package of your Lambda function "SonosAPI" is too large to enable inline code editing. However, you can still invoke your function right now.

Should I be zipping up the node_packages directory that was created when I ran npm install as well as the index.js, AlexaSkill.js and package.js? Also, should I be selecting a Node.js 6.10 Runtime? For Execution Role, I went with "Choose an Existing Role" and "lambda_basic_execution" since it wasn't specified anywhere that I saw. The only Trigger that I added was "Alexa Skills Kit" which I linked up with the Alexa Skill that I created. Somewhere I'm messing up. I did update the index.js file with all of the appropriate login info and skill ID before I zipped the file up and I edited my settings.json file on the node-sonos-http-api server with the Auth, pandora, and spotify logins. I tried to follow your directions in your readme to a T. I've got the skill up and running in my Alexa app and linked to the Lambda side just fine but when I invoke "Open Sonos", (Actually I went with "speakers" as my invocation name since I also have the Sonos skill installed) I get:

"There was a problem with the selected skills response." from Alexa

and my Alexa app shows a card on the homepage of the failure indicating a Lambda issue:

img_1273

Thanks again for all this great work on this implementation and for any help you might be able to give me. I'll be glad to make a thorough walk through for installing this skill if you can help me get this up and running.

hypermoose commented 6 years ago

Hi there!

Yes you should zip up all of the contents, especially the node_packages directory. Use Node 4.3 as I havent upgraded it to 6 yet. If the error still persists please go into the Lambda dashboard and send me the Cloudwatch Logs for your Lambda function.