Current modbus changes from ssalonen

This is supposed to be an overview over @ssalonen’s current valuable work on the modbus binding.

As he is currently putting, quite significant, effort into the binding concerning different topics, everyone interested in the modbus binding should follow his work now.

To get an overview, I would like to collect links structured like:
Topic: brief problem description, associated issues; working branches (git); (test) results; other links

From my current POV, there are the following topics:
modbus-serial: connection pooling/setup, Implementation of non standard float32 datatypes, openhab.cfg::modbus_config interface changes && connection pooling

I’m going to alter this post later on.

Thanks @nickma82!

Here are some of the topics already started:

Relevant git branches

My plan is to

  1. develop the tests first (modbus-binding-tests) to have a basic test set to detect any regressions. In future the tests can be extended with modbus serial tests. The serial tests could be run manually since true serial port is required. I think the tests could be run on any computer with two serial USB adapters and a null modem cable (one port is used for the server while the other is the client).
    – specifically, I still need tests for writing data, and some additional read tests
  2. implement writing of other value types (refer to this discussion for more info)
  3. Connection pooling in modbus binding (only one connection per ip+port or serial port (but not parameters) would be opened). Mandatory for modbus servers that cabable of serving one client at a time.

I have been also experimenting with the idea of separating modbus connection configuration from item configuration. Please see my comment in the connection pooling thread.

Hi, happy new year!
Nice, thank you.
Do you need serial modbus devices for testing reasons? If you want me to test something specific with modbus serial, I could do that. PreRequirement would be an existing repository. :smile:

I can do some serial Modbus testing too. Especially stuff that requires clients to produce certain exceptions that don’t come up in normal operation. I’m building clients myself and I can therefore make them generate all sorts of error :laughing:

Excellent stuff @mbs38 @nickma82. Much appreciated!

Will contact you once I have something concrete, for now I have not yet started the connection pooling, mainly working on the test side. Tests reveal some funky behaviour and I have made separate pull requests for those.

Do you have possibility to set-up two serial devices to the server running openhab, connected via null modem cable? That would be great for testing purposes, once I have ported the tests to setup modbus serial slave (currently the tests setup modbus tcp server).

I have also ordered myself couple of serial-usb adapters for testing purposes :smile: