I tried modbus.cfg
tcp.slave1.connection=xxx.xxx.xxx.xxx:502
tcp.slave1.type=discrete
tcp.slave1.length=4
tcp.slave2in.connection=xxx.xxx.xxx.xxx:502
tcp.slave2in.type=coil
tcp.slave2in.start=512
tcp.slave2in.length=4
tcp.slave2out.connection=xxx.xxx.xxx.xxx:502
tcp.slave2out.type=coil
tcp.slave2out.start=1
tcp.slave2out.length=4
and item
Switch Sw3 "Sw3" (ALL) {modbus="<[slave2in:0],>[slave2out:0]"}
Switch Sw4 "Sw4" (ALL) {modbus="<[slave2in:1],>[slave2out:1]"}
but this didn’t even switch the outputs any more.
I finally succeeded with
Switch Sw3 "Sw3" (ALL) {modbus="slave2in:0"}
Switch Sw4 "Sw4" (ALL) {modbus="slave2in:1"}
but unfortunately this implies only being able to write outputs starting from 0.
I’m using a OpenhabianPI installed a week ago with “binding-modbus1 - 1.9.0”, this version should be the latest one…