CJNE / ha-myenergi

Home Assistant integration for MyEnergi devices
MIT License
139 stars 31 forks source link

Negative power generation #81

Closed JanDetrez closed 2 years ago

JanDetrez commented 2 years ago

Any idea why the power production in Hassio shows negative values, while this is not the case in the Myenergi app?

Screenshot_20220129-191627 Screenshot_20220129-191610

JanDetrez commented 2 years ago

FYI in the Energy tab the negative production values are not visible, but there is a non-existing 0.01 kWh being reported at night. Screenshot_20220129-191925

G6EJD commented 2 years ago

Where is the data coming from? I get negative values (transients) from the GivEnergy server API, I presume ME filter all negative values, but on mine I see the night time power draw of the inverter when it’s in standby about 20W. Do you have anyway of seeing the raw data from the inverter?

JanDetrez commented 2 years ago

The power generation value plot I show above is coming directly from ME, which is clamped via a Zappi to the solar AC power cables.

Good point that this may actually be power draw from the inverter. I looked around in the app and web portal of my PV system, but couldn't find a measure for this. Also, as opposed to a 20 W continuous standby draw you talk about, mine seem to be isolated draws of about 100 W. You could still be right, but the profile seems a bit odd to me.

G6EJD commented 2 years ago

My Solaredge inverter takes a varying amount of power, 20W is more like an average, it moves around the values of 5 to 10 to 20 then 10, it will depend on your inverter design, but a sudden in-rush of power at reasonably regular intervals would not be unusual. You could try running the Python at the command prompt and see if the API is returning the negative values, I’m sure it will do if the readings exist and it’s not some other artefact.

JanDetrez commented 2 years ago

Okay thanks for the feedback.

I'm not sure to which code you are referring, but I suppose it is a piece that gets the current values from ME? I can have a look, but to see the negative current, I suppose I would need to run the script exactly timed with a spike, which seems difficult to achieve.

G6EJD commented 2 years ago

Johan provides some Python scripts that can be run from the HA command line, it would be interesting to see if there was a negative current being reported. Yes difficult to capture an event that is not synchronous. On the basis that most users are not reporting negative current spikes and ME probably suppresses them then it looks they are real and due to the inverter taking grid power when in sleep mode.

JanDetrez commented 2 years ago

Ok, thanks for the feedback. That solves for me the 'issue'.