OH3 - Karaf console: How to escape strings?

Wanting to try out my new HmIP-WRCD I tried to send commands to the corresponding string item from the karaf console and didn’t get it to work because characters are stripped away from the command:

  • openhab:send Item_Name “{DDBC=WHITE,DDTC=BLACK,DDI=1,DDA=CENTER,DDS=Zeile1,DDID=1}”

    • New String (per log): DDBC=WHITE DDTC=BLACK DDI=1 DDA=CENTER DDS=Zeile1 DDID=1
  • openhab:send Item_Name {DDBC=WHITE,DDTC=BLACK,DDI=1,DDA=CENTER,DDS=Zeile1,DDID=1}

    • New String (per log): [DDBC=WHITE, DDTC=BLACK, DDI=1, DDA=CENTER, DDS=Zeile1, DDID=1]
  • openhab:send Item_Name {DDBC=WHITE,DDTC=BLACK,DDI=1,DDA=CENTER,DDS=Zeile1,DDID=1}

    • New String (per log): {DDBC=WHITE,DDTC=BLACK,DDI=1,DDA=CENTER,DDS=Zeile,DDID=1}
  • openhab:send Item_Name {DDBC=WHITE,DDTC=BLACK,DDI=1,DDA=CENTER,DDS=Zeile1,DDID=1}

    • New String (per log): {DDBC=WHITE,DDTC=BLACK,DDI=1,DDA=CENTER,DDS=Zeile1,DDID=1}
    • But it still doesn’t work.

Sending with a rule works just fine:

  • sendCommand("{DDBC=WHITE,DDTC=BLACK,DDI=1,DDA=CENTER,DDS=Zeile1,DDID=1}")

So something in karaf seems to be causing me trouble here, probably some escape string stuff. Is there any documentation how to correctly escape strings for the send command? I could not find any :frowning:

Karaf documentation is here.

Thanks, but I couldn’t find it in that documentation either.

Some more experimenting led me to try single quotes instead of double quotes and that finally worked:

openhab:send Item_Name ‘{DDBC=WHITE,DDTC=BLACK,DDI=1,DDA=CENTER,DDS=Zeile1,DDID=1}’