Sonos funktioniert nach openHAB 3 Migration nicht mehr

Einrichtung der openHAB Umgebung und allgemeine Konfigurationsthemen.

Moderatoren: seppy, udo1toni

Antworten
Michdo93
Beiträge: 54
Registriert: 6. Jul 2021 13:39
Answers: 1

Sonos funktioniert nach openHAB 3 Migration nicht mehr

Beitrag von Michdo93 »

Hi,

hab jetzt nach einigen verschiedenen Dingen, die man neu lernen muss und auch konfigurieren muss festgestellt, dass meine Sonos-Geräte nicht mehr wollen. Bei anderen Dingen wie HomeMatic oder zWave haben Neustarts ausgereicht. Genauer handelt es sich um Sonos Play 5, Playbar und Zoneplayer. In der parallel laufenden Instanz von openHAB 2.5 läuft Sonos noch.

Ich weiß jetzt nicht, ob die Thing-Konfiguration Sinn macht zu zeigen, aber mal ein Beispiel:

Code: Alles auswählen

UID: sonos:PLAY5:RINCON_5CAAFD0D772E01400
label: tBad_Sonos_Lautsprecher
thingTypeUID: sonos:PLAY5
configuration:
  refresh: 60
  udn: RINCON_5CAAFD0D772E01400
  notificationTimeout: 20
Jemand ähnliche Erfahrungen gemacht? Am Rechner nutze ich den Sonos S1 Controller und nicht den S2, aufgrund der Kompatibilität. Sind nicht die neuesten Sonos-Geräte.

Ich erhalte diese Fehlermeldungen:

Code: Alles auswählen

The UPnP device [...] is not yet registered.
In Karaf habe ich folgendes gecheckt:

Code: Alles auswählen

openhab>  bundle:list | grep UPnP                                               
270 │ Active  │  80 │ 2.6.0                 │ JUPnP Library
322 │ Active  │  80 │ 3.1.0                 │ openHAB Core :: Bundles :: UPnP
Liebe Grüße
Michi

Benutzeravatar
peter-pan
Beiträge: 2772
Registriert: 28. Nov 2018 12:03
Answers: 30
Wohnort: Schwäbisch Gmünd

Re: Sonos funktioniert nach openHAB 3 Migration nicht mehr

Beitrag von peter-pan »

Hallo Michi,
ich nehme mal an, du hast deine Sonos-Things und Items aus OH2.5 übernommen und als Text-Files abgespeichert.
Ich habe zwar schon die S2 Controller-App auf dem PC, aber sonst dürften keine Unterschiede sein(ausser dass bei mir Sonos auch auf OH3 steuerbar ist ;) ).

Du hast da einen Auszug aus deiner Bundle-List gepostet. Hast du auch geschaut, ob das Sonos-Binding bei dir aktiv ist ?

Code: Alles auswählen

openhab> bundle:list -s | grep -i "upnp"
252 x Active x  80 x 2.6.0                 x org.jupnp
268 x Active x  80 x 3.1.0                 x org.openhab.core.config.discovery.upnp
270 x Active x  80 x 3.1.0                 x org.openhab.core.io.transport.upnp
openhab>  bundle:list -s | grep -i "sonos"
267 x Active x  80 x 3.1.0                 x org.openhab.binding.sonos
openhab>
Meine sonos.things sieht so aus:

Code: Alles auswählen

Thing sonos:PLAY3:RINCON_5CAAFD54DF8801400	[udn="RINCON_5CAAFD54DF8801400", refresh=60]		//Wohnzimmer
Was dein gleichen Yaml-Code gibt wie bei dir.

die sonos.items hat folgenden Inhalt:

Code: Alles auswählen

//        Wohnzimmer                          
Player WZ_Sonos_Control                     "Player"                        <music>                   (WZ_Sonos,gSonos_Play)    ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:control", autoupdate="false"}
Switch WZ_Sonos_Stop_cross                  "Stop Umgekehrt[%s]"            <sonos_stop>              (WZ_Sonos)                ["Power","Control"]        
Switch WZ_Sonos_Mute                        "Mute"                          <sonos_mute>              (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:mute", autoupdate="false"}
String WZ_Sonos_CurrentTitle                "Title [%s]"                    <track>                   (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:currenttitle", autoupdate="false"}
String WZ_Sonos_CurrentArtist               "Artist [%s]"                   <sonos_artist>            (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:currentartist", autoupdate="false"}
Switch WZ_Sonos_Stop                        "Stop"                          <sonos_stop>              (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:stop", autoupdate="false"}
String WZ_Sonos_CurrentAlbum                "Album [%s]"                    <sonos_album>             (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:currentalbum", autoupdate="false"}
Image  WZ_Sonos_CoverAlbum                  "Cover"                         <sonos_album>             (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:currentalbumart", autoupdate="false"}
Dimmer WZ_Sonos_Volume                      "Volume"                        <volume>                  (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:volume", autoupdate="false"}
String WZ_Sonos_ZoneName                    "Zone Name [%s]"                <sonos_zone>              (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:zonename", autoupdate="false"}
String WZ_Sonos_State                       "State [%s]"                    <sonos_state>             (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:state", autoupdate="false"}
Switch WZ_Sonos_StandAlone                  "Stand Alone"                   <sonos_stand_alone>       (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:standalone", autoupdate="false"}
String WZ_Sonos_Add                         "Add [%s]"                      <sonos_add>               (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:add", autoupdate="false"}
Switch WZ_Sonos_SetAlarm                    "Set Alarm"                     <sonos_alarm>             (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:alarm", autoupdate="false"}
String WZ_Sonos_AlarmProperties             "Alarm Properties [%s]"         <sonos_alarm_prop>        (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:alarmproperties", autoupdate="false"}
Switch WZ_Sonos_AlarmIsrunning              "Alarm is running"              <sonso_alarm_run>         (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:alarmrunning", autoupdate="false"}
Switch WZ_Sonos_Shuffle                     "Shuffle"                       <sonos_shuffle>           (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:shuffle", autoupdate="false"}
String WZ_Sonos_Repeat                      "Repeat [%s]"                   <sonos_repeat>            (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:repeat", autoupdate="false"}
String WZ_Sonos_Favorite                    "Favorite [%s]"                 <rate>                    (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:favorite", autoupdate="false"}
Switch WZ_Sonos_Led                         "Led"                           <sonos_led>               (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:led", autoupdate="false"}
Switch WZ_Sonos_LocalCoordinator            "Local Coordinator"             <sonos_coordinator>       (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:localcoordinator", autoupdate="false"}
String WZ_Sonos_NotificationSound           "Notification Sound [%s]"       <sonos_notification>      (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:notificationsound", autoupdate="false"}
Dimmer WZ_Sonos_Notificationsoundvolume     "Notification Sound Volume"     <soundvolume>             (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:notificationvolume", autoupdate="false"}
String WZ_Sonos_PlayPlaylist                "Play Playlist [%s]"            <playlist>                (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:playlist", autoupdate="false"}
Switch WZ_Sonos_PlayQueue                   "Play Queue"                    <sonos_que>               (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:playqueue", autoupdate="false"}
Number WZ_Sonos_PlayTrack                   "Play Track"                    <track>                   (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:playtrack", autoupdate="false"}
String WZ_Sonos_PlayURI                     "Play URI [%s]"                 <sonos_play_uri>          (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:playuri", autoupdate="false"}
Switch WZ_Sonos_PublicAddress               "Public Address"                <sonos_publiv>            (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:publicaddress", autoupdate="false"}
String WZ_Sonos_Radio                       "Radio [%s]"                    <radio>                   (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:radio", autoupdate="false"}
String WZ_Sonos_Remove                      "Remove [%s]"                   <sonos_remove>            (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:remove", autoupdate="false"}
Switch WZ_Sonos_Restore                     "Restore"                       <sonos_restore>           (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:restore", autoupdate="false"}
Switch WZ_Sonos_RestoreAll                  "Restore All"                   <sonos_restore_all>       (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:restoreall", autoupdate="false"}
Switch WZ_Sonos_Save                        "Save"                          <sonos_save>              (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:save", autoupdate="false"}
Switch WZ_Sonos_SaveAll                     "Save All"                      <sonos_save_all>          (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:saveall", autoupdate="false"}
Number WZ_Sonos_Snooze                      "Snooze"                        <sonos_snooze>            (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:snooze", autoupdate="false"}
String WZ_Sonos_ZoneGroupID                 "Zone Group ID [%s]"            <sonos_zone>              (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:zonegroupid", autoupdate="false"}
String WZ_Sonos_Coordinator                 "Coordinator [%s]"              <sonos_coordinator>       (WZ_Sonos,Sonos_Coords)   ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:coordinator", autoupdate="false"}
Number WZ_Sonos_SleepTimer                  "Sleep Timer"                   <sonos_sleep_timer>       (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:sleeptimer", autoupdate="false"}
String WZ_Sonos_CurrentAVtransportURI       "AV transport URI [%s]"         <sonos_uri>               (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:currenttransporturi", autoupdate="false"}
String WZ_Sonos_CurrenttrackURI             "track URI [%s]"                <sonos_uri>               (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY3:RINCON_5CAAFD54DF8801400:currenttrackuri", autoupdate="false"}
String WZ_Sonos_Tuneinstationid             "TuneIn Sender Id"              <radio>                   (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY1:RINCON_5CAAFD54DF8801400:tuneinstationid", autoupdate="false"}
Switch WZ_Sonos_Clearqueue                  "Wiedergabeliste leeren"                                  (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY1:RINCON_5CAAFD54DF8801400:clearqueue", autoupdate="false"}
String WZ_Sonos_Currenttrack                "Track:"                        <track1>                  (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY1:RINCON_5CAAFD54DF8801400:currenttrack", autoupdate="false"}
String WZ_Sonos_Currentalbumarturl          "Coverbild URL"                                           (WZ_Sonos)                ["Point"]                   {channel="sonos:PLAY1:RINCON_5CAAFD54DF8801400:currentalbumarturl", autoupdate="false"}
.. und als OH3-Page:
sonos.jpg
Wo genau kommt denn die Fehlermeldung her ?

Was ich jedoch bei mir festgestellt habe, ist die Tatsache, dass Homematic, wenn in OH3 aktiviert, in OH2 nicht mehr läuft.
Pi5/8GB(PiOS Lite 64-bit(bookworm)/SSD 120GB - OH4.3.5 openhabian

Michdo93
Beiträge: 54
Registriert: 6. Jul 2021 13:39
Answers: 1

Re: Sonos funktioniert nach openHAB 3 Migration nicht mehr

Beitrag von Michdo93 »

Hi,

also dass das Binding aktiv ist, habe ich vergessen zu erwähnen. Sieht man auch unter Settings --> Bindings. Der Vollständigkeit her dann noch aus der Karaf-Konsole dieser Auszug:

Code: Alles auswählen

bundle:list -s | grep -i "sonos"                                       
301 │ Active  │  80 │ 3.1.0                 │ org.openhab.binding.sonos
bundle:list -s | grep -i "upnp"                                        
270 │ Active  │  80 │ 2.6.0                 │ org.jupnp
Ich habe nichts als Text-Files abgespeichert. Die Things werden migriert, wenn du openHAB installierst. Alles was in /etc/openhab2 lag, wird nach /etc/openhab verschoben. Ähnliches gilt für /var/lib/openhab2 nach /var/lib/openhab usw. Heißt auch Add-ons und Konfigurationen werden beibehalten, sofern vorhanden. Also klar wer Legacy Bindings nutzt, die fallen weg. Sieht man dann in den Logs, dass aus der Konfiguration dieses und dieses Binding nicht mehr installiert werden kann.

Um es anders auszudrücken: Es ist genau dasselbe Thing bzw. es sind genau dieselben Things wie in openHAB 2.5.

Den Sonos S2 Controller kann ich nicht verwenden, dass weiß ich. Hab glaub 6 Geräte und wenn ich auf dem Smartphone entsprechend scanne, würde nur eines der Geräte noch funktionieren. Ich spare mir diesen Link, wo Sonos auflistet, welche Geräte unter Sonos S2 kompatibel sind.

Mir würde demnach org.openhab.core.config.discovery.upnp und org.openhab.core.io.transport.upnp fehlen.

Die Things habe ich nicht als .things gespeichert. Aber der Informatiker in mir findet, dass ich das allgemein mal tun sollte... In openHAB 2.5 wurden sie über PaperUI erstellt.

Die .items können wir weglassen. Daran hat sich auch nichts geändert.

Die Fehlermeldung bekomme ich, wenn ich auf Settings --> Things gehe. Dort steht zunächst Error:Comm. Klickst du auf eines der Sonos-Things, dann steht Offline und dadrunter dann:

Code: Alles auswählen

COMMUNICATION_ERROR
The UPnP device RINCON_5CAAFD0D772E01400 is not yet registered. 
Zu HomeMatic hatte ich neulich total unnötig einen Thread aufgemacht. Habe hinterher mich erinnert, dass ich auch Probleme hatte, nachdem ich auf openHAB 2.5 upgegraded habe. Bei den Things durfte man gewisse Default-Werte nicht fest eintragen. Wie bspw. die Callback Network Address. Da ist weniger mehr. Außerdem ist die Hardware sehr mies bei den CCU's. Was für die WebUI gilt, dass du nach Möglichkeit nur mit einem Gerät und einen Tab darauf zugreifst, gilt auch für openHAB (und den anderen Ports). Bei mir wechselt dies tatsächlich, wenn ich beide VMs anhabe, mit welcher die CCU's gerade kommunizieren. Also eine VM abschalten, dann läuft es auf der anderen stabil. Was auch geprüft werden muss ist die Firewall auf der CCU. Zwei VMs bedeutet zwei IP-Adressen, denen der Zugriff ermöglicht werden muss. Dann CCU's und openhab neustarten.

Benutzeravatar
peter-pan
Beiträge: 2772
Registriert: 28. Nov 2018 12:03
Answers: 30
Wohnort: Schwäbisch Gmünd

Re: Sonos funktioniert nach openHAB 3 Migration nicht mehr

Beitrag von peter-pan »

ich habe zwar meine Homematic-Installation per Autodiscovery (OH2 + OH3) gemacht, aber Sonos noch "händisch" per Textkonfiguration.
Als Yaml sieht mein Thing genauso aus wie deines:

Code: Alles auswählen

UID: sonos:PLAY3:RINCON_5CAAFD54DF8801400
label: PLAY:3
thingTypeUID: sonos:PLAY3
configuration:
  refresh: 60
  udn: RINCON_5CAAFD54DF8801400
  notificationTimeout: 20
Vielleicht findest du ja was im englischen Forum zu diesem Thema
Pi5/8GB(PiOS Lite 64-bit(bookworm)/SSD 120GB - OH4.3.5 openhabian

Michdo93
Beiträge: 54
Registriert: 6. Jul 2021 13:39
Answers: 1

Re: Sonos funktioniert nach openHAB 3 Migration nicht mehr

Beitrag von Michdo93 »

Ich hab tatsächlich etwas gelesen gehabt zwecks Docker, aber ich glaube dies bringt mich nicht weiter.

Antworten