How to get the Energy Consumption Dashboard and running with Homematic (IP) (HmiP-PSM/HM-ES-TX-WM)

Hi everyone,

basically i am using HA just as a Frontend for Homematic (IP). All my automations are on the CCU/Raspberrymatic. I would really wish that the integration of Homematic (IP) would be more seamless in HA, however i can see the Point that the Homematic System is just highly popular in the german speaking part of the world.

I really love the HA UI and the option to just configure everything gui related to the webui.

What is really taxing for me is everything related to yaml based configuration as a lot of the needed information is really buried in the community forum.

So i struggeld now two months in getting my energy dashboard up and running. However it is not very difficult once you know whats the issue.

Basically the Homematic Devices are providing their consumption data based on Watts per Hour instead of Kilowatts per Hour. To do this you need to provide a converted value in a new entity.

This is what i done in the configuration.yaml

sensor:
- platform: integration
  source: sensor.neq0863114_power
  name: Energiezähler  
  unit_prefix: k
  round: 2
  method: left
- platform: integration
  source: sensor.0001dbe9915a18_power
  name: "Arbeitszimmer Schreibtisch"
  unit_prefix: k
  round: 2
  method: left

The sensor.neq0863114_power is a HM-ES-TX-WM energy sensor and now provides the input value for the new Energiezähler sensor.

The sensor.0001dbe9915a18_power is a switchable power socket with metering HmIP-PSM and now proivdes the input value for the Arbeitszimmer Schreibtisch sensor entity.

The will cover the wrong unit for the consumption in addition to that you need a defined utlity meter based on the new created Energiezähler entity:


utility_meter:
  daily_energy:
    source: sensor.energiezahler
    cycle: daily
  monthly_energy:
    source: sensor.energiezahler
    cycle: monthly

Then you will be able to define the necessary entities in the web ui.

Here is what my dashboard and configuration looks like:


Cheers

Andy

4 Likes

Thanks for sharing.

FYI: long term statistics are being worked on here to be working out of the box. Here’s the PR: Add long-term statistics support for homematic sensors by chriss158 · Pull Request #57396 · home-assistant/core · GitHub

Thanks so much for posting this. You saved me a load of work figuring out how to do this!

I’m having a little trouble getting the Energiezähler to work. Is “sensor.neq0863114_power” in your case the one that is providing the value for the current energy usage (like 763W) or the entity that is providing the total energy usage (like 4000kW/h)?

The sensor.energiezahler shows up for me and I can add it to the dashboard, however when I go into the Energy configuration, and try to “Add Consumption” from the grid, it doesn’t show up in the list.

Do you have any ideas what might be wrong?

Ok, I think I figured this out when using a HM-ES-IEC:

  • I used the energy_counter_1 entity from my HM-ES-TX-WM. When using the ES-IEC, you actually get two channels, and a combined channel. However, in my case, nothing is hooked up to the second one and this causes the combined channel to also fail. This first entity gives the actual kWh reading from my meter, so you were right, you need to set state_class to total_increasing.
  • I removed the integration that the article I posted above suggested, as this is not actually necessary. The entity above already reports in kWh.
  • I went into the customize configuration you mentioned above and along with adding the state_class that you mentioned, I also made sure the units were kWh.
  • I then created the following configuration:
utility_meter:
  daily_electricity:
    source: sensor.seq1375407_1_iec_energy_counter
    cycle: daily
  monthly_electricity:
    source: sensor.seq1375407_1_iec_energy_counter
    cycle: monthly
  • I then restarted, and went back to the Energy configuration, added new consumption, and picked the “daily_electricity” above.

It took a little while to kick in but after an hour or so I could see the values correctly.

Hello,
I have the same problem with the Energy monitor that the values are in Wh instead of kWh in Home assistant. In RaspiMatic the values are OK.

Have to say I’m not to HA I want to change from OpenHab.
I use Homeatic (IP) Local from HACS to get my Homeatic devices into HA on a VM.
So far most things are OK and work but the energy monitor drives me crazy.

I use the HM-ES-TX-WM MEQ0705xxx Iec Energy Counter ch1 within the energy monitor.

Under development tools I can see that the entries for the Channel one are wrong:

state_class: total_increasing
interface_id: CCU3-BidCos-RF
address: MEQ0705xxx:1
parameter: IEC_ENERGY_COUNTER
entity_type: generic
unit_of_measurement: Wh
device_class: energy
friendly_name: HM-ES-TX-WM MEQ0705xxx Iec Energy Counter ch1

The unit should be kWh but were can I change this value in HA.

It would be a big help for me if you or anybody else can help me with fixing this problem.
But have to say I need a step by step guide. :slight_smile:
Thanks for your help.

No, Wh is correct. That’s what the device reports. Here’s how it’s defined in the paramset description. And when querying the parameter via XML-RPC you also get the value in Wh, and it also sends the exact same value via push messages to Home Assistant.

Hi Daniel, thanks fro your reply.

But there is something wrong with this value the Energy meter shows always 0.

The value I can see on my meter is 7690 kWh

The value I see in HA is
HM-ES-TX-WM MEQ0705960 Iec Energy Counter ch1 7.960,2157 Wh
Vor 21 Sekunden
HA_Zähler

The value I see in RM:
Energie-Zähler Gerät 7960.2768 kWh

. , problem? I use HA in german language.
Something wrong configured?

Any idea what could be the problem?

Thanks for your help.

For me the values match (not taking into account the added usage between the screenshots).

Debmatic (here it’s displayed as Wh):

Home Assistant (not the latest version of the integration though):

Thanks Daniel, for taking care of me. :slight_smile: Appreciated
Here is a screenshot from my Raspberry Matic:
RM_Zaehler
That’s interesting.

I think the reason is the used sensor.
In your case you are using the Ferraris or the LED Counter which delivers the values in Wh. I use the ES-IEC sensor for the Homeatic HM-ES-TX-WM which delivers the current Energy Value of the counter in kWh. Reason for this is to avoid the overflow at 838860,7 which the older sensors had.
Do you see a chance to get this fixed in the libraries or do you have an idea how I can workarround it.

THX for the help.

I think the device definition changes depending on the used sensor. Please create a new device definition as described here.
Please add this to a new issue (not a PR in this case) at pydevccu repo.

Hi! I have the same issue, but I am using the HA built in homematic component, not the custom component from danielperna.

Hi,
i have the exact same Problem. Any news on this?