hklages / node-red-contrib-sonos-plus

A set of Node-RED nodes to control SONOS player in your local network.
MIT License
75 stars 14 forks source link

Cannot play a Playlist from mysonos #280

Closed evazzoler closed 4 months ago

evazzoler commented 4 months ago

Hi, I cannot play a playlist from mysonos. For being sure, I used the "Example 01: Play a (Music-Library, Amazon) playlist using My-Sonos" and modified the inject node with the exact name of a playlist I have in my mysonos. The result is always this:

group.play.mysonos:htmlData is not string :: Details: {"stack":"Error: htmlData is not string\n at decodeHtmlEntity (/home/pi/.node-red/node_modules/node-red-contrib-sonos-plus/src/Helper.js:42:13)\n at getUpnpClassEncoded (/home/pi/.node-red/node_modules/node-red-contrib-sonos-plus/src/Extensions.js:580:27)\n at /home/pi/.node-red/node_modules/node-red-contrib-sonos-plus/src/Commands.js:659:32\n at Array.map (<anonymous>)\n at getMySonos (/home/pi/.node-red/node_modules/node-red-contrib-sonos-plus/src/Commands.js:646:58)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.groupPlayMySonos [as group.play.mysonos] (/home/pi/.node-red/node_modules/node-red-contrib-sonos-plus/src/sonos-universal.js:1096:26)","message":"htmlData is not string"}

evazzoler commented 4 months ago

I've found a similar issue: #279 It seems that the problem in that issue was coming from a beta installation. In my case, I installed from palette the latest stable version released 5 days ago: 6.7.4

hklages commented 4 months ago

Yes, it seems that the palette uses the newest release beta.7 what does not work. In may package.json I did specify .beta6

Are you familiar with npm - you just need to install the beta6 instead of beta.7.

I will start work on it on monday to make my package work with beta7 - will take a few days to finish.

evazzoler commented 4 months ago

Ok, thank you. I'm not familiar with NPM versioning but I'll read the documentation.

hklages commented 4 months ago

Another option is to use the older version 6.7.3. Here is a link

Just use install with "@6.7.3" instead of @latest

evazzoler commented 4 months ago

Another option is to use the older version 6.7.3. Here is a link

Just use install with "@6.7.3" instead of @latest

I installed 6.7.3 and get the same error.

evazzoler commented 4 months ago

Same with 6.7.2

hklages commented 4 months ago

.... Because the all install the beta.7 and no module does work with that.

Try:

npm list @@.***

Then: npm uninstall @@.***

Then npm install @@.***

On Sat, Feb 17, 2024, 20:35 Enrico Vazzoler @.***> wrote:

Same with 6.7.2

— Reply to this email directly, view it on GitHub https://github.com/hklages/node-red-contrib-sonos-plus/issues/280#issuecomment-1950290826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDZCHZAVXTHX3ODMTPFG2DYUEA7RAVCNFSM6AAAAABDNNFXSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGI4TAOBSGY . You are receiving this because you were assigned.Message ID: @.***>

evazzoler commented 4 months ago

.... Because the all install the beta.7 and no module does work with that. Try: npm list @@. Then: npm uninstall @@. Then npm install @@.***

Ooook, now I only need to understand how to replace ** ;-)

evazzoler commented 4 months ago

Here nothig mention "beta"... So I don't know what to install as "beta6"...

immagine

hklages commented 4 months ago

... Don't waste your time. I will fix it on Monday.

On Sat, Feb 17, 2024, 21:25 Enrico Vazzoler @.***> wrote:

Here nothig mention "beta"... So I don't know what to install as "beta6"...

immagine.png (view on web) https://github.com/hklages/node-red-contrib-sonos-plus/assets/9479876/13c0d823-521f-4e05-8139-74d986012ef3

— Reply to this email directly, view it on GitHub https://github.com/hklages/node-red-contrib-sonos-plus/issues/280#issuecomment-1950300349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDZCHYVGHZPIRDSCS7D66TYUEG4PAVCNFSM6AAAAABDNNFXSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGMYDAMZUHE . You are receiving this because you were assigned.Message ID: @.***>

evazzoler commented 4 months ago

Ok, now is working! :-) The only problem is I accidentally downgraded node-fetch to the 2.7.0 because it is a dependency of sonos@2.6.0-beta.6. node-fetch is used by other packages that are not so happy for that. Have a nice weekend, see you monday with the fix! ;-)

immagine

hklages commented 4 months ago

hi, the you release fixes the installation process but not your fetch node issue. Tomorrow I start to get beta 7 ready with my package.

Cheers, Henning

On Sat, Feb 17, 2024, 21:55 Enrico Vazzoler @.***> wrote:

Ok, now is working! :-) The only problem is I accidentally downgraded node-fetch to the 2.7.0 because it is a dependency of @.***. node-fetch* is used by other packages that are not so happy for that. Have a nice weekend, see you monday with the fix! ;-)

immagine.png (view on web) https://github.com/hklages/node-red-contrib-sonos-plus/assets/9479876/667b9206-f32b-4dca-a451-2c6c95cf1e7e

— Reply to this email directly, view it on GitHub https://github.com/hklages/node-red-contrib-sonos-plus/issues/280#issuecomment-1950323039, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDZCH4RKVBI6CK323XQVUTYUEKNZAVCNFSM6AAAAABDNNFXSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGMZDGMBTHE . You are receiving this because you were assigned.Message ID: @.***>

evazzoler commented 4 months ago

Thank you Henning, tomorrow I will reinstall the "normal" way.

hklages commented 4 months ago

Hi Enrico.

I updated to sonos beta.7 - now "my sonos" related command should work and hopefully also you fetch library.

On Wed, Feb 21, 2024 at 6:24 PM Enrico Vazzoler @.***> wrote:

Thank you Henning, tomorrow I will reinstall the "normal" way.

— Reply to this email directly, view it on GitHub https://github.com/hklages/node-red-contrib-sonos-plus/issues/280#issuecomment-1957390634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDZCH3FC5S7IEFAQIYF67LYUYUV3AVCNFSM6AAAAABDNNFXSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJXGM4TANRTGQ . You are receiving this because you were assigned.Message ID: @.***>

hklages commented 4 months ago

With the new release 6.7.6 that should work now.

Please confirm.

For your info: The problem was caused by a breaking change in sonos 2.6.0-beta.7 and the palette installs the beta.7 automatically on some systems - but not one mine - so I was not aware of that issue. Thanks for letting me know that.

evazzoler commented 4 months ago

Reading the error I suspected that was a issue originated from the sonos library release... I upgraded all is working good, so I close this issue and thank you for the work and the support!