Node-red-contrib-sonos-plus

With one of the latest updates, my sonos flow does not work anymore...
When an eveent occurred, my sonos flow must play a file on my nas...
it worked some weeks ago, and now i dont hear the file playing and i have an error.

I attached a part of my message and the flow..

Hi - its a bug. I can reproduce it. Sorry for the inconvience.
Hope that I can fix it today.

ok, i have a workaround by using

  • library.export.track (search a file)
  • group.play.export (play the found file )

just published 5.03 - should be fixed there.

Does it work for you?

Hi Hklages,

It works again!

Greets peter

Verzonden vanuit Mail voor Windows 10

I do have some Problems with the new Version 5.03 of the node-red-contrib-sonos-plus.

Playing some radio-stations in my Dashbord is the name of the Radiostation displayed. The debugging window on the left shows me the following error displayed by a xml-node -called "Radio Station":

10.4.2021, 08:51:52node: Radio Station
msg : error
error

Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: W

The played Radiostation was WDR2 in Germany.

[{"id":"dc640cce.e046d","type":"ui_template","z":"e87bf2c.7a7039","group":"5df3954c.79a78c","name":"Radiostation","order":12,"width":6,"height":1,"format":"<div class=blockstation ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":1290,"y":1300,"wires":[[]]},{"id":"2c5612cd.57777e","type":"change","z":"e87bf2c.7a7039","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[\"DIDL-Lite\"].item[0][\"dc:title\"][0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":1300,"wires":[["dc640cce.e046d"]]},{"id":"500c32dd.28636c","type":"xml","z":"e87bf2c.7a7039","name":"Radio Station","property":"payload","attr":"$","chr":"","x":900,"y":1300,"wires":[["2c5612cd.57777e"]]},{"id":"d38637d4.559ff8","type":"change","z":"e87bf2c.7a7039","name":"payload für Radiostaion","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.mediaData.CurrentURIMetaData.Title","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1300,"wires":[["500c32dd.28636c"]]},{"id":"939762fe.8c86b8","type":"sonos-universal","z":"e87bf2c.7a7039","confignode":"703c72a2.0eae9c","command":"message","state":"","stateType":"str","name":"","x":320,"y":1140,"wires":[["d38637d4.559ff8","6e400820.d00548","6862c5fb.532fcc","b0c5878d.3ba49","a109073a.fb2d6"]]},{"id":"1224cac2.11e2ad","type":"inject","z":"e87bf2c.7a7039","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":true,"onceDelay":0.1,"topic":"get.trackplus","payload":"","payloadType":"str","x":140,"y":1140,"wires":[["939762fe.8c86b8"]]},{"id":"6e400820.d00548","type":"change","z":"e87bf2c.7a7039","name":"payload.artist","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.artist","tot":"msg"},{"t":"change","p":"payload","pt":"msg","from":"unknown","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":1100,"wires":[["71af078e.1fdb68","8d377ae0.d154d"]]},{"id":"6862c5fb.532fcc","type":"change","z":"e87bf2c.7a7039","name":"payload.title","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.title","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1180,"wires":[["37ea71a2.083b36","8d377ae0.d154d"]]},{"id":"b0c5878d.3ba49","type":"change","z":"e87bf2c.7a7039","name":"payload.title","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.mediaData.NrTracks","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1220,"wires":[["cde8c2b.1538a4"]]},{"id":"a109073a.fb2d6","type":"change","z":"e87bf2c.7a7039","name":"payload.title","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.positionData.Track","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1260,"wires":[["ce34ea5e.170bf","f92fa4d5.c9b488"]]},{"id":"71af078e.1fdb68","type":"ui_template","z":"e87bf2c.7a7039","group":"5df3954c.79a78c","name":"Artist","order":7,"width":6,"height":2,"format":"<div class=\"blockartist\" ng-bind-html=\"msg.payload\">\n    </div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1270,"y":1100,"wires":[[]]},{"id":"8d377ae0.d154d","type":"batch","z":"e87bf2c.7a7039","name":"","mode":"count","count":"2","overlap":0,"interval":"2","allowEmptySequence":false,"topics":[],"x":790,"y":1140,"wires":[["d22be83d.67294"]]},{"id":"37ea71a2.083b36","type":"ui_template","z":"e87bf2c.7a7039","group":"5df3954c.79a78c","name":"Title","order":8,"width":6,"height":2,"format":"\n<div class=\"blocktitle\" ng-bind-html=\"msg.payload\"></div>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1270,"y":1180,"wires":[[]]},{"id":"cde8c2b.1538a4","type":"ui_text","z":"e87bf2c.7a7039","group":"5df3954c.79a78c","order":4,"width":1,"height":1,"name":"gesamtTracks","label":"","format":"{{msg.payload}}","layout":"col-center","x":1300,"y":1220,"wires":[]},{"id":"ce34ea5e.170bf","type":"ui_text","z":"e87bf2c.7a7039","group":"5df3954c.79a78c","order":3,"width":1,"height":1,"name":"TrackNr.","label":"","format":"{{msg.payload}}","layout":"col-center","x":1280,"y":1260,"wires":[]},{"id":"f92fa4d5.c9b488","type":"debug","z":"e87bf2c.7a7039","name":"Test4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":890,"y":1020,"wires":[]},{"id":"d22be83d.67294","type":"join","z":"e87bf2c.7a7039","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":" - ","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":910,"y":1140,"wires":[["27f464e0.790b04"]]},{"id":"27f464e0.790b04","type":"change","z":"e87bf2c.7a7039","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"- unknown","fromt":"str","to":" \\chr(20)","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"ä","fromt":"str","to":"ae","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"ö","fromt":"str","to":"oe","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"ü","fromt":"str","to":"ue","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"ß","fromt":"str","to":"ss","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"°","fromt":"str","to":"Grad","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"&amp;","fromt":"str","to":"&","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1080,"y":1140,"wires":[["2a8e0f78.c353c8"]]},{"id":"2a8e0f78.c353c8","type":"mqtt out","z":"e87bf2c.7a7039","name":"","topic":"/MatrixDisplay2/rdsSz","qos":"","retain":"","broker":"4f9fd004.61dcd8","x":1320,"y":1140,"wires":[]},{"id":"5df3954c.79a78c","type":"ui_group","name":"SONOS","tab":"9a8f8e45.49d28","order":3,"disp":true,"width":"6","collapse":true},{"id":"703c72a2.0eae9c","type":"sonos-config","name":"Schlafzimmer","serialnum":"34-7E-5C-32-88-0E:3","ipaddress":"192.168.2.24"},{"id":"4f9fd004.61dcd8","type":"mqtt-broker","name":"Raspberry4","broker":"192.168.2.45","port":"1883","clientid":"3c5bcf5ccc4b4058a1778c49193320b6","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"9a8f8e45.49d28","type":"ui_tab","name":"Schlafzimmer","icon":"mi-hotel","order":6,"disabled":false,"hidden":false}]

![Screenshot_2021-04-10 Node-RED 192 168 2 45|690x32](upload://pwf9UqSwil2r2eO97bbBZjhwvx9.png) 

(I'm not able to post a picture of the flow. Sorry)

This error comes up since the update to 5.03. I hope someone can help me.

Regards 
Eberhard

Hi Eberhard!

Please remove the xml conversion and set msg payload. Conversion is not anymore necessary.
See the picture below (without the 2 nodes).

An even better solution might be sonos-events. That does not poll for the data but subscribes to the event.

Thank you so much!!

Regards Eberhard

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.