Modbus TCP Agent subtracts 1 from register address

Hi everyone,

I’m experiencing a strange issue with Modbus TCP Agent regarding register addressing.

According to the documentation, OpenRemote uses zero-based addressing. However, in my setup, when I set readAddress: 2000 for a holding register, the actual Modbus packet shows address 07 CF (1999):

00 01 00 00 00 06 03 03 **07 CF** 00 01

If I set readAddress: 2001 , the packet correctly shows 07 D0 (2000) and the device responds:

00 01 00 00 00 06 03 03 **07 D0** 00 01

So it seems OpenRemote subtracts 1 from whatever I enter.

My setup:

  • OpenRemote version: 1.19.0
  • Modbus TCP Agent
  • Attribute: HOLDING, UINT

Hi!

Great timing! @Berg has been busy with a refactor on the Modbus agent,
and it has been included in the latest 1.20.0 release that we published today :joy:
Not sure whether this issue you are having will be resolved by this,
but I think it’s definitely worth checking out!

Maybe @Berg has familiarity with this?