Modbus high max value

What is the max value that modbus works with? I am using PoKeys 55 and the external bus values are 2071 - 2079. The config checks out:

2016-05-21 11:10:21 DEBUG o.o.b.m.i.ModbusActivator[:30]- Modbus binding has been started.
2016-05-21 11:10:21 DEBUG o.o.b.m.internal.ModbusBinding[:290]- modbusSlave 'basement' instanciated
2016-05-21 11:10:21 DEBUG o.o.b.m.internal.ModbusBinding[:290]- modbusSlave 'first' instanciated
2016-05-21 11:10:21 DEBUG o.o.b.m.internal.ModbusBinding[:290]- modbusSlave 'second' instanciated
2016-05-21 11:10:21 DEBUG o.o.b.m.internal.ModbusBinding[:290]- modbusSlave 'shed' instanciated
2016-05-21 11:10:21 DEBUG o.o.b.m.internal.ModbusBinding[:290]- modbusSlave 'water' instanciated
2016-05-21 11:10:21 DEBUG o.o.b.m.internal.ModbusBinding[:352]- config looked good, proceeding with slave-connections

Tho I am seeing errors:

java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
	at java.net.SocketInputStream.read(SocketInputStream.java:170)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
	at java.io.DataInputStream.read(DataInputStream.java:149)
	at net.wimpi.modbus.io.ModbusTCPTransport.readResponse(ModbusTCPTransport.java:187)
	at net.wimpi.modbus.io.ModbusTCPTransaction.execute(ModbusTCPTransaction.java:198)
	at org.openhab.binding.modbus.internal.ModbusSlave.getModbusData(ModbusSlave.java:340)
	at org.openhab.binding.modbus.internal.ModbusSlave.update(ModbusSlave.java:282)
	at org.openhab.binding.modbus.internal.ModbusBinding.execute(ModbusBinding.java:233)
	at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156)
	at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173)

However if I change openhab.conf modbus:tcp.basement.length=2079 to say 55 it works fine on the first 55 pins.

There is a limit to the number of bytes in a MODBUS message, it is in the neighborhood of 255 bytes.

FC 1 (Read Coils) reply has an address byte, length byte the data and 16 bit CRC.

So there are 4 bytes used in the protocol, so maybe there are 251 bytes for data.

Let’s say the number is 250 and there are 8 coils per byte that means you can read a maximum of 2000 coils in a single request. If you have 2079 then you should split it into two operations.

Does this help?

Tom
ps. the number could be smaller just figure out what works and add extra slave definitions to get all the coils you need

Thanks, it was not working with my old 1.7 patched modbus binding, but if I break it up into two operations it works with the newer binding.