TCP-Binding / HEX / REGEX

Hi

I’m trying to send HEX-Code over TCP-Binding to this String-Item

String Blind_Window_Sofa “Fenster [%d %%]” {tcp=">[192.168.1.193:9760:‘REGEX((.*))’]"}

Rule
rule "Blind"
when
Item Switch changed
then
if (Switch.state == OFF) {
sendCommand (Blind_Window_Sofa, “\u0038\u0002\u000b\u0000”)
} else if (Switch.state == ON) {
sendCommand (Blind_Window_Sofa, “\u0038\u0002\u000b\u0032”)
}
end

At the end I want to send these Hex-Codes. All are working except the first one

\u0038\u0002\u000b\u0000 --> not working
\u0038\u0002\u000b\u0023 --> working
\u0038\u0002\u000b\u0032 --> working
\u0038\u0002\u000b\u004b --> working
\u0038\u0002\u000b\u0064 --> working

Does u0000 in this case not work with REGEX? I’m not really familiar with Regular Expressions.

Any help?

Thanks Michael

There shouldn’t be any problem with the REGEX. .* basically matches everything so there is no reason it should be failing on that first one.

Do you see errors in the log?

If you change the order the strings are sent does this first one still fail to send or does a different one fail?

Are you certain it is failing to send it at all and it isn’t a problem on the other end (e.g. a typo in the string sent or the like)?

Though the conversation started ages ago - maybe somebody is interested in the root cause: the TCP binding is working with string interpretations which use x00 as a string delimiter. that is why you can send all hex bytes except x00. also if a x00 is contained in the hex string to send the transformation ends there - omitting the rest of the message. I try to work on a fix on that (providing a HEX-transfer mode for the binding) - if I get the IDE up and running :wink: