I wanna control my amp by a RS232 serial interface.
Connection to openHAB is made by net2serial to read the RS232 and socat to receive the data on the server where openHAB is installed.
I have to realize that
String STR_SERIAL_CA851A_PIUSB0_receive { serial="/dev/PIUSB0" }
does give me confusing results as the string gives me different results back if i parse expressions by REGEX. Furtheron: The status result in KARAF ist not the same as doing a log of the string expression.
Logging the binding shows:
2019-02-11 20:53:21.029 [DEBUG] [binding.serial.internal.SerialDevice] - Received message '#4,13,29^M#4,13,30^M#4,13,31^M' on serial port /dev/PIUSB0
what gives me the impression the whole sequence doing an action with the amp
shall be the string i shall expect from the binding.
The expression i get from the binding is e.g.
#4,13,30
The problem is that i miss in a sequence the single commands that i need to get
a clear information about the state of the amp, as second using different items with the same definition i get different results. What makes sense for me if the shown sequence is the string something gets parsed. But i can never see the sequence complete in the string, i just see a more or less random portion of the sequence string from ^M to ^M. ( ^M is here the carriage return term ).
So i cannot work sequential with the received message as shown in the log
My intention is to get the complete sequence as shown in the log as a string to be able to split and separate that according my needs.
My expectation would be to get as string
#4,13,29^M#4,13,30^M#4,13,31^M
using { serial="/dev/PIUSB0" }
and not e.g.
#4,13,29
( Or: worser: Item 1 gives #4,13,29; Item 2 gives #4,13,31 from the same received message)
2nd: The shown switch in the documentation does not work, it`s always NULL.
Not sure it´s an helpful indicator.
If i observe the port e.g. by cat /dev/PIUSB0 i see the single commands in single rows ( Carriage return ) as a flow.