Ankündigung

Einklappen
Keine Ankündigung bisher.

Sonos Anbindung

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

    Hallo,

    ich nutze SmartHomeNG 1.4.2 und smartVisu 2.8 und das aktuelle Sonos-Plugin. Das Ergebnis des widget aufrufs kann man im Bild sehen.
    Ich habe das Gefühl das ich irgendwo noch etwas eintragen muss.
    Ich habe im LogFile folgendes gefunden:
    WARNING sonos_discover_scheduler Sonos: rincon_949f3exxxxxxx: coordinator is empty

    Viele Grüße
    Christian
    You do not have permission to view this gallery.
    This gallery has 1 photos.
    Zuletzt geändert von Neuchr; 20.01.2018, 11:29.

    Kommentar


      Zitat von pfischi Beitrag anzeigen

      Welche Version setzt du von SmarthomeNG / Smartvisu und dem Plugin ein?

      Gruss,

      Stefan
      Hallo Stefan,

      ich benutzte die Version 2.9.

      Gruß Manuel

      Kommentar


        Zitat von Neuchr Beitrag anzeigen
        WARNING sonos_discover_scheduler Sonos: rincon_949f3exxxxxxx: coordinator is empty
        Die Warnung ist gerade beim Start nichts ungewöhnliches. Sollte dann aber nach einem weiteren Discover-Cycle nicht mehr kommen.
        Ich entwickle das Widget nur noch aktiv auf SmartVisu 2.9. Vielleicht kannst du ja mal testen, ob es damit klappt. Ansonsten brauch ich deine Items für Sonos und die entsprechende html-Seite deiner SmartVisu-Oberfläche.

        Gruss,

        Stefan

        Sonos

        Kommentar


          Zitat von manu241 Beitrag anzeigen

          Hallo Stefan,

          ich benutzte die Version 2.9.

          Gruß Manuel
          Ok, dann wurde da was geändert. Ich schau's mir an.

          Gruss,

          Stefan
          Sonos

          Kommentar


            OK,

            Die Warnung kommt kontinuierlich immer wieder.
            Die Items habe ich einfach komplett übernommen und die Sonos-ID eingetragen.
            Den Player rufe ich mit {{ sonos.player('Sonos_Kueche', 'MySonos.Kueche') }} auf.

            Gruss,

            Christian

            Code:
            MySonos:
              Kueche:
                sonos_uid: rincon_949f3e1b3fec01400
            
                is_initialized:
                  type: bool
                  sonos_recv: is_initialized
            
                volume:
                  type: num
                  sonos_recv: volume
                  sonos_send: volume
                  enforce_updates: true
            
                  group_command:
                    type: bool
                    value: false
                    sonos_attrib: group
            
                  max_volume:
                    type: num
                    value: -1
                    sonos_attrib: max_volume
            
            ........
            Code:
            {% extends "rooms.html" %}
            {% import "sonos.html" as sonos %}
            {% block content %}
            
             <h1><img class="icon" src='{{ icon0 }}audio_audio.svg' />Musik</h1>
            
            
             <div class="block">
              <div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
            
               <div data-role="collapsible" data-collapsed="false">
                <h3>Küche</h3>
            
                     {{ sonos.player('Sonos_Kueche', 'MySonos.Kueche') }}
            
               </div>
              </div>
             </div>

            Kommentar


              Zitat von Neuchr Beitrag anzeigen
              Die Warnung kommt kontinuierlich immer wieder.
              Wenn die Meldung dauernd kommt, dann stimmt da etwas nicht. Hast du die UUID nochmal überprüft? Kein Tippfehler?

              Du kannst mir auch gerne ein Log schicken. Bitte vorher den Debug-Logging-Modus für das Plugin aktivieren und SmarthomeNG neustarten. Danach 30min laufen lassen und mir das Log schicken.

              Gruss,

              Stefan
              Sonos

              Kommentar


                OK, wie schalte ich den das Debug ein, und wie kann ich z.B. von der SSH Session aus sh.MySonos.Kueche.mute(1) ausführen sollte er das nicht annehmen ich bekomme immer Syntaxfehler.

                Danke und Gruss,

                Christian

                Kommentar


                  Zitat von Neuchr Beitrag anzeigen
                  OK, wie schalte ich den das Debug ein, und wie kann ich z.B. von der SSH Session aus sh.MySonos.Kueche.mute(1) ausführen sollte er das nicht annehmen ich bekomme immer Syntaxfehler.

                  Danke und Gruss,

                  Christian
                  Den Logger kannst du in der Datei
                  Code:
                  logging.yaml
                  anpassen. Diese Datei findest du im etc-Ordner deiner SmarthomeNG-Installation.
                  Folgendes müsstest du eintragen bzw. unter dem Abschnitt "loggers" ergänzen:

                  Code:
                  loggers:
                      plugins.sonos:
                      level: DEBUG
                  Eventuell gibt es nur eine Datei
                  Code:
                  logging.yaml.default
                  . Die musst du dann nur nach
                  Code:
                  logging.yaml
                  kopieren/umbennen.

                  Die Items würde ich an deiner Stelle über das Backend-Plugin von SmarthomeNG testen. Über eine Weboberfläche kannst du wunderbar einfach einzelne Items testen. Im Log-Folder hast du dann die entsprechende Logdatei.

                  Link zum Backend


                  Gruss,

                  Stefan
                  Sonos

                  Kommentar


                    Habe die Datei angepasst und den smathome Dienst neu gestartet es kommt die Fehler-Meldung:


                    Code:
                    Job for smarthome.service failed because the control process exited with error code.
                    See "systemctl status smarthome.service" and "journalctl -xe" for Details.
                    Code:
                    â— smarthome.service - SmartHomeNG daemon
                       Loaded: loaded (/lib/systemd/system/smarthome.service; enabled; vendor preset: enabled)
                       Active: failed (Result: exit-code) since Sun 2018-01-21 15:41:01 CET; 3s ago
                      Process: 1879 ExecStart=/usr/bin/python3 /usr/local/smarthome/bin/smarthome.py (code=exited, status=1/FAILURE)
                     Main PID: 832
                    
                    Jan 21 15:41:00 SmartHomeNG python3[1879]:     ^ (line: 1)
                    Jan 21 15:41:00 SmartHomeNG python3[1879]: expected <block end>, but found '<block mapping start>'
                    Jan 21 15:41:00 SmartHomeNG python3[1879]:   in "<unicode string>", line 93, column 4:
                    Jan 21 15:41:00 SmartHomeNG python3[1879]:        plugins.sonos:
                    Jan 21 15:41:00 SmartHomeNG python3[1879]:        ^ (line: 93)
                    Jan 21 15:41:00 SmartHomeNG python3[1879]: ERROR: Invalid logging configuration in file 'logging.yaml'
                    Jan 21 15:41:01 SmartHomeNG systemd[1]: smarthome.service: Control process exited, code=exited status=1
                    Jan 21 15:41:01 SmartHomeNG systemd[1]: Failed to start SmartHomeNG daemon.
                    Jan 21 15:41:01 SmartHomeNG systemd[1]: smarthome.service: Unit entered failed state.
                    Jan 21 15:41:01 SmartHomeNG systemd[1]: smarthome.service: Failed with result 'exit-code'.
                    Code:
                    Jan 21 15:41:00 SmartHomeNG python3[1879]:   in "<unicode string>", line 93, column 4:
                    Jan 21 15:41:00 SmartHomeNG python3[1879]:        plugins.Sonos:
                    Jan 21 15:41:00 SmartHomeNG python3[1879]:        ^ (line: 93)
                    Jan 21 15:41:00 SmartHomeNG python3[1879]: ERROR: Invalid logging configuration in file 'logging.yaml'
                    Jan 21 15:41:01 SmartHomeNG systemd[1]: smarthome.service: Control process exited, code=exited status=1
                    Jan 21 15:41:01 SmartHomeNG systemd[1]: Failed to start SmartHomeNG daemon.
                    -- Subject: Unit smarthome.service has failed
                    -- Defined-By: systemd
                    -- Support: https://www.debian.org/support
                    --
                    -- Unit smarthome.service has failed.
                    --
                    -- The result is failed.
                    Jan 21 15:41:01 SmartHomeNG systemd[1]: smarthome.service: Unit entered failed state.
                    Jan 21 15:41:01 SmartHomeNG systemd[1]: smarthome.service: Failed with result 'exit-code'.
                    Jan 21 15:41:01 SmartHomeNG sudo[1873]: pam_unix(sudo:session): session closed for user root
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]: Exception in thread Thread-156:
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]: Traceback (most recent call last):
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:   File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:     self.run()
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:   File "/usr/local/lib/python3.5/dist-packages/soco/events.py", line 432, in run
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:     sub.renew()
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:   File "/usr/local/lib/python3.5/dist-packages/soco/events.py", line 538, in renew
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:     response.raise_for_status()
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:   File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 935, in raise_for_sta
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:     raise HTTPError(http_error_msg, response=self)
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]: requests.exceptions.HTTPError: 412 Client Error: Precondition Failed for url: http://192.168.0
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]: Exception in thread Thread-158:
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]: Traceback (most recent call last):
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:   File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:     self.run()
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:   File "/usr/local/lib/python3.5/dist-packages/soco/events.py", line 432, in run
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:     sub.renew()
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:   File "/usr/local/lib/python3.5/dist-packages/soco/events.py", line 538, in renew
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:     response.raise_for_status()
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:   File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 935, in raise_for_sta
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]:     raise HTTPError(http_error_msg, response=self)
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]: requests.exceptions.HTTPError: 412 Client Error: Precondition Failed for url: http://192.168.0
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]: 2018-01-21 15:41:53 WARNING  Thread-2     412 Client Error: Precondition Failed for url: http:
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]: 2018-01-21 15:41:53 WARNING  Thread-2     412 Client Error: Precondition Failed for url: http:
                    Jan 21 15:41:53 SmartHomeNG sonos-broker[475]: 2018-01-21 15:41:53 ERROR    Thread-1     Created data structures: [<DidlPlaylistContai (CUT)
                    Jan 21 15:41:54 SmartHomeNG sonos-broker[475]: 2018-01-21 15:41:54 ERROR    Thread-1     Created data structures: [<DidlPlaylistContai (CUT)
                    Danke und Gruss,
                    Christian

                    Kommentar


                      Also bei dir ist einiges im argen

                      Zum einen ist deine logging.yaml falsch formatiert. Unter dem Link (mein Dropbox-Account) findest du eine die funktionieren müsste.

                      Aber was noch wichtiger ist: du setzt eine alte Version des Plugins ein. Den sonos-broker gibt es schon ewig nicht mehr. Bitte stell sicher, das du SmarthomeNG-Version 1.4 benutzt und das Sonos-Plugin 1.4.3 (im develop-Plugin-Branch von SmarthomeNG). Folgendes müsstest du in der Datei __init__.py unter /usr/local/smarthome/plugins/sonos" u.a. finden:

                      Code:
                      class Sonos(SmartPlugin):
                          ALLOW_MULTIINSTANCE = False
                          PLUGIN_VERSION = "1.4.3
                      (relativ weit unten)

                      Am besten wir bringen erstmal dein Logging in Ordnung, danach den Rest.

                      Gruss,

                      Stefan
                      Sonos

                      Kommentar


                        Das ist super. Das Logging läuft jetzt.
                        Laut Backend: SmartHomeNG Version: 1.4.2.master
                        Sonos 1.4.2 wobei in der Datei ....\sonos\__init.py__ 1.4.3 steht

                        Gruss,

                        Christian

                        Kommentar


                          Zitat von Neuchr Beitrag anzeigen
                          Das ist super. Das Logging läuft jetzt.
                          Laut Backend: SmartHomeNG Version: 1.4.2.master
                          Sonos 1.4.2 wobei in der Datei ....\sonos\__init.py__ 1.4.3 steht

                          Gruss,

                          Christian
                          Ok, dann brauche ich deine Logs (bitte komplett) und deine plugin.yam (im etc-Ordner, nur den Sonos-Teil).

                          Gruss,

                          Stefan
                          Sonos

                          Kommentar


                            Anbei das Logfile und die drei Zeilen der plugin.yaml

                            Danke und Gruß

                            Christian
                            Angehängte Dateien

                            Kommentar


                              Habe jetzt die plugin.yaml im plugin\sonos\ Verzeichnis ausgetauscht in der Stand Version 1.4.2 habe jetzt die 1.43 drin. In der __init__.py steht 1.4.3. Anschließend habe ich einmal einen reboot durchgeführt. Im Backend unter den Plugins fehlt jetzt bei Sonos aber die Versions Nr. sowie das Icon vorne in der Zeile. Ist es sinnvoll das Plugin einmal komplett neu einzuspielen? Wie mache ich das?

                              Kommentar


                                Also irgend etwas stimmt überhaupt nicht bei deiner Installation. Wenn du SmarthomeNG und das Plugin mit der neuesten Version laufen lässt, dürfte es keine Ausgabe "sonos-broker" geben. Ich vermute, da läuft noch ein andere Prozess auf deinem System. Hast du evetuell schonmal eine ältere Version eingesetzt?

                                1. Welches System setzt du ein? Ein fertiges Image auf einem Raspberry oder was anderes?
                                2. Ich brauche das Logfile aus
                                Code:
                                /usr/local/smarthome/log
                                3. Die Ausgabe von
                                Code:
                                ps aux
                                wäre hilfreich.

                                Wenn ich mein SmarthomeNG-System einrichte, dann mache ich das manuell direkt aus Github. Dies hat den Vorteil, das ich automatisch alle Updates bekomme. Folgende Schritte sind nötig (am besten du speicherst vorher deine plugin.yaml und die Dateien aus dem items-Ordner:

                                Code:
                                cd /usr/local/
                                git clone https://github.com/smarthomeNG/smarthome.git
                                cd /usr/local/smarthome && git checkout origin/develop
                                git clone https://github.com/smarthomeNG/plugins.git && git checkout origin/develop
                                pip3 install -r /usr/local/smarthome/requirements/all.txt
                                Die git-Anweisung lassen sich hier auch zusammenfassen (so evtl. aber besser sichtbar was gemeint ist). Eventuell brauchst du bei den Befehlen noch root-Rechte (entweder als "root"-User einloggen oder per "sudo")

                                In den jeweiligen Verzeichnissen smarthome und dessen Unterverzeichnis plugins, wird durch den Befehl
                                Code:
                                git pull
                                alle Änderungen / Updates automatisch gezogen. Wenn du nicht den "develop"-Branch möchtest, kannst du entweder den "checkout" Befehl von oben jeweils weglassen, oder einfach in den beiden Verzeichnissen
                                Code:
                                git checkout origin/master
                                ausführen. Das geht hier sogar on-the-fly. Beim Switch werden immer die Konfigurationen für den jeweilgen Git-Zweig geladen, d.h. änderts du etwas für den "develop-Branch", dann ist dieser nicht für den "Master-Zweig" vorhanden. Dort musst du bei Bedarf die Änderung nachtragen. Da kannst du einfach ein wenig rumspielen. Zum testen würde ich dich bitten, den dev-Zweig zu nehmen.

                                Gruss,
                                Stefan



                                Zuletzt geändert von pfischi; 21.01.2018, 18:07.
                                Sonos

                                Kommentar

                                Lädt...
                                X