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

I agree, I think the biggest improvement is that the dashboard is maintained by Home Assistant instead of the individual user. They will work on more advanced features without you doing anything (same thing for the Energy App).

Some cards that are used by the energy dashboard are also available as Lovelace card, so you can create your own dashboard at any moment.

@Fabian_v, thanks for checking. Strange because I started over from scratch and double checked everything but now I have 0.00eur for all electric values and only the Gas cost works. Not sure if the daily graphs are working yet because I reset everything so need to wait at least 2 days.

@DCSBL, for the energy dashboard, I used the “sensor.p1_meter_total_power_import_t1/t2” consumption inputs, but still not getting any values to show up. I thought that maybe I just needed to wait for the data to load but after ~12 hours I still don’t see anything. Any ideas on how to solve it?

For reference, I have both HA 2021.8 and HomeWizard Energy 0.8.1 installed.

Here are some screenshots:

and here is the data from my HomeWizard Energy app:

Strange… I have the exact same configuration. Can you see something in your logs?

Did you change some settings according to history? Please check if your kWh readings are recorded into the database (aka, do you see graphs?). I am not sure but I had issues before that are maybe related.

I checked in history and seems like there is data coming in. Also in my dashboard the kWh and meter readings are displayed, just not in the new energy dashboard.

ok now i see information comming in.
But it seems that it wont show the power that is deliverd to the grid. In the app it is working fine.

@dawnchorus and @marcel1988, I think the best thing to do is to ask some help at Energy Management in Home Assistant. If it turns out that this integration is doing something wrong, please come back to me and I will try to fix it. But for now it seems that the HomeWizard Energy component is working the way it should.

I have picked up my config so you can compare…

##############################################
##                 ELEKTRA                  ##
##############################################
sensor:
  - platform: template
    sensors:
      energy_import_t2_dagelijks_eur:
        friendly_name: 'Dagelijkse kosten nomaal tarief (T2)'
        value_template: "{{ (states('sensor.energy_import_t2_dagelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
        unit_of_measurement: "€"
  
  - platform: template
    sensors:
      energy_import_t2_wekelijks_eur:
        friendly_name: 'Wekelijkse kosten nomaal tarief (T2)'
        value_template: "{{ (states('sensor.energy_import_t2_wekelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
        unit_of_measurement: "€"

  - platform: template
    sensors:
      energy_import_t2_maandelijks_eur:
        friendly_name: 'Maandelijkse kosten nomaal tarief (T2)'
        value_template: "{{ (states('sensor.energy_import_t2_maandelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
        unit_of_measurement: "€"
        
##############################################  
  
  - platform: template
    sensors:
      energy_import_t1_dagelijks_eur:
        friendly_name: 'Dagelijkse kosten dal tarief (T1)'
        value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
        unit_of_measurement: "€"

  - platform: template
    sensors:
      energy_import_t1_wekelijks_eur:
        friendly_name: 'Wekelijkse kosten dal tarief (T1)'
        value_template: "{{ (states('sensor.energy_import_t1_wekelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
        unit_of_measurement: "€"

  - platform: template
    sensors:
      energy_import_t1_maandelijks_eur:
        friendly_name: 'Maandelijkse kosten dal tarief (T1)'
        value_template: "{{ (states('sensor.energy_import_t1_maandelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
        unit_of_measurement: "€"
        
##############################################  		

  - platform: template
    sensors:
      energy_import_total_dagelijks_eur:
        friendly_name: 'Dagelijkse kosten dal + normaal'
        value_template: "{{ (states('sensor.energy_import_t2_dagelijks_eur')|float + states('sensor.energy_import_t1_dagelijks_eur')|float)|round(2) }}"
        unit_of_measurement: "€"

  - platform: template
    sensors:
      energy_import_total_wekelijks_eur:
        friendly_name: 'Wekelijkse kosten dal + normaal'
        value_template: "{{ (states('sensor.energy_import_t2_wekelijks_eur')|float + states('sensor.energy_import_t1_wekelijks_eur')|float)|round(2) }}"
        unit_of_measurement: "€"

  - 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: "€"

############################################## 

  - platform: template
    sensors:
      energy_import_total_dagelijks_kwh:
        friendly_name: 'kWh vandaag dal + normaal'
        value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float + states('sensor.energy_import_t2_dagelijks')|float)|round(2) }}"
        unit_of_measurement: "kWh"


  - platform: template
    sensors:
      energy_import_total_wekelijks_kwh:
        friendly_name: 'kWh wekelijks dal + normaal'
        value_template: "{{ (states('sensor.energy_import_t1_wekelijks')|float + states('sensor.energy_import_t2_wekelijks')|float)|round(2) }}"
        unit_of_measurement: "kWh"

  - platform: template
    sensors:
      energy_import_total_maandelijks_kwh:
        friendly_name: 'kWh maandelijks dal + normaal'
        value_template: "{{ (states('sensor.energy_import_t1_maandelijks')|float + states('sensor.energy_import_t2_maandelijks')|float)|round(2) }}"
        unit_of_measurement: "kWh"
 
 ############################################## 
 ##                    GAS                   ##
 ##############################################
 
  - platform: template
    sensors:
      energy_gas_daily_eur:
        friendly_name: 'Dagelijkse kosten gas'
        value_template: "{{ (states('sensor.energy_gas_dagelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
        unit_of_measurement: "€"
  
  - platform: template
    sensors:
      energy_gas_weekly_eur:
        friendly_name: 'Wekelijkse kosten gas'
        value_template: "{{ (states('sensor.energy_gas_wekelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
        unit_of_measurement: "€"
        
  - platform: template
    sensors:
      energy_gas_monthly_eur:
        friendly_name: 'Maandelijkse kosten gas'
        value_template: "{{ (states('sensor.energy_gas_maandelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
        unit_of_measurement: "€"   

 ############################################## 
 ##   Totale netto kosten (Gas + electra)    ##
 ##############################################
 
  - platform: template
    sensors:
      energy_gas_en_elektriciteit_dagelijks_eur:
        friendly_name: 'Totale netto dag kosten energie'
        value_template: "{{ (states('sensor.energy_gas_daily_eur')|float + states('sensor.energy_import_total_dagelijks_eur')|float)|round(2) }}"
        unit_of_measurement: "€"

  - platform: template
    sensors:
      energy_gas_en_elektriciteit_wekelijks_eur:
        friendly_name: 'Totale netto week kosten energie'
        value_template: "{{ (states('sensor.energy_gas_weekly_eur')|float + states('sensor.energy_import_total_wekelijks_eur')|float)|round(2) }}"
        unit_of_measurement: "€"

  - platform: template
    sensors:
      energy_gas_en_elektriciteit_maandelijks_eur:
        friendly_name: 'Totale netto maand kosten energie'
        value_template: "{{ (states('sensor.energy_gas_monthly_eur')|float + states('sensor.energy_import_total_maandelijks_eur')|float)|round(2) }}"
        unit_of_measurement: "€"

##############################
## input_number             ##
##############################


input_number:
  t2_energy_cost:
    name: Stroom import nomaal
    mode: box
    min: 0
    max: 100
    unit_of_measurement: "€/kWh"
    icon: mdi:currency-eur

  t1_energy_cost:
    name: Stroom import dal
    mode: box
    min: 0
    max: 100
    unit_of_measurement: "€/kWh"
    icon: mdi:currency-eur

  gas_energy_cost:
    name: Gas
    mode: box
    min: 0
    max: 100
    unit_of_measurement: "€/m3"
    icon: mdi:currency-eur

##############################
## Utility Meter            ##
##############################

utility_meter:

# Hourly sensors
  energy_offpeak_hourly:
    source: sensor.p1_meter_total_power_import_t1_kwh
    cycle: hourly
 
  energy_peak_hourly:
    source: sensor.p1_meter_total_power_import_t2_kwh
    cycle: hourly
  
  gas_hourly:
    source: sensor.p1_meter_total_gas_m3
    cycle: hourly

# Daily sensors

  energy_offpeak_daily:
    source: sensor.p1_meter_total_power_import_t1_kwh
    cycle: daily
  energy_peak_daily:
    source: sensor.p1_meter_total_power_import_t2_kwh
    cycle: daily

  energy_import_t2_dagelijks:
    source: sensor.p1_meter_total_power_import_t2
    cycle: daily

  energy_import_t1_dagelijks:
    source: sensor.p1_meter_total_power_import_t1
    cycle: daily
 
# Weekly

  energy_offpeak_weekly:
    source: sensor.p1_meter_total_power_import_t1_kwh
    cycle: weekly
  energy_peak_weekly:
    source: sensor.p1_meter_total_power_import_t2_kwh
    cycle: weekly
   
  energy_import_t2_wekelijks:
    source: sensor.p1_meter_total_power_import_t2
    cycle: weekly

  energy_import_t1_wekelijks:
    source: sensor.p1_meter_total_power_import_t1
    cycle: weekly   

# Monthly

  # energy_peak_monthly:
  #   source: sensor.p1_meter_total_power_import_t2_kwh
  #   cycle: monthly

  # energy_offpeak_monthly:
  #   source: sensor.p1_meter_total_power_import_t1_kwh
  #   cycle: monthly

  energy_import_t2_maandelijks:
    source: sensor.p1_meter_total_power_import_t2
    cycle: monthly

  energy_import_t1_maandelijks:
    source: sensor.p1_meter_total_power_import_t1
    cycle: monthly   


#  energy_export_t2_dagelijks:
#    source: sensor.p1_meter_total_power_export_t2_kwh
#    cycle: daily

#  energy_export_t1_dagelijks:
#    source: sensor.p1_meter_total_power_export_t1_kwh
#    cycle: daily

# Gas

  energy_gas_dagelijks:
    source: sensor.p1_meter_total_gas
    cycle: daily
    
  energy_gas_wekelijks:
    source: sensor.p1_meter_total_gas
    cycle: weekly
    
  energy_gas_maandelijks:
    source: sensor.p1_meter_total_gas
    cycle: monthly    

# Yearly sensors
  energy_offpeak_yearly:
    source: sensor.p1_meter_total_power_import_t1_kwh
    cycle: yearly
  energy_peak_yearly:
    source: sensor.p1_meter_total_power_import_t2_kwh
    cycle: yearly
  gas_yearly:
    source: sensor.p1_meter_total_gas_m3
    cycle: yearly

Amazing, thanks for this. It seems very similar to what I have set up but I deleted mine and copied yours just to see what happens. Now I have data for electric and gas but the numbers are way higher than my daily usage. But at least I know something is working, so I’ll have a closer look and check what I need to change.

2 Likes

give it a day to settle, then you can see what’s going on…

you can add my cards as reference for example:

type: vertical-stack
cards:
  - type: custom:apexcharts-card
    graph_span: 1h
    cache: true
    apex_config:
      stroke:
        width: 1
      plotOptions:
        bar:
          columnWidth: 10%
      legend:
        showForSingleSeries: false
      fill:
        type: solid
        opacity: 0.2
      chart:
        height: 250px
        zoom:
          enabled: true
        toolbar:
          show: false
          tools:
            zoom: false
            zoomin: false
            zoomout: false
            pan: false
            reset: true
      xaxis:
        labels:
          format: HH:mm
    header:
      show: true
      show_states: true
      colorize_states: true
    series:
      - entity: sensor.p1_meter_active_power
        type: area
        name: Huidig Stroom Verbruik
        curve: stepline
        group_by:
          func: raw
          duration: 1m
  - type: custom:apexcharts-card
    graph_span: 12h
    update_interval: 5m
    cache: true
    span:
      end: hour
      offset: '-0h'
    header:
      show: true
      title: Stroom verbruik per kwartier
    apex_config:
      xaxis:
        labels:
          format: HH:mm
          show: true
          showAlways: true
      yaxis:
        forceNiceScale: true
        decimalsInFloat: 0
        min: 0
      chart:
        type: area
        height: 300
      stroke:
        show: true
        width: 1
      legend:
        show: true
      dataLabels:
        enabled: false
        distributed: true
      fill:
        type: gradient
        gradient:
          shadeIntensity: 0.1
          opacityFrom: 0.25
          opacityTo: 1
          inverseColors: true
          stops:
            - 0
            - 90
            - 100
    series:
      - entity: sensor.p1_meter_active_power
        type: column
        name: Verbruik per kwartier
        float_precision: 2
        group_by:
          func: avg
          duration: 15m
  - type: custom:apexcharts-card
    graph_span: 7d
    update_interval: 5m
    cache: true
    span:
      end: day
      offset: '-1sec'
    header:
      show: true
      title: Gas en Stroom verbruik per dag
    apex_config:
      xaxis:
        labels:
          format: dd-MM
          show: true
          showAlways: true
      yaxis:
        forceNiceScale: false
        decimalsInFloat: 0
        min: 0
      chart:
        type: area
        height: 300
      stroke:
        show: true
        width: 1
      legend:
        show: true
      dataLabels:
        enabled: false
        distributed: true
      fill:
        type: gradient
        gradient:
          shadeIntensity: 0.1
          opacityFrom: 0.25
          opacityTo: 1
          inverseColors: true
          stops:
            - 0
            - 90
            - 100
    series:
      - entity: sensor.energy_import_total_dagelijks_kwh
        type: column
        name: Stroom
        float_precision: 2
        group_by:
          func: max
          duration: 23h59m59s
      - entity: sensor.energy_gas_dagelijks
        name: Gas
        type: column
        float_precision: 2
        group_by:
          func: max
          duration: 23h59m59s
  - type: custom:apexcharts-card
    graph_span: 7d
    update_interval: 5m
    cache: true
    span:
      end: day
      offset: '-1sec'
    header:
      show: true
      title: Totale energie kosten per dag in €
    apex_config:
      xaxis:
        labels:
          format: dd-MM
          show: true
          showAlways: true
      yaxis:
        forceNiceScale: false
        decimalsInFloat: 0
      chart:
        type: area
        height: 300
      stroke:
        width: 1
        show: true
      legend:
        show: true
      dataLabels:
        enabled: false
        distributed: true
      fill:
        type: gradient
        gradient:
          shadeIntensity: 0.1
          opacityFrom: 0.25
          opacityTo: 1
          inverseColors: true
          stops:
            - 0
            - 90
            - 100
    series:
      - entity: sensor.energy_import_total_dagelijks_eur
        type: column
        name: Stroom
        float_precision: 2
        group_by:
          func: max
          duration: 24h
      - entity: sensor.energy_gas_daily_eur
        name: Gas
        float_precision: 2
        type: column
        group_by:
          func: max
          duration: 24h
      - color: rgb(128,128,128)
        entity: sensor.energy_gas_en_elektriciteit_dagelijks_eur
        type: column
        name: Totaal
        float_precision: 2
        group_by:
          func: max
          duration: 23h59m59s
  - type: glance
    entities:
      - entity: sensor.energy_gas_en_elektriciteit_dagelijks_eur
        name: Per Dag
        icon: mdi:currency-eur
      - entity: sensor.energy_gas_en_elektriciteit_wekelijks_eur
        name: Per Week
        icon: mdi:currency-eur
      - entity: sensor.energy_gas_en_elektriciteit_maandelijks_eur
        name: Per Maand
        icon: mdi:currency-eur
  - type: entities
    entities:
      - entity: sensor.p1_meter_total_gas
        name: 'Meter Stand Gas:'
      - entity: sensor.p1_meter_total_power_import_t1
        name: Meter Stand Elektra T1
      - entity: sensor.p1_meter_total_power_import_t2
        name: Meter Stand Elektra T2
  - type: entities
    entities:
      - entity: input_number.gas_energy_cost
        name: Kosten gas
      - entity: input_number.t1_energy_cost
        name: Kosten stroom dal
      - entity: input_number.t2_energy_cost
        name: Kosten stroom normaal

2 Likes

Hi again, can someone please confirm if you also don’t have the option of utility_meter.reset in the Developer Tools/Services menu? My daily values are still not resetting and I am not sure if this service should also show up for DSMR/HomeWizard users.

I found a similar issue here but since I am using the DSMR configuration I use separate sensors instead of listing the tariffs under utility_meter

I only have calibrate like you, never touched anything else then what I have in the config files that I shared…

To be honest, I didnt implement those additional sensors. It would be nice to have those available again, but I couldn’t find an use case to justity the time for implementing.

This is so beautiful, can you please share your code?

Hi i like the HA integration for the P1 HomeWizard monitor. Is it possible to add the KW meter of Homewizard somehow?
[HomeWizard Wi-Fi kWh meter](https://KWH Meter)

Thx

Yes.
Make sure you have enabled the API (must be done in the HomeWizard Energy app). Your meter should be discovered automatically.

yes I tried that but the switch is constantly automagic switched back to off.
very strange
Thx for your fast response

just had answer from homewizard. it was due to the firmware version of the meter. they have pushed a new version and now it’s working

1 Like

I’m wondering of the API-calls are limited to a several calls? I have a p1-device of Enelogic which is limited to 500 calls a month (for free)

The API is free and local. You can make as many requests as you want.
HomeWizard recommends that you limit your requests to maximum 2 per second (just to give the P1 meter some time to do other stuff). This is just a technical limitation.

Currently, the integration polls the P1 meter every second (for a DSMR5.0 meter), so about 86.400 calls per day.

1 Like

The Homewizard P1 device is cheap and works great. And it even looks nice next the smart meter. And they have great support also. And the calls are on your local device without the need of an external server. I have a SolarEdge device and that is only available via cloud and limited to one a 15minutes. Now with the HomeWizard Kwh meter i don’t have any limitations. See realtime solar production.
Even if you use their own app you have great visuals. And with home Assistant you can control all your self