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
Ankündigung
Einklappen
Keine Ankündigung bisher.
Sonos Anbindung
Einklappen
X
-
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 mitden Radio Sender auswähle (ändere), dann übernimmt er diesen nicht. Er reagiert nicht drauf.Code:sh.Bad.play_tunein('NDR 2 NDS')
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ß ManuelZuletzt geändert von manu241; 22.11.2016, 22:17.
Einen Kommentar schreiben:
-
Zitat von manu241 Beitrag anzeigenHallo Stefan,
danke für deinen Support.
Da bekomme ich dann:
Gruß und Danke ManuelCode: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.
Hi Manuel,
ich hab das ganze nochmal nachgestellt. Ich muss da auch nochmal ran. Hier meine funktionierendes systemd-Skript:
Die Pfade müssten bei dir identisch sein. Nur den Nutzernamen musst du noch anpassen. Und nach jedem ändern des Skripts musst du noch einCode:[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
ausführenCode:sudo systemctl enable sonos_broker.service
Dann wie gehabt
Code:sudo systemctl start sonos_broker.service
Gruss,
Stefan
Einen Kommentar schreiben:
-
Hallo Stefan,
danke für deinen Support.
Da bekomme ich dann:
Gruß und Danke ManuelCode: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.
Einen Kommentar schreiben:
-
Kannst du mal im systemd-Script unter "[Service]" folgende Zeile hinzufügen?
Gruss,Code:Type=forking
Stefan
Einen Kommentar schreiben:
-
Hallo Stefan,
ich habe deine Service-Datei angepasst. Allerdings habe ich nicht den Ordner:
dafür allerdings den:Code:/usr/local/lib/python3.5/dist-packages/sonos_broker
Den rest habe ich dann so ausgeführt wie beschrieben. Allerdings bekomme ich diese Meldung:Code:/usr/local/lib/python3.5/site-packages/lib_sonos/
Kannst du mir damit noch helfen?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.
Gruß MAnuel
Einen Kommentar schreiben:
-
So,
ich habe dir mal eine Service-Datei für systemd gemacht (im Anhang)
Die Datei selber muss du noch anpassen und bei
den Pfad anpassen. Beim SmarthomeNG Image müsste diesCode:ExecStart=/path/to/broker/sonos_broker start ExecStop=/path/to/broker/sonos_broker stop
sein.Code:/usr/local/lib/python3.5/dist-packages/sonos_broker
Die angepasste Datei musst du mit
ins systemd-Verzeichnis kopieren,Code:sudo cp sonos_broker.service /etc/systemd/system/
Mit
aktivierst du den Autostart.Code:sudo systemctl enable sonos_broker
übernimmt die Änderungen.Code:sudo systemctl daemon-reload
Startet den Service manuell,Code:sudo systemctl start sonos_broker
stoppt ihn.Code:sudo systemctl stop sonos_broker
Mit
siehst Du den aktuellen Status.Code:sudo systemctl status sonos_broker
Sollte so klappen, ist aber ein wenig Blindflug, da ich das Image nicht habe.
Gruss,
StefanAngehängte Dateien
Einen Kommentar schreiben:
-
Hallo Stefan,
ich benutze ein Raspberry mit dem neuen SmarthomeNG-Image
Einen Kommentar schreiben:
-
Was für ein System setzt du ein? Hast du schon systemd? Dann baue ich dir später ein Skript.Zitat von manu241 Beitrag anzeigenHallo 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:
jedoch funktioniert nicht:Code:su admin -c '/usr/local/bin/sonos_broker'
Gruß und danke ManuelCode:su admin -c '/usr/local/bin/sonos_broker start'
Einen Kommentar schreiben:
-
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:
jedoch funktioniert nicht:Code:su admin -c '/usr/local/bin/sonos_broker'
Gruß und danke ManuelCode:su admin -c '/usr/local/bin/sonos_broker start'
Einen Kommentar schreiben:
-
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,
StefanZuletzt geändert von pfischi; 21.11.2016, 18:01.
Einen Kommentar schreiben:
-
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]Gruß ManuelCode:(#)/usr/local/bin:$ chmod +x sonos_broker (#)/usr/local/bin:$ ./sonos_broker Unknown command!
Zuletzt geändert von manu241; 21.11.2016, 16:16.
Einen Kommentar schreiben:
-
Ich mach morgen nochmal ein kleines Update fertig. Ich habe doch tatsächlich den Albumtitel vergessen
Gruss,
Stefan
Einen Kommentar schreiben:
-
Hallo,
das Problem hatte ich auch unter Python3.2. Als Lösung einfach die beiden U Buchstaben entfernen, sprich:
Code:illegal_xml_re = re.compile('[%s]' % ''.join(illegal_ranges))
Damit funktioniert es. Danke schonmal an Stefan für die tolle Arbeit. Ich teste noch und gebe nochmal Rückmeldung.
Grüße
Alex
Einen Kommentar schreiben:


Einen Kommentar schreiben: