Ankündigung

Einklappen
Keine Ankündigung bisher.

Sonos Anbindung

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

    Zitat von manu241 Beitrag anzeigen
    Was mache ich da falsch?

    Gruß Manuel
    Ich vermute, das bereits eine Instanz des Brokers läuft. Schau mal in der Prozessliste nach. Ansonsten ändere mal den Port in den Settings.
    Nimm auch mal bitte die Develop-Variante vom Broker, aktuell Version v0.8b1.

    Gruss,

    Stefan
    Sonos

    Kommentar


      Hallo Stefan,

      danke für die Info. Werde ich am Wochenende nochmal in Angriff nehmen und testen.

      Gruß und danke

      Manuel

      Kommentar


        Hallo Stefan,

        ich habe mich heute mal wieder an das Sonos-Plugin gemacht. Nur leider habe ich immer noch Probleme, die ich alleine nicht lösen kann.

        Folgende Fehlermeldung bekomme ich:

        Code:
         sonos_broker -l
        Scanning for Sonos speaker in the network ...
        
        Found 1 speaker in the network.
        
        Traceback (most recent call last):
          File "/usr/local/bin/sonos_broker", line 330, in scan
            model = SonosServerService.get_model_name(speaker.ip_address)
        AttributeError: type object 'SonosServerService' has no attribute 'get_model_name'
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/usr/local/bin/sonos_broker", line 354, in <module>
            scan()
          File "/usr/local/bin/sonos_broker", line 336, in scan
            except ConnectionError:
        NameError: global name 'ConnectionError' is not defined
        und bei : ./sonos_cmd

        Code:
        root@smarthome.local:bin# ./sonos_cmd
        Connecting to Sonos broker ...
        Could not connect to Sonos broker 127.0.0.1:12900.
        Is the Sonos Broker running?
        Der Sonos_broker sollte laufen. Ich habe ihn vorher mit sonos_broker -s gestoppt und danach mit sonos_broker gestartet.

        Was könnte ich noch versuchen. Habe die Version aus dem develop.

        Gruß Manuel

        Kommentar


          Zitat von manu241 Beitrag anzeigen

          Der Sonos_broker sollte laufen. Ich habe ihn vorher mit sonos_broker -s gestoppt und danach mit sonos_broker gestartet.

          Was könnte ich noch versuchen. Habe die Version aus dem develop.

          Gruß Manuel
          Hallo Manuel,

          danke für den Bug-Report. Tatsächlich ist durch das Kommando

          sonos_broker -l
          der Broker abgeschmiert. Da war ein Fehler drin. Ich habe eine neue dev-Version 0.8b2 gemacht, müsste nun gehen.

          Sonos-Broker v0.8b2


          Gruss,

          Stefan
          Sonos

          Kommentar


            Hallo Stefan,

            danke für deine Hilfe. Damit habe ich das erste Problem beheben können.
            Jedoch wird bei "./sonos_cmd" immer noch keine Instanz sonos_broker gefunden.

            Code:
            /usr/local/bin$ ./sonos_cmd
            Connecting to Sonos broker ...
            Could not connect to Sonos broker 127.0.0.1:12900.
            Is the Sonos Broker running?
            
            [FONT=arial][/FONT]


            Gruß Manuel


            Kommentar


              Zitat von manu241 Beitrag anzeigen
              Hallo Stefan,

              danke für deine Hilfe. Damit habe ich das erste Problem beheben können.
              Jedoch wird bei "./sonos_cmd" immer noch keine Instanz sonos_broker gefunden.

              Code:
              /usr/local/bin$ ./sonos_cmd
              Connecting to Sonos broker ...
              Could not connect to Sonos broker 127.0.0.1:12900.
              Is the Sonos Broker running?
              
              [FONT=arial][/FONT]


              Gruß Manuel

              Hast du den Broker gestartet? Läuft der Broker auf dem gleichen Rechner, wo du auch sonos_cmd ausführst? Wenn nicht, kannst du mal
              Code:
              ./sonos_cmd -h
              aufrufen, die Hilfe sollte selbsterklärend sein.

              Gruss,

              Stefan
              Sonos

              Kommentar


                Hallo Stefan,

                ja, beides läuft auf meinem Raspberry (Smarthome.py Image). Wenn ich nun ./sonos_cmd -s 192.168.8.78 eingebe. Dann findet er den Sonos_broker.
                Wird nur der Broker für das Plugin verwendet?

                Gruß Manuel

                Kommentar


                  Zitat von manu241 Beitrag anzeigen
                  Hallo Stefan,

                  ja, beides läuft auf meinem Raspberry (Smarthome.py Image). Wenn ich nun ./sonos_cmd -s 192.168.8.78 eingebe. Dann findet er den Sonos_broker.
                  Wird nur der Broker für das Plugin verwendet?

                  Gruß Manuel
                  Ja, die sonos_cmd ist zum Steuern der Lautsprecher per Kommandozeile und zum Testen der Funktionalität, für sh.py aber nicht notwendig.

                  Gruss,

                  Stefan
                  Sonos

                  Kommentar


                    Hallo Stefan,

                    nun habe ich es soweit am laufen. Nun habe ich nur noch ein Problem mit play_snippet und play_tts.
                    wenn ich
                    Code:
                    sh.Kinderzimmer.play_snippet('http://192.168.8.78/sonos/test.mp3')
                    ausführe, wird die Sprachansage test.mp3 abgespielt.
                    DIese habe ich zuvor in den Ordner var/www/sonos geschoben. Nach der Ansage fängt die Musik erst nach ca 1min wieder an zu spielen.

                    Bei play_tts wird keine Ansage gemacht. Diese führe ich so aus:
                    Code:
                    sh.Kinderzimmer.play_tts('Test neu')
                    .
                    Ich sehe, dass im Verzeichnis eine mp3-Datei angelegt wird. Diese allerdings als Besitzer root. Die Datei hat auch nur 0kB
                    Ich denke da ist das Problem zu suchen.

                    Gruß Manuel

                    Kommentar


                      Hi, eine Frage habe ich noch zum Starten vom Broker. Wie macht ihr das mit dem Autostart nach dem Neustart?
                      Ich habe das einfach so in die rc.local eingefügt. Reicht das so aus?

                      Code:
                      su admin -c '/usr/local/bin/sonos_broker'
                      
                      exit 0
                      Gruß Manuel

                      Kommentar


                        Hi, hat noch jemand eine Idee, die ich testen könnte, damit tts funktioniert?

                        gruß Manuel

                        Kommentar


                          Kannst du mir mal deine Einstellungen für TTS posten ( also die Konfig-Datei vom Broker?)

                          Gruss,

                          Stefan
                          Sonos

                          Kommentar


                            Hallo Stefan,

                            hier die Konfig:

                            Code:
                            #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/log.txt
                            
                            ########################################################################
                            [sonos_broker]
                            
                            #Binding host address. Default: 0.0.0.0
                            host = 192.168.8.78
                            
                            #Server port. Default: 12900
                            port = 12900
                            
                            ########################################################################
                            [google_tts]
                            
                            #Enabled Google-Text-To-Speech. Default: false
                            enabled = true
                            
                            #Select the path where sonos broker will save the converted mp3 files
                            #Before a web request is made, sonos broker will check, if the requested file already exists.
                            #Possible paths could be: local webserver, mounted smb share ...
                            
                            save_path = /var/www/sonos
                            
                            #Specifies the destination url which sonos broker refers to the sonos speakers. This url must point to 'save_path'.
                            server_url = http://192.168.8.78/sonos
                            
                            #Maximum file size quota in megabytes. Up to this size, sonos broker will save files to 'save_path'.
                            #Default: 100
                            #quota = 200
                            Danke für deine Unterstützung

                            Gruß Manuel

                            Kommentar


                              Schonmal danke für Konfig. Sieht soweit gut aus. Stell mal bitte das Loglevel auf Debug und versuche mal, TTS abzuspielen. Die Logdatei kannst du mir mal schicken. Ein 'ls -la /var/www' wäre auch noch interessant.

                              Gruss,

                              Stefan
                              Sonos

                              Kommentar


                                Hallo Stefan,

                                hier der Auzug von "ls -la /var/www"

                                Code:
                                ls -la /var/www
                                total 20
                                drwxr-xr-x  4 admin admin 4096 Jun 22 06:18 .
                                drwxr-xr-x 13 root  root  4096 May 10  2013 ..
                                -rw-r--r--  1 root  root  3585 Jun 21 12:42 index.lighttpd.html
                                drwxr-xr-x 15 admin admin 4096 Nov 16  2013 smartvisu
                                drwxrwxrwx  2 admin admin 4096 Jun 22 10:02 sonos
                                sh.Kinderzimmer.play_tts('test')

                                Im Logfile steht folgendes:

                                Code:
                                2016-06-26 23:03:19 ERROR    Thread-13279 UPnP Error 701 received: Transition not available from 192.168.8.67
                                Traceback (most recent call last):
                                  File "/usr/local/lib/python3.2/dist-packages/soco/services.py", line 398, in send_command
                                    self.handle_upnp_error(response.text)
                                  File "/usr/local/lib/python3.2/dist-packages/soco/services.py", line 459, in handle_upnp_error
                                    error_xml=xml_error
                                soco.exceptions.SoCoUPnPException: UPnP Error 701 received: Transition not available from 192.168.8.67
                                2016-06-26 23:03:36 ERROR    Thread-13293 UPnP Error 701 received: Transition not available from 192.168.8.67
                                Traceback (most recent call last):
                                  File "/usr/local/lib/python3.2/dist-packages/soco/services.py", line 398, in send_command
                                    self.handle_upnp_error(response.text)
                                  File "/usr/local/lib/python3.2/dist-packages/soco/services.py", line 459, in handle_upnp_error
                                    error_xml=xml_error
                                soco.exceptions.SoCoUPnPException: UPnP Error 701 received: Transition not available from 192.168.8.67
                                2016-06-26 23:06:12 WARNING  Thread-13431 FORCE_STREAM_MOD_OPTION for play_tts is deprecated and ignored.
                                2016-06-26 23:07:23 WARNING  Thread-13505 FORCE_STREAM_MOD_OPTION for play_tts is deprecated and ignored.
                                Gruß und danke Manuel
                                Zuletzt geändert von manu241; 27.06.2016, 00:12.

                                Kommentar

                                Lädt...
                                X