FHEM Forum

FHEM - Anwendungen => Multimedia => Thema gestartet von: aramis am 07 Mai 2016, 15:06:09

Titel: Sonos und notify
Beitrag von: aramis am 07 Mai 2016, 15:06:09
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
Titel: Antw:Sonos und notify
Beitrag 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)


Ansonsten könntest Du noch das % maskieren


Sonos_2_Radio:SWR3 set Sonos_Sonos_2 StartRadio SWR3\%20Elchradio\%2097.5\%20(Pop)
Titel: Antw:Sonos und notify
Beitrag von: aramis am 07 Mai 2016, 15:30:59
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.
Titel: Antw:Sonos und notify
Beitrag von: aramis am 07 Mai 2016, 15:33:33
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!
Titel: Antw:Sonos und notify
Beitrag 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
Titel: Antw:Sonos und notify
Beitrag 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
Titel: Antw:Sonos und notify
Beitrag von: aramis am 07 Mai 2016, 22:34:05
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!