FHEM Forum

FHEM => English Corner => Thema gestartet von: andyclimb am 07 Mai 2015, 13:58:44

Titel: $EVENT not working
Beitrag von: andyclimb am 07 Mai 2015, 13:58:44
Hi all,

I'm trying to pass an event that has spaces in it to the command line..

here is my notify
ws2812_mode { system "ssh rasplex '/usr/bin/hyperion-remote -e '$EVENT' ' &" } if i issue
set ws2812_mode Knight rider
then this is generated...

Start effect Knight
Connected to localhost:19444

so it is connecting but only sending what is equivalent to $EVTPART0, it is not sending the whole EVENT.  I get the same thing if i just echo it to the command line.  Is this a bug?
 
Titel: Antw:$EVENT not working
Beitrag von: rudolfkoenig am 07 Mai 2015, 14:34:41
{ system "CMD &" } is in FHEM more or less equivalent with "CMD"
The argument seems strange to me, it contains way too many single quotes.
Have you tested the command without FHEM? Passing a space in an argument over SSH is sometimes a challenge.
Titel: Antw:$EVENT not working
Beitrag von: Markus Bloch am 09 Mai 2015, 13:57:56
you need to escape:

ws2812_mode { system "ssh rasplex \"/usr/bin/hyperion-remote -e '$EVENT' \" &" }