Da ich das hier mitlese wollte ich die Player mal neu anlegen um eventuelle Änderungen einzupflegen
nur leider sind jetzt alle Bedienfelder verschwunden also erst mal zurück auf alt
Alt:
define MQTT2_RINCON_5CAAFD243CDE01400 MQTT2_DEVICE RINCON_5CAAFD243CDE01400
attr MQTT2_RINCON_5CAAFD243CDE01400 DbLogExclude .*
attr MQTT2_RINCON_5CAAFD243CDE01400 IODev mqtt2server
attr MQTT2_RINCON_5CAAFD243CDE01400 alias Wohnzimmer
attr MQTT2_RINCON_5CAAFD243CDE01400 devStateIcon 0:10px-kreis-rot 1:10px-kreis-gelb 2:10px-kreis-gruen (0|1).(STOPPED|PAUSED_PLAYBACK):rc_BLANK 2.(STOPPED|PAUSED_PLAYBACK):rc_PLAY@green:play 2.(pause|stop):rc_STOP@red:play 2.PLAYING:rc_STOP@red:stop 2.(TRANSITIONING|play):rc_PLAY@yellow:stop 2.mute:audio_volume_mute@yellow:stop 2.volume:audio_volume_mid@yellow:stop 2.volumeDown:audio_volume_low@yellow:stop 2.volumeUp:audio_volume_high@yellow:stop 2.next:rc_NEXT@yellow:stop 2.previous:rc_PREVIOUS@yellow:stop (STOPPED|PAUSED_PLAYBACK).(false|previous|next|volumeDown|volumeUp|[0-9]+|CURRENT.*|NEXT.*|PAUSED_PLAYBACK):rc_BLANK \b(?!(STOPPED|PAUSED_PLAYBACK)\b)\w+.previous:rc_PREVIOUS:previous \b(?!(STOPPED|PAUSED_PLAYBACK)\b)\w+.next:rc_NEXT:next \b(?!(STOPPED|PAUSED_PLAYBACK)\b)\w+.volumeDown:rc_VOLDOWN:volumeDown \b(?!(STOPPED|PAUSED_PLAYBACK)\b)\w+.volumeUp:rc_VOLUP:volumeUp \b(?!(STOPPED|PAUSED_PLAYBACK)\b)\w+.false:rc_VOLUP:mute+true \b(?!(STOPPED|PAUSED_PLAYBACK)\b)\w+.true:rc_MUTE:mute+false
attr MQTT2_RINCON_5CAAFD243CDE01400 icon audio_volume_low
attr MQTT2_RINCON_5CAAFD243CDE01400 jsonMap volume_Master:volume mute_Master:mute transportState:state
attr MQTT2_RINCON_5CAAFD243CDE01400 model sonos2mqtt_speaker
attr MQTT2_RINCON_5CAAFD243CDE01400 readingList sonos/status/wohnzimmer/avtransport:.* { json2nameValue($EVENT,'AV_',$JSONMAP) }\
sonos/status/wohnzimmer/renderingcontrol:.* { json2nameValue($EVENT,'REND_',$JSONMAP) }\
sonos/RINCON_5CAAFD243CDE01400:.* { json2nameValue($EVENT,'',$JSONMAP) }\
sonos/connected:.* bridgeConnected\
sonos/RINCON_5CAAFD243CDE01400/error:.* { json2nameValue($EVENT) }
attr MQTT2_RINCON_5CAAFD243CDE01400 room MQTT2_DEVICE
attr MQTT2_RINCON_5CAAFD243CDE01400 setList stop:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "stop" }\
play:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "play" }\
pause:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "pause" }\
toggle:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "toggle" }\
volumeUp:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "volumeup" }\
volumeDown:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "volumedown" }\
volume:slider,0,1,100 sonos/RINCON_5CAAFD243CDE01400/control { "command": "volume", "input": $EVTPART1 }\
mute:iconSwitch,false,rc_MUTE,true,rc_VOLUP { my $value = $EVTPART1 eq "true" ? "mute" : "unmute";;;; qq(sonos/RINCON_5CAAFD243CDE01400/control { "command": "$value" } ) }\
next:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "next" }\
previous:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "previous" }\
joinGroup:textField sonos/RINCON_5CAAFD243CDE01400/control { "command": "joingroup", "input": "$EVTPART1"}\
leaveGroup:noArg { my $value = ReadingsVal("RINCON_5CAAFD243CDE01400","groupName","all");; qq(sonos/RINCON_5CAAFD243CDE01400/control { "command": "leavegroup", "input": "$value" } ) }\
setAVTUri:textField sonos/RINCON_5CAAFD243CDE01400/control { "command": "setavtransporturi", "input": "$EVTPART1"}\
notify:textField sonos/RINCON_5CAAFD243CDE01400/control { "command":"notify","input":{"trackUri":"$EVTPART2","onlyWhenPlaying":false,"timeout":10,"volume":$EVTPART1,"delayMs":700}}\
x_raw_payload:textField { my $payload = $EVENT;;$payload =~ s/$EVTPART0 //g;; qq(sonos/RINCON_5CAAFD243CDE01400/control $payload)}\
playUri:textField {fhem("sleep 1;; set $NAME play");; qq(sonos/RINCON_5CAAFD243CDE01400/control { "command": "setavtransporturi", "input": "$EVTPART1"})}\
speak:textField { my $tts="SonosTTS";;my $payload = $EVENT;;$payload =~ s/$EVTPART0 $EVTPART1 //g;; fhem("setreading $tts Player $NAME;;setreading $tts volume $EVTPART1;;set $tts tts $payload");;"{}"}
attr MQTT2_RINCON_5CAAFD243CDE01400 stateFormat [$name:bridgeConnected]\
[$name:bridgeConnected].[$name:state]\
[$name:state].previous\
[$name:state].next\
[$name:state].volumeDown\
[$name:state].volumeUp\
; ; ;\
[$name:state].[$name:mute]\
<br>[$name:state] CURRENT: [$name:AV_CurrentTrackMetaData_Artist] - [$name:AV_CurrentTrackMetaData_Title] - ([$name:currentTrack_Duration])\
<br>[$name:state] NEXT: ; ; ; ; ; ;[$name:AV_NextTrackMetaData_Artist] - [$name:AV_NextTrackMetaData_Title] - ([$name:nextTrack_Duration])
----------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Neu
defmod MQTT2_RINCON_5CAAFD243CDE01400 MQTT2_DEVICE RINCON_5CAAFD243CDE01400
attr MQTT2_RINCON_5CAAFD243CDE01400 DbLogExclude .*
attr MQTT2_RINCON_5CAAFD243CDE01400 IODev mqtt2server
attr MQTT2_RINCON_5CAAFD243CDE01400 alias Wohnzimmer
attr MQTT2_RINCON_5CAAFD243CDE01400 icon audio_volume_low
attr MQTT2_RINCON_5CAAFD243CDE01400 jsonMap volume_Master:volume mute_Master:mute transportState:state
attr MQTT2_RINCON_5CAAFD243CDE01400 model sonos2mqtt_speaker
attr MQTT2_RINCON_5CAAFD243CDE01400 readingList sonos/RINCON_5CAAFD243CDE01400:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr MQTT2_RINCON_5CAAFD243CDE01400 room MQTT2_DEVICE
attr MQTT2_RINCON_5CAAFD243CDE01400 setList stop:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "stop" }\
play:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "play" }\
pause:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "pause" }\
toggle:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "toggle" }\
volumeUp:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "volumeup" }\
volumeDown:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "volumedown" }\
volume:slider,0,1,100 sonos/RINCON_5CAAFD243CDE01400/control { "command": "volume", "input": $EVTPART1 }\
mute:on,off { my $value = $EVTPART1 eq "on" ? "mute" : "unmute";; qq(sonos/RINCON_5CAAFD243CDE01400/control { "command": "$value" } ) }\
next:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "next" }\
previous:noArg sonos/RINCON_5CAAFD243CDE01400/control { "command": "previous" }\
joinGroup:textField sonos/RINCON_5CAAFD243CDE01400/control { "command": "joingroup", "input": "$EVTPART1"}\
leaveGroup:noArg { my $value = ReadingsVal("RINCON_5CAAFD243CDE01400","groupName","all");; qq(sonos/RINCON_5CAAFD243CDE01400/control { "command": "leavegroup", "input": "$value" } ) }\
setAVTUri:textField sonos/RINCON_5CAAFD243CDE01400/control { "command": "setavtransporturi", "input": "$EVTPART1"}\
playUri:textField {fhem("set $NAME setAVTUri $EVTPART1;; sleep 1;; set $NAME play")}\
input:Queue { my $value = $EVTPART1 eq "TV" ? "tv" : $EVTPART1 eq "Line_In" ? "line" : "queue";; qq(sonos/RINCON_5CAAFD243CDE01400/control { "command": "switchto$value" } ) }\
notify:textField sonos/RINCON_5CAAFD243CDE01400/control { "command":"notify","input":{"trackUri":"$EVTPART2","onlyWhenPlaying":false,"timeout":10,"volume":$EVTPART1,"delayMs":700}}\
x_raw_payload:textField { my $payload = $EVENT;;$payload =~ s/$EVTPART0 //g;; qq(sonos/RINCON_5CAAFD243CDE01400/control $payload)}\
speak:textField { my $tts="SonosTTS";;my $payload = $EVENT;;$payload =~ s/$EVTPART0 $EVTPART1 //g;; fhem("setreading $tts Player $NAME;;setreading $tts volume $EVTPART1;;set $tts tts $payload");;"{}"}