Sonos2mqtt - vielleicht hat jemand Lust mitzumachen

Begonnen von Otto123, 31 Mai 2020, 18:30:55

Vorheriges Thema - Nächstes Thema

pettibone2002

Hallo allerseits,
von mir auch vielen Dank für das tolle Modul!

Ich habe leider das Problem, dass ich die Favoriten nicht auslesen kann:

Die SonosBridge ist angelegt nach Anleitung. Sonos2mqtt läuft (Docker Container in Proxmox LXC). Auch die Speaker werden erkannt und ich kann sie über FHEM steuern. Trotzdem erhalte ich ein Timeout, wenn ich die Favoriten über die Bridge abrufen möchte.

Internals:
   CFGFN     
   FUUID      671a0441-f33f-3e2f-40ef-e09c6c3cff1ff7c6
   IODev      MQTT2Server
   LASTInputDev MQTT2Server
   MQTT2Server_CONN MQTT2Server_192.168.0.175_58426
   MQTT2Server_MSGCNT 23
   MQTT2Server_TIME 2024-10-24 12:18:47
   MSGCNT     23
   NAME       SonosBridge
   NR         67
   STATE      2
   TYPE       MQTT2_DEVICE
   eventCount 6
   OLDREADINGS:
   READINGS:
     2024-10-24 10:26:05   attrTemplateVersion 20210303
     2024-10-24 10:26:27   config_RINCON_000E5877AE0601400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_000E5877AE0601400/control","device":{"identifiers":["RINCON_000E5877AE0601400"],"manufacturer":"Sonos","name":"Bad"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_000E5877AE0601400","name":"Bad","state_topic":"sonos/RINCON_000E5877AE0601400","unique_id":"sonos2mqtt_RINCON_000E5877AE0601400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
     2024-10-24 10:26:27   config_RINCON_48A6B887EF0001400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_48A6B887EF0001400/control","device":{"identifiers":["RINCON_48A6B887EF0001400"],"manufacturer":"Sonos","name":"Küche"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_48A6B887EF0001400","name":"Küche","state_topic":"sonos/RINCON_48A6B887EF0001400","unique_id":"sonos2mqtt_RINCON_48A6B887EF0001400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
     2024-10-24 10:26:27   connected       2
     2024-10-24 12:15:01   state           PauseAll
Attributes:
   IODev      mqtt2s
   bridgeRegexp sonos/(RINCON_[A-Z0-9]+)[:/].* "$1"
   devStateIcon 0:10px-kreis-rot 1:10px-kreis-gelb 2:10px-kreis-gruen
   devicetopic sonos
   getList    Favorites:noArg Favorites {sonos2mqtt($NAME,$EVENT)}
Reply:Favorites,Radios,Playlists Reply {sonos2mqtt($NAME,$EVENT)}
listalarms:noArg Alarms {sonos2mqtt($NAME,$EVENT)}
   icon       mqtt_bridge_2
   model      sonos2mqtt_bridge
   readingList sonos/status/[^/]+/renderingcontrol:.* {}
homeassistant/music_player/RINCON_([0-9A-Z]+)/sonos/config:.* { $TOPIC =~ m,(RINCON_[0-9A-Z]+),; { "config_$1"=>$EVENT }}
sonos/connected:.* connected
sonos/status/[^/]+/avtransport:.* {}
zigbee2mqtt/RINCON_([0-9A-Z]+)/Favorites:.* Favorites
zigbee2mqtt/RINCON_([0-9A-Z]+)/Reply:.* Reply
zigbee2mqtt/alarms:.* Alarms
   room       MQTT2_DEVICE
   setList    CheckSubscription:noArg $DEVICETOPIC/cmd/check-subscriptions
PauseAll:noArg $DEVICETOPIC/cmd/pauseall
announcementall:textField {sonos2mqtt($NAME,$EVENT)}
notifyall:textField {sonos2mqtt($NAME,$EVENT)}
setalarm:textField $DEVICETOPIC/cmd/setalarm
speak:textField {sonos2mqtt($NAME,$EVENT)}
   stateFormat connected
   userReadings favlist:Favorites.* {sonos2mqtt_ur($name,'favlist')},
grouplist:Favorites.* {sonos2mqtt_ur($name,'grouplist')}


Hat jemand eine Idee, woran es liegen könnte?

Jamo

Hallo Otto,
wie spielt man denn mit den adv-commands einen Favouriten ab?
Hast Du eventuell ein Beispiel?

Das abspielen von Favoriten über den setter im Sonosplayer funktioniert bei mir nicht, ich würde das gerne mal per adv-command probieren. Volume und GroupVolume habe ich auch wie bei Dir im Zitat vom 01.April implementiert, das funktioniert super!

Danke, Jamo

Zitat von: Otto123 am 01 April 2024, 11:48:55Christian hat hier diese Frage gestellt https://forum.fhem.de/index.php?topic=88021.msg1309358#msg1309358

Leider sehe ich in Stephans Code keine direkte Realisierung der gewünschten Befehle in sonso2mqtt?
Die hier gezeigten groupvolume Befehle funktionieren nicht und wenn man in den verlinkten Stellen im Code schaut sind die mMn auch nicht in sonos2mqtt implementiert.

Aber es funktioniert - ich erinnere mich: Stephan hat viele Dinge nicht mehr speziell sondern allgemein über advanced commands implementiert. 
Auf die Schnelle geht es ganz einfach :) mit dem json welches man hier erklärt findet,
{
  "command": "adv-command",
  "input": {
    "cmd": "GroupRenderingControlService.SetGroupVolume",
    "val": {
      "InstanceID": 0,
      "Channel": "Master",
      "DesiredVolume": 20
    }
  }
}
{
  "command": "adv-command",
  "input": {
    "cmd": "GroupRenderingControlService.SetRelativeGroupVolume",
    "val": {
      "InstanceID": 0,
      "Channel": "Master",
      "Adjustment": "+20"
    }
  }
}
dies wirft man zum Test einfach in das Textfeld oder in die FHEM Kommandozeile
set alias=Bad x_raw_payload {...}
Probiere das mal bitte - man kann das später in die sonos2mqttUtils implementieren.

Gruß Otto
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/Conbee III, FB7690, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack, Sonos, ESPresence

TomLee

Hast Du die Favoriten auch im Reading Favorites der Bridge ?

Wenn nicht, mal ein get <bridgedevicename> Favorites ausführen !?

(Weit hergeholt, weil lange schon nicht mehr mit beschäftigt)

Jamo

Hallo TomLee,
ja, das sieht so aus:define SonosBridge MQTT2_DEVICE
attr SonosBridge IODev SONOS2MQTTCLIENT
attr SonosBridge alias SonosBridge
attr SonosBridge autocreate 0
attr SonosBridge bridgeRegexp sonos/(RINCON_[A-Z0-9]+)[:/].* "$1"
attr SonosBridge comment Do not use very open bridgeRegexp expressions! This might lead to irritating results... Especially make sure to not have two regexpes that may both match!
attr SonosBridge devStateIcon 0:10px-kreis-rot 1:10px-kreis-gelb 2:10px-kreis-gruen
attr SonosBridge devicetopic sonos
attr SonosBridge getList Favorites:noArg Favorites {sonos2mqtt($NAME,$EVENT)}\
Reply:Favorites,Radios,Playlists Reply {sonos2mqtt($NAME,$EVENT)}\
listalarms:noArg Alarms {sonos2mqtt($NAME,$EVENT)}
attr SonosBridge group SERVER
attr SonosBridge icon mqtt_bridge_2
attr SonosBridge jsonMap volume_Master:volume mute_Master:mute
attr SonosBridge model sonos2mqtt_bridge
attr SonosBridge readingList sonos/status/[^/]+/renderingcontrol:.* {}\
homeassistant/music_player/RINCON_([0-9A-Z]+)/sonos/config:.* { $TOPIC =~ m,(RINCON_[0-9A-Z]+),;; { "config_$1"=>$EVENT }}\
sonos/RINCON_([0-9A-Z]+)/Favorites:.* Favorites\
sonos/RINCON_([0-9A-Z]+)/Reply:.* Reply\
sonos/alarms:.* Alarms\
sonos/connected:.* connected\
sonos/status/[^/]+/avtransport:.* {}
attr SonosBridge room Sonos
attr SonosBridge setList CheckSubscription:noArg $DEVICETOPIC/cmd/check-subscriptions\
PauseAll:noArg $DEVICETOPIC/cmd/pauseall\
announcementall:textField {sonos2mqtt($NAME,$EVENT)}\
notifyall:textField {sonos2mqtt($NAME,$EVENT)}\
setalarm:textField $DEVICETOPIC/cmd/setalarm\
speak:textField {sonos2mqtt($NAME,$EVENT)}
attr SonosBridge setStateList on off
attr SonosBridge stateFormat connected
attr SonosBridge userReadings favlist:Favorites.* {sonos2mqtt_ur($name,'favlist')},\
grouplist:Favorites.* {sonos2mqtt_ur($name,'grouplist')}
#   FUUID      666eb54d-f33f-97bf-f816-ee0e5fd868125fab
#   IODev      SONOS2MQTTCLIENT
#   LASTInputDev SONOS2MQTTCLIENT
#   MQTTraspi_MSGCNT 2228
#   MQTTraspi_TIME 2024-10-28 09:11:10
#   MSGCNT     4456
#   NAME       SonosBridge
#   NR         3075
#   SONOS2MQTTCLIENT_MSGCNT 2228
#   SONOS2MQTTCLIENT_TIME 2024-10-28 09:11:10
#   STATE      2
#   TYPE       MQTT2_DEVICE
#   eventCount 10
#   JSONMAP:
#     mute_Master mute
#     volume_Master volume
#   READINGS:
#     2024-07-20 21:54:07   Favorites       {"Result":[{"AlbumArtUri":"http://cdn-profiles.tunein.com/s17488/images/logoq.png","Title":"95.5 Charivari","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/7","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s17488?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s42824/images/logoq.png?t=151377","Title":"ANTENNE BAYERN","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/11","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s42824?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s24854/images/logoq.png?t=153565","Title":"Bayern 1","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/1","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s24854?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s14991/images/logoq.png?t=1","Title":"Bayern 3","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/16","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s14991?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s8007q.png","Title":"Hitradio Ö3","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/2","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s8007?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s96270q.png","Title":"HITRADIO RTL - Dresden","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/13","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s96270?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s218146/images/logoq.png?t=155360","Title":"kronehit","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/3","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s218146?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s257286/images/logoq.png?t=154885","Title":"kronehit latino","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/4","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s257286?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s17494q.png","Title":"Radio Gong 96.3","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/6","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s17494?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s249713/images/logoq.png?t=1","Title":"Spreeradio 80er Love","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/17","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s249713?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s100189q.png","Title":"WDR 2 Südwestfalen","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/10","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s100189?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s8294/images/logoq.jpg","Title":"WDR 3","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/9","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s8294?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s73208q.png","Title":"Радио ENERGY (NRJ) България","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/5","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s73208?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"}],"NumberReturned":13,"TotalMatches":13,"UpdateID":1}
#     2024-10-27 16:40:44   IODev           SONOS2MQTTCLIENT
#     2024-07-20 21:40:19   Playlists       {"Result":"&lt;DIDL-Lite xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot; xmlns:r=&quot;urn:schemas-rinconnetworks-com:metadata-1-0/&quot; xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot;&gt;&lt;/DIDL-Lite&gt;","NumberReturned":0,"TotalMatches":0,"UpdateID":1}
#     2024-07-20 21:40:28   Reply           {"Result":"&lt;DIDL-Lite xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot; xmlns:r=&quot;urn:schemas-rinconnetworks-com:metadata-1-0/&quot; xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot;&gt;&lt;/DIDL-Lite&gt;","NumberReturned":0,"TotalMatches":0,"UpdateID":1}
#     2024-06-16 18:25:17   attrTemplateVersion 20210303
#     2024-10-24 18:59:43   config_RINCON_347E5C321A3401400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_347E5C321A3401400/control","device":{"identifiers":["RINCON_347E5C321A3401400"],"manufacturer":"Sonos","name":"Küche"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_347E5C321A3401400","name":"Küche","state_topic":"sonos/RINCON_347E5C321A3401400","unique_id":"sonos2mqtt_RINCON_347E5C321A3401400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
#     2024-10-24 18:59:43   config_RINCON_347E5CC8AA1E01400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_347E5CC8AA1E01400/control","device":{"identifiers":["RINCON_347E5CC8AA1E01400"],"manufacturer":"Sonos","name":"Wohnzimmer"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_347E5CC8AA1E01400","name":"Wohnzimmer","state_topic":"sonos/RINCON_347E5CC8AA1E01400","unique_id":"sonos2mqtt_RINCON_347E5CC8AA1E01400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
#     2024-10-24 18:59:43   config_RINCON_347E5CC8B64C01400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_347E5CC8B64C01400/control","device":{"identifiers":["RINCON_347E5CC8B64C01400"],"manufacturer":"Sonos","name":"Wohnzimmer"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_347E5CC8B64C01400","name":"Wohnzimmer","state_topic":"sonos/RINCON_347E5CC8B64C01400","unique_id":"sonos2mqtt_RINCON_347E5CC8B64C01400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
#     2024-10-24 18:59:43   config_RINCON_347E5CF5645C01400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_347E5CF5645C01400/control","device":{"identifiers":["RINCON_347E5CF5645C01400"],"manufacturer":"Sonos","name":"Bad"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_347E5CF5645C01400","name":"Bad","state_topic":"sonos/RINCON_347E5CF5645C01400","unique_id":"sonos2mqtt_RINCON_347E5CF5645C01400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
#     2024-10-24 18:59:43   connected       2
#     2024-07-20 21:54:07   favlist         95.5.Charivari,ANTENNE.BAYERN,Bayern.1,Bayern.3,HITRADIO.RTL.-.Dresden,Hitradio.Ö3,Radio.Gong.96.3,Spreeradio.80er.Love,WDR.2.Südwestfalen,WDR.3,kronehit,kronehit.latino,Радио.ENERGY.(NRJ).България
#     2024-07-20 21:54:07   grouplist       Bad,Küche,Wohnzimmer
#     2024-07-20 22:00:43   notifyall       set notifyall huhu [SonosTTS:httpName]
#   hmccu:
#
setstate SonosBridge 2
setstate SonosBridge 2024-07-20 21:54:07 Favorites {"Result":[{"AlbumArtUri":"http://cdn-profiles.tunein.com/s17488/images/logoq.png","Title":"95.5 Charivari","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/7","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s17488?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s42824/images/logoq.png?t=151377","Title":"ANTENNE BAYERN","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/11","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s42824?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s24854/images/logoq.png?t=153565","Title":"Bayern 1","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/1","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s24854?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s14991/images/logoq.png?t=1","Title":"Bayern 3","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/16","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s14991?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s8007q.png","Title":"Hitradio Ö3","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/2","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s8007?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s96270q.png","Title":"HITRADIO RTL - Dresden","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/13","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s96270?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s218146/images/logoq.png?t=155360","Title":"kronehit","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/3","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s218146?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s257286/images/logoq.png?t=154885","Title":"kronehit latino","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/4","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s257286?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s17494q.png","Title":"Radio Gong 96.3","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/6","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s17494?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s249713/images/logoq.png?t=1","Title":"Spreeradio 80er Love","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/17","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s249713?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s100189q.png","Title":"WDR 2 Südwestfalen","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/10","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s100189?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-profiles.tunein.com/s8294/images/logoq.jpg","Title":"WDR 3","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/9","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s8294?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"},{"AlbumArtUri":"http://cdn-radiotime-logos.tunein.com/s73208q.png","Title":"Радио ENERGY (NRJ) България","UpnpClass":"object.itemobject.item.sonos-favorite","ItemId":"FV:2/5","ParentId":"FV:2","TrackUri":"x-sonosapi-stream:s73208?sid=333&flags=8224&sn=4","ProtocolInfo":"x-sonosapi-stream:*:*:*"}],"NumberReturned":13,"TotalMatches":13,"UpdateID":1}
setstate SonosBridge 2024-10-27 16:40:44 IODev SONOS2MQTTCLIENT
setstate SonosBridge 2024-07-20 21:40:19 Playlists {"Result":"&lt;;DIDL-Lite xmlns:dc=&quot;;http://purl.org/dc/elements/1.1/&quot;; xmlns:upnp=&quot;;urn:schemas-upnp-org:metadata-1-0/upnp/&quot;; xmlns:r=&quot;;urn:schemas-rinconnetworks-com:metadata-1-0/&quot;; xmlns=&quot;;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot;;&gt;;&lt;;/DIDL-Lite&gt;;","NumberReturned":0,"TotalMatches":0,"UpdateID":1}
setstate SonosBridge 2024-07-20 21:40:28 Reply {"Result":"&lt;;DIDL-Lite xmlns:dc=&quot;;http://purl.org/dc/elements/1.1/&quot;; xmlns:upnp=&quot;;urn:schemas-upnp-org:metadata-1-0/upnp/&quot;; xmlns:r=&quot;;urn:schemas-rinconnetworks-com:metadata-1-0/&quot;; xmlns=&quot;;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot;;&gt;;&lt;;/DIDL-Lite&gt;;","NumberReturned":0,"TotalMatches":0,"UpdateID":1}
setstate SonosBridge 2024-06-16 18:25:17 attrTemplateVersion 20210303
setstate SonosBridge 2024-10-24 18:59:43 config_RINCON_347E5C321A3401400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_347E5C321A3401400/control","device":{"identifiers":["RINCON_347E5C321A3401400"],"manufacturer":"Sonos","name":"Küche"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_347E5C321A3401400","name":"Küche","state_topic":"sonos/RINCON_347E5C321A3401400","unique_id":"sonos2mqtt_RINCON_347E5C321A3401400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
setstate SonosBridge 2024-10-24 18:59:43 config_RINCON_347E5CC8AA1E01400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_347E5CC8AA1E01400/control","device":{"identifiers":["RINCON_347E5CC8AA1E01400"],"manufacturer":"Sonos","name":"Wohnzimmer"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_347E5CC8AA1E01400","name":"Wohnzimmer","state_topic":"sonos/RINCON_347E5CC8AA1E01400","unique_id":"sonos2mqtt_RINCON_347E5CC8AA1E01400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
setstate SonosBridge 2024-10-24 18:59:43 config_RINCON_347E5CC8B64C01400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_347E5CC8B64C01400/control","device":{"identifiers":["RINCON_347E5CC8B64C01400"],"manufacturer":"Sonos","name":"Wohnzimmer"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_347E5CC8B64C01400","name":"Wohnzimmer","state_topic":"sonos/RINCON_347E5CC8B64C01400","unique_id":"sonos2mqtt_RINCON_347E5CC8B64C01400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
setstate SonosBridge 2024-10-24 18:59:43 config_RINCON_347E5CF5645C01400 {"available_commands":["adv-command","clearqueue","command","joingroup","leavegroup","mute","next","notify","notifytwo","pause","play","playmode","previous","queue","seek","selecttrack","setbass","setbuttonlockstate","setledstate","setnightmode","setavtransporturi","settreble","sleep","speak","speaktwo","stop","switchtoline","switchtoqueue","switchtotv","toggle","unmute","volume","volumedown","volumeup"],"command_topic":"sonos/RINCON_347E5CF5645C01400/control","device":{"identifiers":["RINCON_347E5CF5645C01400"],"manufacturer":"Sonos","name":"Bad"},"device_class":"speaker","icon":"mdi:speaker","json_attributes":true,"json_attributes_topic":"sonos/RINCON_347E5CF5645C01400","name":"Bad","state_topic":"sonos/RINCON_347E5CF5645C01400","unique_id":"sonos2mqtt_RINCON_347E5CF5645C01400_speaker","availability_topic":"sonos/connected","payload_available":"2"}
setstate SonosBridge 2024-10-24 18:59:43 connected 2
setstate SonosBridge 2024-07-20 21:54:07 favlist 95.5.Charivari,ANTENNE.BAYERN,Bayern.1,Bayern.3,HITRADIO.RTL.-.Dresden,Hitradio.Ö3,Radio.Gong.96.3,Spreeradio.80er.Love,WDR.2.Südwestfalen,WDR.3,kronehit,kronehit.latino,Радио.ENERGY.(NRJ).България
setstate SonosBridge 2024-07-20 21:54:07 grouplist Bad,Küche,Wohnzimmer
setstate SonosBridge 2024-07-20 22:00:43 notifyall set notifyall huhu [SonosTTS:httpName]

Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/Conbee III, FB7690, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack, Sonos, ESPresence

TomLee

#1399
Zitatwie spielt man denn mit den adv-commands einen Favouriten ab?
Hast Du eventuell ein Beispiel?

Du hast noch gar keinen setter playFav in den Devices? -> https://wiki.fhem.de/wiki/Sonos2mqtt#Befehle_nachr%C3%BCsten

edit:
sry falsch, hier:https://wiki.fhem.de/wiki/Sonos2mqtt#Player_mit_Favoritenliste_und_Gruppenliste_ausstatten

{sonos2mqtt_mod_list('a:model=sonos2mqtt_speaker','setList','joinGroup:'.ReadingsVal((devspec2array('a:model=sonos2mqtt_bridge'))[0],'grouplist','').q( {sonos2mqtt($NAME,$EVENT)}))}
{sonos2mqtt_mod_list('a:model=sonos2mqtt_speaker','setList','playFav:'.ReadingsVal((devspec2array('a:model=sonos2mqtt_bridge'))[0],'favlist','').q( {sonos2mqtt($NAME,$EVENT)}))}

Jamo

Hallo TomLee,
doch die habe ich, aber das funktioniert ja eben irgendwie nicht, und ich weiss nicht wie ich das debuggen kann. Im Eventmonitor sehe ich auch nichts.

[code]define MQTT2_RINCON_347E5CC8AA1E01400 MQTT2_DEVICE RINCON_347E5CC8AA1E01400
attr MQTT2_RINCON_347E5CC8AA1E01400 alias Wohn_R
attr MQTT2_RINCON_347E5CC8AA1E01400 comment Tipps zur Verwendung\
Die automatische Konfiguration setzt den alias entsprechend dem im Sonos vergeben Namen . Die langen MQTT2_RINCON_ Namen sind unhandlich und schlecht lesbar. Man kann Player mit einem devspec ansprechen, das simpelste ist:\
\
set alias=Wohn_R play\
Oder alle Player\
\
set model=sonos2mqtt_speaker leaveGroup
attr MQTT2_RINCON_347E5CC8AA1E01400 devStateIcon {sonos2mqtt($name,'devStateIcon')}
attr MQTT2_RINCON_347E5CC8AA1E01400 devicetopic sonos
attr MQTT2_RINCON_347E5CC8AA1E01400 event-on-change-reading state,transportState
attr MQTT2_RINCON_347E5CC8AA1E01400 group MEDIA
attr MQTT2_RINCON_347E5CC8AA1E01400 icon Sonos2mqtt_icon-S12
attr MQTT2_RINCON_347E5CC8AA1E01400 jsonMap volume_Master:volume mute_Master:mute
attr MQTT2_RINCON_347E5CC8AA1E01400 model sonos2mqtt_speaker
attr MQTT2_RINCON_347E5CC8AA1E01400 readingList $DEVICETOPIC/RINCON_347E5CC8AA1E01400/ZoneInfo:.* { json2nameValue($EVENT) }\
$DEVICETOPIC/RINCON_347E5CC8AA1E01400:.* { json2nameValue($EVENT,'',$JSONMAP) }\
$DEVICETOPIC/status/(.*)/avtransport:.* { sonos2mqtt_reading($NAME,$EVENT,$TOPIC) }\
sonos/RINCON_347E5CC8AA1E01400/control:.* { json2nameValue($EVENT) }
attr MQTT2_RINCON_347E5CC8AA1E01400 room Sonos
attr MQTT2_RINCON_347E5CC8AA1E01400 setList alarm:textField { sonos2mqtt_alarm($NAME,$EVENT) }\
input:Queue {sonos2mqtt($NAME,$EVENT)}\
joinGroup:Wohnzimmer {sonos2mqtt($NAME,$EVENT)}\
leaveGroup:noArg {sonos2mqtt($NAME,$EVENT)}\
mute:true,false {sonos2mqtt($NAME,$EVENT)}\
next:noArg {sonos2mqtt($NAME,$EVENT)}\
notify:textField {sonos2mqtt($NAME,$EVENT)}\
pause:noArg {sonos2mqtt($NAME,$EVENT)}\
play:noArg {sonos2mqtt($NAME,$EVENT)}\
playFav:95.5.Charivari,ANTENNE.BAYERN,Bayern.1,Bayern.3,HITRADIO.RTL.-.Dresden,Hitradio.Ö3,Radio.Gong.96.3,Spreeradio.80er.Love,WDR.2.Südwestfalen,WDR.3,kronehit,kronehit.latino,Радио.ENERGY.(NRJ).България {sonos2mqtt($NAME,$EVENT)}\
playUri:textField {sonos2mqtt($NAME,$EVENT)}\
previous:noArg {sonos2mqtt($NAME,$EVENT)}\
sayText:textField {sonos2mqtt($NAME,$EVENT)}\
setAVTUri:textField {sonos2mqtt($NAME,$EVENT)}\
sleep:selectnumbers,0,15,120,0,lin {sonos2mqtt($NAME,$EVENT)}\
snoozeAlarm:textField { sonos2mqtt($NAME,$EVENT) }\
speak:textField {sonos2mqtt($NAME,$EVENT)}\
stop:noArg {sonos2mqtt($NAME,$EVENT)}\
toggle:noArg {sonos2mqtt($NAME,$EVENT)}\
volume:slider,0,1,100 {sonos2mqtt($NAME,$EVENT)}\
volumeDown:noArg {sonos2mqtt($NAME,$EVENT)}\
volumeUp:noArg {sonos2mqtt($NAME,$EVENT)}\
x_raw_payload:textField {sonos2mqtt($NAME,$EVENT)}
attr MQTT2_RINCON_347E5CC8AA1E01400 stateFormat transportState
attr MQTT2_RINCON_347E5CC8AA1E01400 userReadings Master:groupName.* {(split(' \+',ReadingsVal($name,'groupName','')))[0]},\
isMaster:coordinatorUuid.* {ReadingsVal($name,'coordinatorUuid','') eq ReadingsVal($name,'uuid','')?1:0},\
inGroup:groupName.* {ReadingsVal($name,'groupName','') =~ / \+ /?1:0},\
inCouple:coordinatorUuid.* {(ReadingsVal($name,'coordinatorUuid','') ne ReadingsVal($name,'uuid','') and (index(ReadingsVal($name,'groupName',''), ReadingsVal($name,'name','')) != -1))?1:0},\
Input:currentTrack_TrackUri.* {sonos2mqtt_ur($name,'Input')}
attr MQTT2_RINCON_347E5CC8AA1E01400 verbose 0
attr MQTT2_RINCON_347E5CC8AA1E01400 webCmd volume
#   CID        RINCON_347E5CC8AA1E01400
#   DEF        RINCON_347E5CC8AA1E01400
#   FUUID      666f1390-f33f-97bf-c718-438d6c4e683195ef
#   IODev      SONOS2MQTTCLIENT
#   LASTInputDev MQTTraspi
#   MQTTraspi_MSGCNT 3611
#   MQTTraspi_TIME 2024-10-28 09:11:10
#   MSGCNT     7222
#   NAME       MQTT2_RINCON_347E5CC8AA1E01400
#   NR         3078
#   SONOS2MQTTCLIENT_MSGCNT 3611
#   SONOS2MQTTCLIENT_TIME 2024-10-28 09:11:10
#   STATE      STOPPED
#   TYPE       MQTT2_DEVICE
#   eventCount 24
#   JSONMAP:
#     mute_Master mute
#     volume_Master volume
#   READINGS:
#     2024-10-13 16:35:36   AlarmRunning    false
#     2024-06-16 18:43:28   CopyrightInfo   © 2003-2024, Sonos, Inc. All rights reserved.
#     2024-06-16 18:43:28   DisplaySoftwareVersion 16.2
#     2024-06-16 18:43:28   Flags           0
#     2024-06-16 18:43:28   HTAudioIn       0
#     2024-06-16 18:43:28   HardwareVersion 1.20.1.6-2.2
#     2024-10-23 15:11:13   IODev           SONOS2MQTTCLIENT
#     2024-06-16 18:43:28   IPAddress       168.92.0.73
#     2024-06-20 17:19:46   Input           Radio
#     2024-06-16 18:43:28   MACAddress      34:7E:5C:C8:AA:1E
#     2024-06-20 17:19:46   Master          Wohnzimmer
#     2024-06-16 18:43:28   SerialNumber    34-7E-5C-C8-AA-1E:G
#     2024-10-25 08:45:41   SleepTimerGeneration 0
#     2024-10-13 16:35:36   SnoozeRunning   false
#     2024-06-16 18:43:28   SoftwareVersion 79.1-53290
#     2024-06-16 18:43:28   associatedWith  SonosBridge
#     2024-06-16 18:43:28   attrTemplateVersion 20210303
#     2024-10-28 09:11:10   bass            5
#     2024-10-28 08:39:51   command         play
#     2024-10-28 09:11:10   coordinatorUuid RINCON_347E5CC8AA1E01400
#     2024-10-28 09:11:10   currentTrack_AlbumArtUri http://168.92.0.73:1400/getaa?s=1&u=x-sonosapi-stream%3atunein%253a6693%3fsid%3d303%26flags%3d8232%26sn%3d3
#     2024-10-28 09:09:45   currentTrack_Artist Fun feat. Janelle Monáe: We are young
#     2024-10-28 09:11:10   currentTrack_ItemId -1
#     2024-10-28 09:11:10   currentTrack_ParentId -1
#     2024-10-28 09:11:10   currentTrack_ProtocolInfo sonos.com-http:*:*:*
#     2024-10-28 09:08:04   currentTrack_Title am Vormittag
#     2024-10-28 09:11:10   currentTrack_TrackUri x-sonosapi-stream:tunein:6693?sid=303&flags=8232&sn=3
#     2024-10-28 09:11:10   currentTrack_UpnpClass object.item
#     2024-10-28 09:11:10   enqueuedMetadata_ItemId -1
#     2024-10-28 09:11:10   enqueuedMetadata_ParentId -1
#     2024-10-28 09:11:10   enqueuedMetadata_Title Bayern 3
#     2024-10-28 09:11:10   enqueuedMetadata_UpnpClass object.item.audioItem.audioBroadcast
#     2024-10-28 09:11:10   groupName       Wohnzimmer + 3
#     2024-06-20 17:19:46   inCouple        0
#     2024-06-20 17:19:46   inGroup         1
#     2024-10-28 08:39:50   input           x-sonosapi-stream:s24854?sid=333&flags=8224&sn=4
#     2024-10-27 13:01:51   input_cmd       GroupRenderingControlService.SetRelativeGroupVolume
#     2024-07-20 22:48:23   input_delayMs   700
#     2024-07-20 22:48:23   input_lang      de-DE
#     2024-07-20 22:48:23   input_name      Vicki
#     2024-07-20 22:47:48   input_onlyWhenPlaying false
#     2024-06-16 18:43:28   input_reply     ZoneInfo
#     2024-07-20 22:48:23   input_text      Test
#     2024-07-20 22:47:48   input_timeout   100
#     2024-07-20 22:47:48   input_trackUri  [SonosTTS:httpName]
#     2024-10-27 13:01:51   input_val_Adjustment +2
#     2024-10-27 13:01:51   input_val_Channel Master
#     2024-07-07 17:44:41   input_val_DesiredVolume 9
#     2024-10-27 13:01:51   input_val_InstanceID 0
#     2024-07-20 22:48:23   input_volume    25
#     2024-06-20 17:19:46   isMaster        1
#     2024-06-30 10:45:21   json2nameValueErrorText json2nameValue: no closing } found
#     2024-06-30 10:45:21   json2nameValueInput {"command": "adv-command","input": {"cmd": "GroupRenderingControlService.SetRelativeGroupVolume","val": {"InstanceID": 0,"Channel": "Master","Adjustment": "+2"}}
#     2024-10-28 09:11:10   model           Sonos Play:1
#     2024-06-16 18:43:28   modelNumber     S12
#     2024-10-28 09:11:10   mute            false
#     2024-10-28 09:11:10   mute_LF         false
#     2024-10-28 09:11:10   mute_RF         false
#     2024-10-28 09:11:10   name            Wohnzimmer
#     2024-10-28 09:11:10   playmode        NORMAL
#     2024-10-28 09:11:10   state           toggle
#     2024-10-28 09:11:10   transportState  STOPPED
#     2024-10-28 09:11:10   treble          8
#     2024-10-28 09:11:10   ts              1730103070257
#     2024-10-28 09:11:10   uuid            RINCON_347E5CC8AA1E01400
#     2024-10-28 09:11:10   volume          11
#     2024-10-28 09:11:10   volume_LF       100
#     2024-10-28 09:11:10   volume_RF       100
#
setstate MQTT2_RINCON_347E5CC8AA1E01400 STOPPED
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-13 16:35:36 AlarmRunning false
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 CopyrightInfo © 2003-2024, Sonos, Inc. All rights reserved.
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 DisplaySoftwareVersion 16.2
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 Flags 0
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 HTAudioIn 0
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 HardwareVersion 1.20.1.6-2.2
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-23 15:11:13 IODev SONOS2MQTTCLIENT
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 IPAddress 168.92.0.73
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-20 17:19:46 Input Radio
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 MACAddress 34:7E:5C:C8:AA:1E
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-20 17:19:46 Master Wohnzimmer
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 SerialNumber 34-7E-5C-C8-AA-1E:G
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-25 08:45:41 SleepTimerGeneration 0
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-13 16:35:36 SnoozeRunning false
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 SoftwareVersion 79.1-53290
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 associatedWith SonosBridge
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 attrTemplateVersion 20210303
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 bass 5
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 08:39:51 command play
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 coordinatorUuid RINCON_347E5CC8AA1E01400
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 currentTrack_AlbumArtUri http://168.92.0.73:1400/getaa?s=1&u=x-sonosapi-stream%3atunein%253a6693%3fsid%3d303%26flags%3d8232%26sn%3d3
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:09:45 currentTrack_Artist Fun feat. Janelle Monáe: We are young
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 currentTrack_ItemId -1
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 currentTrack_ParentId -1
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 currentTrack_ProtocolInfo sonos.com-http:*:*:*
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:08:04 currentTrack_Title am Vormittag
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 currentTrack_TrackUri x-sonosapi-stream:tunein:6693?sid=303&flags=8232&sn=3
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 currentTrack_UpnpClass object.item
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 enqueuedMetadata_ItemId -1
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 enqueuedMetadata_ParentId -1
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 enqueuedMetadata_Title Bayern 3
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 enqueuedMetadata_UpnpClass object.item.audioItem.audioBroadcast
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 groupName Wohnzimmer + 3
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-20 17:19:46 inCouple 0
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-20 17:19:46 inGroup 1
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 08:39:50 input x-sonosapi-stream:s24854?sid=333&flags=8224&sn=4
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-27 13:01:51 input_cmd GroupRenderingControlService.SetRelativeGroupVolume
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-07-20 22:48:23 input_delayMs 700
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-07-20 22:48:23 input_lang de-DE
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-07-20 22:48:23 input_name Vicki
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-07-20 22:47:48 input_onlyWhenPlaying false
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 input_reply ZoneInfo
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-07-20 22:48:23 input_text Test
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-07-20 22:47:48 input_timeout 100
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-07-20 22:47:48 input_trackUri [SonosTTS:httpName]
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-27 13:01:51 input_val_Adjustment +2
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-27 13:01:51 input_val_Channel Master
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-07-07 17:44:41 input_val_DesiredVolume 9
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-27 13:01:51 input_val_InstanceID 0
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-07-20 22:48:23 input_volume 25
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-20 17:19:46 isMaster 1
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-30 10:45:21 json2nameValueErrorText json2nameValue: no closing } found
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-30 10:45:21 json2nameValueInput {"command": "adv-command","input": {"cmd": "GroupRenderingControlService.SetRelativeGroupVolume","val": {"InstanceID": 0,"Channel": "Master","Adjustment": "+2"}}
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 model Sonos Play:1
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-06-16 18:43:28 modelNumber S12
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 mute false
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 mute_LF false
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 mute_RF false
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 name Wohnzimmer
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 playmode NORMAL
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 state toggle
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 transportState STOPPED
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 treble 8
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 ts 1730103070257
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 uuid RINCON_347E5CC8AA1E01400
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 volume 11
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 volume_LF 100
setstate MQTT2_RINCON_347E5CC8AA1E01400 2024-10-28 09:11:10 volume_RF 100

[/code]
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/Conbee III, FB7690, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack, Sonos, ESPresence

TomLee

Wenn du bspw. ein
{fhem("set MQTT2_RINCON_347E5CC8AA1E01400 setAVTUri x-sonosapi-stream:s42824?sid=333&flags=8224&sn=4;; sleep 1;;set MQTT2_RINCON_347E5CC8AA1E01400 play")}
oder

{fhem('set MQTT2_RINCON_347E5CC8AA1E01400 x_raw_payload { "command": "setavtransporturi",  "input": "x-sonosapi-stream:s42824?sid=333&flags=8224&sn=4"};; sleep 1;;set MQTT2_RINCON_347E5CC8AA1E01400 play')}
in der Kommandozeile ausführst, wird dann bei dir wirklich nicht Antenne Bayern abgespielt?

Jamo

Hallo TomLee,
Zitat. . . in der Kommandozeile ausführst, wird dann bei dir wirklich nicht Antenne Bayern abgespielt?
nein, dann passiert gar nichts. :-(
Keine Ahnung warum das nicht funktioniert, Volume/VolmeDown/VolumeUp funktioniert über die Setter.

Gruesse, Jamo
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/Conbee III, FB7690, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack, Sonos, ESPresence

TomLee

Bin auf der Suche wie das mit den adv-commands funzt am Ende hier gelandet.

Wenn Du in x_raw_payload folgendes ausführst:
{
  "command": "adv-command",
  "input": {
    "cmd": "SetAVTransportURI",
    "val": "x-sonosapi-stream:s42824?sid=333&flags=8224&sn=4"
  }
}

und anschliessend ein play. Wird dann bei dir Antenne Bayern abgespielt?

Bei mir klappt das so mit der URL aus dem currentTrack_TrackUri-Reading.

Auch das Beispiel aus dem Link:
{
  "command": "adv-command",
  "input": {
    "cmd": "SetAVTransportURI",
    "val": "x-rincon-mp3radio://http://ice3.somafm.com/groovesalad-64-aac"
  }
}
klappt bei mir auf Anhieb.

Jamo

#1404
Hallo Tom,
ZitatWird dann bei dir Antenne Bayern abgespielt?
danke, ja das funktioniert! Wir sind gleichzeitig auf die Lösung gekommen.
Ich hatte gestern auch einzeln alle Favoriten angespielt, und dann alle URLs aus dem currentTrack_TrackUri-Reading kopiert. Anstatt playFav benutze ich jetzt playUri, mit den vorher kopierten URLs.
Also fhem("set MQTT2_RINCON_347E5CC8AA1E01400 playUri x-sonosapi-stream:s42824?sid=333&flags=8224&sn=4");
Wobei ich die URLs in einem hash "Sender2PlayUrL" (also value key pairs) abgespeichert habe. Dann habe ich mithilfe eines weiteren dummy eine neue Setlist definiert, wo ich die Kürzel der Musik "stations" als setlist definiert habe. Damit kann ich jetzt auch alle Favoriten auswählen:

fhem ("set MQTT2_RINCON_347E5CC8AA1E01400 playUri $Sender2PlayUrL{$station}");

my %Sender2PlayUrL   = (
  '1_live'           => 'x-sonosapi-stream:tunein:9658?sid=303&flags=8232&sn=3',
  'antenne'          => 'x-sonosapi-stream:tunein:15359?sid=303&flags=8232&sn=3',
  'antenne_ac'       => 'x-sonosapi-stream:tunein:174333?sid=303&flags=8232&sn=3',
  'arabella'         => 'x-sonosapi-stream:tunein:96798?sid=303&flags=8232&sn=3',
  'br24'             => 'x-sonosapi-stream:tunein:17349?sid=303&flags=8232&sn=3',
.
.
);
Danke, ohne deine Schubser und Codebeispiele wäre ich nicht auf eine Lösung gekommen.
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/Conbee III, FB7690, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack, Sonos, ESPresence

TomLee

Wenn playUri funzt, dann muss auch playFav tun.

Zeig doch mal was im Log mit verbose 3 (vom Sonosdevice) steht und schau im Trafficmonitor von SONOS2MQTTCLIENT was genau "raus geht", wenn Du playFav ausführst.

Jamo

Hallo TomLee,
nein es liegt am URL, weil mit playUri:
fhem("set MQTT2_RINCON_347E5CC8AA1E01400 playUri http://s2-webradio.antenne.de/antenne/stream/aacp"); -> funktioniert nicht
fhem("set MQTT2_RINCON_347E5CC8AA1E01400 playUri x-sonosapi-stream:tunein:15359?sid=303&flags=8232&sn=3"); -> funktioniert

Gruesse
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/Conbee III, FB7690, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack, Sonos, ESPresence