Can I use TCP IP for Weeder I/O modules?

I’m new to openhab but not to HA or software. I’m moving from a 15-yr-old Misterhouse installation, and starting to get the hang of it, but I’m stuck on this one!!

I’m trying to get openhab2 to connect to my weeder WTDIO modules , ideally over an Ethernet to RS232 interface. I can control them manually with serial messages (and via the legacy Misterhouse system), but I’m new to openhab and not sure how to parse the ASCII messages to make them appear as items.

I’ve read about using .map files for TCP/IP which looks useful if it was just a single device, but the device has 14 independent I/O lines and I can’t understand how to map multiple devices onto the single TCP/IP item.

I will have one Weeder device with device name set to ‘A’, accessible at 192.168.123.234 port 1111 (for example), with up to fourteen I/O lines available. I need to send commands like:
AHB (set device A output B high)
AHL (set device A output B low)
for the output devices and

ASC (set pin ‘C’ as a switch input)
and then parse messages like
ACL (input C has gone low)
and
ACH (input C has gone high)
or
ARC (read input C)

How can I add all these items?

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. :slight_smile: ).

1 Like

[I realise this is a long-overdue response, but thought it belonged here to help others with the same question]

Thanks Rick for the pointer on that, I did implement it via MQTT instead, and that has worked really successfully. I have a python script running on the same device as openhab and mosquitto which handles the Weeder device and presents it as multiple MQTT endpoints.

The same approach has made it really easy to implement other custom electronics based on ESP-01 and similar devices, an Ethernet-controlled Extron AV switch etc…