gieljnssns / kostalpiko-sensor-homeassistant

A custom component to get the readings of a Kostal Piko inverter
MIT License
12 stars 18 forks source link

kostal_piko_daily_energy vs utility_meter #13

Open zibous opened 4 years ago

zibous commented 4 years ago

Describe the bug I don't understand why the values of utility_meter (daily) do not match the kostal_piko_daily_energy? The values of the utility_meter sensor are much higher than those of the kostal_piko_daily_energy?

sensor kWh
sensor.ertrag_photovolatik_tag 24.35
sensor.kostal_piko_daily_energy 15.65

Config yaml

sensor:
  - platform: kostal
    host: !secret kostal_host  # "http://192.168.xx.xx"
    username: !secret kostal_username
    password: !secret kostal_password
    monitored_conditions:
      - current_power
      - total_energy
      - daily_energy
      - string1_voltage
      - string1_current
      - string2_voltage
      - string2_current
      - l1_voltage
      - l1_power
      - l2_voltage
      - l2_power
      - l3_voltage
      - l3_power
      - status

utility_meter:
  ertrag_photovolatik_day:
    source: sensor.kostal_piko_current_power
    cycle: daily
  ertrag_photovolatik_month:
    source: sensor.kostal_piko_current_power
    cycle: monthly
ertrag_photovolatik_year:
    source: sensor.kostal_piko_current_power
    cycle: yearly

Additional context

I am doing something wrong in the configuration.

gieljnssns commented 4 years ago

This is apparently normal.

I recommend that you read these forum post https://community.home-assistant.io/t/utility-meter-configuration-is-this-correct/102322

And this integration https://www.home-assistant.io/integrations/integration/

gieljnssns commented 4 years ago

Or this post https://community.home-assistant.io/t/utility-meter-configuration/186707

zibous commented 4 years ago

@gieljnssns Thanks for the information. It works with the Integration - Riemann sum integral solution, but only if I calculate and use the value from daily_energy:

curr_energy = daykw - daykw_prev
daykw_prev: 4.88
daykw: 5.13
curr_energy: 0.25

But there are also deviations here. Will try infulxdb + grafana.

https://gitlab.com/clevercrib/energy-dashboard https://clevercrib.net/visualise-energy-consumption-with-grafana/

gieljnssns commented 3 years ago

You should try this custom component https://github.com/rcasula/kostalpiko-homeassistant My Kostal inverter is broken so I can't test any new versions