rgraciano / echo-sonos

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

Invalid Music Service #180

Open loftgren opened 7 years ago

loftgren commented 7 years ago

Hello,

All was working well, but now when I change the music service and try to play something there npm gives me ... Error: Invalid music service.

Help greatly appreciated!

loftgren commented 7 years ago

2017-06-15T18:22:15.927Z 8ec3fc1b-51f7-11e7-96b6-73db4dc77164 Error: Failed to retrieve data, status code: 500 at ClientRequest.lib.get (/var/task/sonosProxy/httpClient.js:13:17) at ClientRequest.g (events.js:291:16) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at HTTPParser.parserOnIncomingClient (_http_client.js:473:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23) at Socket.socketOnData (_http_client.js:362:20) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18)

loftgren commented 7 years ago

Please help...

loftgren commented 7 years ago

I'm begging here... please help. All else works fine... I can do everything else... I just can't actually get it to play anything with the "Invalid Music Service" appearing.

esakowski commented 7 years ago

Are you by chance using Spotify? I had a similar issue that modifying one line of code corrected.

loftgren commented 6 years ago

I am using Spotify. What was the line of code that you changed?

SeanNazareth commented 6 years ago

I was having a similar problem with Spotify.

I tracked it down to the fact that the Amazon Alexa Skill was outputting a line like: "http://raspberrypi:5005/house/musicsearch/Spotify/song/artist:Coldplay"

Where the "service" was capitalized as "Spotify", but the javascript is looking for all lower case.

I patched the file "lib/actions/musicSearch.js" with the following:

----patch below---- 196c196 < const service = values[0].toLowerCase();

const service = values[0]; ----patch above----

which just makes the musicSearch use lowercase for the music Service.

Sean

edwindotcom commented 6 years ago

This is a critical patch to get spotify working. Note lib/actions/musicSearch.js is in the node-sonos-http-api library