When I received a command message over tcp from my security system, the message may contain multiple commands, separated by newline characters, such as this:
The documentation says
(CR-LF) Message terminator. ASCII characters consisting of hexadecimal 0x0D and
0x0A. The 0x0A is optional. A message terminator may also use the 0x0A only.
In other words /n and/or /r
I’d like to be able to parse that string into individual messages, and then send each message through my code, such as this:
var String messageArray
rule "Security Message Received:
Item messageReceived changed
// put each message into the array
// foreach message in messageArray
// parse the message
I’m on Ubuntu OH2, if that matters.