Sonos: Neue Version vom 20.6.2017

Begonnen von Reinerlein, 20 Juni 2017, 14:02:19

Vorheriges Thema - Nächstes Thema

Reinerlein

Hallo zusammen,

ich stehe echt auf dem Schlauch, und kann mir diese fehlenden "readingsBeginUpdate"-Anweisungen nicht erklären.

Natürlich stehen sie drin, müssen aber, wie alles andere auch, erst per Netzwerkkommunikation zum Fhem-Teil des Moduls übertragen werden.
Was ich nicht verstehe, ist, dass der folgende Bulkupdate sauber (ohne auch nur ein fehlerhaftes Zeichen zu Beginn) ankommt, das vorhergehende BeginUpdate aber gar nicht. Wenn nur Teile ankommen würden, würde es eine entsprechende Fehlermeldung im Log geben, dass da ein Befehl gekommen ist, der nicht identifiziert werden konnte.

Bei mir ist das z.B. noch nie aufgetreten, weder auf meinen Test-/Entwicklungssystem (enthält nur Sonos, läuft unter Windows 2003), noch auf meinem Produktivsystem (enthält natürlich alles von mir, läuft auf einem aktuellen Raspberry Pi 3).
Also irgendwas muss da stören, und es ist nicht auszuschließen, dass da auch andere Module Einfluß haben können.

Da stellt sich die allgemeine Frage, wie reproduzierbar der Fehler ist, und ob man bis dahin nicht mit einem 5er Log mal sehen können müsste, was um den Fehler herum so auf den Netzwerkschnittstellen passiert ist...

Sorry, aber dann war die Umstellung der Mechanik für dieses Problem keine Lösung... Ich werde es trotzdem drin lassen, da es deutlich Ressourcenschonender ist (es wird keine neue Verbindung aufgebaut, und nur wenn lange nichts auf der Leitung passiert ist, wird eine Reaktion vom SubProzess angefordert).
Wir sind also immer noch auf der Suche nach der Ursache dieser Übertragungsverluste...

Grüße
Reiner

P.S.: Zu den Problemen nach dem Löschen der Sonos-Komponenten: Bitte immer erst den SubProzess beenden, und dann die Fhem-Sonos-Komponenten löschen. Also am Sonos-Device "disable" setzen und kurz warten. Die Fehler kommen, wenn der SubProzess noch davon ausgeht, bestimmte Playerdevices (oder auch das Hauptdevice) verwenden zu können, diese aber gar nicht mehr da sind (und in diesem Fall dann auch nicht gefunden werden können).

fhem-challenge

Hallo Zusammen,

seit einigen Tage stehen alle meine Sonos'Player ganz unmotiviert wieder auf "Player disappeared" ... sind aber natürlich im Netz erreichbar und Spielen auch (abseits von FHEM).


Das nach einem Start von FHEM die Player "disappeared" sind, kenne ich ja schon länger, da mache ich ein schlichtes "rescanNetwork" am Sonos selbst (nach FHEM restart), was dazu führt, dass die Player wieder da sind.


Aber das die Player nun nicht deterministisch am Tage plötzlich nicht erreichbar sind, ist neu.

Was mag das sein ?


Viele Grüße!

Andreas

Jamo

#32
Hallo Reiner,
ich denke (evtl sind in einigen Fällen -> bei mir ist es so) die Funksteckdosen für die Player das Problem mit den Fehlermeldungen. Und zwar in dem Fall, dass das Modul 'Sonos' zusammen mit den Funksteckdosen 'enabled' und 'disabled' wird.
Ich habe 6 Sonos Play:1, 2 Stereopärchen, und 2 einzelne Play:1, alle über Funksteckdosen ein- und ausschaltbar.

Alle Fehlermeldungen treten bei mir nur dann auf, wenn ich das Modul Sonos schon zu dem Zeitpukt 'enable', zu dem ich auch die Funksteckdosen für die Player einschalte, also wo die Player selber noch booten und vom Sonos Device noch gar nicht gefunden werden können.

Alle Fehlermeldungen verschwinden, wenn ich dem RebootSonosDOIF ein wait attribut hinzufügt, also define RebootSonosDOIF DOIF ([FunksteckerSonos:state] eq "on") (deleteattr Sonos disable,save) DOELSEIF ([FunksteckerSonos:state] eq "off") (attr Sonos disable 1,save) DOELSE()
attr   RebootSonosDOIF devStateIcon cmd_1:ios-on-green:cmd_2 cmd_2:ios-on-red:cmd_1
attr   RebootSonosDOIF group SCHALTER
attr   RebootSonosDOIF room Sonos
attr   RebootSonosDOIF wait 72:0


Dann passiert folgendes:
1) Die Funksteckdosen für die Player werden zum Zeitpunkt '0' mit [FunksteckerSonos:state] eq "on" eingeschaltet
    Es dauert bei mir etwa 75 - 80 Sekunden, bis der letzte Play:1 am Netz ist
2) nach 72 Sekunden wird das module Sonos 'enabled' über (deleteattr Sonos disable,save)
    nach weiteren ungefähr 8 Sekunden (default) wird bei mir der Sonos Subprozess gestartet
Zu dem Zeitpunkt nach 80 Sekunden sind dann aber auch alle Player schon verfügbar.

Ich habe es jetzt etwa 10 mal reproduzierbar gemacht, wenn ich das wait auf '0' setzte oder lösche treten immer die besagten Fehlermeldungen auf. (attr   RebootSonosDOIF wait 0:0).

Zur Info, ich mache ein:
define Sonos_Ready_p notify (Sonos_BOOST|Sonos_Bad|Sonos_Flur|Sonos_Kueche|Sonos_Kueche_RF|Sonos_Schlaf|Sonos_Schlaf_RF):presence:.appeared {
  Log(2,"$NAME: Event: $EVENT");
  if (ReadingsVal("Sonos_Kueche","presence","nA")    eq "appeared" &&
      ReadingsVal("Sonos_Kueche_RF","presence","nA") eq "appeared" &&
      ReadingsVal("Sonos_Bad","presence","nA")       eq "appeared" &&
      ReadingsVal("Sonos_Flur","presence","nA")      eq "appeared" &&
      ReadingsVal("Sonos_BOOST","presence","nA")     eq "appeared" &&
      ReadingsVal("Sonos_Schlaf","presence","nA")    eq "appeared" &&
      ReadingsVal("Sonos_Schlaf_RF","presence","nA") eq "appeared") {
      fhem("set Sonos Groups [Sonos_Schlaf,Sonos_Kueche,Sonos_Flur,Sonos_Bad];set Sonos_Flur Volume 6;
            set Sonos_Schlaf,Sonos_Kueche,Sonos_Bad Volume 4;set Sonos_Schlaf SnapshotGroupVolume;
            set Sonos Mute 0;set Sonos_Schlaf GroupMute 0;set Sonos_Schlaf StartFavourite /(?i)ANTENNE.*/ ");
  }
}


Damit dauert die Erkennung aller 6 Player + Boost etwa 7 sekunden:
2017.06.26 23:07:17 2: Sonos_Flur: Event: presence: appeared
2017.06.26 23:07:18 2: Sonos_Schlaf: Event: presence: appeared
2017.06.26 23:07:20 2: Sonos_Bad: Event: presence: appeared
2017.06.26 23:07:20 2: Sonos_Kueche: Event: presence: appeared
2017.06.26 23:07:22 2: Sonos_Schlaf_RF: Event: presence: appeared
2017.06.26 23:07:23 2: Sonos_BOOST: Event: presence: appeared
2017.06.26 23:07:24 2: Sonos_Kueche_RF: Event: presence: appeared


Gruss!
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/ConbeeII, FB, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack

Fixel2012

Ich musste trotz verbose 0 und eigentlich bei mir funktionierendem Sonos Modul leider auch mehrere Fehlermeldungen im Log feststellen.
2017.06.26 20:01:02 1: readingsUpdate(Sonos,MusicServicesList,{'231' => {'Name' => 'Wolfgang's Music','Capabilities' => '537153','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/59143/59143-400x400.png','Resolution' => '640','PromoText' => 'The world's largest collection of live music recordings. Thousands of concerts by legendary artists across all genres.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/59143/59143-72x72.png','SMAPI' => 'https://moapi.wolfgangs.com/ws/wolfgangs.asmx','ResolutionSubstitution' => '640','ServiceType' => '59143'},'20' => {'Name' => 'WiMP','Capabilities' => '2579','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/38663/38663-400x400.png','Resolution' => '640','PromoText' => '','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/38663/38663-72x72.png','SMAPI' => 'https://sonos.tidalhifi.com/sonos-wimp','ResolutionSubstitution' => '640x640.jpg','ServiceType' => '38663'},'230' => {'Name' => 'NTS Radio','Capabilities' => '512','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/58887/58887-400x400.png','Resolution' => '1000','PromoText' => 'Kostenloser Live-Radio von den besten DJs der Welt','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/58887/58887-72x72.png','SMAPI' => 'https://www.nts.live/smapi','ResolutionSubstitution' => '/1000x1000/','ServiceType' => '58887'},'174' => {'Name' => 'TIDAL','Capabilities' => '2579','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/47111/47111-400x400.png','Resolution' => '640','PromoText' => '','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/47111/47111-72x72.png','SMAPI' => 'https://sonos.tidalhifi.com/sonos','ResolutionSubstitution' => '640x640.jpg','ServiceType' => '47111'},'159' => {'Name' => 'Groove','Capabilities' => '35347','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/44551/44551-400x400.png','Resolution' => '1500','PromoText' => 'Willkommen bei Groove!','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/44551/44551-72x72.png','SMAPI' => 'https://sonos.auth.music.microsoft.com/api','ResolutionSubstitution' => '/image?w=1500&h=1500&','ServiceType' => '44551'},'144' => {'Name' => 'Calm Radio','Capabilities' => '512','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/38407/38407-400x400.png','Resolution' => '600','PromoText' => 'Calm Radio hat eine riesige Auswahl an Kanälen in jedem Stil. Mit einem kostenlosen Calm Radio-Konto oder zum Kauf einer Low-Cost-Mitgliedschaft für HD-Qualität und ohne Unterbrechungen. Über 200 Premium-Musikkanäle für die Mitglieder in HD-Audio-Qualität aus Pop, Rock, Akustik, Klassik, Ambient, Meditation, Entspannung, Weltmusik , Latin, Jazz, Atmosphärisch Kanäle, Solo Piano, Solo-Gitarre und viele mehr.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/38407/38407-72x72.png','SMAPI' => 'https://api.calmradio.com/sonos/','ResolutionSubstitution' => '_600.jpg','ServiceType' => '38407'},'164' => {'Name' => 'Saavn','Capabilities' => '12865','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/42759/42759-400x400.png','Resolution' => '500','PromoText' => 'Saavn for Sonos. The best Bollywood and Indian music listening experience with over a million tracks.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/42759/42759-72x72.png','SMAPI' => 'https://www.saavn.com/apps/sonos/SonosAPI.php','ResolutionSubstitution' => '500x500.jpg','ServiceType' => '42759'},'221' => {'Name' => 'LivePhish+','Capabilities' => '6675','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/56583/56583-400x400.png','Resolution' => undef,'PromoText' => 'Die personalisierte Musikerlebnis auf der Grundlage Ihrer eigenen einzigartigen Geschmack jetzt Sonos','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/56583/56583-72x72.png','SMAPI' => 'https://sonos.nugs.net/soap/livephish','ResolutionSubstitution' => undef,'ServiceType' => '56583'},'203' => {'Name' => 'Napster','Capabilities' => '595','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/51975/51975-400x400.png','Resolution' => '1500','PromoText' => 'Napster bietet dir Millionen Songs, tausende Hörbücher, exklusive Playlists und redaktionelle Empfehlungen von unseren Experten.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/51975/51975-72x72.png','SMAPI' => 'https://sonosapi-napster.rhapsody.com/smapi','ResolutionSubstitution' => '1500x1500.jpg','ServiceType' => '51975'},'151' => {'Name' => 'Google Play Music','Capabilities' => '98899','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/48391/48391-400x400.png','Resolution' => undef,'PromoText' => '','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/48391/48391-72x72.png','SMAPI' => 'https://mclients.googleapis.com/music/sonos/wsf/smapi','ResolutionSubstitution' => undef,'ServiceType' => '48391'},'218' => {'Name' => 'Soundsuit.fm','Capabilities' => '512','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/55815/55815-400x400.png','Resolution' => undef,'PromoText' => 'Soundsuit – maßgeschneideiderte Musik für Ihren Laden oder Restaurant. Legal und mühelos. Richten Sie Ihr Konto in Sekunden ein. Und los!','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/55815/55815-72x72.png','SMAPI' => 'https://soundsuit.fm/smapi','ResolutionSubstitution' => undef,'ServiceType' => '55815'},'150' => {'Name' => 'RUSC','Capabilities' => '512','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/39431/39431-400x400.png','Resolution' => undef,'PromoText' => 'In RUSC Ihrem Sonos-System und genießen Sie tausende von klassischen Radiosendungen aus den 1930er Jahren, 40er und 50er Jahre.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/39431/39431-72x72.png','SMAPI' => 'https://www.rusc.com/sonos.asmx','ResolutionSubstitution' => undef,'ServiceType' => '39431'},'195' => {'Name' => 'JUKE','Capabilities' => '2579','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/46343/46343-400x400.png','Resolution' => '1500','PromoText' => 'JUKE! Du kannst.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/46343/46343-72x72.png','SMAPI' => 'https://360-smapi.api.247e.com/musicopen.svc','ResolutionSubstitution' => '/1500x1500','ServiceType' => '46343'},'157' => {'Name' => 'Bandcamp','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/40199/40199-400x400.png','Resolution' => undef,'PromoText' => '','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/40199/40199-72x72.png','SMAPI' => 'https://sns.bandcamp.com/api/sonos/2/sonos_api','ResolutionSubstitution' => undef,'ServiceType' => '40199'},'163' => {'Name' => 'Spreaker','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/41991/41991-400x400.png','Resolution' => '200','PromoText' => 'Spreaker is a web and mobile platform that allows listeners to explore broadcasts, podcasts, and original music created by its community of users.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/41991/41991-72x72.png','SMAPI' => 'https://sonos.spreaker.com/sonos/service/v1','ResolutionSubstitution' => '/large/','ServiceType' => '41991'},'160' => {'Name' => 'SoundCloud','Capabilities' => '4611','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/40967/40967-400x400.png','Resolution' => '500','PromoText' => '','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/40967/40967-72x72.png','SMAPI' => 'https://soundcloud-go.ws.sonos.com/smapi','ResolutionSubstitution' => 't500x500','ServiceType' => '40967'},'212' => {'Name' => 'Plex','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/54279/54279-400x400.png','Resolution' => '1080','PromoText' => 'Plex!','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/54279/54279-72x72.png','SMAPI' => 'https://sonos.plex.tv/sonos/','ResolutionSubstitution' => 'width=1080','ServiceType' => '54279'},'254' => {'Name' => 'TuneIn','Capabilities' => '4160','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/52231/52231-400x400.png','Resolution' => '1200','PromoText' => '','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/52231/52231-72x72.png','SMAPI' => 'http://legato.radiotime.com/Radio.asmx','ResolutionSubstitution' => '1200x1200','ServiceType' => '52231'},'162' => {'Name' => 'radioPup','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/54023/54023-400x400.png','Resolution' => undef,'PromoText' => 'radioPup features 300+ local radio stations streaming the best music and news available. Covering many genres including: Country, Classic Rock, Hip-Hop / R&B, Pop, Lite Sounds, Sports, News/Talk, Classic Hits, Rock and more.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/54023/54023-72x72.png','SMAPI' => 'https://sonos.townsquaremedia.com/index.php','ResolutionSubstitution' => undef,'ServiceType' => '54023'},'191' => {'Name' => 'Classical Archives','Capabilities' => '1030739','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/43783/43783-400x400.png','Resolution' => undef,'PromoText' => '','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/43783/43783-72x72.png','SMAPI' => 'https://api.classicalarchives.com/smapi/endpoint','ResolutionSubstitution' => undef,'ServiceType' => '43783'},'169' => {'Name' => 'Tribe of Noise','Capabilities' => '512','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/5127/5127-400x400.png','Resolution' => '1500','PromoText' => 'Tribe of Noise bietet einen innovative Hintergrundmusik-Service für Unternehmen, bei dem keinerlei (jährliche) Gebühren an staatliche Verwertungsgesellschaften fällig werden. Dieser Cloud-Musikdienst hilft Unternehmen, das richtige Ambiente für Kunden und Personal zu schaffen.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/5127/5127-72x72.png','SMAPI' => 'https://sonos.tribeofnoise.com/server-v2.0.php','ResolutionSubstitution' => '_1500.jpg','ServiceType' => '5127'},'9' => {'Name' => 'Spotify','Capabilities' => '1116691','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/2311/2311-400x400.png','Resolution' => undef,'PromoText' => 'Musik auf radikal andere Weise erleben. Millionen von Titeln auf Abruf in höchster Klangqualität.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/2311/2311-72x72.png','SMAPI' => 'https://spotify-v4.ws.sonos.com/smapi','ResolutionSubstitution' => undef,'ServiceType' => '2311'},'184' => {'Name' => 'Stingray Music','Capabilities' => '295427','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/8455/8455-400x400.png','Resolution' => undef,'PromoText' => 'The Stingray Music content you love, now available in every room of your house with Sonos! The best music for every moment, place and mood in your life, curated by experts from around the globe. A wide range of channels in all genres, featuring local and international talents. FREE with your TV subscription.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/8455/8455-72x72.png','SMAPI' => 'https://sonos.stingray.com/ws/Sonos','ResolutionSubstitution' => undef,'ServiceType' => '8455'},'154' => {'Name' => 'Radionomy','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/41735/41735-400x400.png','Resolution' => '999','PromoText' => 'Radionomy features a wide variety of music and themed online radio stations, accessible anywhere, produced and run by passionate people: music fans, artists, DJs, opinion leaders, comedians, story tellers, etc.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/41735/41735-72x72.png','SMAPI' => 'https://sonos.radionomy.com/SonosService.svc','ResolutionSubstitution' => '.s999','ServiceType' => '41735'},'223' => {'Name' => 'RauteMusik.FM','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/57095/57095-400x400.png','Resolution' => undef,'PromoText' => ' Erlebe dutzende kostenlose Musikkanäle mit den verschiedensten Musikrichtungen bei RauteMusik.FM. ','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/57095/57095-72x72.png','SMAPI' => 'https://sonos-smapi.rautemusik.fm/smapi','ResolutionSubstitution' => undef,'ServiceType' => '57095'},'211' => {'Name' => 'The Music Manager','Capabilities' => '514','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/55559/55559-400x400.png','Resolution' => '119','PromoText' => 'TMM is a great service that brings new music to you everyday. Sample hits on Sonos. Set up your account to start listenning.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/55559/55559-72x72.png','SMAPI' => 'https://themusicmanager.eu/sonos/SonosAPI.php','ResolutionSubstitution' => '.l.jpg','ServiceType' => '55559'},'38' => {'Name' => '7digital','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/49927/49927-400x400.png','Resolution' => '800','PromoText' => 'Willkommen bei 7digital','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/49927/49927-72x72.png','SMAPI' => 'https://sonos-service.7digital.com/sonos.asmx','ResolutionSubstitution' => '_800.jpg','ServiceType' => '49927'},'167' => {'Name' => 'Gaana','Capabilities' => '577','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/1799/1799-400x400.png','Resolution' => '480','PromoText' => 'The personalized music experience based on your own unique taste, now for Sonos.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/1799/1799-72x72.png','SMAPI' => 'http://sonosapi.gaana.com/SonosAPI.php','ResolutionSubstitution' => '_480x480_','ServiceType' => '1799'},'198' => {'Name' => 'Anghami','Capabilities' => '2627','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/9735/9735-400x400.png','Resolution' => undef,'PromoText' => 'Add music to your day with Anghami, and make it louder with Sonos!','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/9735/9735-72x72.png','SMAPI' => 'https://api.anghami.com/anghmob/SonosAPI.php','ResolutionSubstitution' => undef,'ServiceType' => '9735'},'24' => {'Name' => 'DAR.fm Record Radio','Capabilities' => '512','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/13575/13575-400x400.png','Resolution' => '328','PromoText' => 'DAR.fm is a personal recorder which records thousands of radio stations and shows to be played back at your convenience.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/13575/13575-72x72.png','SMAPI' => 'http://dar.fm/SonosServer.php','ResolutionSubstitution' => 'lain328','ServiceType' => '13575'},'217' => {'Name' => 'FIT Radio Workout Music','Capabilities' => '4610','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/40711/40711-400x400.png','Resolution' => '1500','PromoText' => 'The personalized music experience based on your own unique taste now for Sonos','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/40711/40711-72x72.png','SMAPI' => 'https://www.fitradio.com/apisonos/ws','ResolutionSubstitution' => '_1500.jpg','ServiceType' => '40711'},'45' => {'Name' => 'hotelradio.fm','Capabilities' => '512','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/7943/7943-400x400.png','Resolution' => '290','PromoText' => 'hotelradio.fm - Musikkonzept für Hotels, Restaurants und Spa','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/7943/7943-72x72.png','SMAPI' => 'https://users.hotelradio.fm/sonosapi/index.php','ResolutionSubstitution' => '_290.png','ServiceType' => '7943'},'219' => {'Name' => 'Audiobooks.com','Capabilities' => '4672','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/56071/56071-400x400.png','Resolution' => '300','PromoText' => 'Sign up for an Audiobooks.com account and get a free 30 day trial!','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/56071/56071-72x72.png','SMAPI' => 'https://api.audiobooks.com/api/v2/sonos/soap','ResolutionSubstitution' => '-huge.jpg?size=300','ServiceType' => '56071'},'232' => {'Name' => 'Radioplayer','Capabilities' => '577','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/59399/59399-400x400.png','Resolution' => '1500','PromoText' => 'Radio für dich – aus deiner Region. Der Radioplayer ist die offizielle App der Radiosender, in höchster Klangqualität, mit tollen Inhalten und vielen Podcasts.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/59399/59399-72x72.png','SMAPI' => 'https://sonosrp.radioapi.io/Service.svc','ResolutionSubstitution' => '_1500.jpg','ServiceType' => '59399'},'189' => {'Name' => 'SOUNDMACHINE','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/50695/50695-400x400.png','Resolution' => '1500','PromoText' => 'A fully licensed cloud-based music service for business. Create a signature soundtrack by easily mixing and day-parting your favorite curated playlists. Style multiple locations with your unique sound.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/50695/50695-72x72.png','SMAPI' => 'https://provider.sound-machine.com/sonosapi','ResolutionSubstitution' => '_1500.png','ServiceType' => '50695'},'2' => {'Name' => 'Deezer','Capabilities' => '2643','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/519/519-400x400.png','Resolution' => '1000','PromoText' => 'Entdecke und genieße die weltweit größte On-Demand-Musikbibliothek auf deinem Sonos-Gerät - ganz bequem von zu Hause.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/519/519-72x72.png','SMAPI' => 'https://api.deezer.com/sonos','ResolutionSubstitution' => '1000x1000-000000-80-0-0.jpg','ServiceType' => '519'},'171' => {'Name' => 'Mood Mix','Capabilities' => '4609','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/43271/43271-400x400.png','Resolution' => '1500','PromoText' => 'A "Plug and Play" online music solution that enables business owners to mix fully licensed, professionally designed playlists to create a custom soundtrack quickly and easily.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/43271/43271-72x72.png','SMAPI' => 'https://sonos.mix.moodmedia.com/api','ResolutionSubstitution' => '_1500.png','ServiceType' => '43271'},'222' => {'Name' => 'nugs.net','Capabilities' => '6675','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/56839/56839-400x400.png','Resolution' => undef,'PromoText' => 'Die personalisierte Musikerlebnis auf der Grundlage Ihrer eigenen einzigartigen Geschmack jetzt Sonos','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/56839/56839-72x72.png','SMAPI' => 'https://sonos.nugs.net/soap/nugs','ResolutionSubstitution' => undef,'ServiceType' => '56839'},'183' => {'Name' => 'narando','Capabilities' => '37395','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/41479/41479-400x400.png','Resolution' => undef,'PromoText' => 'narando - Lass dir interessante Artikel vorlesen. Lausche den Stimmen echter Vorleser während du fährst, trainierst, kochst oder aufräumst.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/41479/41479-72x72.png','SMAPI' => 'http://www.narando.com/sonos/service/action','ResolutionSubstitution' => undef,'ServiceType' => '41479'},'181' => {'Name' => 'Mixcloud','Capabilities' => '2627','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/46855/46855-400x400.png','Resolution' => '1500','PromoText' => 'Höre die zuverlässigsten DJs & Kuratoren.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/46855/46855-72x72.png','SMAPI' => 'https://www.mixcloud.com/sonos-app/','ResolutionSubstitution' => 'w/1500/h/1500/','ServiceType' => '46855'},'7' => {'Name' => 'Concert Vault','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/37383/37383-400x400.png','Resolution' => '569','PromoText' => '','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/37383/37383-72x72.png','SMAPI' => 'https://www.concertvault.com/ws/MOAPI.asmx','ResolutionSubstitution' => '/569/','ServiceType' => '37383'},'201' => {'Name' => 'Amazon Music','Capabilities' => '45633','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/51463/51463-400x400.png','Resolution' => undef,'PromoText' => '','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/51463/51463-72x72.png','SMAPI' => 'https://sonos.amazonmusic.com/','ResolutionSubstitution' => undef,'ServiceType' => '51463'},'192' => {'Name' => 'focus@will','Capabilities' => '5632','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/49159/49159-400x400.png','Resolution' => '1500','PromoText' => 'focus@will is a unique music and audio service scientifically developed to increase concentration and productivity. focus@will on Sonos. Set up your account now to begin.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/49159/49159-72x72.png','SMAPI' => 'https://www.focusatwill.com/sonos/action','ResolutionSubstitution' => '-1500.png','ServiceType' => '49159'},'53' => {'Name' => 'MLB.com Gameday Audio','Capabilities' => '1536','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/36871/36871-400x400.png','Resolution' => '400','PromoText' => 'Listen to every regular season and postseason game LIVE (no blackouts)','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/36871/36871-72x72.png','SMAPI' => 'https://securea.mlb.com/ce/sonos/default.jsp','ResolutionSubstitution' => '/400x400/','ServiceType' => '36871'},'216' => {'Name' => 'Aldi life Musik','Capabilities' => '4627','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/55303/55303-400x400.png','Resolution' => '1500','PromoText' => 'Aldi life Musik powered by Napster bietet dir Millionen Songs, tausende Hörbücher, exklusive Playlists und redaktionelle Empfehlungen von unseren Experten.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/55303/55303-72x72.png','SMAPI' => 'https://sonosapi-aldimusic.rhapsody.com/smapi','ResolutionSubstitution' => '1500x1500.jpg','ServiceType' => '55303'},'146' => {'Name' => 'Daytrotter','Capabilities' => '513','IconQuadraticURL' => 'http://sonos-logo.ws.sonos.com/48903/48903-400x400.png','Resolution' => undef,'PromoText' => 'The source for new music from the best emerging bands, recorded live in Daytrotter's studios.','IconRoundURL' => 'http://sonos-logo.ws.sonos.com/48903/48903-72x72.png','SMAPI' => 'https://www.daytrotter.com/ws/MOAPI.asmx','ResolutionSubstitution' => undef,'ServiceType' => '48903'}}) missed to call readingsBeginUpdate first.
2017.06.26 20:01:02 1: stacktrace:
2017.06.26 20:01:02 1:     main::readingsBulkUpdate            called by ./FHEM/00_SONOS.pm (9519)
2017.06.26 20:01:02 1:     main::SONOS_readingsBulkUpdateIfChanged called by ./FHEM/00_SONOS.pm (1237)
2017.06.26 20:01:02 1:     main::SONOS_Read                    called by fhem.pl (3412)
2017.06.26 20:01:02 1:     main::CallFn                        called by fhem.pl (686)
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4000 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4024 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4048 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4072 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4096 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4120 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4144 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4168 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4192 thread 1.
2017.06.26 20:38:05 1: Perfmon: possible freeze starting at 20:38:04, delay is 1.115
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4000 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4024 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4048 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4072 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4096 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4120 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4144 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4168 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4192 thread 1.
2017.06.26 20:48:45 1: Perfmon: possible freeze starting at 20:48:43, delay is 2.002
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4000 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4024 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4048 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4072 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4096 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4120 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4144 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4168 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4192 thread 1.
2017.06.26 21:20:04 1: Perfmon: possible freeze starting at 21:20:03, delay is 1.969
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4000 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4024 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4048 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4072 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4096 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4120 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4144 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4168 thread 1.
Renewal of subscription failed with error: 500 Can't connect to 192.168.1.24:1400 at ./FHEM/00_SONOS.pm line 4192 thread 1.


Kann da jemand was mit anfangen?  :-[
Fhem 5.8 auf Raspi 3, HMLAN und 868MHz CUL mit einigen Komponenten, Z-Wave Rollladenaktoren, Tablet UI, 433 MHz CUL mit Baumarktsteckdosen und Temp Sensoren, Amazon Echo, Echo Dot, 2x SONOS  play1, 1x SONOS Connect AMP,  presence, HUE, Lightify

juemuc

Hallo Reinerlein,

ich vermute, dass bei einer Neudefinition noch ein kleiner Bug enthalten ist. Ich habe heute ein Fhem-System mit Sonos neu aufgesetzt und erhalte beim Start folgende Fehlermeldung:
ZitatSONOS0: Error during retreiving of FavouriteName: Can't use an undefined value as a HASH reference at ./FHEM/00_SONOS.pm line 1341.
.
Da die Favoriten noch nicht zur Verfügung stehen, läuft der Vergleich auf einen Fehler. Wenn man den Befehl "get FavoritesWithCovers" manuell durchgeführt hat, passt es aber.
VG
juemuc
3x Sonos Play 1, 1x Sonos Arc + Sub, 1 Sonos-One, 1x Sonos Playbar
FB6690 + FB7490 mit 4x Dect 200 und 3 Dect-ULE-Thermostate,  raspberry3B+, HM Funkmodul HM-MOD-RPI-PCB, HM Klingelsensor HM-Sen-DB-PCB, HM (IP) Fensterkontakte und  Amazon Echo Dot,  piVCCU, pi OS (bookworm).

Reinerlein

Hi joemuc,

im Prinzip ist der Fehler nicht vermeidbar, sollte aber auch gar nicht auftreten, da ich für ReadingsVal ja einen Defaultwert vorgebe. Aber ich habe jetzt einen andere Methodik eingebaut, und nun sollte es u.U. keine Meldung dazu geben...

Ansonsten hilft nur den Loglevel auf 0 zu setzen...

Grüße
Reinerlein

Zerika

#36
Hallo zusammen,

auch in der neuen Version habe ich weiterhin Probleme mit einer Vernünftigen Cover Anzeige in den entsprechenden ReadingGroups.

Am Player Device selbst werden die Cover richtig geladen und dargestellt, während in den ReadingGroups weiterhin nur der Platzhalter zu sehen ist. Anbei zwei entsprechende Screenshots.

Nach ein wenig Nachforschung scheint dass ganze an dem Aufbau der URL für die Cover zu liegen. Allerdings weiß ich weder wo, noch wie das ganze zu ändern wäre =)

URL am Player Device:
<div style="display: inline-block; margin-right: 5px; border: 1px solid lightgray; height: 10.75em; width: 10.75em; background-image: url(/fhem/sonos/proxy/aa?url=http%3A%2F%2F192.168.178.58%3A1400%2Fgetaa%3Fs%3D1%26u%3Dx-sonos-http%253alibrarytrack%25253ai.17674.mp4%253fsid%253d204%2526flags%253d8224%2526sn%253d2); background-repeat: no-repeat; background-size: contain; background-position: center center;"><div style="position: relative; top: 0px; left: 2px; display: inline-block; height: 15px; width: 15px; background-image: url(); background-repeat: no-repeat; background-size: contain; background-position: center center;"></div></div>

URL in der RG an einem Element:
<div style="display: inline-block; border: solid 1px lightgray; margin: 3px; width: 70px; height: 70px; background-image: url(/fhem/sonos/proxy/aa?url=http%3A%2F%2F192.168.178.58%3A1400%2Fgetaa%3Fu%3Dx-sonos-http%253Alibrarytrack%25253ai.17190.mp4%253Fsid%253D204%2526flags%253D8224%2526sn%253D2); background-repeat: no-repeat; background-size: contain; background-position: center center;" onclick="FW_cmd('/fhem?XHR=1&amp;cmd.Sonos_Kueche%3Dset%20Sonos_Kueche%20Track%201')"></div>

Der Unterschied wird noch deutlicher wenn man innerhalb des divs die entsprechende background-image URL vergleicht:

Player Device: /fhem/sonos/proxy/aa?url=http%3A%2F%2F192.168.178.58%3A1400%2Fgetaa%3Fs%3D1%26u%3Dx-sonos-http%253alibrarytrack%25253ai.17674.mp4%253fsid%253d204%2526flags%253d8224%2526sn%253d2
ReadingsGroup: /fhem/sonos/proxy/aa?url=http%3A%2F%2F192.168.178.58%3A1400%2Fgetaa%3Fu%3Dx-sonos-http%253Alibrarytrack%25253ai.17190.mp4%253Fsid%253D204%2526flags%253D8224%2526sn%253D2


Auch ein löschen des Attributes generateProxyAlbumArtURLs bringt für die Cover Anzeige in den RGs keine Besserung.

Falls noch weitere Infos benötigt werden einfach Bescheid sagen.

Freundliche Grüße
Zerika

Reinerlein

Hi Zerika,

die Grundlage dieser RGs sind die entsprechenden Readings am Playerdevice. Bei deiner Queue dann das Reading "Queue". Diese werden nur bei Veränderung (wenn das Attribut "getQueueListAtNewVersion", am Besten zusammen mit "getListsDirectlyToReadings" gesetzt ist) oder nach manueller Aufforderung mittels "get <Player> QueueWithCovers" (mit eigenem userReading oder Attribut "getListsDirectlyToReadings") aktualisiert...

Zu dem Zeitpunkt der Aktualisierung werden dann die entsprechenden Attribute für die passende Erzeugung der Bildverweise berücksichtigt.

Ansonsten habe ich auch bei mir wieder einige Cover gefunden, die nicht funktionieren, und ich werde mir das noch mal anschauen. Das allerdings gar keine angezeigt werden ist schon komisch...

Was ist das denn eigentlich für ein Musikdienst? 204 als SID ist etwas ungewöhnlich...

Grüße
Reinerlein

Zerika

Hi Reinerlein,

die Aktualisierung der RG funtkioniert grundsätzlich auch. Zumindest wenn ich das Attribut generateProxyAlbumArtURLs lösche werden die Cover erst "angepasst" wenn ich sie am Player Device mit get QueueWithCovers abrufe. Ohne Proxy bleiben die Coveranzeigen dann jedoch komplett schwarz und es ist nur der Rahmen zu sehen.

Die entsprechenden Attribute am Sonos Device sind bereits gesetzt


Attributes:
   generateProxyAlbumArtURLs 1
   getFavouritesListAtNewVersion 1
   getListsDirectlyToReadings 1
   getPlaylistsListAtNewVersion 1
   getQueueListAtNewVersion 1
   getRadiosListAtNewVersion 1
   verbose    1


Der verwendete Musikdienst aktuell ist Apple Music.
Cover von Radios über Tunein werden sauber dargestellt...

Grüße
Zerika

Reinerlein

Hi Zerika,

habe einen Fehler beim Zerlegen der Musicservices entdeckt, der dafür sorgte, dass Apple Music einfach mal nicht berücksichtigt wird :) Du müsstest auch keine Trackprovider-Informationen gehabt haben.

Ich habe das nun drin... mit dem nächsten checkin musst du das dann mal prüfen, da ich kein Apple Music habe...

Grüße
Reinerlein

Zerika

Alles klar,

ich werds beobachten und dann entsprechend Rückmeldung geben.  :)

Gruß
Zerika

Nobby1805

Zitat von: Reinerlein am 26 Juni 2017, 10:54:11
Hallo zusammen,

ich stehe echt auf dem Schlauch, und kann mir diese fehlenden "readingsBeginUpdate"-Anweisungen nicht erklären.

Natürlich stehen sie drin, müssen aber, wie alles andere auch, erst per Netzwerkkommunikation zum Fhem-Teil des Moduls übertragen werden.
Ich habe mal ein paar zusätzliche Logs eingebaut ... und jetzt nach 2 Tagen ist der Fehler aufgetreten
} elsif ($line =~ m/ReadingsBeginUpdate:(.*)/) {
my $hash = undef;
if (lc($1) eq 'undef') {
$hash = SONOS_getSonosPlayerByName();
} else {
$hash = SONOS_getSonosPlayerByUDN($1);
}

if ($hash) {
      SONOS_Log undef, 0, "Aufruf von ReadingsBeginUpdate";           ##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

readingsBeginUpdate($hash);
} else {
SONOS_Log undef, 0, "Fehlerhafter Aufruf von ReadingsBeginUpdate: $1";
}
} elsif ($line =~ m/ReadingsEndUpdate:(.*)/) {
my $hash = undef;
if (lc($1) eq 'undef') {
$hash = SONOS_getSonosPlayerByName();
} else {
$hash = SONOS_getSonosPlayerByUDN($1);
}

if ($hash) {
      SONOS_Log undef, 0, "Aufruf von ReadingsEndUpdate";               #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
readingsEndUpdate($hash, 1);
} else {
SONOS_Log undef, 0, "Fehlerhafter Aufruf von ReadingsEndUpdate: $1";
}
sub SONOS_readingsBulkUpdateIfChanged($$$) {
my ($hash, $readingName, $readingValue) = @_;

return if (!defined($hash) || !defined($readingName) || !defined($readingValue));
 
my $st=undef;
  if (ReadingsVal($hash->{NAME}, $readingName, '~~ReAlLyNoTeQuAlSmArKeR~~') ne $readingValue) {
    $st=readingsBulkUpdate($hash, $readingName, $readingValue);
        SONOS_Log undef, 0, "Aufgerufen BulkUpdateIfChanged $hash $readingName $readingValue $st";     #<<<<<<<<<<<
  }
}

Der Log zeigt, dass beginUpdate vor dem Fehler aufgerufen worden ist
Zitat2017.06.28 23:17:58.848 0: SONOS0: Aufruf von ReadingsBeginUpdate
2017.06.28 23:17:59.123 1: readingsUpdate(Sonos_Schlafzimmer,currentTrackURI,x-file-cifs://homeserver/Musik/Einzeltitel/01%20-%20A-ha%20-%20Cry%20Wolf.mp3) missed to call readingsBeginUpdate first.
2017.06.28 23:17:59.123 1: stacktrace:
2017.06.28 23:17:59.124 1:     main::readingsBulkUpdate            called by ./FHEM/00_SONOS.pm (9526)
2017.06.28 23:17:59.124 1:     main::SONOS_readingsBulkUpdateIfChanged called by ./FHEM/00_SONOS.pm (1238)
2017.06.28 23:17:59.124 1:     main::SONOS_Read                    called by fhem.pl (3412)
2017.06.28 23:17:59.124 1:     main::CallFn                        called by fhem.pl (686)
2017.06.28 23:17:59.159 1: PERL WARNING: Use of uninitialized value $st in concatenation (.) or string at ./FHEM/00_SONOS.pm line 9527.
2017.06.28 23:17:59.160 0: SONOS0: Aufgerufen BulkUpdateIfChanged HASH(0x32887d4) currentTrackURI x-file-cifs://homeserver/Musik/Einzeltitel/01%20-%20A-ha%20-%20Cry%20Wolf.mp3
2017.06.28 23:17:59.162 1: readingsUpdate(Sonos_Schlafzimmer,currentTrackProvider,) missed to call readingsBeginUpdate first.
2017.06.28 23:17:59.163 1: stacktrace:
2017.06.28 23:17:59.163 1:     main::readingsBulkUpdate            called by ./FHEM/00_SONOS.pm (9526)
2017.06.28 23:17:59.164 1:     main::SONOS_readingsBulkUpdateIfChanged called by ./FHEM/00_SONOS.pm (1238)
2017.06.28 23:17:59.164 1:     main::SONOS_Read                    called by fhem.pl (3412)
2017.06.28 23:17:59.164 1:     main::CallFn                        called by fhem.pl (686)
2017.06.28 23:17:59.166 0: SONOS0: Aufgerufen BulkUpdateIfChanged HASH(0x32887d4) currentTrackProvider 
2017.06.28 23:17:59.169 1: readingsUpdate(Sonos_Schlafzimmer,currentTrackProviderIconRoundURL,) missed to call readingsBeginUpdate first.
2017.06.28 23:17:59.170 1: stacktrace:
2017.06.28 23:17:59.174 1:     main::readingsBulkUpdate            called by ./FHEM/00_SONOS.pm (9526)
2017.06.28 23:17:59.175 1:     main::SONOS_readingsBulkUpdateIfChanged called by ./FHEM/00_SONOS.pm (1238)
2017.06.28 23:17:59.175 1:     main::SONOS_Read                    called by fhem.pl (3412)
2017.06.28 23:17:59.176 1:     main::CallFn                        called by fhem.pl (686)
2017.06.28 23:17:59.178 0: SONOS0: Aufgerufen BulkUpdateIfChanged HASH(0x32887d4) currentTrackProviderIconRoundURL 
2017.06.28 23:17:59.196 1: readingsUpdate(Sonos_Schlafzimmer,currentTrackProviderIconQuadraticURL,) missed to call readingsBeginUpdate first.
2017.06.28 23:17:59.196 1: stacktrace:
2017.06.28 23:17:59.197 1:     main::readingsBulkUpdate            called by ./FHEM/00_SONOS.pm (9526)
2017.06.28 23:17:59.197 1:     main::SONOS_readingsBulkUpdateIfChanged called by ./FHEM/00_SONOS.pm (1238)
2017.06.28 23:17:59.197 1:     main::SONOS_Read                    called by fhem.pl (3412)
2017.06.28 23:17:59.197 1:     main::CallFn                        called by fhem.pl (686)
2017.06.28 23:17:59.199 0: SONOS0: Aufgerufen BulkUpdateIfChanged HASH(0x32887d4) currentTrackProviderIconQuadraticURL 
2017.06.28 23:17:59.206 1: readingsUpdate(Sonos_Schlafzimmer,currentTrackPosition,0:02:01) missed to call readingsBeginUpdate first.
2017.06.28 23:17:59.206 1: stacktrace:
2017.06.28 23:17:59.206 1:     main::readingsBulkUpdate            called by ./FHEM/00_SONOS.pm (1224)
2017.06.28 23:17:59.207 1:     main::SONOS_Read                    called by fhem.pl (3412)
2017.06.28 23:17:59.207 1:     main::CallFn                        called by fhem.pl (686)
2017.06.28 23:17:59.209 1: readingsUpdate(Sonos_Schlafzimmer,currentTrackPositionSec,121) missed to call readingsBeginUpdate first.
2017.06.28 23:17:59.209 1: stacktrace:
2017.06.28 23:17:59.209 1:     main::readingsBulkUpdate            called by ./FHEM/00_SONOS.pm (1224)
2017.06.28 23:17:59.210 1:     main::SONOS_Read                    called by fhem.pl (3412)
2017.06.28 23:17:59.211 1:     main::CallFn                        called by fhem.pl (686)
2017.06.28 23:17:59.220 1: readingsUpdate(Sonos_Schlafzimmer,currentStreamAudio,) missed to call readingsBeginUpdate first.
2017.06.28 23:17:59.221 1: stacktrace:
2017.06.28 23:17:59.221 1:     main::readingsBulkUpdate            called by ./FHEM/00_SONOS.pm (9526)
2017.06.28 23:17:59.222 1:     main::SONOS_readingsBulkUpdateIfChanged called by ./FHEM/00_SONOS.pm (1238)
2017.06.28 23:17:59.223 1:     main::SONOS_Read                    called by fhem.pl (3412)
2017.06.28 23:17:59.224 1:     main::CallFn                        called by fhem.pl (686)
2017.06.28 23:17:59.227 0: SONOS0: Aufgerufen BulkUpdateIfChanged HASH(0x32887d4) currentStreamAudio 
2017.06.28 23:17:59.252 0: SONOS0: Aufruf von ReadingsEndUpdate
Vermutlich liegt es an der Methode, wie erkannt wird ob BeginUpdate aufgerufen worden ist ... da muss ich das Log noch einmal erweitern
FHEM-Featurelevel: 6.2   (fhem.pl:28227/2023-11-29) auf Windows 10 Pro mit Strawberry Perl 5.32.1.1-32bit
TabletUI: 2.7.15
IO: 2xHMLAN(0.965)|HMUSB2(0.967)

Reinerlein

Hallo Nobby,

du musst in der Logausgabe unbedingt einbauen, für welches Device die Begin-, End- und Updateaufrufe ausgeführt werden. Sie könnten für verschiedene Devices sein...

Im Prinzip erhält man das mit einem Log auf Level 5 auch alles.
Ich habe hier bei mir die Möglichkeit eingebaut, die Logausgaben des SubProzess in eine Datei zu schreiben. Damit habe ich im Fhem-Log nur noch die Logausgaben des Fhem-seitigen Teils des Moduls.
Da sehe ich sehr schön, dass (bei mir) die Begin- und End-Aufrufe immer als Pärchen um die entsprechenden Bulkupdates herum passen, und keinerlei Singleupdates für dieses Device dazwischen kommen... zumindest bei mir :)

Ich kann die Version ja mal einchecken, dann kann das jeder besser überblicken. Momentan wird das ja ziemlich unübersichtlich wegen der beiden Modulebenen innerhalb einer Logdatei...

Grüße
Reiner

Nobby1805

Hallo Reiner,

ja klar ... aber bei 5 wurde es mir einfach zu unübersichtlich ... ich versuche z.Zt. den Zeitstempel der von beginUpdate gesetzt wird jeweils vor einem BulkUpdate auszugeben ... das klappt aber irgendwie nicht, in fhem.pl wird der mit $hash->{".updateTimestamp"} angesprochen

Gruß Norbert
FHEM-Featurelevel: 6.2   (fhem.pl:28227/2023-11-29) auf Windows 10 Pro mit Strawberry Perl 5.32.1.1-32bit
TabletUI: 2.7.15
IO: 2xHMLAN(0.965)|HMUSB2(0.967)

ThiemoSt

Zitat von: Reinerlein am 23 Juni 2017, 15:08:10
da scheint sich ein Nicht-Sonos-Player einzumischen. Einfach im Attribut ignoredIPs am Sonos-Device angeben, und damit ignorieren lassen...


Die angegebene IP ist jedoch keine aus meinem Netz (ich nutze 192.168.xxx.xxx).
Diese IP zu den Ignore hinzuzufügen hat auch nichts gebracht.

Wäre es hilfreich zur Fehlersuche Zugriff auf meine Testinstallation zu bekommen um direkt zu testen?
FHEM, Ubuntu unter Proxmox (NUCi7)
FHT80B; CUL_FHTTK; HMUARTLGW; HUE; Netatmo; ENIGMA2; FRITZBOX; S7 und viele weitere.