Ankündigung

Einklappen
Keine Ankündigung bisher.

Sonos Anbindung

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

    Hallo Stefan,

    ich habe heute mal das Update eingespielt. Leider funktioniert es bei mir gar nicht mehr:
    Ich bekomme folgende Meldungen im Log:

    Code:
    [LIST][*]2016-11-21 16:05:30 WARNING Main Could not send sonos notification: {'command': 'sonos_broker_version'}. Error: HTTPConnectionPool(host='192.168.8.58', port=12900): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x722a0a30>: Failed to establish a new connection: [Errno 111] Verbindungsaufbau abgelehnt',))[*]2016-11-21 16:05:30 DEBUG Main sonos-update next time: 2016-11-21 16:05:45+01:00[*]2016-11-21 16:05:31 INFO sonos Starting new HTTP connection (1): 192.168.8.58[*]2016-11-21 16:05:31 WARNING sonos Could not send sonos notification: {'parameter': {'ip': '192.168.8.58', 'port': 9999}, 'command': 'client_subscribe'}. Error: HTTPConnectionPool(host='192.168.8.58', port=12900): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x722507b0>: Failed to establish a new connection: [Errno 111] Verbindungsaufbau abgelehnt',))[*]2016-11-21 16:05:31 INFO sonos Starting new HTTP connection (1): 192.168.8.58[*]2016-11-21 16:05:31 WARNING sonos Could not send sonos notification: {'parameter': {'group_command': 0, 'uid': 'rincon_5caafd4e67b601400'}, 'command': 'current_state'}. Error: HTTPConnectionPool(host='192.168.8.58', port=12900): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x722507b0>: Failed to establish a new connection: [Errno 111] Verbindungsaufbau abgelehnt',))[*]2016-11-21 16:05:45 INFO sonos-update Starting new HTTP connection (1): 192.168.8.58[*]2016-11-21 16:05:45 WARNING sonos-update Could not send sonos notification: {'parameter': {'ip': '192.168.8.58', 'port': 9999}, 'command': 'client_subscribe'}. Error: HTTPConnectionPool(host='192.168.8.58', port=12900): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x71966bb0>: Failed to establish a new connection: [Errno 111] Verbindungsaufbau abgelehnt',))[*]2016-11-21 16:05:45 INFO sonos-update Starting new HTTP connection (1): 192.168.8.58[*]2016-11-21 16:05:45 WARNING sonos-update Could not send sonos notification: {'parameter': {'group_command': 0, 'uid': 'rincon_5caafd4e67b601400'}, 'command': 'current_state'}. Error: HTTPConnectionPool(host='192.168.8.58', port=12900): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x71974710>: Failed to establish a new connection: [Errno 111] Verbindungsaufbau abgelehnt',))[*]2016-11-21 16:05:45 DEBUG Scheduler sonos-update next time: 2016-11-21 16:07:45+01:00[/LIST]
    Code:
    [LIST][*]2016-11-21 16:05:30 WARNING Main No broker url given, assuming current ip and default broker port: http://192.168.8.58:12900[*]2016-11-21 16:05:30 WARNING Main Could not send sonos notification: {'command': 'sonos_broker_version'}. Error: HTTPConnectionPool(host='192.168.8.58', port=12900): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x722a0a30>: Failed to establish a new connection: [Errno 111] Verbindungsaufbau abgelehnt',))[*]2016-11-21 16:05:30 WARNING Main Unknown Sonos broker version string 'None.'[/LIST]
    Code:
    (#)/usr/local/bin:$ chmod +x sonos_broker
    (#)/usr/local/bin:$ ./sonos_broker
    Unknown command!
    Gruß Manuel
    Zuletzt geändert von manu241; 21.11.2016, 16:16.

    Kommentar


      Ich habe den Startparameter vom Broker geändert (siehe Doku und Changelog).

      Code:
      sonos_broker start [-d] [-c]

      In in den nächsten Tagen gibt's auch einen all-in-one Docker Container fix und fertig eingerichtet mit Broker und GoogleTTS.
      Gruss,

      Stefan
      Zuletzt geändert von pfischi; 21.11.2016, 18:01.
      Sonos

      Kommentar


        Hallo Stefan,

        danke das war der Fehler. Habe ich überlesen.
        Kannst du mir sagen, wie ich den broker wieder per autostart starten kann?

        Bisher hatte ich ja immer in der rc.local:

        Code:
        su admin -c '/usr/local/bin/sonos_broker'
        jedoch funktioniert nicht:

        Code:
        su admin -c '/usr/local/bin/sonos_broker start'
        Gruß und danke Manuel

        Kommentar


          Zitat von manu241 Beitrag anzeigen
          Hallo Stefan,

          danke das war der Fehler. Habe ich überlesen.
          Kannst du mir sagen, wie ich den broker wieder per autostart starten kann?

          Bisher hatte ich ja immer in der rc.local:

          Code:
          su admin -c '/usr/local/bin/sonos_broker'
          jedoch funktioniert nicht:

          Code:
          su admin -c '/usr/local/bin/sonos_broker start'
          Gruß und danke Manuel
          Was für ein System setzt du ein? Hast du schon systemd? Dann baue ich dir später ein Skript.
          Sonos

          Kommentar


            Hallo Stefan,

            ich benutze ein Raspberry mit dem neuen SmarthomeNG-Image

            Kommentar


              So,

              ich habe dir mal eine Service-Datei für systemd gemacht (im Anhang)

              Die Datei selber muss du noch anpassen und bei
              Code:
              ExecStart=/path/to/broker/sonos_broker start
              ExecStop=/path/to/broker/sonos_broker stop
              den Pfad anpassen. Beim SmarthomeNG Image müsste dies
              Code:
              /usr/local/lib/python3.5/dist-packages/sonos_broker
              sein.


              Die angepasste Datei musst du mit
              Code:
              sudo cp sonos_broker.service /etc/systemd/system/
              ins systemd-Verzeichnis kopieren,


              Mit
              Code:
              sudo systemctl enable sonos_broker
              aktivierst du den Autostart.
              Code:
              sudo systemctl daemon-reload
              übernimmt die Änderungen.


              Code:
              sudo systemctl start sonos_broker
              Startet den Service manuell,


              Code:
              sudo systemctl stop sonos_broker
              stoppt ihn.


              Mit
              Code:
              sudo systemctl status sonos_broker
              siehst Du den aktuellen Status.


              Sollte so klappen, ist aber ein wenig Blindflug, da ich das Image nicht habe.


              Gruss,

              Stefan
              Angehängte Dateien
              Sonos

              Kommentar


                Hallo Stefan,

                ich habe deine Service-Datei angepasst. Allerdings habe ich nicht den Ordner:

                Code:
                 
                 /usr/local/lib/python3.5/dist-packages/sonos_broker
                dafür allerdings den:

                Code:
                /usr/local/lib/python3.5/site-packages/lib_sonos/
                Den rest habe ich dann so ausgeführt wie beschrieben. Allerdings bekomme ich diese Meldung:

                Code:
                admin@raspberrypi:~$ sudo systemctl status sonos_broker -l
                ● sonos_broker.service - Sonos Broker
                   Loaded: loaded (/etc/systemd/system/sonos_broker.service; enabled)
                   Active: failed (Result: start-limit) since Tue 2016-11-22 18:24:56 CET; 40s ago
                  Process: 985 ExecStop=/usr/local/lib/python3.5/site-packages/lib_sonos/sonos_broker stop (code=exited, status=203/EXEC)
                  Process: 975 ExecStart=/usr/local/lib/python3.5/site-packages/lib_sonos/sonos_broker start (code=exited, status=203/EXEC)
                 Main PID: 975 (code=exited, status=203/EXEC)
                
                Nov 22 18:24:55 raspberrypi systemd[1]: sonos_broker.service: control process exited, code=exited status=203
                Nov 22 18:24:55 raspberrypi systemd[1]: Unit sonos_broker.service entered failed state.
                Nov 22 18:24:56 raspberrypi systemd[1]: sonos_broker.service holdoff time over, scheduling restart.
                Nov 22 18:24:56 raspberrypi systemd[1]: Stopping Sonos Broker...
                Nov 22 18:24:56 raspberrypi systemd[1]: Starting Sonos Broker...
                Nov 22 18:24:56 raspberrypi systemd[1]: sonos_broker.service start request repeated too quickly, refusing to start.
                Nov 22 18:24:56 raspberrypi systemd[1]: Failed to start Sonos Broker.
                Nov 22 18:24:56 raspberrypi systemd[1]: Unit sonos_broker.service entered failed state.
                Kannst du mir damit noch helfen?

                Gruß MAnuel

                Kommentar


                  Kannst du mal im systemd-Script unter "[Service]" folgende Zeile hinzufügen?

                  Code:
                  Type=forking
                  Gruss,

                  Stefan

                  Sonos

                  Kommentar


                    Hallo Stefan,

                    danke für deinen Support.
                    Da bekomme ich dann:

                    Code:
                    admin@raspberrypi:~$ sudo systemctl status sonos_broker -l
                    ● sonos_broker.service - Sonos Broker
                       Loaded: loaded (/etc/systemd/system/sonos_broker.service; enabled)
                       Active: failed (Result: start-limit) since Tue 2016-11-22 19:39:34 CET; 2min 5s ago
                      Process: 1023 ExecStart=/usr/local/lib/python3.5/site-packages/lib_sonos/sonos_broker start (code=exited, status=203/EXEC)
                    
                    Nov 22 19:39:34 raspberrypi systemd[1]: Failed to start Sonos Broker.
                    Nov 22 19:39:34 raspberrypi systemd[1]: Unit sonos_broker.service entered failed state.
                    Nov 22 19:39:34 raspberrypi systemd[1]: sonos_broker.service holdoff time over, scheduling restart.
                    Nov 22 19:39:34 raspberrypi systemd[1]: Stopping Sonos Broker...
                    Nov 22 19:39:34 raspberrypi systemd[1]: Starting Sonos Broker...
                    Nov 22 19:39:34 raspberrypi systemd[1]: sonos_broker.service start request repeated too quickly, refusing to start.
                    Nov 22 19:39:34 raspberrypi systemd[1]: Failed to start Sonos Broker.
                    Nov 22 19:39:34 raspberrypi systemd[1]: Unit sonos_broker.service entered failed state.
                    Gruß und Danke Manuel

                    Kommentar


                      Zitat von manu241 Beitrag anzeigen
                      Hallo Stefan,

                      danke für deinen Support.
                      Da bekomme ich dann:

                      Code:
                      admin@raspberrypi:~$ sudo systemctl status sonos_broker -l
                      ● sonos_broker.service - Sonos Broker
                      Loaded: loaded (/etc/systemd/system/sonos_broker.service; enabled)
                      Active: failed (Result: start-limit) since Tue 2016-11-22 19:39:34 CET; 2min 5s ago
                      Process: 1023 ExecStart=/usr/local/lib/python3.5/site-packages/lib_sonos/sonos_broker start (code=exited, status=203/EXEC)
                      
                      Nov 22 19:39:34 raspberrypi systemd[1]: Failed to start Sonos Broker.
                      Nov 22 19:39:34 raspberrypi systemd[1]: Unit sonos_broker.service entered failed state.
                      Nov 22 19:39:34 raspberrypi systemd[1]: sonos_broker.service holdoff time over, scheduling restart.
                      Nov 22 19:39:34 raspberrypi systemd[1]: Stopping Sonos Broker...
                      Nov 22 19:39:34 raspberrypi systemd[1]: Starting Sonos Broker...
                      Nov 22 19:39:34 raspberrypi systemd[1]: sonos_broker.service start request repeated too quickly, refusing to start.
                      Nov 22 19:39:34 raspberrypi systemd[1]: Failed to start Sonos Broker.
                      Nov 22 19:39:34 raspberrypi systemd[1]: Unit sonos_broker.service entered failed state.
                      Gruß und Danke Manuel

                      Hi Manuel,

                      ich hab das ganze nochmal nachgestellt. Ich muss da auch nochmal ran. Hier meine funktionierendes systemd-Skript:

                      Code:
                      [Unit]
                      Description=Sonos Broker
                      
                      [Service]
                      Type=simple
                      User=pfischi
                      PIDFile=/tmp/sonos_broker.pid
                      ExecStart=/usr/local/bin/sonos_broker start -c /usr/local/bin/sonos_broker.cfg
                      ExecStop=/usr/local/bin/sonos_broker stop
                      RestartSec=10
                      
                      [Install]
                      WantedBy=default.target
                      Die Pfade müssten bei dir identisch sein. Nur den Nutzernamen musst du noch anpassen. Und nach jedem ändern des Skripts musst du noch ein
                      Code:
                      sudo systemctl enable sonos_broker.service
                      ausführen

                      Dann wie gehabt
                      Code:
                      sudo systemctl start sonos_broker.service

                      Gruss,

                      Stefan
                      Sonos

                      Kommentar


                        Hallo Stefan,

                        danke dir. Es läuft erstmal soweit. Nur wird mir kein Senderlogo mehr angezeigt.
                        Kannst du mir da ein Tipp geben, wie ich dieses Fehler eingrenzen kann?

                        Einen Fehler habe ich bei mir irgendwie noch immer:

                        wenn ich mit
                        Code:
                        sh.Bad.play_tunein('NDR 2 NDS')
                        den Radio Sender auswähle (ändere), dann übernimmt er diesen nicht. Er reagiert nicht drauf.

                        Zudem habe ich noch folgende Fehler im Log:

                        Code:
                        [LIST][*]2016-11-22 22:06:21 ERROR Main Error parsing sonos broker response![*]Error: 'SonosSpeaker' object has no attribute 'sonos_playlists'[*]2016-11-22 22:02:06 WARNING Main No broker url given, assuming current ip and default broker port: http://192.168.8.58:12900[/LIST]


                        Gruß Manuel
                        Zuletzt geändert von manu241; 22.11.2016, 22:17.

                        Kommentar


                          Zum Fehler: welche Plugin-Version setzt du ein und welche Broker Version? Am besten du hängst mal deine __ini__.py vom Plugin dran.

                          Zum Radio: Ist nur dieser Sender betroffen?

                          Album-Cover: Lass mal den Broker im Debug-Modus laufen, da müsste immer ein Wert album_art übertragen werden. Das ist die URL des Covers. Im Fehlerfall kannst du mir das Log des Brokers gerne mal schicken.

                          Gruss Stefan
                          Zuletzt geändert von pfischi; 23.11.2016, 00:06.
                          Sonos

                          Kommentar


                            Hallo Stefan,

                            danke für deinen tollen Support. Nun läuft es wie gewünscht.
                            Irgendwie habe ich eine alte Plugin Version genommen.

                            Warum das Cover nicht angezeigt wurde, weiß ich leider nicht. Auf jeden Fall läuft es nun :-)

                            Nochmals besten Dank

                            Gruß Manuel

                            PS: Dann kann ich mich nun an die Senderauswahl machen :-)

                            Kommentar


                              Zitat von manu241 Beitrag anzeigen
                              Hallo Stefan,

                              danke für deinen tollen Support. Nun läuft es wie gewünscht.
                              Irgendwie habe ich eine alte Plugin Version genommen.

                              Warum das Cover nicht angezeigt wurde, weiß ich leider nicht. Auf jeden Fall läuft es nun :-)

                              Nochmals besten Dank

                              Gruß Manuel

                              PS: Dann kann ich mich nun an die Senderauswahl machen :-)

                              Super.

                              Gruss,

                              Stefan
                              Sonos

                              Kommentar


                                Hmm, Stefan...

                                ich steh grad auf m Schlauch. Wie bekomm ich "pip3 install..." zum Laufen?
                                Code:
                                sudo: pip3: command not found
                                in ner ENV-Umgebung hab ich es... hab Python3.5.2 manuell nachinstalliert.

                                Danke und Grüße
                                Thorsten

                                Kommentar

                                Lädt...
                                X