KNX DPT PT 235.001 active_energy + tariff

Hello, do you think it is possible to integrate the DPT 235.001 into the KNX plugin. This contains DPT 13.010 and 5.006+1 data validity byte. The decoding description is avaible here : Particularité du DPT 235.001 - Forum Communauté Jeedom.

Thanks

Hi :wave:!
Currently we don’t support “compound” DPTs as sensors. It would need a quite big change in how the entity creation works.
You may use a knx_event trigger in a template sensor and work with the raw payload meanwhile.

Hello,

Do you have any news about this feature?

Thank you

Not really.

I did some drafts to see which implementation would fit better for such things… but didn’t come to any conclusion yet.

2 Likes

HI,

I hope you find a solution. It’s sad not to be able to extract the kwh directly. In any case, thank you for the work done on xknx.

Hi

I ran into the exact same issue with my Hager TE331 but I managed to implement a workaround.

Step 1: Setup event for KNX telegrams of meter

Setup an event for telegrams to the corresponding address (see KNX - Home Assistant).

Example configuration:

event:
  - address:
    - "24/4/190" # Gesamtzähler (Elektrische Energie)

Step 2: Setup template sensor based on event

- trigger:
    trigger: event
    event_type: knx_event
    event_data:
      destination: "24/4/190"
  sensor:
    - name: "Gesamtzähler Elektrische Energie"
      # Interpret first 4 (of 6) bytes as Wh and convert to kWh, if first 4 bytes are not all 0.
      # Every now and then the meter sends telegrams with only the tariff bytes (last 2) set (e.g. 0x000000000500)
      # and these telegrams must be ignored (otherwise the state is intermittently (re-)set to 0).
      state: >
        {{
          (
            ((trigger.event.data.data[0] * 256 * 256 * 256) +
            (trigger.event.data.data[1] * 256 * 256) +
            (trigger.event.data.data[2] * 256) +
            (trigger.event.data.data[3])) / 1000
          )
          if (
            trigger.event.data.data[0] != 0 or
            trigger.event.data.data[1] != 0 or
            trigger.event.data.data[2] != 0 or
            trigger.event.data.data[3] != 0
          )
          else this.state
          }}
      unit_of_measurement: "kWh"
      state_class: "total"

I hope this helps :grinning:

If the DPT is set correctly in ETS and you uploaded the project, you should be able to use knx.telegram trigger with built-in decoder, instead of knx_event.
It should also show up correctly in the group monitor.