I have an OEM manufacturer sending diagnostic data over TCP/IP. This data is written from the device to a TCP port 19999. Using nc, I am able to listen to this port and see the packets coming in. The raw data is not structured as JSON. It’s just a text format with comma-separated values.
I have a docker container running on the same server. From here, I am able to use a TCP agent to connect to the TCP port 19999. The connection establishes, i.e., in ‘View’ mode, the Agent Status is ‘CONNECTED’.
The problem here is, if I want to assign a ‘Thing’ asset and process the packets, how do I do this. In the case of the HTTP Agent demo, we use a custom attribute to collect weather data and then assign it to attributes. Here I just get a packet (text).
Yes, I can. I initially thought of having some basic Java/Python client read the TCP packets and then push it to OpenRemote as JSON (probably expose it as a REST client).
Or if there is a simpler way you could do it within the manager UI, it would be great. I’m pretty new to OpenRemote, so any suggestion would be more than welcome.
Well, as OpenRemote is 100% open source and you can program Java, the most obvious way would be to write custom protocol aka agent. The best person to ask for help when you are stuck is @Rich. He is free this week but should pickup the subject when he’s back from his break. Till then take a look in the WiKi. There is an example of implementation of such an agent.