Sonos und notify

Begonnen von aramis, 07 Mai 2016, 15:06:09

Vorheriges Thema - Nächstes Thema

aramis

Hallo zusammen,

Ich habe gerade ein notify gebaut. Der notify soll bei der Sonos den Radio Sender auf "SWR3" umstellen.
Nun habe ich ein kleines Problem. Wenn ich den notify auslöse bekomme ich im Event-Monitor:

2016-05-07 14:58:27 SONOSPLAYER Sonos_Sonos_2 LastActionResult: LoadRadio: Radio "SWR3SWR3SWR3ElchradioSWR397.5SWR3(Pop)" not found. Choose one of: "Christmas-Hits","NDR 2 (Pop)","OE3 Hitradio 99.9 (Top 40)","Radio Zürisee 107.4 (Pop)","SWR3 Elchradio 97.5 (Pop)"

Mein notify schaut so aus:
Sonos_2_Radio:SWR3 set Sonos_Sonos_2 StartRadio SWR3 Elchradio 97.5 (Pop)

Maskiere ich nun die Leerzeichen mit %20:
Sonos_2_Radio:SWR3 set Sonos_Sonos_2 StartRadio SWR3%20Elchradio%2097.5%20(Pop)

Bekomme ich im Event Monitor:
2016-05-07 15:04:22 SONOSPLAYER Sonos_Sonos_2 LastActionResult: LoadRadio: Radio "SWR3SWR320ElchradioSWR32097.5SWR320(Pop)" not found. Choose one of: "Christmas-Hits","NDR 2 (Pop)","OE3 Hitradio 99.9 (Top 40)","Radio Zürisee 107.4 (Pop)","SWR3 Elchradio 97.5 (Pop)"


Ich habe schon alles möglich versucht. Sprich "-Zeichen, '-Zeichen, nur das %-Zeichen. Irgendwie bekomme ich es nicht hin.

Gebe ich:
set Sonos_Sonos_2 StartRadio SWR3 Elchradio 97.5 (Pop)
ganz normal oben in das Command-Feld ein funktioniert der Befehl

Hat mir jemand einen Tip?

Danke euch
####################
=> ganz viele verrückte Ideen
####################

CoolTux

Und wenn Du die Leerzeichen nicht maskierst?
Es also so machst?

Sonos_2_Radio:SWR3 set Sonos_Sonos_2 StartRadio SWR3 Elchradio 97.5 (Pop)


Ansonsten könntest Du noch das % maskieren


Sonos_2_Radio:SWR3 set Sonos_Sonos_2 StartRadio SWR3\%20Elchradio\%2097.5\%20(Pop)
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

aramis

Zitat von: CoolTux am 07 Mai 2016, 15:20:53
Und wenn Du die Leerzeichen nicht maskierst?
Es also so machst?

Sonos_2_Radio:SWR3 set Sonos_Sonos_2 StartRadio SWR3 Elchradio 97.5 (Pop)


Da bekomme ich das erste ergebnis.

Zitat von: CoolTux am 07 Mai 2016, 15:20:53
Ansonsten könntest Du noch das % maskieren


Sonos_2_Radio:SWR3 set Sonos_Sonos_2 StartRadio SWR3\%20Elchradio\%2097.5\%20(Pop)


Das muss ich ausprobieren. Ich melde mich gleich.
####################
=> ganz viele verrückte Ideen
####################

aramis

Ohne Erfolg:

2016-05-07 15:33:06 dummy Sonos_2_Radio SWR3
2016-05-07 15:33:07 SONOSPLAYER Sonos_Sonos_2 LastActionResult: LoadRadio: Radio "SWR3\SWR320Elchradio\SWR32097.5\SWR320(Pop)" not found. Choose one of: "Christmas-Hits","NDR 2 (Pop)","OE3 Hitradio 99.9 (Top 40)","Radio Zürisee 107.4 (Pop)","SWR3 Elchradio 97.5 (Pop)"
2016-05-07 15:33:07 SONOSPLAYER Sonos_Sonos_2 LastActionResult: Play: Success!
####################
=> ganz viele verrückte Ideen
####################

FHEm2005

#4
Löse mal die Klammer auf mit ( = %28 und ) =%29 .

Also: SWR3%20Elchradio%2097.5%20%28Pop%29

Gruß Eberhard
Raspi3: FHEM, CULV3 (V1.61), EnOcean Pi 868, nanoCUL433, HUE-Bridge; Raspi4: Node-red, MQTT, Gaszähler auslesen mit ESP32-CAM

justme1968

das einfachste ist die regex variante zu verwenden:set Sonos_Sonos_2 StartRadio /SWR3.Elchradio/

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

aramis

Zitat von: FHEm2005 am 07 Mai 2016, 21:13:50
Löse mal die Klammer auf mit ( = %28 und ) =%29 .

Also: SWR3%20Elchradio%2097.5%20%28Pop%29

Gruß Eberhard

Der Code funktioniert leider nicht.

Zitat von: justme1968 am 07 Mai 2016, 21:35:48
das einfachste ist die regex variante zu verwenden:set Sonos_Sonos_2 StartRadio /SWR3.Elchradio/

gruss
  andre

Danke. Der Code hat funktioniert.
Super - ich weiß warum ihc die Community hier so liebe - IHR SEIT DIE BESTEN!
####################
=> ganz viele verrückte Ideen
####################