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

Presets aren't grouping all rooms #192

Closed rgraciano closed 8 years ago

rgraciano commented 8 years ago

Hey @jishi - I was getting a lot of reports that presets were only playing in the first room requested with echo-sonos, so I gave it a shot today and found the same behavior in node-sonos-http-api. Maybe it's something with my example configuration?

I'm hitting https://host/preset/rock and seeing the below output. In my example data below, Dining Room is the first room in my "rock" configuration and it is the only room that ends up playing music.

LMK if you need a hand reproducing:

loaded presets { downstairs: { players: [ [Object] ], state: 'PLAYING', favorite: 'Rock', uri: 'x-rincon-stream:RINCON_0000000000001500', playMode: 'SHUFFLE', pauseOthers: true }, rap: { players: [ [Object], [Object], [Object], [Object], [Object] ], state: 'PLAYING', favorite: 'Rap', uri: 'x-rincon-stream:RINCON_0000000000001500', playMode: 'SHUFFLE', pauseOthers: true }, 'pop rap': { players: [ [Object], [Object], [Object], [Object], [Object] ], state: 'PLAYING', favorite: 'Rap (Pop)', uri: 'x-rincon-stream:RINCON_0000000000001500', playMode: 'SHUFFLE', pauseOthers: true }, rock: { players: [ [Object], [Object], [Object], [Object], [Object] ], state: 'PLAYING', favorite: 'Rock', uri: 'x-rincon-stream:RINCON_0000000000001500', playMode: 'SHUFFLE', pauseOthers: true } } info: scanning for players in ip 192.168.1.208 info: subscribing to topology 192.168.1.206 info: using local endpoint 192.168.1.208 Initializing player Dining Room Initializing player Master Bedroom Initializing player KitchenWall Initializing player Living Room Initializing player Kitchen debug: received avtransport pndrradio:3008664044517633916?sn=1 debug: received avtransport debug: received avtransport pndrradio:85124959121616764 debug: received avtransport pndrradio:85124959121616764 debug: received avtransport debug: emitting group-volume debug: emitting group-volume info: applying preset players=[roomName=Dining Room, volume=20, roomName=Living Room, volume=20, roomName=Kitchen, volume=20, roomName=Master Bedroom, volume=30, roomName=KitchenWall, volume=50], state=PLAYING, favorite=Rock, uri=x-rincon-stream:RINCON_0000000000001500, playMode=SHUFFLE, pauseOthers=true info: skipping breakout because already coordinator debug: checking if Living Room needs to be grouped debug: RINCON_B8E9373FABFC01400 RINCON_B8E937794A6F01400 pndrradio:3008664044517633916?sn=1 x-rincon:RINCON_B8E9373FABFC01400 debug: adding to group debug: checking if Kitchen needs to be grouped debug: RINCON_B8E9373FABFC01400 RINCON_B8E9372BAAE201400 x-rincon:RINCON_B8E9373FABFC01400 debug: adding to group debug: checking if Master Bedroom needs to be grouped debug: RINCON_B8E9373FABFC01400 RINCON_B8E9373C905201400 pndrradio:85124959121616764 x-rincon:RINCON_B8E9373FABFC01400 debug: adding to group debug: checking if KitchenWall needs to be grouped debug: RINCON_B8E9373FABFC01400 RINCON_000E58DFE99801400 x-rincon:RINCON_B8E9373FABFC01400 debug: adding to group info: found it title=Rock, uri=pndrradio:85124959121616764, albumArtURI=http://cont-ch1-1.pandora.com/images/public/amz/4/1/9/2/093624972914_500W_497H.jpg, metaData=dc:titleRock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON3_rmgraci@gmail.com debug: emitting group-volume

jishi commented 8 years ago

That sounds odd, if it comes across any problem with grouping, it shouldn't start playback either. Can you see if volumes for the other players are adjusted or if they are completely untouched?

I'll look into it at my setup to see if I can find something wonky.

GregRocket commented 8 years ago

I find if the sonos FAVORITE is a PLAYLIST of mp3s, then all rooms group correctly and volume is set correctly. If the sonos FAVORITE is a Streaming Music Service (eg amazon, pandora) then the rooms do not group. Play only starts in the first room listed in the preset.json. Volume is only set in this first room. All other rooms stay ungrouped and no volume change.

ankitprasad commented 8 years ago

Just installed Sonos -> Lambda -> Jishi's HTTP API following rgraciano's instructions.

Running into the same problem, the API seems to only be playing streaming favorites to one room (oddly enough, the same room, regardless of which room I ask for). If the rooms are grouped together, they get ungrouped and music only plays in a single room.

GregRocket commented 8 years ago

Below is a sample preset.json file I tested. Preset "today's hits" is a mp3 playlist Preset "boston" is a pandora radio station preset "eagles" is a amazon radio station

Starting with all rooms ungrouped and volume set to 0. If I call preset boston, a pandora radio station, only the room office plays and volume is only set in office. If I then call preset today's hits, an mp3 sonos playlist, all rooms automajically group, all the volumes are automajically set and today's hits plays in all rooms. Truly a thing of beauty to watch. Now if I now call eagles, an amazon steaming music service, all rooms play this station because they were already grouped. Had the not been already grouped, only the room office would have played.

{ "today's hits": { "players": [ { "roomName": "Office", "volume": 20}, { "roomName": "Hall Bathroom", "volume": 30}, { "roomName": "Master Bedroom", "volume": 60}, { "roomName": "Ladies Room", "volume": 60},
{ "roomName": "Master Bathroom", "volume": 60}, { "roomName": "Media Room", "volume": 60} ], "state": "PLAYING", "favorite": "Today's Hits", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": "SHUFFLE", "pauseOthers": true }, "boston": { "players": [ { "roomName": "Office", "volume": 20}, { "roomName": "Hall Bathroom", "volume": 30}, { "roomName": "Master Bedroom", "volume": 60}, { "roomName": "Ladies Room", "volume": 60},
{ "roomName": "Master Bathroom", "volume": 60}, { "roomName": "Media Room", "volume": 60} ], "state": "PLAYING", "favorite": "boston", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": "SHUFFLE", "pauseOthers": true },
"eagles": { "players": [ { "roomName": "Office", "volume": 20}, { "roomName": "Hall Bathroom", "volume": 30}, { "roomName": "Master Bedroom", "volume": 60}, { "roomName": "Ladies Room", "volume": 60},
{ "roomName": "Master Bathroom", "volume": 60}, { "roomName": "Media Room", "volume": 60} ], "state": "PLAYING", "favorite": "Eagles", "uri": "x-rincon-stream:RINCON_0000000000001500",
"playMode": "SHUFFLE", "pauseOthers": true } }

jishi commented 8 years ago

Do anyone of you have the possibility to test the "beta" branch of the http api to see if it resolves this issue? The preset system has been completely rewritten and it would be good to know if this problem still exists.

You need to run npm install --production after checking out the new branch to install the latest version of sonos-discovery.

Unfortunately I haven't fixed the say / sayAll command in this version, but most of the other stuff still works.

GregRocket commented 8 years ago

I just tried the Beta version of the http api again.

When I try to run a preset this is the error I now get: [TypeError: coordinator.setPlayMode is not a function] TypeError: coordinator.setPlayMode is not a function at /root/node-sonos-http-api/node_modules/sonos-discovery/lib/prototypes/SonosSystem/applyPreset.js:87:46 at process._tickCallback (node.js:364:9)

hmphargh commented 8 years ago

I tried to use the beta version, but it seems like discovery is not working with the sonos-discovery in the dependency. When I tried running the sonos-ssdp integration test from sonos-discovery, it complained of a missing module 'chai'. I would run the same test in master, but it is not included for some reason. Run output is below:

running node server.js:

node server.js
sending M-SEARCH...
https server listening on port 5008
http server listening on port 5007
loaded presets { 'top 40':
   { players: [ [Object] ],
     state: 'PLAYING',
     favorite: 'Top 40 Radio',
     uri: 'x-rincon-stream:RINCON_0000000000001500',
     playMode: 'SHUFFLE',
     pauseOthers: true },
  'rap':
   { players: [ [Object], [Object], [Object] ],
     state: 'PLAYING',
     favorite: 'Rap',
     uri: 'x-rincon-stream:RINCON_0000000000001500',
     playMode: 'SHUFFLE',
     pauseOthers: true },
  'pop':
   { players: [ [Object], [Object], [Object] ],
     state: 'PLAYING',
     favorite: 'Pop',
     uri: 'x-rincon-stream:RINCON_0000000000001500',
     playMode: 'SHUFFLE',
     pauseOthers: true },
  rock:
   { players: [ [Object], [Object], [Object], [Object], [Object] ],
     state: 'PLAYING',
     favorite: 'Rock',
     uri: 'x-rincon-stream:RINCON_0000000000001500',
     playMode: 'SHUFFLE',
     pauseOthers: true } }

running node sonos-ssdp.js

node sonos-ssdp.js
module.js:328
    throw err;
    ^

Error: Cannot find module 'chai'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/volume1/homes/john/temp/node-sonos-http-api-beta/node_modules/sonos-discovery/test/integration/sonos-ssdp.js:2:16)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)

When I replace the sonos-discovery service with the dependency from the master branch, I get another error when invoking the service:

node server.js
info: binding SSDP to port 1905
info: discovering all IPs from lo
info: discovering all IPs from eth0
info: discovering all IPs from tun0
info: relevant IPs 192.168.1.123=null, 10.8.0.1=null
info: notification server listening on port 3500
https server listening on port 5008
http server listening on port 5007
loaded presets { 'top 40':
   { players: [ [Object] ],
     state: 'PLAYING',
     favorite: 'Top 40 Radio',
     uri: 'x-rincon-stream:RINCON_0000000000001500',
     playMode: 'SHUFFLE',
     pauseOthers: true },
  'rap':
   { players: [ [Object], [Object], [Object] ],
     state: 'PLAYING',
     favorite: 'Rap',
     uri: 'x-rincon-stream:RINCON_0000000000001500',
     playMode: 'SHUFFLE',
     pauseOthers: true },
  'pop':
   { players: [ [Object], [Object], [Object] ],
     state: 'PLAYING',
     favorite: 'Pop',
     uri: 'x-rincon-stream:RINCON_0000000000001500',
     playMode: 'SHUFFLE',
     pauseOthers: true },
  rock:
   { players: [ [Object], [Object], [Object], [Object], [Object] ],
     state: 'PLAYING',
     favorite: 'Rock',
     uri: 'x-rincon-stream:RINCON_0000000000001500',
     playMode: 'SHUFFLE',
     pauseOthers: true } }
info: scanning for players in ip 192.168.1.123
info: scanning for players in ip 10.8.0.1
info: subscribing to topology 192.168.1.118
info: using local endpoint 192.168.1.123
Initializing player Living Room
Initializing player Bathroom
Initializing player Kitchen
debug: emitting group-volume
debug: emitting group-volume
/redacted/path/temp/node-sonos-http-api-beta/lib/actions/zones.js:25
  return Promise.resolve(simplifyZones(player.system.zones));
                                                    ^

TypeError: Cannot read property 'zones' of undefined
    at Object.zones (/redacted/path/temp/node-sonos-http-api-beta/lib/actions/zones.js:25:53)
    at handleAction (/redacted/path/temp/node-sonos-http-api-beta/lib/sonos-http-api.js:96:35)
    at HttpAPI.requestHandler.handleAction.then [as requestHandler] (/redacted/path/temp/node-sonos-http-api-beta/lib/sonos-http-api.js:71:5)
    at /redacted/path/temp/node-sonos-http-api-beta/server.js:79:13
    at Server.finish (/redacted/path/temp/node-sonos-http-api-beta/node_modules/node-static/lib/node-static.js:111:13)
    at finish (/redacted/path/temp/node-sonos-http-api-beta/node_modules/node-static/lib/node-static.js:170:14)
    at /redacted/path/temp/node-sonos-http-api-beta/node_modules/node-static/lib/node-static.js:144:17
    at FSReqWrap.oncomplete (fs.js:82:15)
jishi commented 8 years ago

You can't mix the old version of sonos-discovery with the beta branch, since they are not compatible with each other. The new version doesn't yet implement the multi-interface tricks I had to use for some systems (yours is likely one of these since you have multiple private interfaces).

I'm planning on implementing that once everything starts working completely, but right now I'm focusing on finishing the beta-version.

I'm assuming that the node-ssdp version wouldn't work on your system either, since that was actually a downgrade in functionality (hence, no merge). I will try to combine the best of both worlds in the final version, but can't say when that will be finished. Right now I'm trying to fix the radio in presets in the beta-version.

jishi commented 8 years ago

I have fixed the identified issues in the presets of the beta version. If you who had trouble could please test it out once again, I would be grateful. In my limited tests, I'm not able to reproduce all issues, but the setPlayMode issue is resolved, as well as favorites that points to radio streams.

Do note that the playMode config is different in the beta, a preset now looks like this:

"playMode": {
      "repeat": true,
      "shuffle": true
    }
GregRocket commented 8 years ago

@jishi I am testing the beta version's presets. I have an eight room sonos system. Raspberry PI 3, minibian, node v4.3.2, npm v3.9.0

I made a preset.json that has two presets. One that groups 6 rooms and plays an amazon music startion and the other preset groups two rooms and plays an amazon music station.

I ungrouped al rooms andI called the preset to group the 6 rooms (easy pop radio.) The rooms all grouped and volumes were set but the radio station was not called nor did anything play. Whatever station that was in the first room of the group shows in the sonos player. I did get this error when I ran "myserver.com/preset/todays hits" from my web browser. {"status":"error","error":{"statusCode":500}}

I called the preset for the two rooms "eagles radio" (that happen to be in the group of six rooms.) The two rooms ungrouped from the six rooms and grouped together in a new group, volumes set but the radio station was not called and nothing played. I also see this in the browser {"status":"error","error":{"statusCode":500}}

I ungrouped the rooms and I tired a preset that is a sonos favorite playlist of mp3s (today's hits). This also grouped correctly but playlist does not show in sonos player and nothing starts playing.

I tried setting setting playMode repeat and shuffle to "false" just to see what would happen and that crashed my npm. "playMode": { "repeat": false, "shuffle": false },

I also tried ungroup and isolate. When I ungroup (or isolate) a room a random room ungroups. For example if media room is in the middle of a group of six rooms and I try /ungroup/media room Master Bathroom was ungrouped.

My preset.json for this test: { "todays hits": { "players": [ { "roomName": "Hall Bathroom", "volume": 40}, { "roomName": "Master Bedroom", "volume": 50}, { "roomName": "Ladies Room", "volume": 50},
{ "roomName": "Master Bathroom", "volume": 50}, { "roomName": "Media Room", "volume": 50}, { "roomName": "Office", "volume": 20} ],
"state": "PLAYING", "favorite": "Today's Hits", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true }, "easy pop radio": { "players": [ { "roomName": "Hall Bathroom", "volume": 40}, { "roomName": "Master Bedroom", "volume": 50}, { "roomName": "Ladies Room", "volume": 50},
{ "roomName": "Master Bathroom", "volume": 50}, { "roomName": "Media Room", "volume": 50}, { "roomName": "Office", "volume": 20} ],
"state": "PLAYING", "favorite": "Easy Pop Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true }, "eagles radio": { "players": [ { "roomName": "Master Bedroom", "volume": 50}, { "roomName": "Master Bathroom", "volume": 50} ],
"state": "PLAYING", "favorite": "Eagles Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true } }

jishi commented 8 years ago

I have identified some issues in the presets and rolled out fixes for them in beta.3. Please try it out and let me know.

Please use npm -f install to force update of all dependencies, it doesn't update the discovery since I'm not changing version number on it.

GregRocket commented 8 years ago

@jishi I installed the latest beta using npm -f install using the same preset.json in my message above.

I am going to try and explain what I find when testing. I get different results with different groupings.

I first ungrouped all the rooms and tried "easy pop radio" preset (an amazon station). The six rooms grouped, no station in sonos player, no music started. Then I tried "eagles radio" and it grouped the two rooms, master bedroom/master bathroom, but did not show show radio station, no music plays.

I tried "todays hits" (an mp3 playist) all six rooms group correctly, did not load playlist and no music plays. I tried "eagles radio" again. Two rooms ungrouped from the six and grouped together in a new group, no station, no playing.

I manually ungroup all the rooms and tried "todays hits: again. Nothing grouped this time.

I tried "todays hits" 3 times more and on the third try five rooms grouped just not the Master Bedroom, no station, no playing.

jishi commented 8 years ago

I see now that you have state: "PLAYING". Could you try and remove that? I switched how I check for that, without thinking enough on how it's used, but playing is the default. That would explain why no music plays, but not your weird grouping errors.

robertw commented 8 years ago

Hi Jishi : I did update to the newest beta and still having the same grouping problems as in my prior post it is acting the same using the same json file and following the same steps

robertw commented 8 years ago

I believe it is the following if a controller is removed from another group called i the preset the balance of that group is not returned to a ungrouped state thus when it it is called again the other zones do not regroup to the proper format

jishi commented 8 years ago

It would be really helpful if you could find the minimum case where this happen with as few players as possible, that makes it easier to try and reproduce the issue myself. If you can keep the groups to 1-2 players and tell me the group transitions that gives you an unexpected result. It's tedious, but really helpful.

I probably need to implement the debug logging next to actually get some useful data to look at in the meantime.

robertw commented 8 years ago

Will do when i get back home thanks

On Tue, May 17, 2016 at 8:55 AM, Jimmy Shimizu notifications@github.com wrote:

It would be really helpful if you could find the minimum case where this happen with as few players as possible, that makes it easier to try and reproduce the issue myself. If you can keep the groups to 1-2 players and tell me the group transitions that gives you an unexpected result. It's tedious, but really helpful.

I probably need to implement the debug logging next to actually get some useful data to look at in the meantime.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jishi/node-sonos-http-api/issues/192#issuecomment-219708800

Regards

Robert

GregRocket commented 8 years ago

@jishi New test. I removed state: "PLAYING" and made new preset.json below in this message. Started with all rooms ungrouped and sonos queue cleared for each room.

This is the order I used in this test. Went from todays hits to easy pop radio etc.

todays hits: Hall bathroom is selected in sonos player. No playlist loaded. No Music Starts.

easy pop radio: Ladies Room and Media Room Grouped. Hall Bathroom still selected in sonos player. No radio station. No music plays.

classic rock radio: Office and Hall Bathroom grouped and are selected in sonos player. No radio station. No music plays.

eagles radio: Master Bedroom and Master Bathroom grouped. Office and Hall Bathroom are still selected in sonos player. No radio station. No music plays.

classic hits radio: Six rooms grouped and highlighted in sonos player. No radio station. No music plays.

todays hits: Hall ungrouped from six rooms. Remaining five rooms hightlighted in sonos player. No playlist loaded. No Music Starts.

easy pop radio: Ladies Room and Media room ungrouped from five rooms and grouped together. Hall bathroom still selected in sonos player. No radio station. No music plays.

classic rock radio: Office and Hall Bathroom in new group and selected in sonos player. No radio station. No music plays.

eagles radio: Master Bedroom and Master Bedroom grouped. Hall Bathroom selected in sonos player. No radio station. No music plays.

classic hits radio: All six rooms grouped and highlighted in sonos player. No radio station. No music plays.

preset.json used for test: { "todays hits": { "players": [ { "roomName": "Hall Bathroom", "volume": 40} ], "favorite": "Today's Hits", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true },

"easy pop radio": { "players": [ { "roomName": "Ladies Room", "volume": 50}, { "roomName": "Media Room", "volume": 50} ], "favorite": "Easy Pop Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true },

"classic rock radio": { "players": [ { "roomName": "Office", "volume": 50}, { "roomName": "Hall Bathroom", "volume": 50} ], "favorite": "classic rock radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true },

"eagles radio": { "players": [ { "roomName": "Master Bedroom", "volume": 50}, { "roomName": "Master Bathroom", "volume": 50} ], "favorite": "Eagles Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true },

"classic hits radio": { "players": [ { "roomName": "Master Bedroom", "volume": 50}, { "roomName": "Master Bathroom", "volume": 50}, { "roomName": "Ladies Room", "volume": 50}, { "roomName": "Media Room", "volume": 50}, { "roomName": "Hall Bathroom", "volume": 40}, { "roomName": "Office", "volume": 30} ], "favorite": "Classic Hits Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true } }

jishi commented 8 years ago

So basically, grouping always works for you, but no favorite is ever loaded? Could you also provide the output from the /favorites call?

GregRocket commented 8 years ago

It appears that my one room "office" causes some grouping problems as seen in my first test with multiple rooms. I just now made another preset.json with more room groups. If I have office in the mix sometimes grouping does not work correctly. If I remove office grouping seems to work properly.

"Office" is the only room that has two Sonos Play 1's setup as a Stereo Pair in Sonos. I know the Sonos Play 3's can also be paired as stereo. This stereo pairing of two Sonos Speakers seems to mess up the grouping in presets. I can't be the only person that uses the Stereo Pairing of Sonos speakers and I believe should be investigated more.

So as long as office is not in the preset, grouping rooms seems to work, but selecting the radio station or mp3 playlist is not working. Starting the group to play is not working.

The output in my web browser from a /preset call is always {"status":"error","error":{"statusCode":500}}

The output in my web browser from a /room/favorite/radio station /meida room/favorite/todays hits {"status":"error","error":{"error":"action 'meida%20room' not found"}}

/master bedroom/favorite/easy pop radio {"status":"error","error":{"error":"action 'master%20bedroom' not found"}}

Hope this all helps :-)

jishi commented 8 years ago

Okay, given this new information: 500 error for a preset call, is at least good, then I know it actually errors out. But is there no error in the console when this occurs?

Your favorite calls you do manually breaks because it doesn't identify a player with that name. The first one is misspelled, but the second one tells me that it is case sensitive, which is clearly a bug. That one is at least easily fixed :)

GregRocket commented 8 years ago

Spelling error corrected: /media room/favorite/todays hits {"status":"error","error":{"error":"action 'media%20room' not found"}} "Okay, given this new information: 500 error for a preset call, is at least good, then I know it actually errors out. But is there no error in the console when this occurs?" There is no console error

I tired /Media Room/favorite/todays hits (Media Room instead of media room) Web Page Error is: {"status":"error","error":{"statusCode":500}}

Console Error TypeError: Cannot read property '$text' of undefined at EventEmitter. (/root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/models/Player.js:456:28) at emitOne (events.js:77:13) at EventEmitter.emit (events.js:169:7) at SAXStream. (/root/node-sonos-http-api-beta/node_modules/xml-flow/lib/xml-flow.js:102:17) at emitOne (events.js:77:13) at SAXStream.emit (events.js:169:7) at Object.me._parser.(anonymous function) as onclosetag at emit (/root/node-sonos-http-api-beta/node_modules/sax/lib/sax.js:615:33) at emitNode (/root/node-sonos-http-api-beta/node_modules/sax/lib/sax.js:620:3) at closeTag (/root/node-sonos-http-api-beta/node_modules/sax/lib/sax.js:861:5) at Object.write (/root/node-sonos-http-api-beta/node_modules/sax/lib/sax.js:1294:29) at SAXStream.write (/root/node-sonos-http-api-beta/node_modules/sax/lib/sax.js:227:16) at Readable.ondata (_stream_readable.js:528:20) at emitOne (events.js:77:13) at Readable.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:146:16)

npm ERR! Linux 4.4.9-v7+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v4.3.2 npm ERR! npm v3.9.0 npm ERR! code ELIFECYCLE npm ERR! sonos-http-api@1.0.0-beta.3 start: node server.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sonos-http-api@1.0.0-beta.3 start script 'node server.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the sonos-http-api package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node server.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs sonos-http-api npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls sonos-http-api npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /root/node-sonos-http-api-beta/npm-debug.log

jishi commented 8 years ago

I assume you get the same issue when calling /favorites as well?

jishi commented 8 years ago

It seems like one of your favorite is missing a resource URI for some reason, which seems very odd... if you could add this line:

console.log(node.$text) Right before this line: let stream = streamer(node.$text);

It might give me a hint, then send me the XML output that would be appear in the console.

I forgot to mention, that it should go in node_modules/sonos-discovery/lib/models/Player.js around line 450 or something.

GregRocket commented 8 years ago

I assume you get the same issue when calling /favorites as well? That is correct. Nothing happens when I call a favorite. No station is selected, no music plays.

robertw commented 8 years ago

Update 1 -2 players seem to be fine any more than that and we have a problem working on examples and support files will forward thanks again

On Tue, May 17, 2016 at 8:55 AM, Jimmy Shimizu notifications@github.com wrote:

It would be really helpful if you could find the minimum case where this happen with as few players as possible, that makes it easier to try and reproduce the issue myself. If you can keep the groups to 1-2 players and tell me the group transitions that gives you an unexpected result. It's tedious, but really helpful.

I probably need to implement the debug logging next to actually get some useful data to look at in the meantime.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jishi/node-sonos-http-api/issues/192#issuecomment-219708800

Regards

Robert

jishi commented 8 years ago

I just pushed an update (beta.5) that fixes case insensitive player names and some workarounds for edge-cases that you guys are experiencing. Try it and let me know.

GregRocket commented 8 years ago

@jishi Sorry I'm kind of new to this, do I use npm -f install or npm install --production for this beta.5?

jishi commented 8 years ago

Should not matter, but if you want to be sure, use

npm -f install --production

the -f forces a re-install of all modules. --production just install the dependencies needed for running it, excluding any developer dependencies.

GregRocket commented 8 years ago

@jishi I just tried beta.5 Grouping works as before. Stations or Playlists are not being called by preset or favorite. Music is not playing when calling preset or favorite.

The only things that has changed that I can tell is: /media room/favorite/todays hits Now web page shows this: {"status":"error","error":{}} And this now does not throw a console error or crash the server as it did before: /Media Room/favorite/todays hits {"status":"error","error":{}}

jishi commented 8 years ago

I think I need to implement a trace logging to identify what's wrong.

jishi commented 8 years ago

Okay, beta.6 includes extensive logging. To enable, you need to set ENV variable NODE_LOG_LEVEL=debug before running.

In linux and OS X, you can do this when starting the command:

NODE_LOG_LEVEL=debug node server.js

In windows and using powershell, you need to set it before you run the command, like this:

$env:NODE_LOG_LEVEL='debug'
node server.js

I have only added logging to the preset chain, so that would be the most important feature to test.

GregRocket commented 8 years ago

Preset tested: (Rooms Grouped Correctly, no station, no playing started) "easy pop radio": { "players": [ { "roomName": "Ladies Room", "volume": 50}, { "roomName": "Media Room", "volume": 50} ], "favorite": "Easy Pop Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true },

Console Output: 2016-05-17T23:02:10.397Z DEBUG pausing Backyard 2016-05-17T23:02:10.398Z DEBUG invoking pause 2016-05-17T23:02:10.406Z DEBUG pausing Ladies Room 2016-05-17T23:02:10.407Z DEBUG invoking pause 2016-05-17T23:02:10.417Z DEBUG pausing Media Room 2016-05-17T23:02:10.418Z DEBUG invoking pause 2016-05-17T23:02:10.425Z DEBUG pausing Master Bedroom 2016-05-17T23:02:10.426Z DEBUG invoking pause 2016-05-17T23:02:10.434Z DEBUG pausing Front Yard 2016-05-17T23:02:10.435Z DEBUG invoking pause 2016-05-17T23:02:10.444Z DEBUG pausing Office 2016-05-17T23:02:10.445Z DEBUG invoking pause 2016-05-17T23:02:10.453Z DEBUG setting volume 50 on Ladies Room 2016-05-17T23:02:10.471Z DEBUG setting volume 50 on Media Room 2016-05-17T23:02:10.480Z DEBUG coordinator is Ladies Room 2016-05-17T23:02:10.482Z DEBUG adding Media Room to coordinator Ladies Room 2016-05-17T23:02:10.644Z DEBUG Setting repeat to true

GregRocket commented 8 years ago

Another test: (Rooms Grouped Correctly, no station, no playing started) /preset/eagles radio "eagles radio": { "players": [ { "roomName": "Master Bedroom", "volume": 50}, { "roomName": "Master Bathroom", "volume": 50}, { "roomName": "Hall Bathroom", "volume": 50} ], "favorite": "Eagles Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true },

Console Output: 2016-05-17T23:14:39.295Z DEBUG pausing Hall Bathroom 2016-05-17T23:14:39.296Z DEBUG invoking pause 2016-05-17T23:14:39.305Z DEBUG pausing Backyard 2016-05-17T23:14:39.305Z DEBUG invoking pause 2016-05-17T23:14:39.311Z DEBUG pausing Master Bathroom 2016-05-17T23:14:39.312Z DEBUG invoking pause 2016-05-17T23:14:39.338Z DEBUG pausing Front Yard 2016-05-17T23:14:39.339Z DEBUG invoking pause 2016-05-17T23:14:39.348Z DEBUG pausing Master Bedroom 2016-05-17T23:14:39.348Z DEBUG invoking pause 2016-05-17T23:14:39.358Z DEBUG pausing Ladies Room 2016-05-17T23:14:39.358Z DEBUG invoking pause 2016-05-17T23:14:39.365Z DEBUG pausing Office 2016-05-17T23:14:39.365Z DEBUG invoking pause 2016-05-17T23:14:39.372Z DEBUG setting volume 50 on Master Bedroom 2016-05-17T23:14:39.380Z DEBUG setting volume 50 on Master Bathroom 2016-05-17T23:14:39.395Z DEBUG setting volume 50 on Hall Bathroom 2016-05-17T23:14:39.403Z DEBUG coordinator is Master Bedroom 2016-05-17T23:14:39.405Z DEBUG adding Master Bathroom to coordinator Master Bedroom 2016-05-17T23:14:39.405Z DEBUG adding Hall Bathroom to coordinator Master Bedroom 2016-05-17T23:14:39.752Z DEBUG Setting repeat to true

GregRocket commented 8 years ago

And one final test: (Rooms Grouped Correctly, no station, no playing started) "todays hits": { "players": [ { "roomName": "Hall Bathroom", "volume": 40} ], "favorite": "Today's Hits", "uri": "x-rincon-stream:RINCON_0000000000001500", "playMode": { "repeat": true, "shuffle": true }, "pauseOthers": true },

Console Output: 2016-05-17T23:18:17.865Z DEBUG pausing Backyard 2016-05-17T23:18:17.865Z DEBUG invoking pause 2016-05-17T23:18:17.874Z DEBUG pausing Front Yard 2016-05-17T23:18:17.876Z DEBUG invoking pause 2016-05-17T23:18:17.884Z DEBUG pausing Master Bedroom 2016-05-17T23:18:17.886Z DEBUG invoking pause 2016-05-17T23:18:17.904Z DEBUG pausing Ladies Room 2016-05-17T23:18:17.907Z DEBUG invoking pause 2016-05-17T23:18:17.918Z DEBUG pausing Office 2016-05-17T23:18:17.920Z DEBUG invoking pause 2016-05-17T23:18:17.934Z DEBUG setting volume 40 on Hall Bathroom 2016-05-17T23:18:17.950Z DEBUG coordinator is Hall Bathroom 2016-05-17T23:18:17.951Z DEBUG breaking out Hall Bathroom 2016-05-17T23:18:18.531Z DEBUG Setting repeat to true

jishi commented 8 years ago

Could you try and remove the playMode settings from the presets? On radios, it might error out when you try to set repeat or shuffle, on the other hand, it should work on playlists but it actually tries to set them before we have changed source which might be the wrong way around (if it is already playing a radio). It should of course ignore errors for these settings, but it would be good to get it confirmed.

jishi commented 8 years ago

Okay, at least it got further this time, so something happens when it tries to find and use the favorite. Back to the drawing board.

GregRocket commented 8 years ago

@jishi I removed all playMode settings from presets. The rooms still grouped but playlist/raido stations not selected. Nothing plays. Below is console output.

easy pop radio: (amazon radio station) 2016-05-18T12:32:59.783Z DEBUG pausing Hall Bathroom 2016-05-18T12:32:59.785Z DEBUG invoking pause 2016-05-18T12:32:59.794Z DEBUG pausing Backyard 2016-05-18T12:32:59.794Z DEBUG invoking pause 2016-05-18T12:32:59.800Z DEBUG pausing Ladies Room 2016-05-18T12:32:59.800Z DEBUG invoking pause 2016-05-18T12:32:59.808Z DEBUG pausing Master Bedroom 2016-05-18T12:32:59.808Z DEBUG invoking pause 2016-05-18T12:32:59.814Z DEBUG pausing Front Yard 2016-05-18T12:32:59.815Z DEBUG invoking pause 2016-05-18T12:32:59.822Z DEBUG pausing Office 2016-05-18T12:32:59.823Z DEBUG invoking pause 2016-05-18T12:32:59.834Z DEBUG setting volume 50 on Ladies Room 2016-05-18T12:32:59.842Z DEBUG setting volume 50 on Media Room 2016-05-18T12:32:59.849Z DEBUG coordinator is Ladies Room 2016-05-18T12:32:59.850Z DEBUG skipping grouping for Media Room because it is already grouped with coordinator 2016-05-18T12:32:59.852Z DEBUG replacing with favorite Easy Pop Radio 2016-05-18T12:33:00.001Z DEBUG found favorites [ { uri: 'x-sonosapi-radio:prime%2fstations%2fAM08S97P8ESGT%2f%23chunk-yTxSrZVKREC6nbCqPf1IzQ?sid=201&flags=8300&sn=5', title: '70s Rock Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/gotham_Template_Rock_70sRock.jpg', metadata: 'dc:title'70s Rock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAVA4O27YBJZ05%2f%23chunk-ZJFRKn29RMiFvfNAdUgE0A?sid=201&flags=8300&sn=5', title: '80s Pop Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_template_80s_pop.png', metadata: 'dc:title'80s Pop/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA328QJMX2VXG7F%2f%23chunk-jYnU2oIVQCGAmBRXCjgd6Q?sid=201&flags=8300&sn=5', title: '80s Rock Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_ArtTriangleTemplate_Rock_80sRock.jpg', metadata: 'dc:title'80s Rock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAIQEAO9TPRZWG%2f%23chunk-xUct7gZHT2qTC-8GmWVO3Q?sid=201&flags=8300&sn=5', title: '90s Alternative Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:title'90s Alternative/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAS655C0FAXO06%2f%23chunk-nQ4fwFvjT6-5RUh1q8pziQ?sid=201&flags=8300&sn=5', title: 'All 80s Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleAll '80s/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAY2JGCDM8LYJH%2f%23chunk-ta89zS71TYeH9Ngcj7qYbg?sid=201&flags=8300&sn=5', title: 'Beatles Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleThe Beatles/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'pndrradio:2218805407011291932?sn=1', title: 'Boston Radio', artist: undefined, album: undefined, albumArtUri: 'http://mediaserver-cont-sv5-2-v4v6.pandora.com/images/public/rovi/albumart/6/2/0/3/8024391063026_500W_500H.jpg', metadata: 'dc:titleBoston Radio/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON3_myemailaddress@private.com' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA102UKC71I5DU8%2f%23chunk-dcfyWXoNQDakMWHjlC70sg?sid=201&flags=8300&sn=5', title: 'Classic Hits Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleClassic Hits/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA2XEBUI9EJ55OK%2f%23chunk-yl_yff-tTsKfiXbXyLImuA?sid=201&flags=8300&sn=5', title: 'Classic Rock Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_ArtTriangleTemplate_Rock_ClassicRock.jpg', metadata: 'dc:titleClassic Rock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: '', title: undefined, artist: undefined, album: undefined, albumArtUri: undefined, metadata: undefined }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA2APYE2XMUM7UE%2f%23chunk-WJaCvY9JQZKXEElwxqP3SA?sid=201&flags=8300&sn=5', title: 'Eagles Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/I/51od9hkO%2BcL._UY500_CR100,0,488,488_.jpg', metadata: 'dc:titleEagles/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA1HQSY4KHHN1OC%2f%23chunk-idTq9z98RAevSM-n22W4_g?sid=201&flags=8300&sn=5', title: 'Easy Pop Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleEasy Pop/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA2YWQEZX3UC3J1%2f%23chunk-AcdpIl5HSZiXe-dtydptUQ?sid=201&flags=8300&sn=5', title: 'Hard Rock & Metal Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleHard Rock & Metal/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-file-cifs://Mybooklive/mp3/Sonos_Playlists/03%20-%20Today\'s%20Hits.m3u', title: 'Today\'s Hits', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:title03 - Today's Hits.m3u/dc:titleupnp:classobject.container.playlistContainer/upnp:classRINCON_AssociatedZPUDN' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA3QXXOBP9MU5LY%2f%23chunk-Bj27gV-kQ6KimhHE9byefA?sid=201&flags=8300&sn=5', title: 'Top Pop Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_ArtTriangleTemplate_Pop_PopHits.jpg', metadata: 'dc:titleTop Pop/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' } ]

todays hits: (mp3 playlist) 2016-05-18T12:36:04.747Z DEBUG pausing Hall Bathroom 2016-05-18T12:36:04.749Z DEBUG invoking pause 2016-05-18T12:36:04.758Z DEBUG pausing Backyard 2016-05-18T12:36:04.759Z DEBUG invoking pause 2016-05-18T12:36:04.765Z DEBUG pausing Master Bedroom 2016-05-18T12:36:04.765Z DEBUG invoking pause 2016-05-18T12:36:04.771Z DEBUG pausing Office 2016-05-18T12:36:04.771Z DEBUG invoking pause 2016-05-18T12:36:04.780Z DEBUG pausing Front Yard 2016-05-18T12:36:04.780Z DEBUG invoking pause 2016-05-18T12:36:04.785Z DEBUG pausing Ladies Room 2016-05-18T12:36:04.785Z DEBUG invoking pause 2016-05-18T12:36:04.792Z DEBUG setting volume 40 on Hall Bathroom 2016-05-18T12:36:04.803Z DEBUG coordinator is Hall Bathroom 2016-05-18T12:36:04.804Z DEBUG breaking out Hall Bathroom 2016-05-18T12:36:05.525Z DEBUG replacing with favorite Today's Hits 2016-05-18T12:36:05.750Z DEBUG found favorites [ { uri: 'x-sonosapi-radio:prime%2fstations%2fAM08S97P8ESGT%2f%23chunk-yTxSrZVKREC6nbCqPf1IzQ?sid=201&flags=8300&sn=5', title: '70s Rock Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/gotham_Template_Rock_70sRock.jpg', metadata: 'dc:title'70s Rock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAVA4O27YBJZ05%2f%23chunk-ZJFRKn29RMiFvfNAdUgE0A?sid=201&flags=8300&sn=5', title: '80s Pop Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_template_80s_pop.png', metadata: 'dc:title'80s Pop/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA328QJMX2VXG7F%2f%23chunk-jYnU2oIVQCGAmBRXCjgd6Q?sid=201&flags=8300&sn=5', title: '80s Rock Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_ArtTriangleTemplate_Rock_80sRock.jpg', metadata: 'dc:title'80s Rock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAIQEAO9TPRZWG%2f%23chunk-xUct7gZHT2qTC-8GmWVO3Q?sid=201&flags=8300&sn=5', title: '90s Alternative Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:title'90s Alternative/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAS655C0FAXO06%2f%23chunk-nQ4fwFvjT6-5RUh1q8pziQ?sid=201&flags=8300&sn=5', title: 'All 80s Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleAll '80s/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAY2JGCDM8LYJH%2f%23chunk-ta89zS71TYeH9Ngcj7qYbg?sid=201&flags=8300&sn=5', title: 'Beatles Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleThe Beatles/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'pndrradio:2218805407011291932?sn=1', title: 'Boston Radio', artist: undefined, album: undefined, albumArtUri: 'http://mediaserver-cont-sv5-2-v4v6.pandora.com/images/public/rovi/albumart/6/2/0/3/8024391063026_500W_500H.jpg', metadata: 'dc:titleBoston Radio/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON3_myemailaddress@private.com' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA102UKC71I5DU8%2f%23chunk-dcfyWXoNQDakMWHjlC70sg?sid=201&flags=8300&sn=5', title: 'Classic Hits Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleClassic Hits/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA2XEBUI9EJ55OK%2f%23chunk-yl_yff-tTsKfiXbXyLImuA?sid=201&flags=8300&sn=5', title: 'Classic Rock Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_ArtTriangleTemplate_Rock_ClassicRock.jpg', metadata: 'dc:titleClassic Rock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: '', title: undefined, artist: undefined, album: undefined, albumArtUri: undefined, metadata: undefined }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA2APYE2XMUM7UE%2f%23chunk-WJaCvY9JQZKXEElwxqP3SA?sid=201&flags=8300&sn=5', title: 'Eagles Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/I/51od9hkO%2BcL._UY500_CR100,0,488,488_.jpg', metadata: 'dc:titleEagles/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA1HQSY4KHHN1OC%2f%23chunk-idTq9z98RAevSM-n22W4_g?sid=201&flags=8300&sn=5', title: 'Easy Pop Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleEasy Pop/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA2YWQEZX3UC3J1%2f%23chunk-AcdpIl5HSZiXe-dtydptUQ?sid=201&flags=8300&sn=5', title: 'Hard Rock & Metal Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleHard Rock & Metal/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-file-cifs://Mybooklive/mp3/Sonos_Playlists/03%20-%20Today\'s%20Hits.m3u', title: 'Today\'s Hits', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:title03 - Today's Hits.m3u/dc:titleupnp:classobject.container.playlistContainer/upnp:classRINCON_AssociatedZPUDN' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA3QXXOBP9MU5LY%2f%23chunk-Bj27gV-kQ6KimhHE9byefA?sid=201&flags=8300&sn=5', title: 'Top Pop Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_ArtTriangleTemplate_Pop_PopHits.jpg', metadata: 'dc:titleTop Pop/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' } ]

eagles radio: (amazon music station)

2016-05-18T12:41:03.020Z DEBUG pausing Hall Bathroom 2016-05-18T12:41:03.024Z DEBUG invoking pause 2016-05-18T12:41:03.035Z DEBUG pausing Backyard 2016-05-18T12:41:03.036Z DEBUG invoking pause 2016-05-18T12:41:03.049Z DEBUG pausing Ladies Room 2016-05-18T12:41:03.049Z DEBUG invoking pause 2016-05-18T12:41:03.057Z DEBUG pausing Master Bedroom 2016-05-18T12:41:03.057Z DEBUG invoking pause 2016-05-18T12:41:03.068Z DEBUG pausing Front Yard 2016-05-18T12:41:03.069Z DEBUG invoking pause 2016-05-18T12:41:03.080Z DEBUG pausing Media Room 2016-05-18T12:41:03.081Z DEBUG invoking pause 2016-05-18T12:41:03.092Z DEBUG pausing Master Bathroom 2016-05-18T12:41:03.099Z DEBUG invoking pause 2016-05-18T12:41:03.112Z DEBUG pausing Office 2016-05-18T12:41:03.112Z DEBUG invoking pause 2016-05-18T12:41:03.119Z DEBUG setting volume 50 on Master Bedroom 2016-05-18T12:41:03.134Z DEBUG setting volume 50 on Master Bathroom 2016-05-18T12:41:03.143Z DEBUG setting volume 50 on Hall Bathroom 2016-05-18T12:41:03.151Z DEBUG coordinator is Master Bedroom 2016-05-18T12:41:03.153Z DEBUG adding Master Bathroom to coordinator Master Bedroom 2016-05-18T12:41:03.153Z DEBUG adding Hall Bathroom to coordinator Master Bedroom 2016-05-18T12:41:03.493Z DEBUG replacing with favorite Eagles Radio 2016-05-18T12:41:03.662Z DEBUG found favorites [ { uri: 'x-sonosapi-radio:prime%2fstations%2fAM08S97P8ESGT%2f%23chunk-yTxSrZVKREC6nbCqPf1IzQ?sid=201&flags=8300&sn=5', title: '70s Rock Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/gotham_Template_Rock_70sRock.jpg', metadata: 'dc:title'70s Rock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAVA4O27YBJZ05%2f%23chunk-ZJFRKn29RMiFvfNAdUgE0A?sid=201&flags=8300&sn=5', title: '80s Pop Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_template_80s_pop.png', metadata: 'dc:title'80s Pop/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA328QJMX2VXG7F%2f%23chunk-jYnU2oIVQCGAmBRXCjgd6Q?sid=201&flags=8300&sn=5', title: '80s Rock Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_ArtTriangleTemplate_Rock_80sRock.jpg', metadata: 'dc:title'80s Rock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAIQEAO9TPRZWG%2f%23chunk-xUct7gZHT2qTC-8GmWVO3Q?sid=201&flags=8300&sn=5', title: '90s Alternative Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:title'90s Alternative/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAS655C0FAXO06%2f%23chunk-nQ4fwFvjT6-5RUh1q8pziQ?sid=201&flags=8300&sn=5', title: 'All 80s Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleAll '80s/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fAY2JGCDM8LYJH%2f%23chunk-ta89zS71TYeH9Ngcj7qYbg?sid=201&flags=8300&sn=5', title: 'Beatles Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleThe Beatles/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'pndrradio:2218805407011291932?sn=1', title: 'Boston Radio', artist: undefined, album: undefined, albumArtUri: 'http://mediaserver-cont-sv5-2-v4v6.pandora.com/images/public/rovi/albumart/6/2/0/3/8024391063026_500W_500H.jpg', metadata: 'dc:titleBoston Radio/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON3_myemailaddress@private.com' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA102UKC71I5DU8%2f%23chunk-dcfyWXoNQDakMWHjlC70sg?sid=201&flags=8300&sn=5', title: 'Classic Hits Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleClassic Hits/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA2XEBUI9EJ55OK%2f%23chunk-yl_yff-tTsKfiXbXyLImuA?sid=201&flags=8300&sn=5', title: 'Classic Rock Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_ArtTriangleTemplate_Rock_ClassicRock.jpg', metadata: 'dc:titleClassic Rock/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: '', title: undefined, artist: undefined, album: undefined, albumArtUri: undefined, metadata: undefined }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA2APYE2XMUM7UE%2f%23chunk-WJaCvY9JQZKXEElwxqP3SA?sid=201&flags=8300&sn=5', title: 'Eagles Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/I/51od9hkO%2BcL._UY500_CR100,0,488,488_.jpg', metadata: 'dc:titleEagles/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA1HQSY4KHHN1OC%2f%23chunk-idTq9z98RAevSM-n22W4_g?sid=201&flags=8300&sn=5', title: 'Easy Pop Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleEasy Pop/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA2YWQEZX3UC3J1%2f%23chunk-AcdpIl5HSZiXe-dtydptUQ?sid=201&flags=8300&sn=5', title: 'Hard Rock & Metal Radio', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:titleHard Rock & Metal/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' }, { uri: 'x-file-cifs://Mybooklive/mp3/Sonos_Playlists/03%20-%20Today\'s%20Hits.m3u', title: 'Today\'s Hits', artist: undefined, album: undefined, albumArtUri: undefined, metadata: 'dc:title03 - Today's Hits.m3u/dc:titleupnp:classobject.container.playlistContainer/upnp:classRINCON_AssociatedZPUDN' }, { uri: 'x-sonosapi-radio:prime%2fstations%2fA3QXXOBP9MU5LY%2f%23chunk-Bj27gV-kQ6KimhHE9byefA?sid=201&flags=8300&sn=5', title: 'Top Pop Radio', artist: undefined, album: undefined, albumArtUri: 'https://images-na.ssl-images-amazon.com/images/G/01/Gotham/noborder/gotham_ArtTriangleTemplate_Pop_PopHits.jpg', metadata: 'dc:titleTop Pop/dc:titleupnp:classobject.item.audioItem.audioBroadcast/upnp:classSA_RINCON51463X#Svc51463-0-Token' } ]

jishi commented 8 years ago

Okay, beta.7 should give some relevant output now, if you could redo your tests with this version, that would be super.

GregRocket commented 8 years ago

@jishi Beta.7 test results

todays hits: (mp3 playlist)

Webpage respone: {"status":"error","error":"TypeError: Cannot read property 'toLowerCase' of undefined\n at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:47\n at Array.find (native)\n at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:24\n at process._tickCallback (node.js:364:9)"}

Console Error: 2016-05-18T18:19:45.994Z DEBUG pausing Hall Bathroom 2016-05-18T18:19:45.996Z DEBUG invoking pause 2016-05-18T18:19:46.005Z DEBUG pausing Backyard 2016-05-18T18:19:46.005Z DEBUG invoking pause 2016-05-18T18:19:46.012Z DEBUG pausing Ladies Room 2016-05-18T18:19:46.012Z DEBUG invoking pause 2016-05-18T18:19:46.018Z DEBUG pausing Master Bedroom 2016-05-18T18:19:46.018Z DEBUG invoking pause 2016-05-18T18:19:46.023Z DEBUG pausing Front Yard 2016-05-18T18:19:46.024Z DEBUG invoking pause 2016-05-18T18:19:46.029Z DEBUG pausing Media Room 2016-05-18T18:19:46.029Z DEBUG invoking pause 2016-05-18T18:19:46.034Z DEBUG pausing Master Bathroom 2016-05-18T18:19:46.034Z DEBUG invoking pause 2016-05-18T18:19:46.053Z DEBUG pausing Office 2016-05-18T18:19:46.054Z DEBUG invoking pause 2016-05-18T18:19:46.061Z DEBUG setting volume 40 on Hall Bathroom 2016-05-18T18:19:46.074Z DEBUG coordinator is Hall Bathroom 2016-05-18T18:19:46.074Z DEBUG breaking out Hall Bathroom 2016-05-18T18:19:46.867Z DEBUG replacing with favorite Today's Hits 2016-05-18T18:19:47.095Z DEBUG found favorites [ '70s Rock Radio', '80s Pop Radio', '80s Rock Radio', '90s Alternative Radio', 'All 80s Radio', 'Beatles Radio', 'Boston Radio', 'Classic Hits Radio', 'Classic Rock Radio', undefined, 'Eagles Radio', 'Easy Pop Radio', 'Hard Rock & Metal Radio', 'Today\'s Hits', 'Top Pop Radio' ] TypeError: Cannot read property 'toLowerCase' of undefined at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:47 at Array.find (native) at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:24 at process._tickCallback (node.js:364:9)

easy pop radio: (amazon music station)

Wepbage response: {"status":"error","error":"TypeError: Cannot read property 'toLowerCase' of undefined\n at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:47\n at Array.find (native)\n at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:24\n at process._tickCallback (node.js:364:9)"}

Console Error: 2016-05-18T18:21:55.988Z DEBUG pausing Hall Bathroom 2016-05-18T18:21:55.992Z DEBUG invoking pause 2016-05-18T18:21:56.005Z DEBUG pausing Ladies Room 2016-05-18T18:21:56.006Z DEBUG invoking pause 2016-05-18T18:21:56.015Z DEBUG pausing Master Bathroom 2016-05-18T18:21:56.015Z DEBUG invoking pause 2016-05-18T18:21:56.025Z DEBUG pausing Office 2016-05-18T18:21:56.025Z DEBUG invoking pause 2016-05-18T18:21:56.038Z DEBUG pausing Media Room 2016-05-18T18:21:56.039Z DEBUG invoking pause 2016-05-18T18:21:56.048Z DEBUG pausing Master Bedroom 2016-05-18T18:21:56.049Z DEBUG invoking pause 2016-05-18T18:21:56.056Z DEBUG pausing Front Yard 2016-05-18T18:21:56.057Z DEBUG invoking pause 2016-05-18T18:21:56.063Z DEBUG pausing Backyard 2016-05-18T18:21:56.065Z DEBUG invoking pause 2016-05-18T18:21:56.078Z DEBUG setting volume 50 on Ladies Room 2016-05-18T18:21:56.091Z DEBUG setting volume 50 on Media Room 2016-05-18T18:21:56.100Z DEBUG coordinator is Ladies Room 2016-05-18T18:21:56.101Z DEBUG adding Media Room to coordinator Ladies Room 2016-05-18T18:21:56.365Z DEBUG replacing with favorite Easy Pop Radio 2016-05-18T18:21:56.543Z DEBUG found favorites [ '70s Rock Radio', '80s Pop Radio', '80s Rock Radio', '90s Alternative Radio', 'All 80s Radio', 'Beatles Radio', 'Boston Radio', 'Classic Hits Radio', 'Classic Rock Radio', undefined, 'Eagles Radio', 'Easy Pop Radio', 'Hard Rock & Metal Radio', 'Today\'s Hits', 'Top Pop Radio' ] TypeError: Cannot read property 'toLowerCase' of undefined at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:47 at Array.find (native) at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:24 at process._tickCallback (node.js:364:9)

jishi commented 8 years ago

Okay, I see the issue now. In your favorite list in the Sonos application, do you have an entry between 'Classic Rock Radio' and 'Eagles Radio'? I wonder if it's a parsing error or a data error.

GregRocket commented 8 years ago

I don't have an entry between 'Classic Rock Radio' and 'Eagles Radio'

Here are the two presets 'Classic Rock Radio' is just before 'Eagles Radio'

"classic rock radio": { "players": [ { "roomName": "Hall Bathroom", "volume": 50}, { "roomName": "Ladies Room", "volume": 50}, { "roomName": "Media Room", "volume": 50}, { "roomName": "Office", "volume": 20} ], "favorite": "classic rock radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "pauseOthers": true },

"eagles radio": { "players": [ { "roomName": "Master Bedroom", "volume": 50}, { "roomName": "Master Bathroom", "volume": 50}, { "roomName": "Hall Bathroom", "volume": 50} ], "favorite": "Eagles Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "pauseOthers": true },

GregRocket commented 8 years ago

Here is the entire preset

{ "todays hits": { "players": [ { "roomName": "Hall Bathroom", "volume": 40} ], "favorite": "Today's Hits", "uri": "x-rincon-stream:RINCON_0000000000001500", "pauseOthers": true },

"easy pop radio": { "players": [ { "roomName": "Ladies Room", "volume": 50}, { "roomName": "Media Room", "volume": 50} ], "favorite": "Easy Pop Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "pauseOthers": true },

"beatles radio": { "players": [ { "roomName": "Office", "volume": 30}, { "roomName": "Ladies Room", "volume": 50}, { "roomName": "Media Room", "volume": 50} ], "favorite": "Beatles Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "pauseOthers": true },

"classic rock radio": { "players": [ { "roomName": "Hall Bathroom", "volume": 50}, { "roomName": "Ladies Room", "volume": 50}, { "roomName": "Media Room", "volume": 50}, { "roomName": "Office", "volume": 20} ], "favorite": "classic rock radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "pauseOthers": true },

"eagles radio": { "players": [ { "roomName": "Master Bedroom", "volume": 50}, { "roomName": "Master Bathroom", "volume": 50}, { "roomName": "Hall Bathroom", "volume": 50} ], "favorite": "Eagles Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "pauseOthers": true },

"classic hits radio": { "players": [ { "roomName": "Master Bedroom", "volume": 50}, { "roomName": "Master Bathroom", "volume": 50}, { "roomName": "Ladies Room", "volume": 50}, { "roomName": "Media Room", "volume": 50}, { "roomName": "Hall Bathroom", "volume": 40} ], "favorite": "Classic Hits Radio", "uri": "x-rincon-stream:RINCON_0000000000001500", "pauseOthers": true } }

jishi commented 8 years ago

I'm talking about the list of favorites that you have added, in Sonos application. Do you have 14 or 15 entries there? And is there one in between "Classic Rock Radio" and "Eagles Radio" there?

It would be really useful to get a raw XML dump of the response from the Sonos player, using Wireshark or tcpdump if possible. We could start a new issue and continue that discussion there.

Also, try the beta.8 version now.

GregRocket commented 8 years ago

Sorry, so many things to think about. ;-)

Yes there is an entry there. It is 'Disney Greatest' a Sonos Playlist.

If you can give me instructions to get the raw XML dump I'd be glad to.

GregRocket commented 8 years ago

Beta.8

Preset 'Easy Pop Radio'

Rooms Grouped but not selected. Radio Station not loaded. Nothing Playing.

Webpage Response {"status":"error","error":"TypeError: Cannot read property 'toLowerCase' of undefined\n at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:47\n at Array.find (native)\n at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:24\n at process._tickCallback (node.js:364:9)"}

Console Respone 2016-05-18T19:22:42.132Z DEBUG pausing Hall Bathroom 2016-05-18T19:22:42.132Z DEBUG invoking pause 2016-05-18T19:22:42.142Z DEBUG pausing Backyard 2016-05-18T19:22:42.142Z DEBUG invoking pause 2016-05-18T19:22:42.149Z DEBUG pausing Ladies Room 2016-05-18T19:22:42.150Z DEBUG invoking pause 2016-05-18T19:22:42.157Z DEBUG pausing Master Bedroom 2016-05-18T19:22:42.158Z DEBUG invoking pause 2016-05-18T19:22:42.165Z DEBUG pausing Master Bathroom 2016-05-18T19:22:42.166Z DEBUG invoking pause 2016-05-18T19:22:42.176Z DEBUG pausing Office 2016-05-18T19:22:42.176Z DEBUG invoking pause 2016-05-18T19:22:42.184Z DEBUG pausing Front Yard 2016-05-18T19:22:42.184Z DEBUG invoking pause 2016-05-18T19:22:42.191Z DEBUG pausing Media Room 2016-05-18T19:22:42.191Z DEBUG invoking pause 2016-05-18T19:22:42.199Z DEBUG setting volume 50 on Ladies Room 2016-05-18T19:22:42.208Z DEBUG setting volume 50 on Media Room 2016-05-18T19:22:42.217Z DEBUG coordinator is Ladies Room 2016-05-18T19:22:42.218Z DEBUG adding Media Room to coordinator Ladies Room 2016-05-18T19:22:42.455Z DEBUG replacing with favorite Easy Pop Radio 2016-05-18T19:22:42.666Z DEBUG found favorites [ '70s Rock Radio', '80s Pop Radio', '80s Rock Radio', '90s Alternative Radio', 'All 80s Radio', 'Beatles Radio', 'Boston Radio', 'Classic Hits Radio', 'Classic Rock Radio', undefined, 'Eagles Radio', 'Easy Pop Radio', 'Hard Rock & Metal Radio', 'Today\'s Hits', 'Top Pop Radio' ] TypeError: Cannot read property 'toLowerCase' of undefined at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:47 at Array.find (native) at /root/node-sonos-http-api-beta/node_modules/sonos-discovery/lib/prototypes/Player/replaceWithFavorite.js:15:24 at process._tickCallback (node.js:364:9)

GregRocket commented 8 years ago

I notice that in Sonos Favorites Disney Greatest is a Sonos Playlist and shows as undefined, (no quotes) in the console output Today's Hits is a Music Library Playlist and shows correctly as 'Today\'s Hits'

The rest of the Favorites are Music Stations

jishi commented 8 years ago

Hm, that's weird, it should have filtered out that entry. can you verify that it says beta.8 in node_modules/sonos-discovery/package.json?

GregRocket commented 8 years ago

It says beta.7. I downloaded the zip from here. I just downloaded it again and it still says beta.7

jishi commented 8 years ago

Yeah, it's because I'm a retard. Try again, same procedure. I forget to push the changes...