Sonos Python 3 Beta

Posted on
Sat Nov 11, 2023 8:02 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

You could try a manual install:
  • Shutdown the Indigo Server
  • Copy the Sonos plugin into Indigo's plugin directory at:
    Code: Select all
    /Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins
    that is, assuming you are running 2023.1 (change as appropriate)
  • Restart the Indigo Server
See if that works or throws an error.

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

Re: Sonos Python 3 Beta

Hi Jon,

That worked ! Excellent. Everything seems fine and working as expected, I have 1 error message in the event log but it doesn't seem to stop anything working:

Sonos Error 'HTTP Error 403: Forbidden' in module 'request.py', method 'http_error_default [2023.0.30]'
Failing statement [line 643]: 'raise HTTPError(req.full_url, code, msg, hdrs, fp)'

Many thanks for your assistance .

Martyn

Posted on
Sun Nov 19, 2023 3:51 pm
wideglidejrp offline
User avatar
Posts: 555
Joined: Jan 15, 2012
Location: Danbury, CT

Re: Sonos Python 3 Beta

I am trying to add a bit more of a pause after each period in the text I submit for Polly. I inserted <break time="1000ms"/>. I got the following response.
Attachments
sonos.png
sonos.png (57.07 KiB) Viewed 173443 times

John R Patrick
Author of
Home Attitude

Posted on
Mon Nov 20, 2023 10:35 am
aldera offline
User avatar
Posts: 188
Joined: Aug 30, 2016
Location: Michigan, USA

Re: Sonos Python 3 Beta

Hi,

Running Indigo 2023.1 on a Macmini (M1) with Ventura 13.0.1 OS.
I installed all the python libraries and got the plugin running. However, I'm not sure how to fix the last 3 errors in the code below. There are no image files in the directory specified and there never were any image files in the prior version. I'm not a Unix guy so I don't really know how to fix it. Thanks for any help.


Code: Select all
 Reloading plugin "Sonos 2023.0.27" using API v3.1
   Stopping plugin "Sonos 2023.0.27" (pid 74054)
   Sonos                           SoCo Reactor Landing...
   Stopped plugin "Sonos 2023.0.27"
   Starting plugin "Sonos 2023.0.27" (pid 81422)
   Sonos                           Plugin logging now started.
   Sonos                           Loaded Sonos Favorites... [12]
   Sonos                           Loaded Playlists... [13]
   Sonos                           Loaded RadioTime Favorite Stations... [0]
   Sonos                           Loaded Sound Files... [44]
   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                           [Wed Nov  8 20:26:15 2023] Processed plugin preferences.
   Sonos                           Plugin __init__ ended.
   Started plugin "Sonos 2023.0.27"
   Sonos                           Plugin startup started.
   Sonos                           [Wed Nov  8 20:26:15 2023] Processed plugin preferences.
   Sonos                           Serving HTTP Streamer on 10.0.1.77 [0.0.0.0], port 8888
   Sonos                           Loaded Apple Voices.. [143]
   Sonos                           SSDP Listener Started...
   Sonos                           Plugin startup ended.
   Sonos                           Adding ZonePlayer: 10.0.1.58, RINCON_000E58750DD801400, SonosSpkr_AlanaKit
   Sonos                           Adding ZonePlayer: 10.0.1.59, RINCON_000E58C1855C01400, SonosSpkr_AlanaLR
   Sonos                           Adding ZonePlayer: 10.0.1.60, RINCON_5CAAFD46046201400, SonosSpkr_AlanaWR
   Sonos                           Adding ZonePlayer: 10.0.1.19, RINCON_542A1B85ABF101400, SonosSpkr_Beam
   Sonos                           Adding ZonePlayer: 10.0.1.43, RINCON_B8E93747BD1501400, SonosSpkr_FrontPorch
   Sonos                           Adding ZonePlayer: 10.0.1.36, RINCON_7828CA2979BA01400, SonosSpkr_Garage
   Sonos                           Adding ZonePlayer: 10.0.1.25, RINCON_000E58723DEE01400, SonosSpkr_MBR
   Sonos                           Adding ZonePlayer: 10.0.1.27, RINCON_000E58735A2001400, SonosSpkr_Office
   Sonos                           SoCo Reactor Ignition...
   Sonos Error                     '[Errno 13] Permission denied: '/Library/Application Support/Perceptive Automation/images/Sonos/Basement - KT_art.jpg'' in module 'Sonos.py', method 'processArt [2023.0.27]'
   Failing statement [line 1378]: 'localFile = open("/Library/Application Support/Perceptive Automation/images/Sonos/"+ZP_ZoneName+"_art.jpg", "wb")'
   Sonos Error                     '[Errno 13] Permission denied: '/Library/Application Support/Perceptive Automation/images/Sonos/Basement - LvRm_art.jpg'' in module 'Sonos.py', method 'processArt [2023.0.27]'
   Failing statement [line 1378]: 'localFile = open("/Library/Application Support/Perceptive Automation/images/Sonos/"+ZP_ZoneName+"_art.jpg", "wb")'
   Sonos                           Loaded Playlists... [13]
   Sonos Error                     '[Errno 13] Permission denied: '/Library/Application Support/Perceptive Automation/images/Sonos/Basement - WR_art.jpg'' in module 'Sonos.py', method 'processArt [2023.0.27]'
   Failing statement [line 1378]: 'localFile = open("/Library/Application Support/Perceptive Automation/images/Sonos/"+ZP_ZoneName+"_art.jpg", "wb")'
   Sonos                           Loaded Playlists... [13]

Posted on
Mon Nov 20, 2023 1:06 pm
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

wideglidejrp wrote:
I am trying to add a bit more of a pause after each period in the text I submit for Polly. I inserted <break time="1000ms"/>. I got the following response.

I think this might be caused by the plugin using lame to encode an mp3 file. It is embedded in the plugin otherwise it has to be installed using Homebrew.

If you get the error, I think you can click Cancel and then got to the Mac's Settings App and select the Privacy & Security tab, then scroll down until you get to the Some system software requires your attention before it can be used box, click Details... and OK the Indigo plugin if it is there. You might have to repeat this a couple of times and reload the plugin?

It is possibly being triggered if maybe you have updated MacOS?

Posted on
Mon Nov 20, 2023 1:10 pm
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

aldera wrote:
Hi,

Running Indigo 2023.1 on a Macmini (M1) with Ventura 13.0.1 OS.
I installed all the python libraries and got the plugin running. However, I'm not sure how to fix the last 3 errors in the code below. There are no image files in the directory specified and there never were any image files in the prior version. I'm not a Unix guy so I don't really know how to fix it. Thanks for any help.


Code: Select all
 Reloading plugin "Sonos 2023.0.27" using API v3.1
   Stopping plugin "Sonos 2023.0.27" (pid 74054)
   Sonos                           SoCo Reactor Landing...
   Stopped plugin "Sonos 2023.0.27"
   Starting plugin "Sonos 2023.0.27" (pid 81422)
   Sonos                           Plugin logging now started.
   Sonos                           Loaded Sonos Favorites... [12]
   Sonos                           Loaded Playlists... [13]
   Sonos                           Loaded RadioTime Favorite Stations... [0]
   Sonos                           Loaded Sound Files... [44]
   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                           [Wed Nov  8 20:26:15 2023] Processed plugin preferences.
   Sonos                           Plugin __init__ ended.
   Started plugin "Sonos 2023.0.27"
   Sonos                           Plugin startup started.
   Sonos                           [Wed Nov  8 20:26:15 2023] Processed plugin preferences.
   Sonos                           Serving HTTP Streamer on 10.0.1.77 [0.0.0.0], port 8888
   Sonos                           Loaded Apple Voices.. [143]
   Sonos                           SSDP Listener Started...
   Sonos                           Plugin startup ended.
   Sonos                           Adding ZonePlayer: 10.0.1.58, RINCON_000E58750DD801400, SonosSpkr_AlanaKit
   Sonos                           Adding ZonePlayer: 10.0.1.59, RINCON_000E58C1855C01400, SonosSpkr_AlanaLR
   Sonos                           Adding ZonePlayer: 10.0.1.60, RINCON_5CAAFD46046201400, SonosSpkr_AlanaWR
   Sonos                           Adding ZonePlayer: 10.0.1.19, RINCON_542A1B85ABF101400, SonosSpkr_Beam
   Sonos                           Adding ZonePlayer: 10.0.1.43, RINCON_B8E93747BD1501400, SonosSpkr_FrontPorch
   Sonos                           Adding ZonePlayer: 10.0.1.36, RINCON_7828CA2979BA01400, SonosSpkr_Garage
   Sonos                           Adding ZonePlayer: 10.0.1.25, RINCON_000E58723DEE01400, SonosSpkr_MBR
   Sonos                           Adding ZonePlayer: 10.0.1.27, RINCON_000E58735A2001400, SonosSpkr_Office
   Sonos                           SoCo Reactor Ignition...
   Sonos Error                     '[Errno 13] Permission denied: '/Library/Application Support/Perceptive Automation/images/Sonos/Basement - KT_art.jpg'' in module 'Sonos.py', method 'processArt [2023.0.27]'
   Failing statement [line 1378]: 'localFile = open("/Library/Application Support/Perceptive Automation/images/Sonos/"+ZP_ZoneName+"_art.jpg", "wb")'
   Sonos Error                     '[Errno 13] Permission denied: '/Library/Application Support/Perceptive Automation/images/Sonos/Basement - LvRm_art.jpg'' in module 'Sonos.py', method 'processArt [2023.0.27]'
   Failing statement [line 1378]: 'localFile = open("/Library/Application Support/Perceptive Automation/images/Sonos/"+ZP_ZoneName+"_art.jpg", "wb")'
   Sonos                           Loaded Playlists... [13]
   Sonos Error                     '[Errno 13] Permission denied: '/Library/Application Support/Perceptive Automation/images/Sonos/Basement - WR_art.jpg'' in module 'Sonos.py', method 'processArt [2023.0.27]'
   Failing statement [line 1378]: 'localFile = open("/Library/Application Support/Perceptive Automation/images/Sonos/"+ZP_ZoneName+"_art.jpg", "wb")'
   Sonos                           Loaded Playlists... [13]


I think this is probably triggered by Pandora not working and the resultant ZP_ZoneName being blank?

The code in this area should probably be enhanced?

If you are not using Pandora, then turning it off in the plugin config, should hopefully stop this error.

Posted on
Tue Nov 21, 2023 1:23 pm
aldera offline
User avatar
Posts: 188
Joined: Aug 30, 2016
Location: Michigan, USA

Re: Sonos Python 3 Beta

Unchecking Pandora did get rid of the authentication error but the "Permission Denied" errors are still there.

Code: Select all
  Sonos Error                     '[Errno 13] Permission denied: '/Library/Application Support/Perceptive Automation/images/Sonos/Basement - LvRm_art.jpg'' in module 'Sonos.py', method 'processArt [2023.0.27]'
   Failing statement [line 1378]: 'localFile = open("/Library/Application Support/Perceptive Automation/images/Sonos/"+ZP_ZoneName+"_art.jpg", "wb")'
   Sonos                           Loaded Playlists... [13]
   Sonos Error                     '[Errno 13] Permission denied: '/Library/Application Support/Perceptive Automation/images/Sonos/Basement - KT_art.jpg'' in module 'Sonos.py', method 'processArt [2023.0.27]'
   Failing statement [line 1378]: 'localFile = open("/Library/Application Support/Perceptive Automation/images/Sonos/"+ZP_ZoneName+"_art.jpg", "wb")'
   Sonos Error                     '[Errno 13] Permission denied: '/Library/Application Support/Perceptive Automation/images/Sonos/Basement - WR_art.jpg'' in module 'Sonos.py', method 'processArt [2023.0.27]'
   Failing statement [line 1378]: 'localFile = open("/Library/Application Support/Perceptive Automation/images/Sonos/"+ZP_ZoneName+"_art.jpg", "wb")'
   Sonos                           Loaded Playlists... [13]

Posted on
Fri Nov 24, 2023 1:13 pm
aldera offline
User avatar
Posts: 188
Joined: Aug 30, 2016
Location: Michigan, USA

Re: Sonos Python 3 Beta

I got the 3 Sonos errors fixed. I just added three jpg files with the same names given in the error messages and now it's working fine.

Thanks again for updating this plugin to Python 3. Appreciate it!

Ralph

Posted on
Sat Nov 25, 2023 12:53 pm
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

Hi Ralph,
aldera wrote:
I got the 3 Sonos errors fixed. I just added three jpg files with the same names given in the error messages and now it's working fine.

A nice bit of lateral thinking! :D

Posted on
Sat Jan 06, 2024 11:27 am
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Sonos Python 3 Beta

just installed the newest version and I'm getting the Sirius error again.

Sonos Error SiriusXM Response: <Response [503]> [Reason: Service Unavailable]

Content: b'<html style="height:100%"><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"><meta name="format-detection" content="telephone=no"><meta name="viewport" content="initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><script type="text/javascript" src="/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3"></script></head><body style="margin:0px;height:100%"><iframe id="main-iframe" src="/_Incapsula_Resource?CWUDNSAI=4&xinfo=10-189608790-0%200NNN%20RT%281704561916179%203%29%20q%280%20-1%20-1%201%29%20r%280%20-1%29%20b6%20U24&incident_id=440001270304440364-1072902394145677258&edet=30&cinfo=ffffffff&rpinfo=0&mth=POST" frameborder=0 width="100%" height="100%" marginheight="0px" marginwidth="0px">Request unsuccessful. Incapsula incident ID: 440001270304440364-1072902394145677258</iframe></body></html>'

Sonos Error [Sat Jan 6 11:25:16 2024] SiriusXM SessionID communications error: mismatched tag: line 1, column 356

Posted on
Sat Jan 06, 2024 4:12 pm
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Sonos Python 3 Beta

downgraded to the 2023-11-23 fix you made and it is working with Sirius!

Posted on
Mon Jan 08, 2024 5:14 pm
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Sonos Python 3 Beta

Sonos Error 'name 'channels' is not defined' in module 'Sonos.py', method 'get_chan_parms_3_way [2023.0.27]'
Failing statement [line 3828]: 'l1 = max(len(x.get('channelId', '')) for x in channels)'

Posted on
Mon Jan 08, 2024 5:27 pm
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Sonos Python 3 Beta

I think I got it working again by updating/modifying the config settings and saving the config. fingers crossed.

Posted on
Sun Jan 14, 2024 7:50 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: Sonos Python 3 Beta

With the last version on the plugin store I get following error

Code: Select all
Sonos Error                     ''NoneType' object has no attribute 'startSpeakingString_toURL_'' in module 'Sonos.py', method 'actionAnnouncement [2023.1.0]'
   Failing statement [line 2579]: 'sp.startSpeakingString_toURL_(announcement, ru)'

Posted on
Sun Jan 14, 2024 9:44 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

MarcoGT wrote:
With the last version on the plugin store I get following error

Code: Select all
Sonos Error                     ''NoneType' object has no attribute 'startSpeakingString_toURL_'' in module 'Sonos.py', method 'actionAnnouncement [2023.1.0]'
   Failing statement [line 2579]: 'sp.startSpeakingString_toURL_(announcement, ru)'

I need more information to to try and replicate and track this down.

How have you setup the action to speak the message?

Who is online

Users browsing this forum: No registered users and 8 guests