KNX value not equal to home assistant

HI
Iam using a KNX interface (wiser Schneider) for measuring my gas en electric
I want make a enery dashboard in HA
Gas is oke and give the right value
But eletric give a wrong value

Hou can i fix this problem

My config for gas
- name: “actueel geleverd (m3)”
state_address: “1/3/16”
type: ‘volume’
state_class: ‘total_increasing’
For elektric

  • name: “opbrengst PV kWh”
    state_address: “1/0/12”
    type: ‘active_energy_kwh’
    state_class: ‘total_increasing’

value must be 2472.000kWh HA gives 1.159.365.000

When iam using config below no unit exist

  • name: “opbrengst PV kWh”
    state_address: “1/0/12”
    type: ‘dtp-14’
    state_class: ‘total_increasing’

For readability you must use the code tags for well… code. Helps with debugging.
If you read the value in ETS what do you get? Some devices just put out Wh and you’ll need to convert it.

type: ‘dtp-14’ is not a type. And also the wrong dtp anyway.

Oke
My ETS value is 2477kWh
My HA value is 1.159.365.000 with no unit

I can not find any relation into de values

But gas works well

Can u screenshot the read value in ETS Diagnostics (with type and raw values and group number)

Thats weird, DPT 14 is not used for any kind of KWh report. Where are you getting that value from?
Model number would be helpfull so i can look at what the communication objects report.
Also noticing from you tabs that you are translating Dutch to English and back?
If you having trouble with that you can PM me.

I hope this is wat you mean

Here my screensshots about measuring HA
Opbrengst PV kWh
1.159.364.608kWh

Here my screensshots about measuring ETS

If I increase the value in ETS by 1, 4096 will be added in HA

That just means its the wrong type. 4 bytes can do alot of things, Signed, Unsigned, Floating point
But what is measuring your KWh? is it the Wiser using modbus to your KWh? or connected to your PV?Or do you have a KNX KWh module?

My PV has a schneider IEM3155 kWh connected by modbus to KNX

My grid is a P1G2 plugged into my “slimme meter”" connected by KNX

I think the problem is HA because my gas value is right

And my values in the wiser are also right

The wiser reads out the Modbus? So it will get the correct value. It is however pushing that value to the KNX group with the wrong type. And thus HA will receive the wrong value but Wiser will show the correct value. You will prob just have to change the data type in Wiser. (gegevenstype)
So in ETS (Not wiser or HA) what do you see at that group address?

Edit, GAS is in the correct type: 14.076 DPT_Value_Volume m3 volume so thats why HA sees that correctly

Sorry
But the kWh meter is direct connected with the modbus of the wiser
Only my grid values are read via ets

Is the problem
Wiser uses DTP 14 (4byte_float)

And HA needs DTP 13.013
image

Thats exactly what i am saying. I’m getting the feeling that things are getting lost in translation.
Specially since ETS is a programming tool and not the KNX bus itself.

To be clear:
The PV KWh is connected to your Wiser via Modbus, so Wiser will display the correct value.
Wiser then puts that value in KNX at group 1/0/12 in the wrong data type. HA gets it info from 1/0/12 and thus the wrong info.
You need to change the data type in Wiser to DPT 13, then your original config in HA will work correctly

DPT 14 is a very different type than DPT 13 you CANNOT mix them.

Oke
But when iam changed the dtp to 13 The wiser gives the wrong value

But the same as the HA before changing n.l.
1159364608kWh

Is there any way to convert this?

Ah, so it is an 4 byte floating point number from the Modbus. Yeah, you will need to set that back, i hope i didnt screw up your graph to much in Wiser :sweat_smile:
Now the fun part, converting that to 4 byte signed. Should be fun

Oke,

Nothing wrong because it did not work!

I dont know how futher?

What are my possibilities?

My quick Google learns that its not easy as a simple conversion. So i hope anyone else can help with that. Should be doable in HA with a template.
I’ll go and look. But it looks thats beyond what i understand, but never to old to learn.

Maybe @farmio has an idea?

Okay,
Great, hope to hear from you
Thank you in advance for all your efforts

It’s dpt-14 or just 14, not dtp-14.
It won’t get an auto-assigned unit. Use customize to add one. Customizing entities - Home Assistant
Or create a helper entity from the resulting state.

1 Like

I missed that completely, and i always thought you couldnt use the DPT number but only the Type column values like 4byte_float