jjlawren / sonos-websocket Goto Github PK
View Code? Open in Web Editor NEWAn asynchronous Python library to communicate with Sonos devices over websockets
An asynchronous Python library to communicate with Sonos devices over websockets
Hi,
I'm using homeassistant which uses your library for the Sonos integration, especially the new announcement feature. In general it works, some of my Sonos play 1 just have a weak wifi connection, which leads to connection timeouts from time to time.
From what I can see, you have hardcoded the timeout to 3 secs.
Is there any reason for the 3 sec? Do you mind increasing it to 5sec, or maybe even expose it, so it can be tweaked in home assistant?
Thanks
Siedi
Hi,
Having some trouble trying to use this, is Python 3.11 a requirement for running it?
I'm getting this error on Python 3.9:
# python3 -m sonos_websocket --ip_addr 192.168.1.113 --uri "http://192.168.1.100:8080/sound/beep.mp3" --volume 10
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/tmp/sonos-websocket/sonos_websocket/__init__.py", line 2, in <module>
from .websocket import SonosWebsocket # noqa: F401
File "/tmp/sonos-websocket/sonos_websocket/websocket.py", line 27, in <module>
class SonosWebsocket:
File "/tmp/sonos-websocket/sonos_websocket/websocket.py", line 33, in SonosWebsocket
player_id: str | None = None,
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.