Modbus Config problem with Bits (OH3.0.0)

Hi. I am currently converting my system from text to GUI config and von OH2 to OH3. In the process I came across the following problem:
I want to enter byte 0 bit 3 as described in error on the top of the screenshot. But the input field does not allow this. ;(
Does anyone else have the problem? or even better … a solution :wink:

Poller Config:
UID: modbus:poller:a2d35da2c8:b0cf9cbeda
label: BK9050 Garage Poller (DI)
thingTypeUID: modbus:poller
configuration:
length: 4
start: 0
refresh: 60000
maxTries: 2
cacheMillis: 500
type: holding
bridgeUID: modbus:tcp:a2d35da2c8
location: Garage

DI Config:
UID: modbus:data:b0cf9cbeda:c4852c1169
label: MB Garage (DI 01.4)
thingTypeUID: modbus:data
configuration:
readValueType: bit
readTransform: default
writeTransform: default
writeType: coil
readStart: “0.3”
updateUnchangedValuesEveryMillis: 1000
writeValueType: bit
writeMultipleEvenWithSingleRegisterOrCoil: false
writeMaxTries: 2
writeStart: “0.3”
bridgeUID: modbus:poller:a2d35da2c8:b0cf9cbeda
location: Garage

Would you try this as a read-only config for now, leaving out attempting to write to a bit target? (You cannot write to individual bits in a holding register as easily as that! But note that you’ve chosen “coil” as your write type - which is bit by nature and so never uses x.y bit addressing, just x)

It does seem to be complaining about read address, but let’s simplify the problem by taking out write stuff that is certainly wrong.

The simplify thing was a good suggestion.
I did not customize the thing via the WebUI but via the “Code” tab. After I have thrown out almost everything the thing went online.

my “code” now looks like this.
UID: modbus:data:b0cf9cbeda:c4852c1169
label: MB Garage (DI 01.4)
thingTypeUID: modbus:data
configuration:
readValueType: bit
readStart: "0.3
bridgeUID: modbus:poller:a2d35da2c8:b0cf9cbeda
location: Garage

on the GUI the error is still visible and therefore I can’t save…

My old config looks like:
Bridge modbus:tcp:bk9000garage [ host=“192.168.5.7”, port=502 , id=1, timeBetweenTransactionsMillis=25, connectTimeoutMillis=1000]
{
Bridge poller coils [ start=0, length=58, refresh=0, type=“coil” ]
{
Thing data mb_DO_1_1 “Licht_SP_Schupfer”@“rGar_Schupfer” [readStart=“0”, readValueType=“bit”, writeStart=“0”, writeValueType=“bit”, writeType=“coil” ]
Thing data mb_DO_1_2 “Licht_Garage1”@“rGar_Garage” [readStart=“1”, readValueType=“bit”, writeStart=“1”, writeValueType=“bit”, writeType=“coil” ]
Thing data mb_DO_2_2 “Licht_Garage2”@“rGar_Garage” [readStart=“3”, readValueType=“bit”, writeStart=“3”, writeValueType=“bit”, writeType=“coil” ]
Thing data mb_DO_3_2 “Garagentor”@“rGar_Garage” [readStart=“5”, readValueType=“bit”, writeStart=“5”, writeValueType=“bit”, writeType=“coil” ]
}
Bridge poller holding [ start=0.0, length=4, refresh=750, type=“holding” ]
{
Thing data mb_DI_1_1 “garagezu”@“rGar_Garage” [readStart=“0.0”, readValueType=“bit”]
Thing data mb_DI_1_4 “garageauf”@“rGar_Garage” [readStart=“0.3”, readValueType=“bit”]
}
Bridge poller watchdog [ start=4384, length=1, refresh=5000, type=“holding” ]
{
Thing data holding1120 [ readStart=“4384”, readValueType=“int16”, writeStart=“4384”, writeValueType=“int16”,writeType=“holding” ]
}
}

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.

Hi

Indeed this is a bug in UI validation. readStart=0.N fails while 1.N works.

For now you have to use textual config here or switch to newer unreleased version of the binding.

The bug had been fixed in this version: [modbus] Gain-offset profile (QuantityType support) and writing of individual bits of holding registers by ssalonen · Pull Request #9980 · openhab/openhab-addons · GitHub, installation instructions here [modbus] Gain-offset profile (QuantityType support) and writing of individual bits of holding registers by ssalonen · Pull Request #9980 · openhab/openhab-addons · GitHub

1 Like