[SOLVED] OpenHAB2 exec Binding

I’ve copy-pasted your rule from your last into this forum’s “rules” fences.
(There is currently a problem with the forum keeping the icon for that invisible, which makes it hard to guess to use this!)

rule “Poweroutlet B”
when
Item Power_Plug_Socket_B received command
then
if(receivedCommand == ON) Remote_Send_Args.postUpdate(“00001 3 1”)
else Remote_Send_Args.postUpdate(“00001 3 0”)
when
Item Remote_Send_Out received update
then
logInfo(“Power_Plug”, "Results are: " + Remote_Send_Out.state.toString)
end

Anyway, having done this we can see that there are still the wrong kind of quote marks around
rule “Poweroutlet B”
which corresponds with error message
[7,1]: no viable alternative at input ‘when’
and also still at
logInfo(“Power_Plug”,
which corresponds to error message
no viable alternative at input ‘Remote_Send_Out’
because in both cases the rules parser was looking for a “string” and bumped into something else.

You will need to fix both your postUpdates as well, although the parser missed those and they won’t fail until runtime.

The other thing you have to do is un-mangle where you have mangled two rules into one.
Each “when” belongs to a different rule, each rule must have its own rule "xxx" line and end line, etc.