First I’ll caveat this with I do not use this binding.
Without writing this myself to see if there is some sort of optimizations that could be made I would use Proxy Items to represent your devices and Rules to send the commands over the TCP binding and to parse the results.
The structure of the rules would be something like:
- rule responsible for receiving and parsing the data send by the devices and updating the proxy Items as appropriate
- rules responsible for receiving the commands on the Proxy Items and posting the correct command string to the TCP bound Item.
Alternatively, you can outsource the communication to an external script that gets called by OH (exec binding, MQTT messages, etc). It should be possible to do this all within OH but don’t be afraid to think outside OH.
).