Enphase Envoy - Current state of things

It is actually retrieving a token successfully. The empty token at the start is as expected as you are adding the envoy. Then it reaches out to enphase and obtains a token which is valid till October 1, 2025.

2024-10-01 21:01:38.024 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Obtained Token
2024-10-01 21:01:38.025 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Token expires at: 2025-10-01 21:01:37

As a next step it is reaching out to your envoy to authenticate with the envoy, but no reply is returned, a timeout occurs. And it tries again to connect to the envoy

2024-10-01 21:01:38.032 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #1 of 2: https://192.168.1.192/auth/check_jwt: use token: True: Header: <Token hidden>  Timeout: 60 Holdoff: 0

2024-10-01 21:02:38.038 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP Timeout in fetch_with_retry, waiting 0 sec: 

2024-10-01 21:02:38.039 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #2 of 2: https://192.168.1.192/auth/check_jwt: use token: True: Header: <Token hidden>  Timeout: 60 Holdoff: 0

And times-out for the second time

2024-10-01 21:03:38.046 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP Timeout in fetch_with_retry, raising: 
2024-10-01 21:03:38.061 WARNING (MainThread) [custom_components.enphase_envoy.config_flow] Validate input, getdata returned HTTPError:

So the issue is that the Envoy is not replying to authentication requests with the token.

I assume you picked some parts from the log. There may be more detailed lines between the first connection attempt to the Envoy and the last failure, These may contain some more information.

What type of Enphase account do you have, installer/diy or home owner?

I’m a homeowner when looking into account details. System maintainer is someone else (the installer) unfortunately.

I have found this article and I’m testing it: Enphase Envoy - D7 firmware with JWT - A Different Approach

Although the sun is not shining at all, the sensors have been created and measuring 0 Watt at the moment… I hope the sun comes to make me more happy with some figures and overcome the autumn :thinking:

EDIT: this is actually close to this thread… what a mistake! When I go to top, I see the final implementation. Great work…! Thanks @del13r

I think things are working, however I receive 0 kWh produced.

Screenshot 2024-10-02 at 13.09.31

When looking into more detail, I have noticed https://envoy.local shows 0 Watt production:

This must be an Enphase thing instead of a HA integration issue. It might go beyond this topic, but should I make some settings at the Enphase instance? I’m homeowner or do I need to kick out my system maintainer?

Also, I don’t think my installer has installed a CT clamp. But how is it possible I can see the production at https://enlighten.enphaseenergy.com? Is this because of the Envoy and its cloud connection? Does this integration only work if you have a physical CT clamp?

I do have a P1 reader, so my consumption and/or export back into net is already visable in HA.

You can check if the Enphase Website or the Enphase App are showing production data?

I was just editing my own reply above…

Yes, when using https://enlighten.enphaseenergy.com I can see the production data…

Looks like you have CT clamps as the envoy page is showing a ''metering" heading as well as production and consumption. Mine, which is non metered only shows micro inverter production.

I don’t know what data Enphase all gets from the Envoy and maybe it uses inverter data to report production.

The 0 production number shown on the Envoy page at 1pm seems very low. Enphase signals 54 watt around 2 pm. Unless it’s pitch dark, even under rainy conditions panels typically produce a little bit. The 54 watt reported by Enlighten over 12 panels is 4.5 watt for each panel. Almost as if the production CT is not reporting properly. I’d expect some small values and also that the lifetime value would increase over time.

If HA is reporting same values as what you see on that Envoy webpage it’s indeed something with the Envoy and not HA.

I have physically checked the Envoy. There are only the phase and neutral wire connected, no wires for a clamp (1 phase).

I think it is because of the model: Envoy-S-Metered-EU. As far as I know, the connection of clamps is optional…

I will look for settings to turn off the metering… or maybe someone else has experience?

Envoy metered without installed/configured CT behaves different. In the HA Enphase Envoy Core integration we have some checks for this and use data from different source data if this is the case:

envoy metered without configured CT has whLifetime and wNow in inverters
whLastSevenDays and whToday are incorrect for both so either can be used

So you may need to change your rest setup to use wattHoursLifetime and wattsNow from /api/v1/production.

{
  "wattHoursToday": 36462,
  "wattHoursSevenDays": 189712,
  "wattHoursLifetime": 6139406,
  "wattsNow": 5740
}

I found this diagram for the 230V 50hz (Europe and Australia might be the same) version of the Envoy-S Metered.

When reading, my Envoy S Metered should have a CT clamp for production (which is not installed). Optional is a CT clamp for consumption.

I will contact my installer to ask why he didn’t install.

Do you think I can still read the production without a physical CT clamp?

The integration of @del13r works with https://envoy.local/ which won’t work for me. The portal https://enlighten.enphaseenergy.com gets its information from the micro-inverters I believe, where I presume all data is stored in the cloud of Enphase and therefore still visible for me…

@catsmanac do you think I’m able to fetch the data into HA? When using https://envoy.local/api/v1/production I get:

Screenshot 2024-10-03 at 12.15.52

What is /production showing for data?

https://envoy.local/production.json gives:

{"production":[{"type":"inverters","activeCount":12,"readingTime":1727961428,"wNow":567,"whLifetime":2463751},
{"type":"eim","activeCount":1,"measurementType":"production","readingTime":1727961444,"wNow":0.0,"whLifetime":0.049,"varhLeadLifetime":1.963,"varhLagLifetime":1395.445,"vahLifetime":10187.493,"rmsCurrent":-0.0,"rmsVoltage":243.464,"reactPwr":-0.0,"apprntPwr":0.0,"pwrFactor":0.0,"whToday":0.049,"whLastSevenDays":0.049,"vahToday":23.493,"varhLeadToday":0.963,"varhLagToday":3.445}],"consumption":
[{"type":"eim","activeCount":1,"measurementType":"total-consumption","readingTime":1727961444,"wNow":-0.714,"whLifetime":-7186.364,"varhLeadLifetime":-0.29,"varhLagLifetime":31.743,"vahLifetime":257393.467,"rmsCurrent":-0.165,"rmsVoltage":243.403,"reactPwr":0.423,"apprntPwr":-40.238,"pwrFactor":-1.0,"whToday":0.0,"whLastSevenDays":0.0,"vahToday":575.467,"varhLeadToday":0.0,"varhLagToday":0.743},
{"type":"eim","activeCount":1,"measurementType":"net-consumption","readingTime":1727961444,"wNow":-0.714,"whLifetime":-7993.991,"varhLeadLifetime":1.673,"varhLagLifetime":1427.187,"vahLifetime":257393.467,"rmsCurrent":-0.165,"rmsVoltage":243.403,"reactPwr":0.423,"apprntPwr":-40.238,"pwrFactor":-1.0,"whToday":0,"whLastSevenDays":0,"vahToday":0,"varhLeadToday":0,"varhLagToday":0}],"storage":
[{"type":"acb","activeCount":0,"readingTime":0,"wNow":0,"whNow":0,"state":"idle"}]}

“wNow”:567 seems to give the current production in Watt…
“whLifetime”:2463751 seems to give an even better cumulative figure as it can be deducted from the prior read out to get the last production in kWh

Yes, these are used the the integration you used before and the HA Core integration.

I have a similar problem as @jnathalia.

I also have the Envoy S-metered-EU, without any CT clamps installed. In the core HA integration the sensors are all at 0. However, when I look at device info is does say “Envoy, phases: 1, phase mode: three, production CT”. See also the attached screenshot.

Screenshot 2024-10-04 153847_ 2

Like @jnathalia, the data in production.json → inverters is accurate when compared to the Enphase Enlighten website.

How do I get the integration to use the values in the inverters section of the production.json file? Is the integration (wrongly?) thinking I have a production CT (based on the info under device info)?

We have a small difference @dschrijnders as you have been able to install the HA integration and I haven’t. I have another site and there I’m capable with the standard HA integration but this one is at firmware D5.x.

I discussed with my PV installer and he admitted that a clamp should be installed and proposed to send me 2. However, I have a 1-phase installation so 1 is sufficient (for Production), for Consumption I need 3 clamps as I have 3 phases. So, in total 4 are then required. But I do have a P1 reader from HomeWizard so the additional 3 are not necessary.

I have a positive feeling that the RESTfull integration of @del13r will work…

I’m wondering how you succeeded to install the HA integration…

By the way, although you succeed to install the HA integration (maybe DEV from briancmpbll), you still have the same issue as the production meter says 0. Also you, I believe, should install a production CT clamp…

I will report as soon as I have installed into mine.

Hi @dschrijnders, this may be an issue with the core integration and the 8.2.4264 firmware which is rolled out recently. If you are using the HA Core Enphase Envoy integration, please report the issue as Home Assistant issue and we’ll look into it and any code changes that may be needed.

Thanks @catsmanac, I am indeed using the HA Core Enphase Envoy integration. I will report it. Although I must say that I have this issue for at least six months now.

@jnathalia I installed the HA Core integration, not the one from briancmpbll. It has been working before, when the updated version of the integration was tested. I did use the DEV version back then. When the changes were merged into the main branch, I uninstalled the DEV version, and switched to the HA Core integration. And it also has been working shortly after all the changes were merged into the main branch, and then suddenly stopped working. By the way, my installer said I don’t need a production CT, as the production data can also be read from the inverters themselves. As I understood it correctly, that is also what the integration is supposed to do, if I understood @catsmanac correctly.

well, if I understand correctly (and I might be wrong) there are two ways to retrieve your data from Enphase.

  1. via the data that is collected from your micro-inverters and submitted to (the cloud of) Enphase. This is what you can see at https://enlighten.enphaseenergy.com. However you cannot see it live as it takes time before the data is pushed to their portal/cloud…
  2. or via https://envoy.local/ which is retrieving live the data from you gateway and skipping the cloud of https://enlighten.enphaseenergy.com. If you have a metered version (as I do have) the result is 0 when using https://envoy.local/production.json as I do not have a production CT.

What kind of Enphase gateway do you have?

As I have neither a production or consumption CT clamp, my consumption has some inaccuracy reported live at its gateway. It reports -1 Watt live. That’s why I also thinks, when the CT Production clamp is installed, I will get figures live.