jishi / node-sonos-http-api

An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar.
http://jishi.github.io/node-sonos-http-api/
MIT License
1.85k stars 460 forks source link

cannot call favourites. #331

Closed red3all closed 8 years ago

red3all commented 8 years ago

Hi, first ever post on Github and thanks for such a gread project.

Im a complete newbie to this stuff, so apologies if I need spoon feeding. I had never heard of GitHub, node.js, npm etc until about a few days ago.

I have managed to install and setup the server, it appears to be responding to requests and Im using it in conjunction with the instructions from here to control this with an Amazon Echo/Alexa https://github.com/rgraciano/echo-sonos

I followed the instructions from another issue raised to resolve the spotify not working in the UK, and that has worked brilliantly.

However, one thing I cant seem to do is to get a favourite to play.

Ive added favourite songs from spotify to the sonos favourites (right click and select add to sonos favourites). I also have radio stations listed as favourites, but no mater how I call these using the echo, it always plays the closest match it can find in spotify.

Ive tried calling:

http://localhost:5005/kitchen/favourite/BBCRadio2

but I receive an error: 2016-10-05T14:52:02. 862Z ERROR { error: 'action \'favicon.ico\' not found' }

Would you have a solution for this or any pointers to help a newbie out?

red3all commented 8 years ago

So... newbie strikes here.

Helps if I spell favorite the US way.....

Now calling from the web page works just fine. I will have to find a work around to call this via the echo integration. I think it will involve a preset and using the echo command to call that.

jplourde5 commented 8 years ago

Add the Favorites, spelled exactly as they are in Favorites, to your Echo Presets file in the Alexa management portal (developer.amazon.com) and it will probably fix the problem. The Favorites does not do a fuzzy search in this api, so if the Echo does not come up with the exact spelling of what you say, the favorite will not play.

jishi commented 8 years ago

FYI, I just added alternative spelling for favorite to avoid this confusion in the future :)