home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.17k stars 30.2k forks source link

Enphase Core shows different values as Enphase Enlighten #113924

Closed fwolf222 closed 3 months ago

fwolf222 commented 6 months ago

The problem

Hello,

i installed HA2024.3 and the enphase core integration.

but the sensors shows different values than my enlighten portal. also i miss some sensors like grid export. for example: yesterday 20th march

enlighten: 45,9kWh production and 9,0kWh usage enphase core: 59,7kWh production and 11,7kWh usage

maybe there are some differences between US and EU envoy? what i made wrong, does it needs a inititalisation factor or so?

thx for the help

What version of Home Assistant Core has the issue?

2024.3.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Enphase

Link to integration documentation on our website

https://www.home-assistant.io/integrations/enphase_envoy/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 6 months ago

Hey there @bdraco, @cgarwood, @dgomes, @joostlek, @catsmanac, mind taking a look at this issue as it has been labeled with an integration (enphase_envoy) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `enphase_envoy` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign enphase_envoy` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


enphase_envoy documentation enphase_envoy source (message by IssueLinks)

catsmanac commented 6 months ago

Hi @fwolf222, availability of sensors depends on the Envoy model, i.e. metered or not metered, installed and configured current transformers (CT). It's not a difference between US and Eu models, but more what features are installed with it. Firmware version running may show different behavior as well.

Grid import and Export are reported in ..Envoy Lifetime net energy.. entities. If these don't show its mostly caused by lack of installed or configured CT.

Can you share (drop as as file in the comment drop area) the diagnostic report of the Envoy so we can help you to asses what is going on?

fwolf222 commented 6 months ago

hello @catsmanac, sorry for the late response.

config_entry-enphase_envoy-0612d468c5f813a3124e5ed86ee5ccb6.json

home-assistant_enphase_envoy_2024-03-23T06-51-41.943Z.log.zip

i forgott: i have the envoy-s-metered-eu with firmware 7.6.323

image

completly different :/

image
catsmanac commented 6 months ago

Thanks for the data @fwolf222. Bear with me, long story below. Short summary: data reported comes from the Envoy. Verbraucht seems to match close. Erzeugt number is strange, but came from Envoy. Try configuring HA energy dashboard to see if Grid Bezogen and Eingespeist and maybe Erzeugt start to match

Your Energieproduktion heute comes from whToday in /production on the Envoy. You can find these in either of the 2 files, I'll use the diagnostic one as that has a more readable format. Below it shows as 16.6 kWh.

      "/production": {
        "production": [
          {
            "type": "inverters",
            "activeCount": 25,
            "readingTime": 1711178074,
            "wNow": 2161,
            "whLifetime": 630755
          },
          {
            "type": "eim",
            "activeCount": 1,
            "measurementType": "production",
            "readingTime": 1711178434,
            "wNow": 1622.491,
            "whLifetime": 2969975.13,

            "whToday": 16639.13,
            "whLastSevenDays": 266897.13,

Similar the Energieverbrauch heute comes from whToday in consumption of /production where measurement type is total-consumption and shows 2.7 kWh.

        "consumption": [
          {
            "type": "eim",
            "activeCount": 1,
            "measurementType": "total-consumption",
            "readingTime": 1711178434,
            "wNow": 1608.944,
            "whLifetime": 1755287.892,

            "whToday": 2701.892,

So as far as I can determine the data you see actually comes from the Envoy. Energieverbrauch heute is close and diff may be caused by time difference in the report. But the Solar production numbers are not matching.

Not sure if it is related, it might be though, in your debug log file I notice:

2024-03-23 07:49:13.765 DEBUG (MainThread) [pyenphase.updaters.production] Not all phases report phase data, 0 of 3

Which is kind of surprising. The `/meter' section in the diagnostic reports shows its a three phase system with 3 phases:

      "/ivp/meters": [
        {
          "eid": 704643328,
          "state": "enabled",
          "measurementType": "production",
          "phaseMode": "three",
          "phaseCount": 3,
          "meteringStatus": "normal",
          "statusFlags": []
        },

and there are no phase reported in the `/production' section. Which is unexpected. Is it indeed a 3 phase system and is something misconfigured in the Envoy? Could also be a firmware specific behavior, would not be the first time.

To make sens of the other data you may want to configure the HA Energy dashboard, if not yet done, with the Lifetime energy production for the solarpanel, Lifetime net energy consumption and lifetime net energy production for the grid values as described here. That will give you some more daily numbers you can compare to the picture you now have. Batteries won't be included and can offset numbers, but grid import/export should and Solarproduction may now show different values. We've seen Envoy daily values deviate in the past, may be the case here too.

afbeelding

fwolf222 commented 6 months ago

@catsmanac hello, thx for your response. yes, i have a 3 phase system, i will ask my installer.

for the HA Energy i configured the 3 energyknots. here is a picture with 2 days and this week.

image

one problem is the missing battery. my home consumption (zuhause) in the HA is always the real consumption with the battery added. but the battery is part of the consumption. i dont have entities for the battery configuration.

also the grid data depends on the missing battery. the grid data for import and export in the enphase portal are correct. i compared it with the values from the provider smartmeter which will be charged.

can you help here? to add the battery in the HA system?

catsmanac commented 6 months ago

Hi @fwolf222, looking at the pictures we can confirm that solar production match. I would expect that the Netz value would also match. The standard Envoy model for current transformers looks like this:

afbeelding

For a full picture, 3 out of 4 CT are needed and the 4th, typically the House, is calculated. (Without batteries 2 of 3). As you can see in the picture, the net-consumption CT sits between the switchboard and the Netz. So values for these should match your smart-meter. Unless the battery ties in at a different spot and flows through the net-consumption CT.

As for options:

catsmanac commented 6 months ago

Hi @fwolf222, as for my earlier remark:

Not sure if it is related, it might be though, in your debug log file I notice: 2024-03-23 07:49:13.765 DEBUG (MainThread) [pyenphase.updaters.production] Not all phases report phase data, 0 of 3 Which is kind of surprising.

It seems that this is the case with firmware >7.6.x as we had another issue reported that had this as well. So this doesn't come from something with the configuration.

catsmanac commented 5 months ago

It seems that this is the case with firmware >7.6.x as we had another issue reported that had this as well. So this doesn't come from something with the configuration.

This is not an issue and unrelated to your issue. Founds its caused by how the integrations gets the data from the Envoy and we're fixing it.

catsmanac commented 5 months ago

Hi @fwolf222, the above link is for a discussion on the problem you have, it's on the Envoy not reporting correct grid import/export when batteries are used in a multi-phase environment.

fwolf222 commented 5 months ago

thx, i got the email notification, but had no time to read it. i will do it this week...

also: i generated a helper in HA as you said (point 2) - first looks, it's not 100% correct

catsmanac commented 5 months ago

No problem, just wanted to make sure you are aware.

Yes the helper will not be 100% correct. You get samples every 1 minute while it will change during that minute. To improve you would have to collect data more often.

catsmanac commented 3 months ago

Issue is caused by some EU countries multi-phase situation, explained here.

The battery will discharge on one phase to the grid the amount the house consumes on another phase from the grid to balance overal consumption to 0. Envoy will report both amount on the export and import. Policies for the grid smart meter in the countries require only to report balanced phase amounts to electricity company and do not include same amount exported on one phase and imported on another phase.

closing this case.

catsmanac commented 3 months ago

@home-assistant close