rgraciano / echo-sonos

Amazon Echo integration with Sonos
Other
712 stars 234 forks source link

Adds support for Open Sonos command #176

Closed jplourde5 closed 7 years ago

jplourde5 commented 7 years ago

Saying "Alexa, open Sonos" or "Alexa, start Sonos", etc. invokes Sonos. The current room and service are indicated followed by a "What would you like to do next?". You can continue to perform multiple commands without having to repeat "Alexa, ask Sonos...". You can conclude at any point by answering "I'm finished", "Finished", "Done", etc.

loftgren commented 7 years ago

No, but the Lambda response window says it was successful.

loftgren commented 7 years ago

Must be a in Lambda... just not sure where to look.

jplourde5 commented 7 years ago

Can you invoke node-sonos using an external IP through your firewall? The above looks like an external IP, but just checking. There are a number of important Lamda configuration perimeters, so pay very close attention to the instructions. Make sure you have specified the correct external IP and port that you have tested successfully through your browser. And again, stay away from the proxy until this is working end to end. One step at a time.

loftgren commented 7 years ago

that is an external ip. so I assume all is good. Is there a place to enter the port in Lambda? Would I enter it after the Host address, like 74.75.123.155:5005?

jplourde5 commented 7 years ago

There is an options.js file in the lamda/src directory that needs to be edited, zipped, uploaded, and saved. The file has three settings that must be filled in:

appid: getDefault('APPID', 'yourappidhere'), host: getDefault('HOST', '74.75.123.155'), port: getDefault('PORT', '5005'),

Port already defaults to the right port based on what you use above. I entered your HOST value above. You need to enter your app id according to the instructions in the README. I think that these values can also be entered through a screen in the Lamda console now also (new feature). You just have to get them in there one way or another. Again, follow the instructions slowly and carefully.

loftgren commented 7 years ago

These are my Lambda variables presently:

screen shot 2017-06-29 at 10 05 26 am

Because I can tell Alexa to start and stop and select rooms etc, all which work fine, doesn't it make sense that this information is working fine?

Again, when I ask alexa to play music,"Alexa, ask sonos to play Bruno Mars in the kitchen," is when I get the "invalid music service" message on my terminal screen. But as we proved yesterday, both Spotify and Pandora work just fine when summoned through browser.

jplourde5 commented 7 years ago

Make sure that you have the correct Alexa Skill ID from the Alexa console. Mine starts with amzn1.echo-sdk-ams.app. , which is different than yours. But based on some of the commands working, it sounds like all of your settings are good. Try issuing the command, "Alexa, Ask Sonos to change music service to Spotify" ?

Make sure that you created the SERVICES slot in your Alexa skill Interaction Model.

Also make sure that you have setup your Lambda permissions for DynamoDB and you may as well include SQS if you intend to go with the proxy AFTER you get the basics working.

elmedico27 commented 7 years ago

Not sure where you still are with this, but depending on when you cloned the echo-sonos repo, you might still need to manually download async -- that could solve any number of Lambda communication issues. Run npm install async from the command line in your echo-sonos folder.

Looking through the thread, you might also be missing some settings or parameters somewhere, but try checking/fixing dependencies first.