LightwaveRF command line syntax

I am trying to create a switch in HA that controls my LightwaveRF hub directly.
I can send the following commands directly from my Rpi command line and it switches the lamp on and off.

echo -n ‘100,!R2D1F1’ >/dev/udp/
echo -n ‘100,!R2D1F0’ >/dev/udp/

I cannot find the right syntax using echo that works from within HA when I try to define it as a switch.
This is the setup

  • platform: command_line
    command_on: echo -n ‘100,!R2D1F1’ > /dev/udp/
    command_off: echo -n ‘100,!R2D1F0’ >/dev/udp/’

[The spacing is correct in the configuration file]

I have tried various combinations of single and double quotes with no success
I already have lots of switches working using command_line with curl with no problems

Can anyone help?


Hi Tommy,

Did you ever resolve this mate?