Modbus-Binding - make configurable if data frame entity addresses or absolut addresses is used

I use OH since 2013. I use modbus-binding version 1.7 to communicat from OH to my Wago 750 841 Controller.

Now I want to migrate to OH2, but I have a problem with the new modus-binding 1.9. This binding uses data fram entity addresses, but I need absolut-addressing to communicate with my wago-controller. When I use coil, I do not have a problem. But when I use holding it doesn’t work. I think the problem is, that the binding is adding 40000 to start-address I configured (I need a start-address 12308).

I can not switch to wago-binding, because (as i know) this binding does not suppoort holding-operation and is not supportet with OH2

May be it is possible to enhance the configuration-options for the modbus-binding, so that i can configure, if I want to use absolut or data frame addressing.


The binding doesn’t add anything to addresses.

It does start from 0 rather than 1, sometimes that confuses.

Perhaps you can expand on “doesn’t work” and/or show your config ?

Hello, it is exlained in the modbus binding info.

I want to use holding funktion and start address 12300.

In the binding info is documented
"The openhab modbus binding uses data frame entity addresses when referring to modbus entities. That is, the entity address configured in modbus binding is passed to modbus protocol frame as-is. For example, modbus slave definition with start=3, length=2 and type=holding will read modbus entities with the following numbers 40004 and 40005."

So if I configure start at 12300, the bindind starts at 52300 (40000 + 12300) for holding funktion.

Why not use -12300 in the setup.
40000 - 12300
Is this tested by you?

Yes I have tried -27700, but it do not work!

The binding does not add anything to the address. Try it and see.

If you have
in your .cfg file, then 12300 is sent on the wire.

How the target slave chooses to interpret that number is the slave designers choice.

There is a traditional way to name describe Modbus slave registers, where all holding registers start with 40001. In that name scheme, no-one would never ever send 40001 on the wire, you would send 0 on the wire and the slave assumes 40001. It is just a naming scheme and not used by the OH binding.

Very few modern designers use this naming scheme, most just do not refer to 40001 part (or 30001 for inputs etc.) at all.
As your Wago documentation gives 12300, a number less than 40001, they are not using it either.

I think you’ve just misread the paperwork and are worrying about nothing. Try it and see.
Other people use Wago with OH just fine,it can be done

When you want help,share your config and describe the problem you are having.

Ok, then I have an other problem. With openhab 1 and modbus binding 1.7 it is wirking. With openhab2 and 1.9 binding it is not working. I use tcp protokoll.

Have you made a new file modbus.cfg ? openhab.cfg is not used in OH2.

Perhaps you would share your modbus.cfg with us. Maybe you would look in your logs and see if the binding reports any errors at start up, or when polling your device. Perhaps you could tell us what “not working” means exactly.

Thank you for your help. The problem was not the holding - operation. It was the Dimmer. The Dimmer is not working with the Modbus-Binding. Now I use Number-Item with a Rule, and it works!!! Alexa is now dimming my light :wink: