Recommendable debug settings to identify wrong datatypes written in Things of the KNX Binding

Dear Peter,

I also use the MDT heating actors and had the same questions. Regarding your first question, I tried to configure the HVAC status as the second (read) GA of the channel, but because of the different value codings, it will not work.

So I decided to use two items. One for the HVAC mode and one for the HVAC status. I also decided to use them both as string items in openHAB with the distinct values Comfort, Standby, Economy and Building Protection. These strings are already mapped by the knx binding, when you use the DPT 20.102 with the channel type String.

Regarding your second question how to handle the HVAC status, this is quite a bit of a pain. The suggested DPT for this is mentioned in the official DPT specification of the KNX Association in the Annex A. It’s official name is DPT_HVACStatus and is a non standard DPT that is used by an HVAC room controller to report the currently set HVAC Mode by means of a status/diagnostic datapoint. Therefore in the current specification the DPT has no assigned DPT ID, but the content is specified.

My decision here is to use the generic DPT 5.006 as a number and use a transformation to bring it into the corresponding string representation.

As you indicated in your topic title, you still use openHAB 2.5, which means, you use the textual configuration of the knx addon, right?

The file is then OPENHAB/conf/things/knx.things. Where OEPNHAB is the root directory of your openhab installation.

This is a draft from my config, I used in OH 2.5 and still works with OH3:

Bridge knx:ip:bridge [
    type="ROUTER",
    autoReconnectPeriod=60
] {
    Thing device 01e52303 "Heizungsaktor D3.1" @ "Technikraum" [
        address="1.0.14"
    ] {

        Type string : A10 "Betriebsart Heizung Schlafzimmer" [
            // channel A, communication object #10
            ga="20.102:6/2/3"
        ]

        Type number : A11 "Betriebsart Status Heizung Schlafzimmer" [
            // channel A, communication object #11
            ga="5.006:<6/2/4"
        ]
    }
}

And this is the tranformation I use on the communication object #11:

(function(hvacStatus) {
    var logger = Java.type("org.slf4j.LoggerFactory").getLogger("org.openhab.core.model.transform.DPTHVACStatus");

    if(isNaN(hvacStatus)) {
        logger.warn("HVAC status is not a number");
        return "Undefined";
    }

    var havacMode = hvacStatus & 0x0F;
    logger.debug("HVAC status is: {}", havacMode);

    switch (havacMode) {
        case 1:
            return "Comfort";

        case 2:
            return "Standby";

        case 4:
            return "Economy";

        case 8:
            return "Building Protection";
    }

    return "Invalid";
})(input)

According the the MDT handbook for the heating actor, you can also configure the HVAC mode to send the status on the same communication object #10. I didn’t try that, but it should work like this:

Bridge knx:ip:bridge [
    type="ROUTER",
    autoReconnectPeriod=60
] {
    Thing device 01e52303 "Heizungsaktor D3.1" @ "Technikraum" [
        address="1.0.14"
    ] {

        Type string : A10 "Betriebsart Heizung Schlafzimmer" [
			// channel A, communication object #10, also sending status
            ga="20.102:<6/2/3"
        ]
	}
}

The difference is the ‘<’ for the HVAC mode GA, that tells the knx binding that this GA can also be read.

I hope the answer is not to late and can be still useful to you.

1 Like