briancmpbll / home_assistant_custom_envoy

171 stars 76 forks source link

Current measurement does not look ok #187

Closed hspjanssen closed 3 months ago

hspjanssen commented 4 months ago

Hello,

I like this integration, it is working good for power consumption/production and it working good for voltage readings, however it looks that the current measurement is not working ok. I have Envoy version 7, 3-phase system with both production and consumption CT's installed.

At this moment, I see this in HA:

HA_1

As you can see the current Net Power is nearly the wsame as current Power Consumption, at this moment it is dark outside, no production. I also read my P1, at that moment my P1 measured L1: 0.4A, L2: 0.5A and L3: 2.5A. It looks that when I multiple these P1 measured current values with the corresponding voltages per fase (L1: 234V, L2: 235V and L3 235V) the measured powered in HA matches (L1: 83W, L2: 104W and L3: 589W). The measured currents in HA does not match, especially for L1 and L2.

I also see strange production currents, since at this moment it is fully dark outside:

HA_2

Any idea?

catsmanac commented 4 months ago

Hi @hspjanssen , no I'm afraid not. The Current comes from values send by the Envoy. Let's first validate if it's using the right values from what it receives from the Envoy. Download the Diagnostic report for the Envoy en open it. afbeelding

In the report look for the line starting with endpoint-meters-report:

        "Endpoint-meters-reports": "[{\"createdAt\":1709713043,\"reportType\":\"production\

It's quite a long line, in there look for rmsCurrent. With a bit of cleanup it looks like below (values below are made up):

        "Endpoint-meters-reports": [
          {
            "createdAt": 1709713043,
            "reportType": "production",
            "cumulative": {
              "currW": 1234,
              "actPower": 1234,
              "apprntPwr": 0,
              "reactPwr": 0,
              "whDlvdCum": 6795789,
              "whRcvdCum": 0,
              "varhLagCum": 0,
              "varhLeadCum": 0,
              "vahCum": 0,
              "rmsVoltage": 240,
              "rmsCurrent": 5.142,
              "pwrFactor": 1,
              "freqHz": 50
            },

There's one summary and 3 lines for production and net-consumption, and total-consumption.

These are the values received from the Envoy. Validate if HA is showing the same numbers. If not there may be an issue in the code, if yes it's what the Envoy thinks what it is.

While looking over the data, you may notice that the Voltage for the aggregate report for production and the consumption sections shows as the sum of the individual phases. I wonder if that is part of the issue you are seeing. Summing it may be fine for split phase use like in the US, but with 3 phase use it doesn't make much sense. But as it calculates it, it maybe have an impact on current as well. I'm just guessing here though

As for the production current, the inverters are using a little bit of power when it gets dark, and I think I've seen a note somewhere that Current is always reported as positive number, but I'm not 100% certain on that.

hspjanssen commented 4 months ago

Hello,

Checked it for the production part in the diagnostic file, looks that HA is showing the same results:

\"reportType\": \"production\ \"rmsCurrent\": 2.275,\n \"rmsCurrent\": 0.841,\n \"rmsCurrent\": 0.772,\n \"rmsCurrent\": 0.662,\n

To me, this does not make any sense, I know that the inverters will use some power, but this is 2.3A for about 30 inverters, that is a lot. At this moment there is no production (it is dark), the current power production is -3W.

catsmanac commented 4 months ago

Yes, the numbers don't make sense to me either. They they come from the Envoy however. Don't know what we can do about it.

hspjanssen commented 3 months ago

Let's close this issue, since it looks to be an Enphase issue.