Ankündigung

Einklappen
Keine Ankündigung bisher.

Sonos Anbindung

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Zitat von RoyalTS Beitrag anzeigen

    Gibt es schon etwas Neues zu meinen Wünschne?
    Und ob.

    Da das nächste Release ja die Version 1.0 werden wird, muss ja einiges kommen. Ich verweise mal für alle Änderungen auf die Github-Seite, die wichtigsten Dinge muss ich aber auch kurz hier erläutern. Wer es sich traut, kann HIER eine Vorab-Version testen. Würde mich über Feedback freuen, dann kann ich die Version auch als Release rausbringen.

    An dieser Stelle kurz die wichtigsten Änderungen:

    1. Ich habe die Namen der ausführbaren Dateien in
    Code:
    sonos-broker
    sonos-cmd
    geändert. Das entspricht der gebräuchlicheren Namenskonvention unter LInux. Und versprochen: es bleibt dabei.

    2. Ich habe die Setuproutine ein wenig geändert und pip-konform gemacht. Wenn man den Broker mit dem Befehl
    Code:
    python3 -m pip -v install sonos-broker-{release-version}.tar.gz
    installiert, werden auch alle Abhängigkeiten mit installiert (z.B. requests und xmttodict).
    Die Setuproutine installiert die Standard-Konfigurationsdatei nach
    Code:
    /etc/default/sonos-broker
    Diese wird gealden, wenn kein Parameter '-c' mit einer spezifischen Datei angegeben wurde.

    3. Das Daemonize-Verhalten des Brokers habe ich entfernt. D.h., er startet immer im Vordergrund. In Zunkunft setzte ich voll auf systemd, das kann es besser und ist einfacher zu installieren. Im Zuge dessen habe ich der Setuproutine Startskripte für upstart und systemd mitgegeben. Je nach System wird bei der Installation das entsprechende Skript bereits in die entsprechenden Ordner kopiert; im Fall von systemd z.B.
    Code:
    /etc/systemd/system
    Möchte man den Autostart aktivieren, kann man dies dann mit
    Code:
    sudo systemctl enable sonos-broker.service
    tun.
    Bei einem Upstart-System (z.B. Ubuntu 14.04), muss man in der Datei
    Code:
    /etc/init/sonos-broker.conf
    die Zeile
    Code:
    #start on runlevel [2345]
    auskommentieren.
    HIER kann man sich die simplen Skripte anschauen.

    4. Ich habe den Broker einen eigenen Webservice für das Bereitstellen von Audiodateien spendiert. Man braucht nun keinen eigenen Server mehr, um z.B. GoogleTTS-Dateien oder andere Snippets abzuspielen. Die Konfigurationsdatei wurde entsprechend angepasst und eine neue Sektion [webservice] eingefügt. Eigentlich sollte die Beschreibung selbsterklärend sein.

    5. Die Verarbeitung von den Kommandos
    Code:
    play_tts
    und
    Code:
    play_snippet
    sollte nun robuster sein. Die Länge der Audiodatei wird nun durch ein "Preloading" der Datei genau bestimmt und sollte nun nicht vorher abgebrochen werden oder die Pasue zu groß sein. Dabei habe ich auch gleich einen Bug gefunden, der die Lautstärke der Zonen-Member nicht korrekt auf den Wert vor dem Abspielen des Snippets zurückgesetzt hat.

    6. Die Methode
    Code:
    unjoin
    hat jetzt einen weiteren Parameter 'play' bekommen. Nach einem unjoin wurde zwar der letzte Zustand des Lautsprechers vor dem 'join' wiederhergestellt, mit der Option 'play' kann nun auch sofort der letzte Track / Radiostation wieder abgespielt werden. Dafür bitte unbedingt das SmarthomeNG-Plugin (diese Datei in den Sonos-Plugin-Ordner von SmarthomeNG kopieren) und die Items-Datei updaten. Das Item 'unjoin' würde dann z.B. so aussehen:

    Code:
         [[unjoin]]        
             type = foo        
             enforce_updates = True        
             sonos_send = unjoin        
             visu_acl = rw          
    
             [[[play]]]          
                 type = bool            
                 value = 1
    Ich weiss, das sind einige tiefgreifendere Änderungen die leider aber nötig geworden sind. Ich bin gerade dabei das Widget komplett zu überarbeiten. Sollte dies fertig sein und der Beta-Test erfolgreich verlaufen, dann schiebe ich das Release nach.


    @RoyalTS
    Die Zustandslogiken hab ich nochmal zurückgestellt. Nach Tests mit meinen zwei Lautsprechern wurde der Zustand der Lautsprecher nach einem join --> unjoin immer wieder korrekt von der Sonos-internen Logik zurückgesetzt. Ich habe wie oben schon geschrieben eingige Veränderungen am Code durchgeführt. Eventuell behebt es schon die meisten Probleme. Ich bin gespannt auf deine Tests.

    Gruss,

    Stefan


    Zuletzt geändert von pfischi; 08.01.2017, 16:38.
    Sonos

    Kommentar


      Hallo Stefan,

      ich habe in der Config den Webserver deaktiviert und bekomme beim Starten des Brokers folgende Fehlermeldung. Liegt das an einer zu alte Python (3.2) Version? VG


      ./sonos-broker start
      Traceback (most recent call last):
      File "./sonos-broker", line 318, in <module>
      broker.start()
      File "./sonos-broker", line 252, in start
      self._quota, self._tts_local_mode, self._webservice_root_path)
      File "/home/cubie/sonos-broker-1.0b1/lib_sonos/sonos_service.py", line 346, in __init__
      self.sonos_events_thread = SonosEventThread()
      File "/home/cubie/sonos-broker-1.0b1/lib_sonos/sonos_service.py", line 180, in __init__
      threading.Thread.__init__(self, target=self.process_events, daemon=True)
      TypeError: __init__() got an unexpected keyword argument 'daemon'

      Kommentar


        Ja, das kann tatsächlich sein. Schau ich mir gleich an.
        Sonos

        Kommentar


          Zitat von aschwith Beitrag anzeigen
          Hallo Stefan,

          ich habe in der Config den Webserver deaktiviert und bekomme beim Starten des Brokers folgende Fehlermeldung. Liegt das an einer zu alte Python (3.2) Version? VG


          ./sonos-broker start
          Traceback (most recent call last):
          File "./sonos-broker", line 318, in <module>
          broker.start()
          File "./sonos-broker", line 252, in start
          self._quota, self._tts_local_mode, self._webservice_root_path)
          File "/home/cubie/sonos-broker-1.0b1/lib_sonos/sonos_service.py", line 346, in __init__
          self.sonos_events_thread = SonosEventThread()
          File "/home/cubie/sonos-broker-1.0b1/lib_sonos/sonos_service.py", line 180, in __init__
          threading.Thread.__init__(self, target=self.process_events, daemon=True)
          TypeError: __init__() got an unexpected keyword argument 'daemon'
          Ich habe das Projekt auf Gthub geupdatet. Am besten du installierst es nochmal mit der aktuellen Version.
          Sollte jetzt an dieser Codestelle klappen. Es kann aber sein, das es noch andere Stellen geben wird, die nicht 100% kompatibel sind. Einfach kurz melden.

          Gruss,

          Stefan
          Sonos

          Kommentar


            Du gibst echt eine Schlagzahl vor. Funktioniert bestens. Vielen Dank!
            Gruß
            Alex

            Kommentar


              Hallo Stefan,

              ich bin gerade dabei Sonos in mein System zu integrieren. Da ich keine Lust habe zeitnah alles anzupassen, bin ich direkt auf die 1.0 Betha gegangen.

              Installiert habe ich über
              Code:
              wget https://github.com/pfischi/shSonos/raw/develop/server.sonos/dist/sonos-broker-1.0b1.tar.gz
              python3 -m pip -v install sonos-broker-1.0b1.tar.gz
              Die Installation scheint zu klappen:
              Code:
               Checking systems start method ... ok [SYSTEMD]
                Checking permissions ... ok
                Copying start script to /etc/systemd/system ... ok [/etc/systemd/system/sonos-broker.service]
                Sonos Broker service successfully installed.
                Type sudo systemctl [start|stop|restart|status] sonos-broker to control the service.
                For auto-start execute sudo systemctl enable sonos-broker.service
              allerdings lässt sich der Broker nicht via systemctl starten:
              Code:
              systemctl start sonos-broker
              ... liefert zwar keine Fehlermeldung aber
              Code:
               sudo systemctl status sonos-broker
              ● sonos-broker.service - Sonos Broker
                 Loaded: loaded (/etc/systemd/system/sonos-broker.service; enabled; vendor preset: enabled)
                 Active: failed (Result: exit-code) since Fri 2017-01-13 15:28:39 UTC; 6s ago
                Process: 18710 ExecStart=/usr/local/sbin/sonos_broker start (code=exited, status=203/EXEC)
               Main PID: 18710 (code=exited, status=203/EXEC)
              
              Jan 13 15:28:39 odroid systemd[1]: Started Sonos Broker.
              Jan 13 15:28:39 odroid systemd[18710]: sonos-broker.service: Failed at step EXEC spawning /usr/local/sbin/sonos_broker: No such file or directory
              Jan 13 15:28:39 odroid systemd[1]: sonos-broker.service: Main process exited, code=exited, status=203/EXEC
              Jan 13 15:28:39 odroid systemd[1]: sonos-broker.service: Unit entered failed state.
              Jan 13 15:28:39 odroid systemd[1]: sonos-broker.service: Failed with result 'exit-code'.
              Manuell lässt sich der Broker wohl starten, findet aber keine Lautsprecher:
              Code:
              /etc/default# sonos-broker start &
              /etc/default# sonos-cmd
              Connecting to Sonos broker ... done!
              
              Welcome to Sonos Broker console!
              =>> list
              
              speaker(s):
              -----------
              Wenn ich den Broker in Vordergrund starte reagiert er nicht auf Kommandos...

              Wärend der Installation via Methode 1 sind mir folgende Fehlermeldungen aufgefallen, das das systemctl Problem erklären könnten:
              Code:
                  warning: manifest_maker: standard file '-c' not found
              ...
               warning: no directories found matching 'scripts/systemd/'
                warning: no directories found matching 'scripts/upstart/'
              Gruß, Daniel

              Kommentar


                Starte den Broker mal im Vordergrund mit

                Code:
                sonos-broker start -d
                und poste bitte mal den Output.

                Edit: Mir fällt gerade auf, das du noch den Befehl
                Code:
                update
                als erstes nach dem Start des cmd-Tols absetzen musst. Dann geht auch das Listing.

                Gruss,

                Stefan
                Zuletzt geändert von pfischi; 13.01.2017, 20:34.
                Sonos

                Kommentar


                  Hallo Stefan,

                  Danke für dein schnelles Feedback. Wenn ich den Broker im Debugmodus starte bekomme ich folgenden Output:

                  Teil 1:
                  Code:
                  sonos-broker start -d
                  2017-01-13 20:43:49,998 DEBUG    MainThread   Google-TTS disabled! -- sonos-broker:__init__:205
                  2017-01-13 20:43:49,999 INFO     MainThread   Sonos Broker v1.0b1 -- sonos-broker:start:249
                  2017-01-13 20:43:52,013 DEBUG    Thread-2     active threads: 4 -- sonos_service.py:get_speakers_periodically:161
                  2017-01-13 20:43:52,014 INFO     Thread-2     scan devices ... -- sonos_service.py:get_speakers_periodically:162
                  2017-01-13 20:43:52,015 INFO     Thread-2     Sending discovery packets on [<socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('0.0.0.0', 0)>, <socket.socket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('0.0.0.0', 0)>] -- discovery.py:discover:126
                  2017-01-13 20:43:52,150 DEBUG    Thread-2     Received discovery response from ('192.168.32.21', 1900): "b'HTTP/1.1 200 OK\r\nHOST: 239.255.255.250:1900\r\nEXT:\r\nCACHE-CONTROL: max-age=100\r\nLOCATION: http://192.168.32.21:80/description.xml\r\nSERVER: FreeRTOS/7.4.2 UPnP/1.0 IpBridge/1.14.0\r\nhue-bridgeid: 001788FFFE1C8969\r\nST: upnp:rootdevice\r\nUSN: uuid:2f402f80-da50-11e1-9b23-0017881c8969::upnp:rootdevice\r\n\r\n'" -- discovery.py:discover:173
                  2017-01-13 20:43:52,201 DEBUG    Thread-2     Received discovery response from ('192.168.32.21', 1900): "b'HTTP/1.1 200 OK\r\nHOST: 239.255.255.250:1900\r\nEXT:\r\nCACHE-CONTROL: max-age=100\r\nLOCATION: http://192.168.32.21:80/description.xml\r\nSERVER: FreeRTOS/7.4.2 UPnP/1.0 IpBridge/1.14.0\r\nhue-bridgeid: 001788FFFE1C8969\r\nST: uuid:2f402f80-da50-11e1-9b23-0017881c8969\r\nUSN: uuid:2f402f80-da50-11e1-9b23-0017881c8969\r\n\r\n'" -- discovery.py:discover:173
                  2017-01-13 20:43:52,253 DEBUG    Thread-2     Received discovery response from ('192.168.32.21', 1900): "b'HTTP/1.1 200 OK\r\nHOST: 239.255.255.250:1900\r\nEXT:\r\nCACHE-CONTROL: max-age=100\r\nLOCATION: http://192.168.32.21:80/description.xml\r\nSERVER: FreeRTOS/7.4.2 UPnP/1.0 IpBridge/1.14.0\r\nhue-bridgeid: 001788FFFE1C8969\r\nST: urn:schemas-upnp-org:device:basic:1\r\nUSN: uuid:2f402f80-da50-11e1-9b23-0017881c8969\r\n\r\n'" -- discovery.py:discover:173
                  2017-01-13 20:43:52,397 DEBUG    Thread-2     Received discovery response from ('192.168.33.34', 48939): "b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCATION: http://192.168.33.34:1400/xml/device_description.xml\r\nSERVER: Linux UPnP/1.0 Sonos/33.15-32291 (ZPS1)\r\nST: urn:schemas-upnp-org:device:ZonePlayer:1\r\nUSN: uuid:RINCON_B8E937EB649001400::urn:schemas-upnp-org:device:ZonePlayer:1\r\nX-RINCON-HOUSEHOLD: Sonos_gfMGqOz7JhdLhqNO2yaFLOKY1R\r\nX-RINCON-BOOTSEQ: 135\r\nX-RINCON-WIFIMODE: 0\r\n\r\n'" -- discovery.py:discover:173
                  2017-01-13 20:43:52,398 DEBUG    Thread-2     Created SoCo instance for ip: 192.168.33.34 -- core.py:__init__:225
                  2017-01-13 20:43:52,400 INFO     Thread-2     Sending GetZoneGroupState None to 192.168.33.34 -- services.py:send_command:381
                  2017-01-13 20:43:52,416 DEBUG    Thread-2     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:ZoneGroupTopology:1#GetZoneGroupState', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                  <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                    <s:Body>
                      <u:GetZoneGroupState xmlns:u="urn:schemas-upnp-org:service:ZoneGroupTopology:1"/>
                    </s:Body>
                  </s:Envelope>
                   -- services.py:send_command:382
                  2017-01-13 20:43:52,427 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                  2017-01-13 20:43:52,433 DEBUG    Thread-2     "POST /ZoneGroupTopology/Control HTTP/1.1" 200 1101 -- connectionpool.py:_make_request:388
                  2017-01-13 20:43:52,436 DEBUG    Thread-2     Received {'EXT': '', 'Server': 'Linux UPnP/1.0 Sonos/33.15-32291 (ZPS1)', 'CONTENT-LENGTH': '1101', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'Connection': 'close'}, <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetZoneGroupStateResponse xmlns:u="urn:schemas-upnp-org:service:ZoneGroupTopology:1"><ZoneGroupState>&lt;ZoneGroups&gt;&lt;ZoneGroup Coordinator=&quot;RINCON_B8E937EB649001400&quot; ID=&quot;RINCON_B8E937EB649001400:9&quot;&gt;&lt;ZoneGroupMember UUID=&quot;RINCON_B8E937EB649001400&quot; Location=&quot;http://192.168.33.34:1400/xml/device_description.xml&quot; ZoneName=&quot;Küche&quot; Icon=&quot;x-rincon-roomicon:kitchen&quot; Configuration=&quot;1&quot; SoftwareVersion=&quot;33.15-32291&quot; MinCompatibleVersion=&quot;32.0-00000&quot; LegacyCompatibleVersion=&quot;25.0-00000&quot; BootSeq=&quot;135&quot; WirelessMode=&quot;0&quot; WirelessLeafOnly=&quot;0&quot; HasConfiguredSSID=&quot;1&quot; ChannelFreq=&quot;2437&quot; BehindWifiExtender=&quot;0&quot; WifiEnabled=&quot;1&quot; Orientation=&quot;0&quot; RoomCalibrationState=&quot;4&quot;/&gt;&lt;/ZoneGroup&gt;&lt;/ZoneGroups&gt;</ZoneGroupState></u:GetZoneGroupStateResponse></s:Body></s:Envelope> -- services.py:send_command:389
                  2017-01-13 20:43:52,436 INFO     Thread-2     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                  2017-01-13 20:43:52,442 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                  2017-01-13 20:43:52,449 DEBUG    Thread-2     "GET /xml/device_description.xml HTTP/1.1" 200 None -- connectionpool.py:_make_request:388
                  2017-01-13 20:43:52,458 DEBUG    Thread-2     Dispatching method GetVolume -- services.py:__getattr__:195
                  2017-01-13 20:43:52,458 INFO     Thread-2     Sending GetVolume [('InstanceID', 0), ('Channel', 'Master')] to 192.168.33.34 -- services.py:send_command:381
                  2017-01-13 20:43:52,460 DEBUG    Thread-2     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:RenderingControl:1#GetVolume', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                  <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                    <s:Body>
                      <u:GetVolume xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
                        <InstanceID>0</InstanceID>
                        <Channel>Master</Channel>
                      </u:GetVolume>
                    </s:Body>
                  </s:Envelope>
                   -- services.py:send_command:382
                  2017-01-13 20:43:52,465 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                  2017-01-13 20:43:52,471 DEBUG    Thread-2     "POST /MediaRenderer/RenderingControl/Control HTTP/1.1" 200 288 -- connectionpool.py:_make_request:388
                  2017-01-13 20:43:52,474 DEBUG    Thread-2     Received {'EXT': '', 'Server': 'Linux UPnP/1.0 Sonos/33.15-32291 (ZPS1)', 'CONTENT-LENGTH': '288', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'Connection': 'close'}, <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetVolumeResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><CurrentVolume>14</CurrentVolume></u:GetVolumeResponse></s:Body></s:Envelope> -- services.py:send_command:389
                  2017-01-13 20:43:52,474 INFO     Thread-2     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                  2017-01-13 20:43:52,475 DEBUG    Thread-2     Dispatching method GetBass -- services.py:__getattr__:195
                  2017-01-13 20:43:52,476 INFO     Thread-2     Sending GetBass [('InstanceID', 0), ('Channel', 'Master')] to 192.168.33.34 -- services.py:send_command:381
                  2017-01-13 20:43:52,477 DEBUG    Thread-2     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:RenderingControl:1#GetBass', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                  <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                    <s:Body>
                      <u:GetBass xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
                        <InstanceID>0</InstanceID>
                        <Channel>Master</Channel>
                      </u:GetBass>
                    </s:Body>
                  </s:Envelope>
                   -- services.py:send_command:382
                  2017-01-13 20:43:52,483 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                  2017-01-13 20:43:52,488 DEBUG    Thread-2     "POST /MediaRenderer/RenderingControl/Control HTTP/1.1" 200 279 -- connectionpool.py:_make_request:388
                  2017-01-13 20:43:52,491 DEBUG    Thread-2     Received {'EXT': '', 'Server': 'Linux UPnP/1.0 Sonos/33.15-32291 (ZPS1)', 'CONTENT-LENGTH': '279', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'Connection': 'close'}, <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetBassResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><CurrentBass>0</CurrentBass></u:GetBassResponse></s:Body></s:Envelope> -- services.py:send_command:389
                  2017-01-13 20:43:52,491 INFO     Thread-2     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                  2017-01-13 20:43:52,492 DEBUG    Thread-2     Dispatching method GetTreble -- services.py:__getattr__:195
                  2017-01-13 20:43:52,493 INFO     Thread-2     Sending GetTreble [('InstanceID', 0), ('Channel', 'Master')] to 192.168.33.34 -- services.py:send_command:381
                  2017-01-13 20:43:52,495 DEBUG    Thread-2     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:RenderingControl:1#GetTreble', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                  <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                    <s:Body>
                      <u:GetTreble xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
                        <InstanceID>0</InstanceID>
                        <Channel>Master</Channel>
                      </u:GetTreble>
                    </s:Body>
                  </s:Envelope>
                   -- services.py:send_command:382
                  2017-01-13 20:43:52,500 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                  2017-01-13 20:43:52,506 DEBUG    Thread-2     "POST /MediaRenderer/RenderingControl/Control HTTP/1.1" 200 287 -- connectionpool.py:_make_request:388
                  2017-01-13 20:43:52,508 DEBUG    Thread-2     Received {'EXT': '', 'Server': 'Linux UPnP/1.0 Sonos/33.15-32291 (ZPS1)', 'CONTENT-LENGTH': '287', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'Connection': 'close'}, <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetTrebleResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><CurrentTreble>0</CurrentTreble></u:GetTrebleResponse></s:Body></s:Envelope> -- services.py:send_command:389
                  2017-01-13 20:43:52,509 INFO     Thread-2     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                  2017-01-13 20:43:52,510 DEBUG    Thread-2     Dispatching method GetLoudness -- services.py:__getattr__:195
                  2017-01-13 20:43:52,510 INFO     Thread-2     Sending GetLoudness [('InstanceID', 0), ('Channel', 'Master')] to 192.168.33.34 -- services.py:send_command:381
                  2017-01-13 20:43:52,512 DEBUG    Thread-2     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:RenderingControl:1#GetLoudness', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                  <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                    <s:Body>
                      <u:GetLoudness xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
                        <InstanceID>0</InstanceID>
                        <Channel>Master</Channel>
                      </u:GetLoudness>
                    </s:Body>
                  </s:Envelope>
                   -- services.py:send_command:382
                  2017-01-13 20:43:52,518 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                  2017-01-13 20:43:52,523 DEBUG    Thread-2     "POST /MediaRenderer/RenderingControl/Control HTTP/1.1" 200 295 -- connectionpool.py:_make_request:388
                  2017-01-13 20:43:52,526 DEBUG    Thread-2     Received {'EXT': '', 'Server': 'Linux UPnP/1.0 Sonos/33.15-32291 (ZPS1)', 'CONTENT-LENGTH': '295', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'Connection': 'close'}, <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetLoudnessResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><CurrentLoudness>1</CurrentLoudness></u:GetLoudnessResponse></s:Body></s:Envelope> -- services.py:send_command:389
                  2017-01-13 20:43:52,526 INFO     Thread-2     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                  2017-01-13 20:43:52,527 DEBUG    Thread-2     Dispatching method GetTransportSettings -- services.py:__getattr__:195
                  2017-01-13 20:43:52,528 INFO     Thread-2     Sending GetTransportSettings [('InstanceID', 0)] to 192.168.33.34 -- services.py:send_command:381
                  2017-01-13 20:43:52,529 DEBUG    Thread-2     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:AVTransport:1#GetTransportSettings', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                  <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                    <s:Body>
                      <u:GetTransportSettings xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
                        <InstanceID>0</InstanceID>
                      </u:GetTransportSettings>
                    </s:Body>
                  </s:Envelope>
                   -- services.py:send_command:382
                  2017-01-13 20:43:52,534 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                  2017-01-13 20:43:52,540 DEBUG    Thread-2     "POST /MediaRenderer/AVTransport/Control HTTP/1.1" 200 347 -- connectionpool.py:_make_request:388
                  2017-01-13 20:43:52,542 DEBUG    Thread-2     Received {'EXT': '', 'Server': 'Linux UPnP/1.0 Sonos/33.15-32291 (ZPS1)', 'CONTENT-LENGTH': '347', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'Connection': 'close'}, <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetTransportSettingsResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><PlayMode>NORMAL</PlayMode><RecQualityMode>NOT_IMPLEMENTED</RecQualityMode></u:GetTransportSettingsResponse></s:Body></s:Envelope> -- services.py:send_command:389
                  2017-01-13 20:43:52,543 INFO     Thread-2     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                  2017-01-13 20:43:52,544 DEBUG    Thread-2     Dispatching method GetHouseholdID -- services.py:__getattr__:195
                  2017-01-13 20:43:52,544 INFO     Thread-2     Sending GetHouseholdID None to 192.168.33.34 -- services.py:send_command:381
                  2017-01-13 20:43:52,546 DEBUG    Thread-2     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:DeviceProperties:1#GetHouseholdID', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                  <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                    <s:Body>
                      <u:GetHouseholdID xmlns:u="urn:schemas-upnp-org:service:DeviceProperties:1"/>
                    </s:Body>
                  </s:Envelope>
                  Edit: Forum verschluckt sich bei zu langen Posts
                  Zuletzt geändert von dafra; 13.01.2017, 22:01.

                  Kommentar


                    Teil 2:
                    Code:
                     -- services.py:send_command:382
                    2017-01-13 20:43:52,551 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                    2017-01-13 20:43:52,557 DEBUG    Thread-2     "POST /DeviceProperties/Control HTTP/1.1" 200 338 -- connectionpool.py:_make_request:388
                    2017-01-13 20:43:52,559 DEBUG    Thread-2     Received {'EXT': '', 'Server': 'Linux UPnP/1.0 Sonos/33.15-32291 (ZPS1)', 'CONTENT-LENGTH': '338', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'Connection': 'close'}, <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetHouseholdIDResponse xmlns:u="urn:schemas-upnp-org:service:DeviceProperties:1"><CurrentHouseholdID>Sonos_gfMGqOz7JhdLhqNO2yaFLOKY1R</CurrentHouseholdID></u:GetHouseholdIDResponse></s:Body></s:Envelope> -- services.py:send_command:389
                    2017-01-13 20:43:52,560 INFO     Thread-2     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                    2017-01-13 20:43:52,565 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                    2017-01-13 20:43:52,596 DEBUG    Thread-2     "GET /status/ifconfig HTTP/1.1" 200 None -- connectionpool.py:_make_request:388
                    2017-01-13 20:43:52,599 DEBUG    Thread-2     Dispatching method Browse -- services.py:__getattr__:195
                    2017-01-13 20:43:52,599 INFO     Thread-2     Sending Browse [('ObjectID', 'SQ:'), ('BrowseFlag', 'BrowseDirectChildren'), ('Filter', '*'), ('StartingIndex', 0), ('RequestedCount', 100), ('SortCriteria', '')] to 192.168.33.34 -- services.py:send_command:381
                    2017-01-13 20:43:52,601 DEBUG    Thread-2     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:ContentDirectory:1#Browse', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                    <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                      <s:Body>
                        <u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
                          <ObjectID>SQ:</ObjectID>
                          <BrowseFlag>BrowseDirectChildren</BrowseFlag>
                          <Filter>*</Filter>
                          <StartingIndex>0</StartingIndex>
                          <RequestedCount>100</RequestedCount>
                          <SortCriteria/>
                        </u:Browse>
                      </s:Body>
                    </s:Envelope>
                    Zuletzt geändert von dafra; 13.01.2017, 22:05.

                    Kommentar


                      Teil 3:
                      Code:
                       -- services.py:send_command:382
                      2017-01-13 20:43:52,551 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                      2017-01-13 20:43:52,557 DEBUG    Thread-2     "POST /DeviceProperties/Control HTTP/1.1" 200 338 -- connectionpool.py:_make_request:388
                      2017-01-13 20:43:52,559 DEBUG    Thread-2     Received {'EXT': '', 'Server': 'Linux UPnP/1.0 Sonos/33.15-32291 (ZPS1)', 'CONTENT-LENGTH': '338', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'Connection': 'close'}, <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetHouseholdIDResponse xmlns:u="urn:schemas-upnp-org:service:DeviceProperties:1"><CurrentHouseholdID>Sonos_gfMGqOz7JhdLhqNO2yaFLOKY1R</CurrentHouseholdID></u:GetHouseholdIDResponse></s:Body></s:Envelope> -- services.py:send_command:389
                      2017-01-13 20:43:52,560 INFO     Thread-2     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                      2017-01-13 20:43:52,565 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                      2017-01-13 20:43:52,596 DEBUG    Thread-2     "GET /status/ifconfig HTTP/1.1" 200 None -- connectionpool.py:_make_request:388
                      2017-01-13 20:43:52,599 DEBUG    Thread-2     Dispatching method Browse -- services.py:__getattr__:195
                      2017-01-13 20:43:52,599 INFO     Thread-2     Sending Browse [('ObjectID', 'SQ:'), ('BrowseFlag', 'BrowseDirectChildren'), ('Filter', '*'), ('StartingIndex', 0), ('RequestedCount', 100), ('SortCriteria', '')] to 192.168.33.34 -- services.py:send_command:381
                      2017-01-13 20:43:52,601 DEBUG    Thread-2     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:ContentDirectory:1#Browse', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                      <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                        <s:Body>
                          <u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
                            <ObjectID>SQ:</ObjectID>
                            <BrowseFlag>BrowseDirectChildren</BrowseFlag>
                            <Filter>*</Filter>
                            <StartingIndex>0</StartingIndex>
                            <RequestedCount>100</RequestedCount>
                            <SortCriteria/>
                          </u:Browse>
                        </s:Body>
                      </s:Envelope>
                       -- services.py:send_command:382
                      2017-01-13 20:43:52,607 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                      2017-01-13 20:43:52,628 DEBUG    Thread-2     "POST /MediaServer/ContentDirectory/Control HTTP/1.1" 200 None -- connectionpool.py:_make_request:388
                      2017-01-13 20:43:52,638 INFO     Thread-2     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                      2017-01-13 20:43:52,643 DEBUG    Thread-2     Cache hit -- services.py:send_command:377
                      2017-01-13 20:43:52,643 DEBUG    Thread-2     Cache hit -- services.py:send_command:377
                      2017-01-13 20:43:52,644 DEBUG    Thread-2     Cache hit -- services.py:send_command:377
                      2017-01-13 20:43:52,644 DEBUG    Thread-2     Cache hit -- services.py:send_command:377
                      2017-01-13 20:43:52,645 DEBUG    Thread-2     Cache hit -- services.py:send_command:377
                      2017-01-13 20:43:52,645 DEBUG    Thread-2     renewing topology event for rincon_b8e937eb649001400 -- sonos_speaker.py:event_subscription:1458
                      2017-01-13 20:43:52,647 INFO     Thread-2     Event listener started -- events.py:start:338
                      2017-01-13 20:43:52,648 INFO     Thread-4     Event listener running on ('192.168.32.3', 1400) -- events.py:run:275
                      2017-01-13 20:43:52,654 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                      2017-01-13 20:43:52,664 DEBUG    Thread-2     "SUBSCRIBE /ZoneGroupTopology/Event HTTP/1.1" 200 None -- connectionpool.py:_make_request:388
                      2017-01-13 20:43:52,668 INFO     Thread-2     Subscribed to http://192.168.33.34:1400/ZoneGroupTopology/Event, sid: uuid:RINCON_B8E937EB649001400_sub0000000511 -- events.py:subscribe:477
                      2017-01-13 20:43:52,670 INFO     Thread-5     No service registered for uuid:RINCON_B8E937EB649001400_sub0000000511 -- events.py:do_NOTIFY:243
                      2017-01-13 20:43:52,671 DEBUG    Thread-5     "NOTIFY / HTTP/1.1" 200 - -- events.py:log_message:249
                      2017-01-13 20:43:52,671 DEBUG    Thread-2     renewing av-transport event for rincon_b8e937eb649001400 -- sonos_speaker.py:event_subscription:1475
                      2017-01-13 20:43:52,677 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                      2017-01-13 20:43:52,683 DEBUG    Thread-2     "SUBSCRIBE /MediaRenderer/AVTransport/Event HTTP/1.1" 200 None -- connectionpool.py:_make_request:388
                      2017-01-13 20:43:52,685 INFO     Thread-2     Subscribed to http://192.168.33.34:1400/MediaRenderer/AVTransport/Event, sid: uuid:RINCON_B8E937EB649001400_sub0000000512 -- events.py:subscribe:477
                      2017-01-13 20:43:52,686 DEBUG    Thread-2     renewing rendering event for rincon_b8e937eb649001400 -- sonos_speaker.py:event_subscription:1491
                      2017-01-13 20:43:52,691 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                      2017-01-13 20:43:52,696 INFO     Thread-8     Event 0 received for AVTransport service on thread <Thread(Thread-8, started -1294994320)> at 1484340232.695966 -- events.py:do_NOTIFY:227
                      2017-01-13 20:43:52,698 DEBUG    Thread-2     "SUBSCRIBE /MediaRenderer/RenderingControl/Event HTTP/1.1" 200 None -- connectionpool.py:_make_request:388
                      2017-01-13 20:43:52,704 DEBUG    Thread-8     "NOTIFY / HTTP/1.1" 200 - -- events.py:log_message:249
                      2017-01-13 20:43:52,706 INFO     Thread-2     Subscribed to http://192.168.33.34:1400/MediaRenderer/RenderingControl/Event, sid: uuid:RINCON_B8E937EB649001400_sub0000000513 -- events.py:subscribe:477
                      2017-01-13 20:43:52,708 DEBUG    Thread-2     renewing alarm event for rincon_b8e937eb649001400 -- sonos_speaker.py:event_subscription:1507
                      2017-01-13 20:43:52,713 INFO     Thread-2     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                      2017-01-13 20:43:52,717 INFO     Thread-10    Event 0 received for RenderingControl service on thread <Thread(Thread-10, started -1294994320)> at 1484340232.7176404 -- events.py:do_NOTIFY:227
                      2017-01-13 20:43:52,718 DEBUG    Thread-2     "SUBSCRIBE /AlarmClock/Event HTTP/1.1" 200 None -- connectionpool.py:_make_request:388
                      2017-01-13 20:43:52,719 DEBUG    Thread-10    Event content: b'<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"><e:property><LastChange>&lt;Event xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/RCS/&quot;&gt;&lt;InstanceID val=&quot;0&quot;&gt;&lt;Volume channel=&quot;Master&quot; val=&quot;14&quot;/&gt;&lt;Volume channel=&quot;LF&quot; val=&quot;100&quot;/&gt;&lt;Volume channel=&quot;RF&quot; val=&quot;100&quot;/&gt;&lt;Mute channel=&quot;Master&quot; val=&quot;0&quot;/&gt;&lt;Mute channel=&quot;LF&quot; val=&quot;0&quot;/&gt;&lt;Mute channel=&quot;RF&quot; val=&quot;0&quot;/&gt;&lt;Bass val=&quot;0&quot;/&gt;&lt;Treble val=&quot;0&quot;/&gt;&lt;Loudness channel=&quot;Master&quot; val=&quot;1&quot;/&gt;&lt;OutputFixed val=&quot;0&quot;/&gt;&lt;HeadphoneConnected val=&quot;0&quot;/&gt;&lt;SpeakerSize val=&quot;5&quot;/&gt;&lt;SubGain val=&quot;0&quot;/&gt;&lt;SubCrossover val=&quot;0&quot;/&gt;&lt;SubPolarity val=&quot;0&quot;/&gt;&lt;SubEnabled val=&quot;1&quot;/&gt;&lt;SonarEnabled val=&quot;0&quot;/&gt;&lt;SonarCalibrationAvailable val=&quot;0&quot;/&gt;&lt;PresetNameList val=&quot;FactoryDefaults&quot;/&gt;&lt;/InstanceID&gt;&lt;/Event&gt;</LastChange></e:property></e:propertyset>' -- events.py:do_NOTIFY:228
                      2017-01-13 20:43:52,722 DEBUG    Thread-10    "NOTIFY / HTTP/1.1" 200 - -- events.py:log_message:249
                      2017-01-13 20:43:52,724 INFO     Thread-2     Subscribed to http://192.168.33.34:1400/AlarmClock/Event, sid: uuid:RINCON_B8E937EB649001400_sub0000000514 -- events.py:subscribe:477
                      2017-01-13 20:43:52,725 DEBUG    Thread-2     Start wait -- sonos_service.py:get_speakers_periodically:165
                      2017-01-13 20:43:52,733 INFO     Thread-12    Event 0 received for AlarmClock service on thread <Thread(Thread-12, started -1294994320)> at 1484340232.7333848 -- events.py:do_NOTIFY:227
                      2017-01-13 20:43:52,734 DEBUG    Thread-12    Event content: b'<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"><e:property><TimeZone>ffc40a000503000003000502ffc4</TimeZone></e:property><e:property><TimeServer>0.sonostime.pool.ntp.org,1.sonostime.pool.ntp.org,2.sonostime.pool.ntp.org,3.sonostime.pool.ntp.org</TimeServer></e:property><e:property><TimeGeneration>1</TimeGeneration></e:property><e:property><AlarmListVersion>RINCON_B8E937B61E6C01400:49</AlarmListVersion></e:property><e:property><TimeFormat>INV</TimeFormat></e:property><e:property><DateFormat>INV</DateFormat></e:property><e:property><DailyIndexRefreshTime></DailyIndexRefreshTime></e:property></e:propertyset>' -- events.py:do_NOTIFY:228
                      2017-01-13 20:43:52,735 DEBUG    Thread-12    "NOTIFY / HTTP/1.1" 200 - -- events.py:log_message:249
                      2017-01-13 20:43:55,515 DEBUG    Thread-1     Dispatching method ListAlarms -- services.py:__getattr__:195
                      2017-01-13 20:43:55,515 INFO     Thread-1     Sending ListAlarms None to 192.168.33.34 -- services.py:send_command:381
                      2017-01-13 20:43:55,517 DEBUG    Thread-1     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:AlarmClock:1#ListAlarms', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                      <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                        <s:Body>
                          <u:ListAlarms xmlns:u="urn:schemas-upnp-org:service:AlarmClock:1"/>
                        </s:Body>
                      </s:Envelope>

                      Kommentar


                        Code:
                         -- services.py:send_command:382
                        2017-01-13 20:43:55,521 INFO     Thread-1     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                        2017-01-13 20:43:55,532 DEBUG    Thread-1     "POST /AlarmClock/Control HTTP/1.1" 200 2887 -- connectionpool.py:_make_request:388
                        2017-01-13 20:43:55,535 INFO     Thread-1     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                        2017-01-13 20:43:55,543 DEBUG    Thread-1     Cache hit -- services.py:send_command:377
                        2017-01-13 20:43:55,544 INFO     Thread-1     Sending Browse [('ObjectID', 'SQ:'), ('BrowseFlag', 'BrowseDirectChildren'), ('Filter', '*'), ('StartingIndex', 0), ('RequestedCount', 100), ('SortCriteria', '')] to 192.168.33.34 -- services.py:send_command:381
                        2017-01-13 20:43:55,546 DEBUG    Thread-1     Sending {'SOAPACTION': 'urn:schemas-upnp-org:service:ContentDirectory:1#Browse', 'Content-Type': 'text/xml; charset="utf-8"'}, <?xml version="1.0" ?>
                        <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
                          <s:Body>
                            <u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
                              <ObjectID>SQ:</ObjectID>
                              <BrowseFlag>BrowseDirectChildren</BrowseFlag>
                              <Filter>*</Filter>
                              <StartingIndex>0</StartingIndex>
                              <RequestedCount>100</RequestedCount>
                              <SortCriteria/>
                            </u:Browse>
                          </s:Body>
                        </s:Envelope>
                         -- services.py:send_command:382
                        2017-01-13 20:43:55,552 INFO     Thread-1     Starting new HTTP connection (1): 192.168.33.34 -- connectionpool.py:_new_conn:208
                        2017-01-13 20:43:55,575 DEBUG    Thread-1     "POST /MediaServer/ContentDirectory/Control HTTP/1.1" 200 None -- connectionpool.py:_make_request:388
                        2017-01-13 20:43:55,585 INFO     Thread-1     Received status 200 from 192.168.33.34 -- services.py:send_command:392
                        2017-01-13 20:43:55,589 INFO     Thread-1     registered clients:  -- udp_broker.py:udp_send:43
                        Zuletzt geändert von dafra; 13.01.2017, 22:13.

                        Kommentar


                          Code:
                          --- Logging error ---
                          Traceback (most recent call last):
                            File "/usr/lib/python3.5/logging/__init__.py", line 982, in emit
                              stream.write(msg)
                          UnicodeEncodeError: 'ascii' codec can't encode character '\xe6' in position 782: ordinal not in range(128)
                          Call stack:
                            File "/usr/lib/python3.5/threading.py", line 882, in _bootstrap
                              self._bootstrap_inner()
                            File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
                              self.run()
                            File "/usr/lib/python3.5/threading.py", line 862, in run
                              self._target(*self._args, **self._kwargs)
                            File "/usr/local/lib/python3.5/dist-packages/lib_sonos/sonos_service.py", line 242, in process_events
                              speaker.send()
                            File "/usr/local/lib/python3.5/dist-packages/lib_sonos/sonos_speaker.py", line 1384, in send
                              self._send()
                            File "/usr/local/lib/python3.5/dist-packages/lib_sonos/sonos_speaker.py", line 1407, in _send
                              udp_broker.UdpBroker.udp_send(data)
                            File "/usr/local/lib/python3.5/dist-packages/lib_sonos/udp_broker.py", line 44, in udp_send
                              logger.info("sending sonos speaker data: {}".format(data))
                          Message: 'sending sonos speaker data: {......................... editiert von dafra ........................}'
                          Arguments: ()
                          Arguments: ()
                          2017-01-13 20:43:55,590 INFO     Thread-1     sending sonos speaker data: {
                              "additional_zone_members": "",
                              "alarms": "",
                              "balance": 0,
                              "bass": 0,
                              "display_version": "6.4",
                              "hardware_version": "1.8.3.7-2",
                          ....................... editiert von dafra ....................

                          Kommentar


                            Sorry dafür, den Thread so zugespamt zu haben - irgenwie mag das Forum den Output vom sonos-broker nicht. Die Vorschau passte, nach dem Absenden ist die Formatierung und der halbe Text weg.

                            Da half gerade nur try and error, ein paar lange Zeilen habe ich schon händisch rausgelöscht. Das nächste mal häng ich ne txt dran.

                            Zurück zum Thema:
                            Den Sonos im Netzwerk scheint er zu finden (letzte Ausgabe).

                            Wenn ich den sonos-cmd starte und "update" vor "list" absetze, stürtzt er ab:
                            Code:
                             sonos-cmd
                            Connecting to Sonos broker ... done!
                            
                            Welcome to Sonos Broker console!
                            =>> update
                            =>> list
                            
                            speaker(s):
                            -----------
                            Traceback (most recent call last):
                              File "/usr/local/bin/sonos-cmd", line 1811, in <module>
                                broker_cmd.cmdloop()
                              File "/usr/lib/python3.5/cmd.py", line 138, in cmdloop
                                stop = self.onecmd(line)
                              File "/usr/lib/python3.5/cmd.py", line 217, in onecmd
                                return func(arg)
                              File "/usr/local/bin/sonos-cmd", line 158, in do_list
                                print(speaker)
                            UnicodeEncodeError: 'ascii' codec can't encode character '\xfc' in position 46: ordinal not in range(128)
                            Gruß, Daniel
                            Zuletzt geändert von dafra; 13.01.2017, 22:22.

                            Kommentar


                              dafra

                              Du hast da gleiche Problem wie hier in diesem Thread:

                              https://knx-user-forum.de/forum/supp...73#post1036873

                              Das liegt an den Encoding-Einstellung deines Images (ich wette du nimmst das von Onkelandy).

                              Du musst folgende Einträge der PATH-Variable deines Systems hinzufügen:

                              Code:
                              export LC_ALL=de_DE.utf8
                              export LANGUAGE=de_DE.utf8
                              Gruss,

                              Stefan
                              Sonos

                              Kommentar


                                Hallo Stefan,

                                deine Wette war sehr gut, denn
                                Code:
                                python3 -c "import sys;print(sys.stdout.encoding)"
                                ANSI_X3.4-1968
                                Allerdings habe ich als Basis einen Odroid U3, auf dem Ubuntu 16.04 LTS läuft. SmarthomeNG habe ich nach der offiziellen Anleitung installiert.

                                Da
                                Code:
                                export LC_ALL=de_DE.utf8
                                -bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.utf8)
                                gebracht hat, habe ich mit
                                Code:
                                locale-gen de_DE.utf8
                                update-locale LANG=de_DE.utf8
                                das Encoding geändert.

                                Damit klappt es:
                                Code:
                                 python3 -c "import sys;print(sys.stdout.encoding)"
                                UTF-8
                                Wenn ich jetzt den Broker via
                                Code:
                                sonos-broker start &
                                dämonisiere, läuft sonos-cmd so wie es soll:
                                Code:
                                 sonos-cmd
                                Connecting to Sonos broker ... done!
                                
                                Welcome to Sonos Broker console!
                                =>> update
                                =>> list
                                
                                speaker(s):
                                -----------
                                (1)             rincon_b8e937eb649001400        [192.168.33.34|Küche|Sonos PLAY:1]
                                Hast Du eine Ahnung, warum der Broker mit systemctl nicht hochkommt?

                                Gruß, Daniel

                                P.S: Gibt es eine Möglichkeit, den Broker "robust" gegen andere Encodings als UTF8 zu machnen? Über das Problem werdnen vermutlich viele stolpern...

                                Kommentar

                                Lädt...
                                X