Help ! Reception OK but can not send over Port Serie

OpenHab2 - Raspberry PI 3B+
RFlink on Arduino Mega 2560
Serial Binding V - 1.13.0

Hy.
I have a text box linked to the serial port that perfectly receives the information from the RFlink
But I can not send orders on this one.

My sitemap:{
     sitemap rf_test  label= "RfLink Test"{
         Text item=RFLinkRaw // ["%s"]
    }
}
My items
String RFLinkRaw	"RFLink raw data [%s]" <text> { serial="/dev/ttyUSB0@57600" }
Switch Test_RFlinj    "Send Command"        
My rules

rule "RFLink IN"
     when
              Item RFLinkRaw received update
    then
           //treatment values received
end

rule "RFLink OUT"
   when    
         Item Test_RFlink received command ON
   then
         RFLinkRaw.sendCommand("10;Newkaku;02128800;1;ON")  
end   

When I send the command I receive this error:
16:01:43.799 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule ‘RFLink IN’: 5

I do not have to have everything understood to send information on / dev / ttyUSB0 …
Please Help me

I tested another solution based on the switch but it does not pass either (in fact once a comande has worked!)

Switch Test_Salon    "TestSalon" {serial="/dev/ttyUSB0@57600,ON(10;SMARTWARE;00171800;1;ON;\n),OFF(10;SMARTWARE;00171800;1;OFF;\n) "}

openHAB’s autoupdate will “helpfully” update your Item state when you send it a command.
The update will trigger your “RFLink IN” which presumably fails in the code that you have kept secret, or perhaps the code that isn’t there yet, while trying to analyze your own command.

You could stop that by turning off autoupdate for this Item

String RFLinkRaw "RFLink raw data [%s]" <text> { serial="/dev/ttyUSB0@57600", autoupdate="false" }

That won’t fix whatever you are sending out though. Your different patterns don’t seem to have much in common.
You might need to pin down exactly what your are supposed to send, you may also need to look at character encoding.

I advanced in my problems:
if I send the commands on the item related to the serial port it works now

rule "Light Cuisine "    
   when    
         Item Cuisine received command
   then
 
      if (Cuisine.state == ON ){
         RFLinkRaw.sendCommand("10;POWERFIX;0B00;03;ON\n\r") 
      } else {
           RFLinkRaw.sendCommand("10;POWERFIX;0B00;03;OFF\n\r")  
      }     
end   

but I must have a syntax error in the direct command from the switch that works on the ‘OFF’ function but not on the ‘ON’

Switch Cuisine       "Cuisine"        <light> (gLumieres) ["Lighting"] //{serial="/dev/ttyUSB0@57600,ON(10;POWERFIX;0B00;03;OFF;\n),OFF(10;POWERFIX;0B00;03;ON;\n) "}

I voluntarily reversed on ‘ON’ for RFlink the OFF command of the Switch and there I can turn on my lamp when switch Off
but the extinction does not work with Switch ON

If I put the commands correctly:

Switch Cuisine       "Cuisine"        <light> (gLumieres) ["Lighting"] //{serial="/dev/ttyUSB0@57600,ON(10;POWERFIX;0B00;03;ON;\n),OFF(10;POWERFIX;0B00;03;OFF;\n) "}

In this case I do not know how to turn on my lamp but I know how to turn it off!
Which reinforces me in the sense that I must have an error in the syntax of this line

Thank you in advance for your clarifications

For information

17:12:50.476 [DEBUG] [.binding.serial.internal.SerialDevice] - Writing '10;POWERFIX;0B00;03;OFF
' to serial port /dev/ttyUSB0
17:12:50.479 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'RFLinkRaw' received command 10;POWERFIX;0B00;03;OFF

17:12:50.498 [INFO ] [smarthome.event.ItemStateChangedEvent] - RFLinkRaw changed from 20;41;OK;
 to 10;POWERFIX;0B00;03;OFF

17:12:51.473 [DEBUG] [.binding.serial.internal.SerialDevice] - Received message '20;42;OK;
' on serial port /dev/ttyUSB0
17:12:51.496 [INFO ] [smarthome.event.ItemStateChangedEvent] - RFLinkRaw changed from 10;POWERFIX;0B00;03;OFF
 to 20;42;OK;



this binding link is commented out.

There are fairly obvious differences between
RFLinkRaw.sendCommand(“10;POWERFIX;0B00;03;OFF\n\r”)
and
serial="/dev/ttyUSB0@57600,ON(10;POWERFIX;0B00;03;OFF;\n)

This is a result of ignoring the advice about autoupdate.

I have put the autoupdate = false…

Sorry: In fact the “;” between the “” and the “n” is a transcript error but in my site it is not there and the problem is as described

Switch Test_Salon    "TestSalon"  {serial="/dev/ttyUSB0@57600,ON(10;PING;\n),OFF(10;PING;\n) "}

another test that gives the same problem: the ON does not work (RFlink only responds on the OFF)

Well, you’ve already found out how to do debug logging. Share the results?

Thank’s it’s OK now