S0 Power Meter on KNX binary input not working in OH4 anymore

Hi, i have a s0 Power Meter and a KNX binary input.

My item is a “contact” and it worked in oh3 with DPT12.001

But this isn´t working in oh4 anymore. Which DTP is the right one to use here?

In my things-file i used: [ ga=“12.001:<4/3/1” ] but this isn´t workin anymore. Now i tested it with [ <4/3/1" ] - not working.

4-Byte Integer contact item please do explain? What is the purpose?

In the ETS it is configured as a counter and this is DTP 12.001. Every 5 ticks from the s0 powermeter my binary input sends a message to my openhab and with the time difference i can calculate the actual power consumption in watt.

Don´t know if this is all configured right, but it worked a long time until i updated to oh 4.

In things it is a contact, in items it is a number item…

Sorry, my mistake…

Here is the old thread with the original rule:

From my point of view either you respect the QuantityType and change to number like in the docs and use transformation

// 4 byte unsigned (DPT 12)
        DPT_UNIT_MAP.remove(DPTXlator4ByteUnsigned.DPT_VALUE_4_UCOUNT.getID()); // counts have no unit

Or disable Uom in the binding for now until you figure it out.
Still remember you said group adress with DPD 12.001 that is not a bit or maybe there is something I don’t understand.

I read your thread a little.Does your input knx interface support pulse counting if so use that remove the rule altogether and just get the final value ? What is the reference of that module ?

Have you read my EDIT in my post above?

I get a number from my knx binary input. My binary input is configured as a counter. So i get a number every five s0-ticks. With the time difference i can calculate the watt.

I changed my inside my things-file from contact to number. So how do i have to configure it in ETS and how to configure it in things file in [ga=“…”] ?

Can i stay in ETS on DTP 12.001 or should i change it there to another one? Is DTP 9.001 a better one? That i can find in the openhab knx binding docs.

Now with my current configuration i don´t get any value at all inside openhab. If i will get any type of value, it will work, because i can convert it inside openhab to my needs (remove unit, convert from string to number, everything else…)

As far as I understand the source code (well… not so far…) DPT12 is ok:


// 4 byte unsigned (DPT 12)
        DPT_UNIT_MAP.remove(DPTXlator4ByteUnsigned.DPT_VALUE_4_UCOUNT.getID()); // counts have no unit

and there is an extra doc:

ainType: 12
12.000: General unsigned long
12.001: DPT_Value_4_Ucount values: 0...4294967295 counter pulses
12.100: DPT_LongTimePeriod_Sec
12.101: DPT_LongTimePeriod_Min
12.102: DPT_LongTimePeriod_Hrs
12.1200: DPT_VolumeLiquid_Litre
12.1201: DPT_Volume_m3

so openHAB should use the number value as is.

Look from my point of view you should let the device do the counting and calculation as much as possible without the need for openhab. Why not say the name of the knx device that takes that inpuls to check what is capable of.

My binary input is: MDT BE-16000.01

Its from 2014 i think. There is a newer version .02 - i saw you can do watt calculation in it, but i can´t find any settings inside the ets to do this with my old version.

Maybe i´m wrong - i only can find the manual from the version 0.2. In the mdt archiv you can download software for old hardware-versions, but i can´t find old manuals. I will aks the mdt support.

I got errors in my openhab-log since my updatze to oh 4.1.1 with dtp 12.001 - but maybe it was because of the “contact”-thing. Now i changed inside my things-file to “number” maybe it works now? I will check this.

It looks good, with number instead of contact it works again. In oh3 it works even with contact.

These two devices are very different, and even as the new model is the direct successor, I highly doubt that there is any chance to get the same functionality from the old hardware.

The other question is: why do you use the counter at all? If it’s only about the pulses, just set the knx channel to switch and use “switch rising edge ON” (Schalten steigende Flange An). Now each pulse will result in an ON bit at the corresponding GA.

On the other hand, using the counter is a nice option, because this way you won’t lose pulses (get previousState from historic Item, get current state, get time span between both events, get difference between both values)

I want to see the counter also, not only current power.

I write down my power meter counters every month to an excel-file. I let send an email from openhab, so i can simply write the numbers into mi excel-file.

Only disadvantage of this s0-counter and my rule: when i have to restart the knx-system, my binary-input gets lost all the values and starts the counter from 0 again. So i have to set an offset every now and then to my rule to get the real counter stats again.

I don´t know, how i can make a workaround to this problem… Maybe write the values to an extra item and when i get new counter-values stzarting from 0 - i could calculate the real value?