[KNX] Binary Dry Contacts not mapped correctly

Hello everyone,
after I switched from 1x binding to 2x Version of the KNX-Binding (and a whole lot of time passed as I did not have time to debug it :wink: ) I am currently having the following problem:

I have binary dry contacts that publish on the knx bus with 1.001 DPT
I set them up in my Thing file as follows:

Type contact : Presence_1_0_32 “PrĂ€senz E6 BĂŒro” [ ga=“1.001:9/0/5” ]

I omitted the < as the value has no Readflag on the bus (so is push-by-sensor only from my understanding)

Items are setup as follow:

Contact Presence_E6 “Presence [MAP(presence.map):%d]” (GF_Office,Presence_GF) { channel=“knx:device:bridge:dev_1_0_32:Presence_1_0_32” }

The presence.map is as follows (including some debugging stuff :wink: ):

OPEN=anwesend
CLOSED=abwesend
NULL=undefiniert(NULL)
OFF=abwesend
ON=anwesend
0=abwesend
1=anwesend
-=undefiniert

The dry contact is always shown as undefined in openHAB.
If I setup the item as a switch instead of a contact (the item not the Thing) it works fine and the mapping also works.
Shouldn’t it also work correctly with item-type contact?

The bus delivers 1 or 0 values which i presume openhab/the binding should translate to OPEN/CLOSED for the Thing type “contact”
Thats why I am wondering about it acually being mapped to the ONOFF values as it seems (maybe due to DPT being 1.001?!

Can anybody help me clarify the problem?

Best regards

Maybe try to use contact without any DPT. At the end, it’s a simple Bit, and DPT is only how to interpret this Bit. As openHAB does not use the minor DPT, you can simply omit.

When setting up an item, it’s a good Idea not to use any transformation service. For contact you have to use %s instead of %d (%s is “use state as a string” where %d is “use state as a decimal type”, but contact is OpenClosedType, so you would read it as OPEN or CLOSED, and that is no number.

Another point: why using contact at all? You don’t need to.

That did the trick.
I was adding the DPT as it differs from contacts default DPT

Regarding your other point: What else should I use?
The dry contacts are used for window contacts as well as to show presence state in the rooms

Best regards

For windows contacts, for sure contact is the best option, as the dynamic icons are labeled -open and -closed. But for presence, I would prefer a switch channel. presence is ON or OFF, not OPEN or CLOSED