From bbf1ae171a3646087b9cd80140b59239d7eea7d1 Mon Sep 17 00:00:00 2001 From: pfischi Date: Sun, 8 Jan 2017 15:51:36 +0100 Subject: [PATCH 01/29] beta test v1.0b1 --- README.md | 261 +++-- plugin.sonos/README.md | 29 +- plugin.sonos/__init__.py | 18 +- plugin.sonos/examples/sonos.conf | 8 +- server.sonos/CHANGES.txt | 38 + server.sonos/MANIFEST | 37 - server.sonos/MANIFEST.in | 3 + server.sonos/config/sonos-broker | 57 + server.sonos/dist/sonos-broker-0.9.tar.gz | Bin 120749 -> 0 bytes server.sonos/dist/sonos-broker-1.0b1.tar.gz | Bin 0 -> 138200 bytes server.sonos/lib_sonos/daemon.py | 170 --- server.sonos/lib_sonos/definitions.py | 16 +- server.sonos/lib_sonos/radio_parser.py | 2 +- server.sonos/lib_sonos/sonos_commands.py | 41 +- server.sonos/lib_sonos/sonos_library.py | 2 +- server.sonos/lib_sonos/sonos_service.py | 483 +++++--- server.sonos/lib_sonos/sonos_speaker.py | 119 +- server.sonos/lib_sonos/tinytag.py | 1021 +++++++++++++++++ server.sonos/lib_sonos/udp_broker.py | 4 +- server.sonos/lib_sonos/utils.py | 107 +- .../scripts/systemd/sonos-broker.service | 11 + .../scripts/upstart/sonos-broker.conf | 10 + server.sonos/setup.py | 140 ++- server.sonos/soco/config.py | 11 + server.sonos/soco/events.py | 17 +- server.sonos/{sonos_broker => sonos-broker} | 223 ++-- server.sonos/{sonos_cmd => sonos-cmd} | 90 ++ server.sonos/sonos_broker.cfg | 40 - 28 files changed, 2184 insertions(+), 774 deletions(-) delete mode 100644 server.sonos/MANIFEST create mode 100644 server.sonos/MANIFEST.in create mode 100644 server.sonos/config/sonos-broker delete mode 100644 server.sonos/dist/sonos-broker-0.9.tar.gz create mode 100644 server.sonos/dist/sonos-broker-1.0b1.tar.gz delete mode 100755 server.sonos/lib_sonos/daemon.py create mode 100644 server.sonos/lib_sonos/tinytag.py create mode 100644 server.sonos/scripts/systemd/sonos-broker.service create mode 100644 server.sonos/scripts/upstart/sonos-broker.conf rename server.sonos/{sonos_broker => sonos-broker} (63%) rename server.sonos/{sonos_cmd => sonos-cmd} (94%) delete mode 100644 server.sonos/sonos_broker.cfg diff --git a/README.md b/README.md index 1a4a43a..dfd69b9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,28 @@ ## Release -v.0.9 (2016-11-20) +v1.0b1 (2017-01-08) + + -- integrated webservice to serve audio files for the Sonos speakers + -- improved 'play_snippet' and 'play_tts' functionality + -- the length of a snippet will now be estimated by pre-loading the audio file + -- bug: the 'volume' of all zone members will now be restored correctly after playing the snippet + -- command optional parameter 'play' added to command "unjoin" + -- with 'play' set to true, the prevoiusly played track (before joining a group) will resumed + -- changed executable name from "sonos_broker" to "sonos-broker" + -- changed command line tool from "sonos_cmd" to "sonos-cmd" + -- changed default installation path of sonos_broker.cfg to /etc/default/sonos-broker + -- stopping a running Sonos Broker instance is handled a bit more gracefully + -- updated setup script + -- auto-start scripts for systemd and upstart automatically placed in the appropriate folder by the + installation script + -- 'daemonize' behaviour removed + -- unnecessary parameter 'stop' removed + -- updated documentation + -- added "zone_member" command to Sonos Broker (to retrieve this value actively) + -- added commands 'join' and 'unjoin' to Sonos Broker commandline tool + -- bug: error when trying to decode non-ascii chars and the systems stdout was no set to utf8 + +v0.9 (2016-11-20) -- added missing 'track_album' property -- added missing 'track_album' to Sonos-Broker commandline @@ -14,55 +36,6 @@ v.0.9 (2016-11-20) -- bugfixed: Sonos Broker user-specific server port was ignored -- updated documentation -v.0.8.2 (2016-11-14) - - -- fixed bug in GoogleTTS - -v.0.8.1 (2016-11-14) - - -- changed commandline arguments to control the Sonos Broker. - Available arguments: - - start [-d] [-c] [-h] (-d=debug mode, -c=user-specified config file, -h=help) - stop - list - - -- fixed an issue when executing sonos_broker with '-l' parameter - -v0.8 (2016-11-11) - - -- **ATTENTION:** commands "get_playlist" and "set_playlist" removed. I decided to stick with - the internal Sonos playlists. - -- new implementation Google TTS: Captcha and other issues should now be solved (for this time) - -- **ATTENTION:** parameter "force_stream_mode" removed for command "play_tts" caused by the new - implementation for Google TTS. The possibility for an additional TTS "stream mode" was removed. - (see documentation Google TTS for setup) - -- new command "load_sonos_playlist". See documentation for implementation. - -- command "sonos_broker_version" added - -- command 'clear_queue' added - -- command 'play_tunein' added. Play any TuneIn radio station by a given name - -- SoCo framework changes (v0.12) with some bugfixes - -- removed some unused functions - -- fixed error when calling sonos_broker with 'l' (scan only flag) - -- small bugfixes - -- Deezer tracks and their metadata are handled correctly now - -- Sonos-Broker commandline tools has now parameters (type "sonos_cmd -h" for help) - -v0.7 (2016-01-04) - - -- command "discover" added to force a manual scan for Sonos speaker in the network - -- command "balance" can now take the optional parameter "group_command"; documentation updated - -- property "status" now triggers a value change notification to all connected clients - -- bugfix: setting play, pause, stop could lead to an infinite loop (play-pause-play ...) - -- added a valid user-agent for Google TTS requests, this should solve the captcha issue - -- property 'model_number' added - -- property 'display_version' added - -- property 'household_id' added (a unique identifier for all players in a household) - -- some changes in SoCo framework - -- bugfixes in command-line tool - -- command 'balance' (especially for sonos amp and stereo paired sonos speaker) added - - ## Overview @@ -80,78 +53,86 @@ smart home environment (https://github.com/mknx/smarthome/). ## Requirements +#### Deleting old files + +If're updating the Broker it may be a good idea to delete old files. Please adapt the paths to your system. + +``` +sudo rm -rf /usr/local/bin/sonos* +sudo rm -rf /usr/local/lib/python3.5/site-packages/*sonos* +sudo rm -rf /usr/local/lib/python3.5/site-packages/soco +``` + #### Server-side python3.4 python3 libraries 'requests' and 'xmltodict' -``` -pip3 install requests -pip3 install xmltodict -``` #### Client-side Nothing special, just send your commands over http (JSON format) or use the Smarthome.py plugin to control the speakers within Smarthome.py. +You can use the included built-in implementation, the [Sonos Broker commandline tool](#cmd_tool) ## Installation #### Setup -Under the github folder "server.sonos/dist/" you'll find the actual release as a tar.gz file. -Unzip this file with: +Under the github folder "server.sonos/dist/" you'll find the actual release as a tar.gz file. Here are two ways to +install the Sonos Broker: - tar -xvf sonos_broker_release.tar.gz +##### 1. pip -(adjust the filename to your needs) +If python3-pip is installed, you can simply call -Go to the unpacked folder and run setup.py with: + python3 -m pip -v install sonos-broker-{release-version}.tar.gz - sudo python3 setup.py install +Every dependency should be installed automatically. + +##### 2. manually -This command will install all the python packages and places the start script to the python folder -"/user/local/bin" +Untar the file with and install it manually. -Make the file executable and run the sonos_broker with: + tar -xvf sonos-broker-{release}.tar.gz + cd sonos-broker-{release} + sudo python3 setup.py install --force - chmod +x sonos_broker - ./sonos_broker +If an error occurred, you should try to (re)-install all necessary dependencies: + + pip3 install requests + pip3 install xmltodict -Normally, the script finds the internal ip address of your computer. If not, you have to edit your sonos_broker.cfg. +Both methods will install ```sonos-broker``` and ```sonos-cmd``` under ```/usr/local/bin``` to make both commands +system-wide executable. +The default config file is installed under ```/etc/default/sonos-broker``. - [sonos_broker] - server_ip = x.x.x.x +The internal ip address should be set up automatically. If not, you have to edit ```/etc/default/sonos-broker``` -(x.x.x.x means your ip: run ifconfig - a to find it out) + [sonos_broker] + server_ip = x.x.x.x #your ip here #### Configuration / Start options -You can edit the settings of Sonos Broker. Open 'sonos_broker.cfg' with your favorite editor and edit the file. -All values within the config file should be self-explaining. For Google-TTS options, see the appropriate section in this -Readme. +You can edit the settings of Sonos Broker. Open '/etc/default/sonos-broker' (by default) with your favorite editor and +edit the file. All values within the config file should be self-explaining. For Google-TTS options, see the appropriate +section in this Readme. -If you start the sonos broker with +You can start the sonos broker with ``` sonos_broker start ``` -the server will be automatically daemonized. -You can add the -d (--debug) parameter to hold the process in the foreground. +You can add the -d (--debug) parameter to get more output ``` sonos_broker start -d ``` -An user-specified config file can be passed with the '-c' flag +An user-specified config file can be passed with the '-c' flag. Default: /etc/default/sonos-broker ``` -sonos_broker start -c -``` - -You can stop the server with -``` -sonos_broker stop +sonos_broker start -c /your/config/file/path/here ``` To get a short overview of your speakers in the network start the server with @@ -163,23 +144,39 @@ To get an overview of all parameters type ``` sonos_broker -h ``` -or +and / or ``` sonos_broker {command} -h ``` -To autostart the service on system boot, please follow the instruction for your linux distribution and put this -script in the right place. +After the successful installation with ```sudo python3 setup.py install --force``` an autostart script should be placed +automatically in your systems autostart directory. The autostart implementations are integrated for systems based on +'SYSTEMD' and 'UPSTART'. 'SYSVINIT' is NOT supported because of there are too many different sysvinit implementations. +To control the Broker via the system service control, see the commands below: + +SYSTEMD: +```sudo systemctl [start|stop|restart] sonos-broker``` -To get some debug output, please edit the sonos_broker.cfg and uncomment this line in the logging section (or use the --d start parameter): +For autostart: +```sudo systemctl enable sonos-broker``` + + +UPSTART: +```sudo service sonos-broker [start|stop|restart]``` + +For autostart uncomment following line in ```/etc/init/sonos-broker.conf```: +```#start on runlevel [2345]``` + + +To get some more debug output when running the Broker as a service, please edit the Sonos Broker config file +(default: /etc/default/sonos-broker) and uncomment this line in the logging section: loglevel = debug You can set the debug level to debug, info, warning, error, critical. Additionally, you can specify a file to pipe the debug log to this file. - logfile = log.txt + logfile = /path/to/your/log.txt ## Interactive Command Line @@ -187,7 +184,7 @@ Additionally, you can specify a file to pipe the debug log to this file. You can control the Broker and your speakers without implementing your own client. To start the interactive command line (the Broker must be running) type ``` -./sonos_cmd +sonos-cmd ``` in the root folder of the Sonos Broker. @@ -231,6 +228,15 @@ exit redirects you to the first command line level. +## Integrated webservice for audio files + +Sonos Broker integrates an internal webservice to serve audio files for Sonos speakers. You can enable this feature in +the \[webservice\] section of the Sonos Broker configuration. If enabled, you can store audio files in the configurable +web root path (valid extensions: aac, mp4, mp3, ogg, wav, web) and they can be played with the +[play_snippet](#p_snippet) command. The URL is available via http://SONOS_BROKER_IP:SONOS_BROKER_PORT/. +This service is also helpful for the Google TTS functionality. + + ## Google TTS Support Sonos broker features the Google Text-To-Speech API. You can play any text limited to 100 chars. @@ -240,45 +246,44 @@ Sonos broker features the Google Text-To-Speech API. You can play any text limit - local / remote mounted folder or share with read/write access - http access to this local folder (e.g. /var/www) -- settings configured in sonos_broker.conf +- settings configured in sonos-broker configuration file (default: /etc/default/sonos-broker) +- running a webservice #### Internals -If a text is given to the google tts function, sonos broker makes a http request to the Google API. The response is -stored as a mp3-file to the local / remote folder. +If a text is given to the google tts function, the Sonos Broker makes a http request to the Google API. The response is +stored as a mp3-file to a local / remote folder. -Before the request is made ('local mode'), the broker checks whether a file exists -with the same name. The file name of a tts-file is always: BASE64(_).mp3 -You can set a file quota in the config file. This limits the amount of disk space the broker can use to save tts files. -If the quota exceeds, you will receive a message. By default the quota is set to 100 mb. - - sonos_broker.cfg: +Before the request is made, the broker checks whether a file exists with the same name. The file name of a tts-file +is always: BASE64(_).mp3. You can set a file quota in the config file. This limits the amount +of disk space the broker can use to save tts files. If the quota exceeds, you will receive a message. By default the +quota is set to 100 mb. [google_tts] quota = 200 -By default, Google TTS support is disabled. To enable the service, add following line to sonos_broker.cfg: - - sonos_broker.cfg: +By default, Google TTS support is disabled. To enable the service, add following line to your sonos-broker +configuration: [google_tts] enable = true -You have to set the local save path (where the mp3 is stored) and the accessible local url: - - sonos_broker.cfg - +You have to set the local save path (where the mp3 is stored) and an accessible url. If're using the integrated +webservice, 'save_path' and 'root_path' in the \[webservice\] section should be the same value. +The server url must point to a webservice that handles the Sonos speaker requests, e.g. a nginx or apache server. By +enabling the integrated webservice, this is done by the Sonos Broker. + [google_tts] - save_path =/your/path/here + save_path = /var/www/tts server_url = http://192.168.0.2/tts -This is an example of a google_tts section in the sonos_broker.cfg file: +This is an example of a google_tts section in Sonos Broker configuration file: [google_tts] enable=true quota=200 - save_path =/your/path/here - server_url = http://192.168.0.2/tts + save_path = /var/www/tts + server_url = http://192.168.0.2:12900/tts ## Implementation: @@ -437,6 +442,7 @@ Click on the links below to get a detailed command descriptions and their usage. ###### [get_sonos_playlists](#get_sonos_playlists) ###### [load_sonos_playlist](#load_sonos_playlist) ###### [refresh_media_library](#ref_lib) +###### [zone_members](#zone_members) ###### [get_wifi_state](#get_wifi) ###### [set_wifi_state](#set_wifi) ###### [discover](#discover) @@ -1833,13 +1839,15 @@ No special parameter needed. | parameter | required / optional | valid values | description | | :-------- | :------------------ | :----------- | :---------- | | uid | required | | The UID of the Sonos speaker. | +| play | optional | True/False, 0/1 | Should the speaker automatically start playing after unjoin. | ######Example JSON format: { 'command': 'unjoin', 'parameter': { - 'uid': 'rincon_b8e93730d19801410' + 'uid': 'rincon_b8e93730d19801410', + 'play': False } } @@ -2390,6 +2398,39 @@ This has some disadvantages. Please read the Google TTS section in this document No UDP response +---- +#### zone_members + Gets all additional zone members of the group the current speaker is part of. If the speaker is the only member of the + group, the response is empty. + In most cases, you don't have to execute this command, because all subscribed clients will be notified automatically + about 'zone_members'-status changes. + +| parameter | required / optional | valid values | description | +| :-------- | :------------------ | :----------- | :---------- | +| uid | required | | The UID of the Sonos speaker. | + +######Example + JSON format: + { + 'command': 'zone_members', + 'parameter': { + 'uid': rincon_b8e91111d11111400 + } + +######HTTP Response + HTTP 200 OK + or + Exception with HTTP status 400 and the specific error message. + +###### UDP Response sent to subscribed clients: + JSON format: + { + ... + "zone_members": ["rincon_c4441111d11111400", "rincon_d5ee1111d11111400"] + "uid": "rincon_b8e91111d11111400" + ... + } + ---- #### get_wifi_state Gets the current wifi status. Since there is no sonos event for the wifi state, you have to trigger diff --git a/plugin.sonos/README.md b/plugin.sonos/README.md index 5d155e3..6ed3162 100644 --- a/plugin.sonos/README.md +++ b/plugin.sonos/README.md @@ -3,7 +3,13 @@ Smarthome.py framework (https://github.com/mknx/smarthome). ##Release -v0.9 (2016-11-20) +v1.0b1 (2017-01-02) + + -- added attribute 'play' to 'unjoin' + -- resumes the last played track / radio before join to another group + -- change expected Sonos Broker version to v1.0b1 + +v0.9 (2016-11-20) -- added missing 'track_album' property -- add new property 'playlist_total_tracks' @@ -18,23 +24,10 @@ v0.8.1 (2016-11-14) -- switching versioning to the current Sonos Broker version -- change expected Sonos Broker version to 0.8.1 -v1.8 (2016-11-11) - - -- ATTENTION: commands 'get_playlist' and 'set_playlist' removed and replaced by 'sonos_playlists' and - 'load_sonos_playlist' - --command "load_sonos_playlist" with parameter added. The commands loads a Sonos playlist by its name. - -- optional parameters: play_after_insert, clear_queue - -- command "play_tunein" added - -- 'play_tunein' expects a radio station name. The name will be searched within TuneIn and the - first match is played. To make sure the correct radio station is played provide the full radio - station showing in the Sonos app. - -- 'clear_queue' command added. The command clears the current queue. - -- version check against Sonos Broker to identify an out-dated plugin or Broker - - + ## Requirements: - sonos_broker server v0.8.3 + sonos_broker server v1.0b1 (https://github.com/pfischi/shSonos) SmarthomeNG @@ -325,6 +318,10 @@ Edit file with this sample of mine: enforce_updates = True sonos_send = unjoin visu_acl = rw + + [[[play]]] + type = bool + value = 1 [[partymode]] type = foo diff --git a/plugin.sonos/__init__.py b/plugin.sonos/__init__.py index 8084fb0..81f3345 100755 --- a/plugin.sonos/__init__.py +++ b/plugin.sonos/__init__.py @@ -31,7 +31,7 @@ import struct import requests -EXPECTED_BROKER_VERSION = "0.9" +EXPECTED_BROKER_VERSION = "1.0b1" logger = logging.getLogger('') sonos_speaker = {} @@ -398,7 +398,13 @@ def _update_item(self, item, caller=None, source=None, dest=None): cmd = self._command.join(uid, value) if command == 'unjoin': - cmd = self._command.unjoin(uid) + play_item_name = '{}.play'.format(item._name) + play = 0 + for child in item.return_children(): + if child._name.lower() == play_item_name.lower(): + play = child() + break + cmd = self._command.unjoin(uid, play) if command == 'partymode': cmd = self._command.partymode(uid) @@ -598,11 +604,12 @@ def join(uid, value): } @staticmethod - def unjoin(uid): + def unjoin(uid, play=0): return { 'command': 'unjoin', 'parameter': { - 'uid': '{uid}'.format(uid=uid) + 'uid': '{uid}'.format(uid=uid), + 'play': play } } @@ -957,5 +964,4 @@ def get_lan_ip_fallback(): return s.getsockname()[0] except Exception as err: logger.critical(err) - return None - + return None \ No newline at end of file diff --git a/plugin.sonos/examples/sonos.conf b/plugin.sonos/examples/sonos.conf index 53e6289..ba53397 100644 --- a/plugin.sonos/examples/sonos.conf +++ b/plugin.sonos/examples/sonos.conf @@ -184,10 +184,6 @@ type = bool value = 0 - [[[force_stream_mode]]] - type = bool - value = 0 - [[[fade_in]]] type = bool value = 1 @@ -279,6 +275,10 @@ sonos_send = unjoin visu_acl = rw + [[[play]]] + type = bool + value = 1 + [[partymode]] type = foo enforce_updates = True diff --git a/server.sonos/CHANGES.txt b/server.sonos/CHANGES.txt index d11240d..e5b9d2c 100644 --- a/server.sonos/CHANGES.txt +++ b/server.sonos/CHANGES.txt @@ -1,3 +1,41 @@ +v1.0b1 (2017-01-02) + + -- integrated webservice to serve audio files for the Sonos speakers + -- improved 'play_snippet' and 'play_tts' functionality + -- the length of a snippet will now be estimated by pre-loading the audio file + -- bug: the 'volume' of all zone members will now be restored correctly after playing the snippet + -- command optional parameter 'play' added to command "unjoin" + -- with 'play' set to true, the prevoiusly played track (before joining a group) will resumed + -- changed executable name from "sonos_broker" to "sonos-broker" + -- changed command line tool from "sonos_cmd" to "sonos-cmd" + -- changed default installation path of sonos_broker.cfg to /etc/default/sonos-broker + -- stopping a running Sonos Broker instance is handled a bit more gracefully + -- updated setup script + -- auto-start scripts for systemd and upstart automatically placed in the appropriate folder by the + installation script + -- 'daemonize' behaviour removed + -- unnecessary parameter 'stop' removed + -- updated documentation + -- added "zone_member" command to Sonos Broker (to retrieve this value actively) + -- added commands 'join' and 'unjoin' to Sonos Broker commandline tool + -- bug: error when trying to decode non-ascii chars and the systems stdout was no set to utf8 + + +v0.9 (2016-11-20) + + -- added missing 'track_album' property + -- added missing 'track_album' to Sonos-Broker commandline + -- added "get_playlist_position" command and "playlist_position" property to Sonos Broker and + Sonos Broker commandline tool + -- added "get_playlist_total_tracks" command and "playlist_total_tracks" property to Sonos Broker and + Sonos Broker commandline tool + -- added missing 'track_album_art' property to Sonos Broker commandline tool + -- bug: 'playlist_position' was not handled correctly + -- changed maximum snippet length to 15 seconds + -- bugfixed: Sonos Broker user-specific server port was ignored + -- updated documentation + + v.0.8.2 (2016-11-14) -- fixed bug in GoogleTTS diff --git a/server.sonos/MANIFEST b/server.sonos/MANIFEST deleted file mode 100644 index 00b4d42..0000000 --- a/server.sonos/MANIFEST +++ /dev/null @@ -1,37 +0,0 @@ -# file GENERATED by distutils, do NOT edit -setup.py -sonos_broker -sonos_broker.cfg -sonos_cmd -lib_sonos/__init__.py -lib_sonos/daemon.py -lib_sonos/definitions.py -lib_sonos/radio_parser.py -lib_sonos/sonos_commands.py -lib_sonos/sonos_library.py -lib_sonos/sonos_service.py -lib_sonos/sonos_speaker.py -lib_sonos/tts.py -lib_sonos/udp_broker.py -lib_sonos/utils.py -soco/__init__.py -soco/alarms.py -soco/cache.py -soco/compat.py -soco/config.py -soco/core.py -soco/data_structures.py -soco/discovery.py -soco/events.py -soco/exceptions.py -soco/groups.py -soco/ms_data_structures.py -soco/music_library.py -soco/services.py -soco/snapshot.py -soco/soap.py -soco/utils.py -soco/xml.py -soco/music_services/__init__.py -soco/music_services/accounts.py -soco/music_services/music_service.py diff --git a/server.sonos/MANIFEST.in b/server.sonos/MANIFEST.in new file mode 100644 index 0000000..4bb9b50 --- /dev/null +++ b/server.sonos/MANIFEST.in @@ -0,0 +1,3 @@ +graft scripts/systemd/ +graft scripts/upstart/ +graft config diff --git a/server.sonos/config/sonos-broker b/server.sonos/config/sonos-broker new file mode 100644 index 0000000..4a24e9e --- /dev/null +++ b/server.sonos/config/sonos-broker @@ -0,0 +1,57 @@ +# This is the config file for sonos broker. Adapt and uncomment the lines to your purpose + +######################################################################## +[logging] + +# Sets the log level for the server. WARNING is the default value. +# Possible values are: debug, info, warning, error, critical +# Default logfile path: /tmp/sonos-broker.log + +# loglevel = warning +# logfile = /tmp/sonos-broker.log + +######################################################################## +[sonos_broker] + +# Binding host address. Default: 0.0.0.0 +# host = 0.0.0.0 + +# Server port. Default: 12900 +# port = 12900 + +######################################################################## +[google_tts] + +# Enable Google-Text-To-Speech. Default: false +# enabled = true + +# Select the path where Sonos Broker will save the converted mp3 files +# If your're using the built-in webserver (see webserver section), 'save_path' and 'root_path' should be set to the same +# value. +# save_path = /var/www + +# Specifies the destination url which Sonos Broker refers to the Sonos speakers. This must be the hosts IP address the +# webservice is running on. +# server_url = http://192.168.0.8:12900 + +# Maximum file size quota in megabytes. Up to this size, the Sonos Broker will save files to 'save_path'. +# Default: 100 +# quota = 200 + +######################################################################## +[webservice] + +# Sonos Broker can start an own webservice that delivers stored audio files to the Sonos speakers. This is helpful for +# playing audio snippets and the Google TTS functionality. E.g. every audio snippet under 'root_path' can be played via +# 'play_snippet' command. +# You can leave this option disabled if you're using another webserver (nginx, apache) or you don't want to use Google +# TTS and/or the snippet command with local audio files. You can place all your snippet audio files in the web +# root directory. The server handles these files by their extension. Valid extensions are: aac, mp4, mp3, ogg, wav, web. +# This does not mean that the Sonos speakers can playback such a file. +# Port and IP address are the same as the values 'host' and 'port' in the [sonos_broker] section. + +# Enables the webservice. Default: false +# enabled = false + +# Web-root path. The directory must exists and readable (better writeable) for the current user. Default: /var/www +# root_path = /var/www \ No newline at end of file diff --git a/server.sonos/dist/sonos-broker-0.9.tar.gz b/server.sonos/dist/sonos-broker-0.9.tar.gz deleted file mode 100644 index 51b8b730b6afb754fe1398b9daa7f38899dbf3db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 120749 zcmV(tKWCB0&<85R(7{fR@!>n%6n+ah~kdW#6$u zQnu6SnTc0-Bmo<>Z?$XJy^1W&irzTS-p6^bAAYy>&Da0ehkuVBKg6Hgk018UpYq=~ z+q?bk2fGg*@9aMQrVoESc=%25@SA_azhzNIc@TV4j90f?_g+p!{`_z9uWoZ8%jWzUUNKBHrt&I}qp8twlBE|3k5j=alFKxjsZWx*n8GX>59y@J z2`tNGR@A(k#urJNlu4GlEkZu+IR0c3%l2pZkY|0yZ|VR?@f_CM|B^vZviTe)UVKH& z`QhZ%vxAefuZ%f4?>r1t3|XzpUhpzYikpELZW zJse&nvv@e{bQ-w(F@7Y`;4&^x=vlkf>Og0+s3>^Fe+0A?h}ZVxV`tC^;2-Q~FwKTP z9G$m|cy=M4;=eM#(SP8-%UL##W`Q#$t4SUg%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