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.
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
>