HomeWizard Energy (Wi-Fi P1 meter, kWh meter, Energy Socket and Water Meter)

This night there was a spike in my gas usage and it added crazy numbers to my yearly, weekly, monthly usage. How was this possible and how can i correct it? the Homewizard app on my phone doesnt have this spike.

gas p12 gas p1

That’s weird…!
The integration does nothing special with the data, it is not validated in some form. So this data is the data that the integration got from the API, and that is the point were ‘my support’ ends. I have send you a DM.

    current_power_import:
      friendly_name: Huidig afgenomen vermogen
      value_template: >-
          {% if (states('sensor.slimme_meter_active_power') > 0) %}
            {{ states('sensor.slimme_meter_active_power') }}
          {% else %}
            0|float
          {% endif %}
    current_power_export:
      friendly_name: Huidig teruggeleverd vermogen
      value_template: >-
          {% if (states('sensor.slimme_meter_active_power') < 0) %}
            {{ states('sensor.slimme_meter_active_power') }}
          {% else %}
            0|float
          {% endif %}

Love the product and HA integration. Nice work.

I’m trying to create two sensors to split the active power sensor into two separate sensors. So I can graph them without the graph going below.

My YAML code doesn’t work though, and I am not sure why or where to look for instructions. Any help would be appreciated!

You can try templates in developer tools. There it says what your error is.

Solution:
Replace
{% if (states('sensor.p1_meter_active_power') > 0) %}
with
{% if (states('sensor.p1_meter_active_power') | float > 0) %}

and the same for the 'if <'.

1 Like

Thanks, got it to work :slightly_smiling_face:

1 Like

loading time for weekly takes already quite some time, I think monthly and yearly will be more panful, guess influxdb with grafana will be better for long term data.

I am working on making the fetch interval configurable. That way your reading is less ‘live’ but it is better for your database. That way you can render graphs over a longer period.

1 Like

That can be nice if that is possible

Received my HomeWizard P1 meter yesterday, got it to work with the App on my iPhone. But integrating it into Homeassistant didn’t work. I followed the instructions (with/without HACS) but when I try to install homewizard_energy it says: Aborted.
Any tips ?

I see…
However, i think monthly sensors will come too

Sensors you can make, that is the easy part…

  energy_import_t1_maandelijks:
    source: sensor.p1_meter_total_power_import_t1
    cycle: monthly 

  - platform: template
    sensors:
      energy_import_total_maandelijks_eur:
        friendly_name: 'Maandelijkse kosten dal + normaal'
        value_template: "{{ (states('sensor.energy_import_t2_maandelijks_eur')|float + states('sensor.energy_import_t1_maandelijks_eur')|float)|round(2) }}"
        unit_of_measurement: "€"

it’s more the presenting part that can be a challenge…

yeah the sensor i already have :slight_smile:

Is there anything else to see? Such as a message that supports the ‘Aborted’ message or something in the log? Make sure that you have your P1 meter at version 2.11 or above (you can check this in the app).

Nope. I do have my Homeassistant in a different VLAN as my HomeWizard P1 though. mDNS is enabled.

I’ve send you a PM to not pollute the topic.

Next year, in Belgium, the billing of electricity will be partly on kWh and partly on peak energy over a 15 minute period.
They will take the average of the maximum peaks of every month, over a year, to bill the capacity tariff.
To have the 15 minute energy use, I have this in utility meter

utility_meter:
  kwartierpiek_t1:
    source: sensor.p1_meter_total_power_import_t1
    cycle: quarter-hourly

But I have no idea on how to have the maximum value stored into 12 variables

max15min energy for januari
..
max15min energy for december

The minimum value they will bill is 2.5 kWh, so every variable should be initialized to 2.5, and this should be replaced by the measured value if it is higher, than the value that is in the variable for that month.

And calculate the average of those 12 variables, and multiply it by the 15min capacity tariff.

Any ideas on how to do this in HA ?

1 Like

You can take a look at the utility integrations that are build-in. The Statistics integration looks promising, but I haven’t tried.

Utility Integrations:

1 Like

I’m currently using Grafana and influxdb for my quarter hourly thing.

I also setup a Apex-Chart card for this. Maybe I’ll add an extra sensor like yours. It’s a good and better idea to track the MAX 15min peak.

type: 'custom:apexcharts-card'
graph_span: 10h
header:
  show: true
  title: Verbruik per kwartier (10u)
series:
  - entity: sensor.p1_meter_active_power
    type: column
    name: Verbruik per kwartier
    group_by:
      func: avg
      duration: 15m
    color: '#9400D3'
apex_config:
  stroke:
    width: 2
span:
  end: hour
  offset: '-0h'

I just added this to my utility meter. So I’ll keep you noted how I will check the max value’s.

2 Likes

Thanks, looks interesting.
I’ll create a sensor qhenergy that takes the quarter hourly t1 + t2 energy and use the stats max function on that.

Then I need to find a way to store it in variables, depending on what month (1…12) it is.
A qh-peak(month) = max(qhenergy) array would do the trick,
but does HA know array variables ?

Thx for the suggestion about the chart.
I am relatively new to HA, so I need to do some extra reading on how to use Influx and Grafana.

The active_power sensor will not reflect correctly the quarter-hr peaks as defined by the electricity network company, because they will only look at the energy you import from the network, but the active_power sensor looks at both imported and exported power in W and not at the imported energy in kWh.

To have something equal to the capacity tariff the utility company will bill, you need to have a sensor that calculates the max value of the quarter-hourly value over a month, and multiply this by 4, and this for every month of the year.

It would be interesting if the utility meter integration could be extended with this feature.