TCP Binding - Send Command, Parse Response Into Items

I am having issues understanding how to use a TCP binding to retrieve data. I have a TCP device that I connect to, send the string ‘T0’ and then it returns lines of ASCII. The line I am looking for is in the format:

00 01 YYYY XX.XX

where YYYY is a unique serial number and XX.XX is temperature.

I can’t figure out how to set up the Items to use the binding to do that. I assume I will actually have to set up four items and just parse our the serial number I care about for that item, but I can’t seem to get it to send the T0 command and get the results back, even into a String.

Anyone have an experience with that TCP binding?

Some updates. I have figured out how to send the command and get the response, but it appears I am not transforming the data correctly. I assumed that it was due to the fact that I am getting multiple lines back, but the data “breaks” at strange places.

Here is what the data looks like when I connect manually:

T0    <---- This is my command input
1      <---- Junk line back I need to ignore
00 10 1AF8 22.43      <---- Actual data I want

And here is the OpenHab2 config:


String MSS70 "MSS 70" (gMSS) { tcp=">['REGEX(.+([0-9][0-9].[0-9][0-9]))']"}


rule "Pull MSS Data"
        Time cron "0 0-59/2 * * * ?" 

Here is what I see in events.log

2018-01-26 09:44:00.027 [ome.event.ItemCommandEvent] - Item 'MSS70' received command T0
2018-01-26 09:44:00.057 [vent.ItemStateChangedEvent] - MSS70 changed from null to T0
2018-01-26 09:44:00.716 [vent.ItemStateChangedEvent] - MSS70 changed from T0 to 1
00 10 1AF8
2018-01-26 09:44:00.758 [vent.ItemStateChangedEvent] - MSS70 changed from 1
00 10 1AF8  to null
2018-01-26 09:44:01.747 [vent.ItemStateChangedEvent] - MSS70 changed from null to 21.06
2018-01-26 09:44:01.806 [vent.ItemStateChangedEvent] - MSS70 changed from 21.06
> to null