[SOLVED] How to configure TWO modbus?

Hi,
I’m new with the modbus bindings and I try to connect my openhab to TWO server devices using the modbus bindings.
the first device is a SMA inverter. IP adress: 192.168.0.208
the second device is a Stiebel Eltron heatpump. IP adress : 192.168.0.207
my config files is:

Bridge modbus:tcp:inverter1 [ host=“192.168.0.208”, port=502, id=3, connectMaxTries=3] {

// SMA Inverter Device Type
Bridge poller DevType [ start=30053, length=4, refresh=60000, type=“input” ] {
Thing data type @ “PV” [ readStart=“30053”, readValueType=“uint32” ]
}

// SMA Inverter Status
Bridge poller SMA_Status [ start=30201, length=36, refresh=60000, type=“input” ] {
Thing data status @ “PV”[ readStart=“30201”, readValueType=“int32” ]
Thing data Grid_Contactor @ “PV”[ readStart=“30217”, readValueType=“int32” ]
Thing data Max_Power @ “PV”[ readStart=“30231”, readValueType=“int32” ]
Thing data Set_Max_Power @ “PV”[ readStart=“30233”, readValueType=“int32” ]
}

// SMA Inverter Yield
Bridge poller Yield [ start=30517, length=16, refresh=60000, type=“input” ] {
Thing data Day_Yield @ “PV”[ readStart=“30517”, readValueType=“int64”, readTransform=“JS(divide1000.js)” ]
Thing data Total_Yield @ “PV”[ readStart=“30529”, readValueType=“int32”, readTransform=“JS(divide1000.js)” ]
}

// SMA Inverter Power Section West & Total
Bridge poller power_a [ start=30769, length=20, refresh=5000, type=“input” ] {
Thing data current_input @ “PV”[ readStart=“30769”, readValueType=“int32”, readTransform=“JS(smalimit1000.js)” ]
Thing data voltage_input @ “PV”[ readStart=“30771”, readValueType=“int32”, readTransform=“JS(smalimit100.js)” ]
Thing data power_west @ “PV”[ readStart=“30773”, readValueType=“int32”, readTransform=“JS(smalimit.js)” ]
Thing data active_power @ “PV”[ readStart=“30775”, readValueType=“int32”, readTransform=“JS(smalimit.js)” ]
Thing data power_L1 @ “PV”[ readStart=“30777”, readValueType=“int32”, readTransform=“JS(smalimit.js)” ]
Thing data power_L2 @ “PV”[ readStart=“30779”, readValueType=“int32”, readTransform=“JS(smalimit.js)” ]
Thing data power_L3 @ “PV”[ readStart=“30781”, readValueType=“int32”, readTransform=“JS(smalimit.js)” ]
Thing data volt_G1 @ “PV”[ readStart=“30783”, readValueType=“uint32”, readTransform=“JS(divide100.js)” ]
Thing data volt_G2 @ “PV”[ readStart=“30785”, readValueType=“uint32”, readTransform=“JS(divide100.js)” ]
Thing data volt_G3 @ “PV”[ readStart=“30787”, readValueType=“uint32”, readTransform=“JS(divide100.js)” ]
}

// SMA Inverter Power Section East
Bridge poller power_b [ start=30957, length=8, refresh=5000, type=“input” ] {
Thing data currentB_input @ “PV”[ readStart=“30957”, readValueType=“int32”, readTransform=“JS(smalimit1000.js)” ]
Thing data voltageB_input @ “PV”[ readStart=“30959”, readValueType=“int32”, readTransform=“JS(smalimit100.js)” ]
Thing data power_east @ “PV”[ readStart=“30961”, readValueType=“int32”, readTransform=“JS(smalimit.js)” ]
}

// SMA Inverter Operation
Bridge poller SMA_Status_Operate [ start=40029, length=4, refresh=5000, type=“holding” ] {
Thing data operatestatus @ “PV”[ readStart=“40029”, readValueType=“uint32” ]
}
}

Bridge modbus:tcp:heatpump [ host=“192.168.0.207”, port=502, id=1] {
Thing modbus:heatpump:stiebelEltron “StiebelEltron” (modbus:tcp:modbusheatpump)
}

Only the heatpump is create, no inverter. Individually, inverter and heatpump config were OK but when I but them together, it’s not working anymore.
Any idea why it’s wrong?

Your principle is fine

Bridge modbus:tcp:xxx ....  {
   Bridge poller ... {
      Thing data ... [ ...]
      Thing data ... [ ...]
   }
   Bridge poller ... {
      Thing data ... [ ...]
   }

Bridge modbus:tcp:zzz ....  {
   Bridge poller ... {
      Thing data ... [ ...]
   }

The hard part of manual configuring is ensuring your Things have unique IDs

I don’t like the look of this, though.
There’s two ways to associate Things with a “parent” Thing, by nesting using curly braces { } or by spelling out UIDs in round brackets ( ). I’m not convinced you should try both at the same time.
I also think the Bridge references should actually match!

Bridge modbus:tcp:heatpump [ host="192.168.0.207", port=502, id=1] 

Thing modbus:heatpump:stiebelEltron "StiebelEltron" (modbus:tcp:heatpump) [ ]

 // or 

Bridge modbus:tcp:heatpump [ host="192.168.0.207", port=502, id=1] {
   Thing modbus:heatpump:stiebelEltron "StiebelEltron"  [ ]
}

I’ve not really played with these extensions, but note that that heatpump is a magic word here that invokes the particular extension Thing type.
Using this magic word as part of your TCP Bridge UID “should” be okay, but …

thank you, a restart and every thing is working :wink:

… you shouldn’t be using .things files at all.

For non-trivial modbus configurations, it really is the most practical method. This is error-prone, and requires attention to detail. That’s little different from using PaperUI to configure modbus, which eliminates some ways to make mistakes and introduces new ones. Modbus is modbus.