[SOLVED] Modbus 2.x Things not starting up

Hi,

I’m trying to migrate my working Modbus 1.x Binding to 2.x.

I’m using a Wago SPS (via TCP/IP) and my configuration looks like this:

Bridge modbus:tcp:wago [ host="192.168.0.126", port=502 ] {

    Bridge poller wago_switch [ start=12288, length=64, refresh=200, type="discrete" ] {
      Thing data myLight [ readStart="12289", readValueType="bit", writeStart="12288", writeValueType="bit", writeType="coil" ]
    }

    Bridge poller wago_consumption [ start=12292, length=30, refresh=200, type="input" ] {
    }

    Bridge poller wago_windows [ start=12292, length=60, refresh=200, type="holding" ] {
    }
}

I’m starting the binding via addons.cfg (and can see the binding becoming active).

When ever I change the things or the items configuration I get successful refreshes

2019-02-03 17:08:59.950 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'modbusV2.items'

or

2019-02-03 17:03:02.281 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'modbus.things'

Karaf (full TRACE logging enabled according to the binding page) shows no active things when I do “smarthome:things list”

Same thing on Paper UI: Binding is active but things being shown.

No traces of data transfer in the event log

Could I get a hint what I’m doing wrong?

You should see a message in openhab.log

2019-02-05 20:58:02.451 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Modbus manager activated

Your modbus.things file appears essentially sound.

As mentions above your config looks good. Have you restarted OH since installing and/or modifying any Modbus files? Just asking b/c mqtt 2.x has a bug that requires an OH restart after making any changes to the things file.

1 Like

Restarting did the trick for me. Now I get a CONFIGURATION_ERROR on the switch-item, but that a thing I look into by myself this evening. Thank you all for your support!

Trying to understand the expectation here. You installed modbus binding, and were stumped enough by it not working without a reboot, that you posted for help?
I’m not saying you’re dumb!! Maybe we need a prompt in the install process.or docs. Suggestions?

1 Like

Hi,

the last Bindings/Things I installed (ie.solaredge,http1,fritzboxtr0641) all started without the need to do a restart.

Furthermore the logfiles did show that ModBus (somehow) became active. Thus I was quite sure that the problem was due to a bad configuration.

So this is the first time I ran into this issue (using openhab for several years). I would say that I’m not a total noob and a hint within the ModBus binding page would be quite helpful.