Modbus binding - multiple serial masters

Hi,

Because a lot of serial modbus devices I need to split those devices into two chains (using two USB-RS485 converters).

I prepared openhab.cfg containing something like this below but it doesn’t work.

modbus:serial.slave1.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave1.id=1
modbus:serial.slave1.start=0
modbus:serial.slave1.length=8
modbus:serial.slave1.type=coil

modbus:serial.slave20.connection=/dev/ttyUSB1:19200:8:even:1:rtu
modbus:serial.slave20.id=20
modbus:serial.slave20.start=0
modbus:serial.slave20.length=16
modbus:serial.slave20.type=discrete

Does OpenHAB support such configuration?

If NO may I ask for some direction related to modbus binding source code changes before I will start reinventing a wheel …

BTW, Connecting any modbus device to the same master (e.g. /dev/ttyUSB0) works just fine. Unfortunately pooling such configuration takes plenty of time (approx. 2s for 20 devices).

Best Regards

Peter

Hi,
IMHO it should do that but sadly it doesn’t work at the moment, thats because of

https:// github.com/openhab/openhab/issues/626#issuecomment-121939216
(new users can only put one link in the post, but github links count as more than one - obviously)

Note: Jacek has a similar problem: Modbus serial - failed to read
Best