Sonos Python 3 Beta

Posted on
Mon Oct 09, 2023 10:46 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Sonos Python 3 Beta

ryanbuckner wrote:
Before I do that, I'm not having this issue with any other Plugins.


The Sonos has some compiled code in it which can get the quarantine flag set. If you want, you could just specify the specific plugin instead of the entire directory, but it's certainly not going to hurt anything if you do them all.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Oct 09, 2023 11:05 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sonos Python 3 Beta

Ok great. I ran it for the whole folder. I'll monitor and let you know the outcome. Thanks!

Posted on
Thu Oct 19, 2023 8:35 am
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Sonos Python 3 Beta

I upgraded yesterday to the latest indigo and the new Sonos plugin. I seem to have the Sonos plugin working except for Sirius XM channels.


Code: Select all
Sonos Error                     'local variable 'title' referenced before assignment' in module 'Sonos.py', method 'actionDirect [2023.0.27]'
   Failing statement [line 2257]: 'self.SOAPSend(zoneIP, "/MediaRenderer", "/AVTransport", "SetAVTransportURI", "<CurrentURI>x-sonosapi-hls:" + urllib.parse.quote(contentId) + "?sid=37&amp;flags=8480&amp;sn=8</CurrentURI><CurrentURIMetaData>&lt;DIDL-Lite xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns:r=\"urn:schemas-rinconnetworks-com:metadata-1-0/\" xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\"&gt;&lt;item id=\"" + contentId + "\" parentID=\"0\" restricted=\"true\"&gt;&lt;dc:title&gt;" + title + "&lt;/dc:title&gt;&lt;upnp:class&gt;object.item.audioItem.audioBroadcast&lt;/upnp:class&gt;&lt;desc id=\"cdudn\" nameSpace=\"urn:schemas-rinconnetworks-com:metadata-1-0/\"&gt;SA_RINCON6_&lt;/desc&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;</CurrentURIMetaData>")'


I saw a couple of older threads on Sirius issues, and I've had problems through the years. but this was working yesterday with the previous indigo and Sonos plugin. any insights or fixes?

Posted on
Thu Oct 19, 2023 2:21 pm
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

Seeker wrote:
I upgraded yesterday to the latest indigo and the new Sonos plugin. I seem to have the Sonos plugin working except for Sirius XM channels.


Code: Select all
Sonos Error                     'local variable 'title' referenced before assignment' in module 'Sonos.py', method 'actionDirect [2023.0.27]'
   Failing statement [line 2257]: 'self.SOAPSend(zoneIP, "/MediaRenderer", "/AVTransport", "SetAVTransportURI", "<CurrentURI>x-sonosapi-hls:" + urllib.parse.quote(contentId) + "?sid=37&amp;flags=8480&amp;sn=8</CurrentURI><CurrentURIMetaData>&lt;DIDL-Lite xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns:r=\"urn:schemas-rinconnetworks-com:metadata-1-0/\" xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\"&gt;&lt;item id=\"" + contentId + "\" parentID=\"0\" restricted=\"true\"&gt;&lt;dc:title&gt;" + title + "&lt;/dc:title&gt;&lt;upnp:class&gt;object.item.audioItem.audioBroadcast&lt;/upnp:class&gt;&lt;desc id=\"cdudn\" nameSpace=\"urn:schemas-rinconnetworks-com:metadata-1-0/\"&gt;SA_RINCON6_&lt;/desc&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;</CurrentURIMetaData>")'


I saw a couple of older threads on Sirius issues, and I've had problems through the years. but this was working yesterday with the previous indigo and Sonos plugin. any insights or fixes?

This is still an outstanding issue that is highlighted in the release announcement.
Being UK based, I haven't got access to SiriusXM which makes sorting it out a bit more of a challenge.
I may be able to get round to looking at it again in a couple of weeks as non-Indigo stuff has had to have my immediate attention.

Posted on
Thu Oct 19, 2023 3:23 pm
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Sonos Python 3 Beta

thank you for keeping this plugin alive! if I can be of any assistance, let me know.

Posted on
Mon Oct 23, 2023 1:46 pm
will1305 offline
Posts: 6
Joined: Dec 06, 2011

Re: Sonos Python 3 Beta

I recently upgraded to the latest version of Indigo (2023.1) and the latest version of the Sonos plugin (2023.0.27). The plugin starts correctly (although it can't find my Pandora account even though the correct credentials are in the Sonos plugin setup. After a few moments the plugin starts generating error messages. See log contents below. Any advise as to how to proceed?

Oct 23, 2023 at 3:38:38 PM
Enabling plugin "Sonos 2023.0.27" using API v3.1
Starting plugin "Sonos 2023.0.27" (pid 8133)
Sonos Plugin logging now started.
Sonos Loaded Sonos Favorites... [2]
Sonos Loaded Playlists... [0]
Sonos Loaded RadioTime Favorite Stations... [0]
Sonos Error 'User not yet authenticated' in module 'pandora.py', method 'check_authentication [2023.0.27]'
Failing statement [line 12]: 'raise ValueError("User not yet authenticated")'
Sonos [Mon Oct 23 15:38:39 2023] Processed plugin preferences.
Sonos Plugin __init__ ended.
Started plugin "Sonos 2023.0.27"
Sonos Plugin startup started.
Sonos [Mon Oct 23 15:38:39 2023] Processed plugin preferences.
Sonos Serving HTTP Streamer on 127.0.0.1 [0.0.0.0], port 8888
Sonos Loaded Apple Voices.. [143]
Sonos SSDP Listener Started...
Sonos Plugin startup ended.
Sonos Adding ZonePlayer: 192.168.7.46, RINCON_000E5813CD4601400, Sonos - Backyard Deck
Sonos Adding ZonePlayer: 192.168.7.41, RINCON_949F3E6D5A2C01400, Sonos - Basement
Sonos Adding ZonePlayer: 192.168.7.222, RINCON_38420B4494F401400, Sonos - Family Room
Sonos Adding ZonePlayer: 192.168.7.45, RINCON_000E588C3FF201400, Sonos - Living Room
Sonos SoCo Reactor Ignition...
Sonos LineIn: RINCON_000E5813CD4601400, Audio Component:Patio
Sonos LineIn: RINCON_000E588C3FF201400, Audio Component:Living Room (L)
Sonos Loaded Playlists... [0]

Oct 23, 2023 at 3:39:19 PM
Sonos [Mon Oct 23 15:39:19 2023] Processed plugin preferences.

Oct 23, 2023 at 3:39:35 PM
Sonos Error 'invalid literal for int() with base 10: ''' in module 'Sonos.py', method 'SSDPProcess [2023.0.27]'
Failing statement [line 283]: 'if int(message["X-RINCON-BOOTSEQ"]) != int(dev.states["bootseq"]):'
Sonos Error 'invalid literal for int() with base 10: ''' in module 'Sonos.py', method 'SSDPProcess [2023.0.27]'
Failing statement [line 283]: 'if int(message["X-RINCON-BOOTSEQ"]) != int(dev.states["bootseq"]):'
Sonos Error 'invalid literal for int() with base 10: ''' in module 'Sonos.py', method 'SSDPProcess [2023.0.27]'
Failing statement [line 283]: 'if int(message["X-RINCON-BOOTSEQ"]) != int(dev.states["bootseq"]):'

Posted on
Tue Oct 24, 2023 9:24 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

I have posted a pre-release version on Github: Fix for BOOTSEQ bug?

This pre-release includes the following enhancements:
  • Hopefully fix the invalid literal for int() with base 10 bug accessing dev.states["bootseq"].
  • Require latest version of the twisted python package.
  • Enhance package requirements checking.
  • Minor corrections.

When you install this version, the plugin will stop after asking you to pip3.10 install the lateat Python twisted package. Just copy and paste the displayed command into a terminal session and after it completes, reload the plugin.

Again, as with SiriusXM, being UK based I can't get access to Pandora for testing.

I can't see anything wrong with the Pandora code. I am pretty certain there are users of this plugin version sucessfully using Pandora?
Having said that, the plugin is using logic from an unofficial API and there are two logins it is doing. The first is a partner login and the second is the user login. The partner login is hard coded into the plugin and the user login is entered via the plugin configuration. I would maybe suggest, deleting the Pandora userid and password and entering them again by typing them in to force an update.

In the meanwhile, if any user of this version of the plugin is successfully using Pandora, could they reply to this post and let us know? :)

Posted on
Mon Oct 30, 2023 8:37 pm
will1305 offline
Posts: 6
Joined: Dec 06, 2011

Re: Sonos Python 3 Beta

I installed the latest plugin version (2023.0.30) and can confirm that the “ invalid literal for int() with base 10 bug accessing dev.states["bootseq"].” have been fixed.

I tried the suggested Pandora approach and deleted my credentials and saved the configuration. Then reentered the credentials and saved the configuration to force an update. Unfortunately this made no difference. Same error message.

Posted on
Wed Nov 01, 2023 1:36 pm
AutoMation01 offline
Posts: 40
Joined: Mar 18, 2018

Re: Sonos Python 3 Beta

autolog wrote:
Seeker wrote:
I upgraded yesterday to the latest indigo and the new Sonos plugin. I seem to have the Sonos plugin working except for Sirius XM channels.


Code: Select all
Sonos Error                     'local variable 'title' referenced before assignment' in module 'Sonos.py', method 'actionDirect [2023.0.27]'
   Failing statement [line 2257]: 'self.SOAPSend(zoneIP, "/MediaRenderer", "/AVTransport", "SetAVTransportURI", "<CurrentURI>x-sonosapi-hls:" + urllib.parse.quote(contentId) + "?sid=37&amp;flags=8480&amp;sn=8</CurrentURI><CurrentURIMetaData>&lt;DIDL-Lite xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns:r=\"urn:schemas-rinconnetworks-com:metadata-1-0/\" xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\"&gt;&lt;item id=\"" + contentId + "\" parentID=\"0\" restricted=\"true\"&gt;&lt;dc:title&gt;" + title + "&lt;/dc:title&gt;&lt;upnp:class&gt;object.item.audioItem.audioBroadcast&lt;/upnp:class&gt;&lt;desc id=\"cdudn\" nameSpace=\"urn:schemas-rinconnetworks-com:metadata-1-0/\"&gt;SA_RINCON6_&lt;/desc&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;</CurrentURIMetaData>")'


I saw a couple of older threads on Sirius issues, and I've had problems through the years. but this was working yesterday with the previous indigo and Sonos plugin. any insights or fixes?

This is still an outstanding issue that is highlighted in the release announcement.
Being UK based, I haven't got access to SiriusXM which makes sorting it out a bit more of a challenge.
I may be able to get round to looking at it again in a couple of weeks as non-Indigo stuff has had to have my immediate attention.


As a quick temporary work around until the real SONOS XM integration can be addressed, here is a link to a hacked version https://app.box.com/s/g6re6nsembt13v2hcax0t5qhgie5t6o8 that has a python embedded player glued in to authenticate the XM session and support the XM player options.

This method has worked for a couple of years on the python 2 plugin and the python 3 was close enough in a similar format for a quick port. Seems to be working with the new Plugin Version.

I had to compress it to upload to BOX so you may need to uncompress before installing. Hope it works for the few folks that still use XM.

Enjoy ....

Posted on
Fri Nov 03, 2023 3:28 am
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Sonos Python 3 Beta

that fixed my SiriusSM issues!! thank you so much!

Posted on
Thu Nov 09, 2023 9:30 am
MartynD offline
Posts: 32
Joined: May 15, 2019
Location: North Yorkshire. UK.

Re: Sonos Python 3 Beta

I am having trouble loading Sonos plugin. I get this error message:
Code: Select all
9 Nov 2023 at 15:17:04
   Installing and enabling plugin Sonos v2023.0.30
   Error                           ReloadPlugin() caught exception: FileIOError -- rename/move of file or folder failed -- check file/folder permissions
   Reloading plugin "Web Server 2023.1.0" using API v3.3
   Stopping plugin "Web Server 2023.1.0" (pid 78432)
   Reflector                       shutdown reflector connection
   Stopped plugin "Web Server 2023.1.0"
   Starting plugin "Web Server 2023.1.0" (pid 78578)
   Started plugin "Web Server 2023.1.0"


Which file/folder permissions do I need to check?
I have just moved to a Mac mini M2, It was working on my old Intel Mac mini which was running latest versions of Indigo python 3 .

Thanks.

Posted on
Thu Nov 09, 2023 10:06 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sonos Python 3 Beta

I suspect you have an old version of the plugin in the Plugins (Disabled) folder in the Indigo install folder so when Indigo tries to move the active one from the Plugins folder (enabled plugins) the move fails. Look to see if there's one in that folder and delete it.

If that's not the case, then rerun the Indigo installer and it should correct any file/folder permission errors.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Nov 10, 2023 4:00 am
MartynD offline
Posts: 32
Joined: May 15, 2019
Location: North Yorkshire. UK.

Re: Sonos Python 3 Beta

Hi Jay,

Tried that - no joy. There is no Sonos plugin in either folder, and after running the installer I still have the same error.

I have just tried to install a different plugin - announcements - I have the exact same error...........

Posted on
Fri Nov 10, 2023 11:05 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sonos Python 3 Beta

Are you sure you are rerunning the Indigo Installer under the same user account and that account is an admin account?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Nov 11, 2023 4:08 am
MartynD offline
Posts: 32
Joined: May 15, 2019
Location: North Yorkshire. UK.

Re: Sonos Python 3 Beta

Hi,

Yes, there is only 1 account on there.

Martyn

Who is online

Users browsing this forum: Google [Bot] and 11 guests