Sonos Python 3 Beta

Posted on
Thu Jun 08, 2023 9:35 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

ryanbuckner wrote:
I use Pandora with Sonos, but it's not critical to my Indigo integration.


Did you try Pandora with Version 2023.0.10?

Posted on
Thu Jun 08, 2023 11:10 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sonos Python 3 Beta

autolog wrote:
ryanbuckner wrote:
I use Pandora with Sonos, but it's not critical to my Indigo integration.


Did you try Pandora with Version 2023.0.10?


Pandora is working with Version 2023.0.10 for me

Posted on
Thu Jun 08, 2023 12:03 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

ryanbuckner wrote:
autolog wrote:
ryanbuckner wrote:
I use Pandora with Sonos, but it's not critical to my Indigo integration.


Did you try Pandora with Version 2023.0.10?


Pandora is working with Version 2023.0.10 for me

That is very positive news - thank you for the feedback! :D

Obviously there is no need for you to upgrade to v .11.

I will try and figure out a way forward which will look at trying to resolve the issue experienced by @Bleasel.

I think I may be able to find a way to turn Pandora ON and OFF; we'll see. :)

Posted on
Thu Jun 08, 2023 7:11 pm
Bleasel offline
Posts: 88
Joined: Mar 05, 2014
Location: Sydney, AUSTRALIA

Re: Sonos Python 3 Beta

Thanks, 11 loaded and seems to be working although the following error line has come up in the log. Not sure what issue this creates.


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

Posted on
Fri Jun 09, 2023 7:50 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sonos Python 3 Beta

More testing on version 10:

Testing the Sonos Play Toggle Function for 1 speaker. Currently not having any effect when launched from Action Group or control page regardless of source. No errors to the log.

I have also attempted to configure the plugin to turn on debugging and I'm not able to get the screen to show: (The errors are from the configure attempt, not the toggle)

Code: Select all
Jun 9, 2023 at 9:43:09 AM
   Action Group                    Toggle Sonos Play Kitchen
   Action Group                    Toggle Sonos Play Kitchen
   Error (client)                  timeout waiting for plugin response from com.ssi.indigoplugin.Sonos for request UiGetValues1
   Error (client)                  timeout waiting for plugin response from com.ssi.indigoplugin.Sonos for request CallPluginFunc
   Error (client)                  runConfigDialog() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]

Jun 9, 2023 at 9:43:45 AM
   NOAA Weather                    'NOAA Weather' changed at 2023-06-09 08:52:00'.
   Error (client)                  timeout waiting for plugin response from com.ssi.indigoplugin.Sonos for request UiGetValues1
   Error (client)                  timeout waiting for plugin response from com.ssi.indigoplugin.Sonos for request CallPluginFunc
   Error (client)                  runConfigDialog() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjec

Posted on
Fri Jun 09, 2023 8:17 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

ryanbuckner wrote:
... Testing the Sonos Play Toggle Function for 1 speaker. Currently not having any effect when launched from Action Group or control page regardless of source. No errors to the log.

I have also attempted to configure the plugin to turn on debugging and I'm not able to get the screen to show: (The errors are from the configure attempt, not the toggle) ...

Thanks for the report :)

I have just tested both of these and it is working for me i.e. the play toggles and the dialogue displays.

I suspect your plugin is corrupted?

I have just uploaded v .12 to Github (see announcements), so please try with that. If it still fails, I'll dig deeper.

Posted on
Sat Jun 10, 2023 8:32 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sonos Python 3 Beta

v 12 appears to be working for me

Posted on
Sat Jun 10, 2023 9:05 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

ryanbuckner wrote:
v 12 appears to be working for me

Good news - thanks for the feedback. :)

Posted on
Tue Jun 13, 2023 8:14 pm
mclass offline
Posts: 314
Joined: May 13, 2015
Location: Melbourne, Australia

Re: Sonos Python 3 Beta

Thanks, 11 loaded and seems to be working although the following error line has come up in the log. Not sure what issue this creates.


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


Me too! I held off, but in the end couldn't resist!

As a general comment, I found the installation tedious. It may help if a list of dependencies could be provided (with associated pip commands to allow preparation and avoid the current iterative process.

Thanks for your efforts in bringing the Python 3 version to fruition!!

mclass

Posted on
Tue Jun 13, 2023 8:48 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sonos Python 3 Beta

mclass wrote:
As a general comment, I found the installation tedious. It may help if a list of dependencies could be provided (with associated pip commands to allow preparation and avoid the current iterative process.
mclass


Here's what I had to install - maybe add to the readme:

Code: Select all
pip3.10 install boto3
pip3.10 install gTTS
pip3.10 install pyvona
pip3.10 install Twisted
pip3.10 install cryptography==38.0.4
pip3.10 install pandora
pip3.10 install xmltodict

Posted on
Wed Jun 14, 2023 8:20 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

ryanbuckner wrote:
mclass wrote:
As a general comment, I found the installation tedious. It may help if a list of dependencies could be provided (with associated pip commands to allow preparation and avoid the current iterative process.
mclass


Here's what I had to install - maybe add to the readme:

Code: Select all
pip3.10 install boto3
pip3.10 install gTTS
pip3.10 install pyvona
pip3.10 install Twisted
pip3.10 install cryptography==38.0.4
pip3.10 install pandora
pip3.10 install xmltodict

@mclass I found it tedious as well, hence the next version will list all the required missing packages or those requiring updates on the first startup of the plugin, so you won't have to keep doing plugin restarts.

@ryanbuckner I realise you had an issue related to cryptography (which is a package now included by default in Indigo as it uses it) but it isn't required by the plugin.

@ryanbuckner You should do an upgrade of cryptography to the latest version (at least v 41.0.1) to fix a security issue via the command:
Code: Select all
pip3.10 install --upgrade cryptography


The package requirements for next version (not yet released) are:
Code: Select all
boto3==1.26.138
gTTS==2.3.2
ifaddr==0.2.0
lxml==4.9.2
mutagen==1.46.0
# OPTIONAL pandora==1.5.0
pyvona==1.2.1
Twisted==22.10.0
xmltodict==0.13.0

Posted on
Wed Jun 14, 2023 7:46 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sonos Python 3 Beta

autolog wrote:
@ryanbuckner You should do an upgrade of cryptography to the latest version (at least v 41.0.1) to fix a security issue via the command:


Done. Thanks!

Posted on
Sat Jun 17, 2023 3:16 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sonos Python 3 Beta

errors after a Mac server reboot:

Code: Select all
Sonos Error                     Error in plugin execution InitializeMain:

  File "plugin.py", line 23, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/twisted/internet/reactor.py", line 38, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/twisted/internet/default.py", line 55, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/twisted/internet/default.py", line 49, in _getInstallFunction
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/twisted/internet/selectreactor.py", line 18, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/twisted/internet/posixbase.py", line 16, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/twisted/internet/tcp.py", line 38, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/twisted/internet/_newtls.py", line 18, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/twisted/protocols/tls.py", line 42, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/OpenSSL/__init__.py", line 8, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/OpenSSL/crypto.py", line 3268, in <module>
type: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'


Posted on
Sun Jun 18, 2023 10:36 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sonos Python 3 Beta

ryanbuckner wrote:
errors after a Mac server reboot: ...


Looks like there is an issue with OpenSSL and Twisted (maybe triggered by the cryptography update?).

Interestingly, I don't have the OpenSSL package on my system and don't have the problem.

From your report, I am unclear as to whether the Sonos plugin has stopped working because of this error or not?

Can you do the command:
Code: Select all
pip3.10 freeze
in a terminal window. This will list all the packages and their versions and may aid trying to figure what is going on.

Posted on
Mon Jun 19, 2023 8:30 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sonos Python 3 Beta

here's what I have:

Code: Select all
affine==2.4.0
aiodns==3.0.0
aiofiles==23.1.0
aioharmony==0.2.9
aiohttp==3.8.4
aiosignal==1.2.0
anyio==3.6.1
async-generator==1.10
async-timeout==4.0.2
attrs==21.4.0
Automat==22.10.0
beautifulsoup4==4.11.1
bimmer-connected==0.13.6
bitarray==2.6.1
boto3==1.26.144
botocore==1.29.144
bs4==0.0.1
certifi==2022.5.18.1
cffi==1.15.0
chacha20poly1305-reuseable==0.0.4
charset-normalizer==2.0.12
click==8.1.2
click-plugins==1.1.1
cligj==0.7.2
constantly==15.1.0
cryptography==41.0.1
cycler==0.11.0
dateparser==1.1.1
dictdiffer==0.9.0
fake-useragent==0.1.11
Flask==2.1.1
fonttools==4.32.0
frozenlist==1.3.0
Geometry==0.0.23
geos==0.2.3
gTTS==2.3.2
h11==0.12.0
html5lib==1.1
htmldate==1.2.1
httpcore==0.15.0
httptools==0.5.0
httpx==0.24.1
hyperlink==21.0.0
idna==3.3
ifaddr==0.2.0
imageio==2.30.0
incremental==22.10.0
itsdangerous==2.1.2
janus==1.0.0
Jinja2==3.1.2
jmespath==1.0.1
json-checker==2.0.0
kiwisolver==1.4.2
lazy_loader==0.2
llvmlite==0.40.0
lxml==4.9.2
MarkupSafe==2.1.1
matplotlib==3.5.1
mediafile==0.11.0
miniaudio==1.55
multidict==6.0.2
mutagen==1.46.0
networkx==3.1
numba==0.57.0
numpy==1.22.3
oauthlib==3.2.0
outcome==1.1.0
packaging==21.3
pandas==1.4.2
pandora==1.5.0
Pillow==9.1.0
protobuf==4.21.12
pyadtpulse==1.0.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyatv==0.10.3
pycares==4.2.1
pycparser==2.21
pycryptodome==3.14.1
PyJWT==2.3.0
pyobjc==8.4.1
pyobjc-core==8.4.1
pyobjc-framework-Accounts==8.4.1
pyobjc-framework-AddressBook==8.4.1
pyobjc-framework-AdSupport==8.4.1
pyobjc-framework-AppleScriptKit==8.4.1
pyobjc-framework-AppleScriptObjC==8.4.1
pyobjc-framework-ApplicationServices==8.4.1
pyobjc-framework-AudioVideoBridging==8.4.1
pyobjc-framework-AuthenticationServices==8.4.1
pyobjc-framework-AutomaticAssessmentConfiguration==8.4.1
pyobjc-framework-Automator==8.4.1
pyobjc-framework-AVFoundation==8.4.1
pyobjc-framework-AVKit==8.4.1
pyobjc-framework-BusinessChat==8.4.1
pyobjc-framework-CalendarStore==8.4.1
pyobjc-framework-CFNetwork==8.4.1
pyobjc-framework-CloudKit==8.4.1
pyobjc-framework-Cocoa==8.4.1
pyobjc-framework-Collaboration==8.4.1
pyobjc-framework-ColorSync==8.4.1
pyobjc-framework-Contacts==8.4.1
pyobjc-framework-ContactsUI==8.4.1
pyobjc-framework-CoreAudio==8.4.1
pyobjc-framework-CoreAudioKit==8.4.1
pyobjc-framework-CoreBluetooth==8.4.1
pyobjc-framework-CoreData==8.4.1
pyobjc-framework-CoreHaptics==8.4.1
pyobjc-framework-CoreLocation==8.4.1
pyobjc-framework-CoreMedia==8.4.1
pyobjc-framework-CoreMediaIO==8.4.1
pyobjc-framework-CoreMIDI==8.4.1
pyobjc-framework-CoreML==8.4.1
pyobjc-framework-CoreMotion==8.4.1
pyobjc-framework-CoreServices==8.4.1
pyobjc-framework-CoreSpotlight==8.4.1
pyobjc-framework-CoreText==8.4.1
pyobjc-framework-CoreWLAN==8.4.1
pyobjc-framework-CryptoTokenKit==8.4.1
pyobjc-framework-DeviceCheck==8.4.1
pyobjc-framework-DictionaryServices==8.4.1
pyobjc-framework-DiscRecording==8.4.1
pyobjc-framework-DiscRecordingUI==8.4.1
pyobjc-framework-DiskArbitration==8.4.1
pyobjc-framework-DVDPlayback==8.4.1
pyobjc-framework-EventKit==8.4.1
pyobjc-framework-ExceptionHandling==8.4.1
pyobjc-framework-ExecutionPolicy==8.4.1
pyobjc-framework-ExternalAccessory==8.4.1
pyobjc-framework-FileProvider==8.4.1
pyobjc-framework-FileProviderUI==8.4.1
pyobjc-framework-FinderSync==8.4.1
pyobjc-framework-FSEvents==8.4.1
pyobjc-framework-GameCenter==8.4.1
pyobjc-framework-GameController==8.4.1
pyobjc-framework-GameKit==8.4.1
pyobjc-framework-GameplayKit==8.4.1
pyobjc-framework-ImageCaptureCore==8.4.1
pyobjc-framework-IMServicePlugIn==8.4.1
pyobjc-framework-InputMethodKit==8.4.1
pyobjc-framework-InstallerPlugins==8.4.1
pyobjc-framework-InstantMessage==8.4.1
pyobjc-framework-Intents==8.4.1
pyobjc-framework-IOSurface==8.4.1
pyobjc-framework-iTunesLibrary==8.4.1
pyobjc-framework-LatentSemanticMapping==8.4.1
pyobjc-framework-LaunchServices==8.4.1
pyobjc-framework-libdispatch==8.4.1
pyobjc-framework-LinkPresentation==8.4.1
pyobjc-framework-LocalAuthentication==8.4.1
pyobjc-framework-MapKit==8.4.1
pyobjc-framework-MediaAccessibility==8.4.1
pyobjc-framework-MediaLibrary==8.4.1
pyobjc-framework-MediaPlayer==8.4.1
pyobjc-framework-MediaToolbox==8.4.1
pyobjc-framework-Metal==8.4.1
pyobjc-framework-MetalKit==8.4.1
pyobjc-framework-MetalPerformanceShaders==8.4.1
pyobjc-framework-ModelIO==8.4.1
pyobjc-framework-MultipeerConnectivity==8.4.1
pyobjc-framework-NaturalLanguage==8.4.1
pyobjc-framework-NetFS==8.4.1
pyobjc-framework-Network==8.4.1
pyobjc-framework-NetworkExtension==8.4.1
pyobjc-framework-NotificationCenter==8.4.1
pyobjc-framework-OpenDirectory==8.4.1
pyobjc-framework-OSAKit==8.4.1
pyobjc-framework-OSLog==8.4.1
pyobjc-framework-PencilKit==8.4.1
pyobjc-framework-Photos==8.4.1
pyobjc-framework-PhotosUI==8.4.1
pyobjc-framework-PreferencePanes==8.4.1
pyobjc-framework-PushKit==8.4.1
pyobjc-framework-Quartz==8.4.1
pyobjc-framework-QuickLookThumbnailing==8.4.1
pyobjc-framework-SafariServices==8.4.1
pyobjc-framework-SceneKit==8.4.1
pyobjc-framework-ScreenSaver==8.4.1
pyobjc-framework-ScriptingBridge==8.4.1
pyobjc-framework-SearchKit==8.4.1
pyobjc-framework-Security==8.4.1
pyobjc-framework-SecurityFoundation==8.4.1
pyobjc-framework-SecurityInterface==8.4.1
pyobjc-framework-ServiceManagement==8.4.1
pyobjc-framework-Social==8.4.1
pyobjc-framework-SoundAnalysis==8.4.1
pyobjc-framework-Speech==8.4.1
pyobjc-framework-SpriteKit==8.4.1
pyobjc-framework-StoreKit==8.4.1
pyobjc-framework-SyncServices==8.4.1
pyobjc-framework-SystemConfiguration==8.4.1
pyobjc-framework-SystemExtensions==8.4.1
pyobjc-framework-UserNotifications==8.4.1
pyobjc-framework-VideoSubscriberAccount==8.4.1
pyobjc-framework-VideoToolbox==8.4.1
pyobjc-framework-Vision==8.4.1
pyobjc-framework-WebKit==8.4.1
pyOpenSSL==22.0.0
pyparsing==3.0.7
PySocks==1.7.1
python-dateutil==2.8.2
python-dotenv==0.20.0
pytz==2022.1
pytz-deprecation-shim==0.1.0.post0
pyvona==1.2.1
PyWavelets==1.4.1
rasterio==1.3.7
regex==2022.3.2
requests==2.27.1
requests-oauthlib==1.3.1
rfc3986==1.5.0
s3transfer==0.6.1
samsungtv==1.0.0
samsungtvws==2.5.0
sanic==22.6.1
sanic-routing==22.3.0
sanic-session==0.8.0
scikit-image==0.20.0
scipy==1.8.0
selenium==4.1.3
Shapely==1.8.1.post1
six==1.16.0
slixmpp==1.8.2
sniffio==1.2.0
snuggs==1.4.7
sortedcontainers==2.4.0
soupsieve==2.3.2
srptools==1.0.1
tifffile==2023.4.12
transitions==0.9.0
trio==0.20.0
trio-websocket==0.9.2
tweepy==3.10.0
Twisted==22.10.0
typing_extensions==4.5.0
tzdata==2022.1
tzlocal==4.2
ujson==5.7.0
urllib3==1.26.9
user-agent==0.1.10
uvloop==0.17.0
wakeonlan==2.1.0
webdriver-manager==3.7.0
webencodings==0.5.1
websocket-client==1.3.2
websockets==10.4
Werkzeug==2.1.1
wsproto==1.1.0
xarray==2023.5.0
xmltodict==0.13.0
yarl==1.7.2
zeroconf==0.47.1
zope.interface==6.0


Page 4 of 15 1, 2, 3, 4, 5, 6, 7 ... 15

Who is online

Users browsing this forum: No registered users and 3 guests