$EVENT not working

Begonnen von andyclimb, 07 Mai 2015, 13:58:44

Vorheriges Thema - Nächstes Thema

andyclimb

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?
AM

rudolfkoenig

{ 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.

Markus Bloch

you need to escape:

ws2812_mode { system "ssh rasplex \"/usr/bin/hyperion-remote -e '$EVENT' \" &" }
Developer für Module: YAMAHA_AVR, YAMAHA_BD, FB_CALLMONITOR, FB_CALLLIST, PRESENCE, Pushsafer, LGTV_IP12, version

aktives Mitglied des FHEM e.V. (Technik)