OH3 - Modbus - Slave responsed with error=10

Hallo, need Help OH3
tried to set up Heating Modbus Gateway:

Following OH3 error:
Slave Bridge/Thing = “Online”, Poller Thing = “Error”, Data Thing = “no online Bridge”

Error with read: org.openhab.core.io.transport.modbus.internal.ModbusSlaveErrorResponseExceptionImpl: Slave responsed with error=10

Same Error config via Gui o. Textfile
Code:
/******************************OH3 - Haus2 - Heizung-Zentrale - Regin ExoDos - IP: 192.168.10.xxx - Login: Pw: ***********************/

Bridge modbus:tcp:slaveHz2 “Modbus slaveHz2” [ host=“192.168.10.xxx”, port=502, id=7 ] {

//C=00001-

 Bridge poller slaveHz2C "Poller slaveHz2_C" [ start=0, length=1, refresh=1000, type="coil" ] {   

     Thing data slaveHz2C1  "Data slaveHz2_C1" [ readStart="0", readValueType="bit", readType="coil", writeStart="0", writeValueType="bit", writeType="coil" ]

 }

// DI=10001-

Bridge poller slaveHz2DI "Poller slaveHz2_DI" [ start=0, length=1, refresh=1000, type="discrete" ] { 

   Thing data slaveHz2DI1 "Data slaveHz2_DI1" [ readStart="0", readValueType="bit", readType="discrete"]

}

// HR=40001-

Bridge poller slaveHz2HR "Poller slaveHz2_HR" [ start=0, length=1, refresh=1000, type="holding" ] {  

  Thing data slaveHz2HR1 "Data slaveHz2_HR1" [ readStart="0", readValueType="uint8", readType="holding" , writeStart="0", writeValueType="uint8", writeType="holding" ]  // index Pos.GanzZahl daher uint8

      }

//IR=30001-

Bridge poller slaveHz2IR "Poller slaveHz2_IR" [ start=0, length=1, refresh=1000, type="input" ] { 

  Thing data slaveHz2IR1 "Data slaveHz2_IR1"[ readStart="0", readValueType="uint8", readType="input"  ]                                      // index Pos.GanzZahl daher uint8

}
}

The good news is that openHAB is talking to your device - correct IP address, etc.
The bad news is the slave has rejected what OH says.

We can’t tell what the slave means by code “10”, but it usually means there is something wrong with the gateway setup.
Tell us more about “Heating Modbus Gateway”, is this a TCP to serial converter, or something?

Its followig Gateway: Modbus TCP Gateway

Its working fine - delivering Data - no error on connect - on my second Hausautomation SW - xhome
with the same Konfiguration as in OH3

Perhaps we can see this ‘xhome’ configuration that works?

Are you stopping that before trying openHAB? Some Modbus slaves only talk to one master at a time.

stopped XHome reading the ExoDosGateway - same Issue with OH3
Sceenshot Xhome Config
https://drive.google.com/file/d/1uqzo5UbVN3eFiglBdgWrcFRy6J-T54wq/view?usp=sharing

Alright, comparing the Xhome setup with your openHAB Things -

I can’t see anywhere that id=7 is set in xhome. Confident you want that in your TCP Thing? (It usually defaults to 1 in Modbus-TCP devices,but might be anything.)
Looking at the xhome table, it does show “Gateway-ID” so maybe we can guess this device responds on multiple id. If that is the case, you will eventually need several TCP bridge Things.

I can see “Gateway-ID” 5 and 6, let’s try one of those.

Bridge modbus:tcp:slaveHz26 "Modbus slaveHz2 id6" [ host="192.168.10.205", port=502, id=6 ] {

There are no coil, discrete, or holding registers shown in the xhome screenshot, so I have nothing to say about 3 of your poller Things.

What is shown is input registers, at various “ID” numbers. The lowest I can see is 123 and the highest is 224. Let’s assume those are Modbus register addresses.
The column marked “Adresse” is obviously not Modbus register addresses because many are -1, which would not be valid.

So let’s review your input poller Thing - I see maybe temperature registers at “Gateway-ID” 6, “ID” 163 and 164, and they’re 16-bit signed

Bridge poller slaveHz2IR "Poller slaveHz2_IR" [ start=163, length=2, refresh=1000, type="input" ] { 

  Thing data slaveHz2IR164 "Data slaveHz2_IR164" [ readStart="164", readValueType="int16", readType="input"  ]                                    
}

See what happens with that.

Same Issue - Config in Textfile or Gui tested - Slave Bride is Workin - Poller thing-> error=10

Well, we’ve made a lot of guesses so its not surprising. You did remove the other three pollers?

If you don’t know how to address this thing with Modbus, the best I can suggest is to use wireshark or similar tool to capture samples of your working TCP system for analysis.

Tested several Times - with korrekt Modbus Registers
See - Modbus Reader
https://drive.google.com/file/d/1VK3cDQtxC-i58SNUTnBINHMDO7MkJVBY/view?usp=sharing

btw.163 bzw. 164 ist the Fixture ID in xhome not the Modbus Register
the korrekt Modbus IR is 3 for “Haus 1 AussenTemp” -> Fixture ID 164

Well if you know this, use it to set up your Things.

From the latest screenshot, I get no idea of what you need to put in your TCP bridge Thing. We know the IP and port are correct, because it responds. I do not know the correct id number so you’ll have to guess that.

Using the screenshot, try just this one poller Thing.

Bridge modbus:tcp:slaveHz2 "Modbus slaveHz2" [ host="192.168.10.205", port=502, id=XXX ] {
  Bridge poller slaveHz2IR "Poller slaveHz2_IR" [ start=0, length=10, refresh=1000, type="input" ] { 
     Thing data slaveHz2IR0 "Data slaveHz2_IR0" [ readStart="0", readValueType="int16"  ]                                    
   }
}

Just realized there was an unwanted readType= in the data Thing that should be removed (poller selects that), but that should have done no harm.

Issue solved: id has to be 1 depending on settings in the Gateway
then its working fine

Bridge modbus:tcp:slaveHz2 “Modbus slaveHz2” [ host=“192.168.10.205”, port=502, id=1] {
Bridge poller slaveHz2IR “Poller slaveHz2_IR” [ start=0, length=10, refresh=1000, type=“input” ] {
Thing data slaveHz2IR0 “Data slaveHz2_IR0” [ readStart=“0”, readValueType=“int16” ]
}
}

1 Like