OH3 KNX Binding - request for improvement

First of all, thanks a lot for all the work done on OHx!

I have an OH2.5 installation up and running since about 2 years and think I have some experience with OH.

Now I decided to setup a new OH3 system (Raspi 4b 4GB) from scratch using UI only. In general it works great but I had some strange experiences by setting up alarm items.

Newly defined things go online immediately. Then I defined several items like a windows contact using my OH2.5 knowledge regarding GAs. For the window contact I used 1.009:5/2/60+<5/2/60 as GA. It works as expected - OPEN / CLOSED as results.

Then I specified an alarm contact of my presence detector as shown in the screenshot

I use a contact because it is a sensor. The result is consistently NULL. There is nothing in the logs, neither an error or warning nor an event of the alarm - which I double-checked via a bus monitor.

After some other trials I found out that changing the GA from “1.005:2/3/60+<2/3/60” to “2/3/60” or “2/3/60+<2/3/60” (removing the DPT) did the trick.

I don’t understand the difference for a windows contact and a similar alarm contact.
Other DPTs like 9.004 for luminance are working.

Therefore my first request is to extend all lines requiring a GA by an exact syntax example to make clear what is allowed / expected here.

The next irritation is that for the alarm contact I get CLOSED / OPEN as results which is not very obvious to interprete. Having the DPT as part of the GA (like in OH2.x) would allow to give back the corresponding expexted result and makes things easier.

I would really appreciate if you would improve the KNX logic and the GA UI hints.

Thanks a lot in advance
Helmut

Please be aware that DPT is (for now) only the knx side of communication. In question of a Bit there is simply no difference between any DPT, as it’s 1 or 0 in knx. in openHAB it’s depending on the channel type (switch type : ON/OFF, contact type : OPEN/CLOSED)
In fact, it would be very nice to get UoM for knx, this would be possible via DPT (is it °C, m/s, whatever) but for now DPT is only to decide how to interpret multibit data (is it Integer, float, double…?)

1 Like

Thanks for the reply.

Understood, but would it be possible to add at least a syntax hint for the GAs in the channel form?
It took really hours to find out that some of the channels work with a given DPT and others not. I think by default the DPT should be omitted as long it is not officially supported. This could avoid same trouble for other users.

Regards
Helmut

Stumbled just now across the same thing trying 1.005 alarm DTP but seeing it not working (state is not reflected in OH) :(. Only removing it and interpreting it as normal contact made it work. Even weirder currently is, that one also has to invert the contact, since default KNX “0” (OPEN) is mapped to “1” (CLOSED) somehow. Sad thing is, that then the badge for alarm is also wrong (inverted) :/.

Regarding inversion: try installing basicprofiles from the community marketplace and apply the invert profile to the channel. The problem is that most installations in place are configured with the wrong 0/1 conversion, so changing that would break all existing installations and IMO that’s bad.

Regarding 1.005: What type of channel did you link? Contact or Switch?

Yeah, I already have that “workaround” with using a profile in place - it’s just annoying having to remember it each time :). I’m using a simple JS profile with a small snippet to invert it. It works, but has also some side-effects as mentioned with the badges. So I also had to adapt the config for them to make them work. No idea if it also has other effects somewhere else. It would be really nice, if that “invert” option would be part of the binding itself. So I only have to specify it centrally for all contacts.

Regarding the alarm I modeled it as a contact. Since it’s not something that can be manually switched - in that sense. But maybe that’s the wrong approach for it? I can remember I saw a read-only option in the state description metadata, that could also do the trick for a alarm switch (?).

Thanks for your help!

1.005 is mapped to OnOffType and that can only be linked to Switch items. Maybe a warning should be placed if the configured DPT is incompatible with the channel type.

Ah, I see. Yup, that warning would help for sure :). Thanks!