Enphase Envoy - Current state of things

Assuming you only have 1 envoy with 2 groups?

Yes, that is correct. Though this wasn’t my issue.

After debugging the add-on I determined it was my IPv6 address that was the issue. Envoy’s API doesn’t support IPv6 addresses. In the async_step_zeroconf method HA was finding “two” Enphase hosts, the IPv6 and IPv4 one. They are the same host, but the IPv6 came first. And because of await self.async_set_unique_id(serial), I was only presented with the IPv6 option, no IPv4 option. Since the Envoy local API doesn’t support IPv6 this was causing the integration to fail.

I changed two things to fix this. The first was to check if the host was an IPv4 address, if not abort the zeroconf step. The second was to strictly use the serial number of the Envoy as the unique id. I was planning on making a PR this weekend for your review.

@jrutski here you go Only support hosts with IPv4 addresses by unibeck · Pull Request #2 · jrutski/home_assistant_envoy_d7_fw · GitHub. Hopefully this fixes @TerroBladeZ. Or at the very least I added some debugging that helped me find the IPv6 bug, maybe it will provide some insight into his error as well.

@unibeck thanks for that. I can’t imagine too many people using IP6, though certainly not out of the realm of possibility. Maybe a “Use IPv6” checkbox in the config window, defaulted off?

I’m trying to get a few other things sorted out, and get the grid status sensor in there as well…I’ll pull your fix in to the bigger version.

Glad I could help.

I have IPv6 off in my router and in HASS. There are known issues with Google WiFi’s IPv6 implementation, so it may be related to that. Either way, it is an easy enough check to perform in the add-on

I still get the same error, I took your raw code as your pull is not yet merged.

I have a IQ combiner 3 on 7.0.153.

Below is the errors with the self token.

2022-09-29 11:42:08.587 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Checking Token value:
2022-09-29 11:42:08.587 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Found empty token:
2022-09-29 11:42:10.087 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #1: Header:{‘Authorization’: ‘Bearer eyJraWQiOiI3ZDEwMDA1ZC03ODk5LTRkMGQtYmNiNC0yNDRmOT…’}
2022-09-29 11:42:40.091 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] TransportError:
2022-09-29 11:42:40.092 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #2: Header:{‘Authorization’: ‘Bearer eyJraWQiOiI3ZDEwMDA1ZC03ODk5LTRkMGQtYmNiNC0yNDRmOT…’}
2022-09-29 11:43:10.096 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] TransportError:
2022-09-29 11:43:10.096 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #3: Header:{‘Authorization’: ‘Bearer eyJraWQiOiI3ZDEwMDA1ZC03ODk5LTRkMGQtYmNiNC0yNDRmOT…’}
2022-09-29 11:43:38.591 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] TransportError: All connection attempts failed

Below is the error without Self Token.

2022-09-28 13:58:50.279 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Checking Token value:
2022-09-28 13:58:50.279 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Found empty token:
2022-09-28 13:58:51.724 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #1: Header:{‘Authorization’: ‘Bearer eyJraWQiOiI3ZDEwMDA1ZC03ODk5LTRkMGQtYmNiNC0yNDRmOThlZTE1NmIiLCJ0eXAiOiJKV1QiL…’}
2022-09-28 13:59:21.729 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #2: Header:{‘Authorization’: ‘Bearer eyJraWQiOiI3ZDEwMDA1ZC03ODk5LTRkMGQtYmNiNC0yNDRmOThlZTE1NmIiLCJ0eXAiOiJKV1QiL…’’}
2022-09-28 13:59:51.734 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #3: Header:{‘Authorization’: ‘Bearer eyJraWQiOiI3ZDEwMDA1ZC03ODk5LTRkMGQtYmNiNC0yNDRmOThlZTE1NmIiLCJ0eXAiOiJKV1QiL…’’}


I’ve been reading the thread, since I’m having issues of connecting my Envoy. I can log in on the authentication page, but there is no system to select from. What step did I miss.

Thanks in advance.

1 Like

I got my Envoy-S Metered yesterday and I cannot add it in Home Assistant. It’s quite frustrating.
I tried every possibilities (IPv6 with “envoy”, “installer” or my Enlighten credentials ; same with IPv4) and I have the same result “Failed to connect”.
My Envoy-S Metered firmware version is D7.0.88.
Do you have any idea? What did I miss?
Thanks! :slight_smile:

Did you try this custom component: GitHub - jrutski/home_assistant_envoy_d7_fw: Update for D7 based firmware on Envoy gateways ? Works for me, but I have an IQ Gateway. There are bunch of custom components with their own version of authentication. Try them all. Be sure you can login to your envoy via http://envoy.local ,

1 Like


Thank you for your quick reply. I have made some tests and still nothing worked :frowning:

I can log in on http://envoy.local but it’s very long with Firefox (after an INVALID_CERT page which I can bypass) and it does not work with Chrome (impossible to bypass the INVALID_CERT page).

When I try to have access to http://envoy.local, I first have a HTTPS redirection and the URL became https://envoy.local, then I have an error pop up, after I need to click to “Connect with Enphase” button and I land on this page :

Enphase Authentication | Login page

Sound like OAuth2 authentication method…

Do you have the same?

Last question, you mentioned I need to try all custom Envoy Enphase integration. How can find them? I tried to search on Google and GitLab but I did not be able to find the link your provided. That’s why, I think I don’t have the right method.

Thanks! :slight_smile:

Yes, the certs are messed up on the envoy. But you should get in eventually using the “Login with Enphase” button. If you cannot get local web access, then something else is the issue. If that works, the integration should work. I’ve only ones I found from this thread are (which you install with HACS):


Hopefully one of the authors of the integration can help, if you can login locally to the envoy.

I have an Envoy-R (LCD model) and a new IQ Combiner 4 (with built-in IQ Envoy).

I installed the GitHub - jrutski/home_assistant_envoy_d7_fw: Update for D7 based firmware on Envoy gateways integration.

Unfortunately, it :

  1. broke my Envoy-R, which was working fine in HomeAssistant with the standard Envoy integration.

  2. didn’t work with my IQ Envoy either. It was unclear what was supposed to be entered in the password field.

For now, I had to revert to the previous integration.

It depends on the firmware running on the Envoy. The current enphase integration that ships with HA works with any hardware as long as it is not running D7.xx.xx firmware - do not use the HACS integrations with older firmwares.

The credentials for the D7 integrations are enlighten credentials (the web login for the enlighten portal).

Grid status sensor

I’ve not had time to write the binary sensor into the custom integration, but it is easily done in the configuration.yaml file, leveraging a valid token (yes, the token will expire)

  - platform: rest
    name: Rest Grid Status
    resource: https://EnvoyIPAddress/home.json
    method: GET
    verify_ssl: false
    value_template: "{{ value_json['enpower']['grid_status'] }}"
    timeout: 45
      Authorization: Bearer **YourTokenHere**


Thanks for your response. I have two Envoys - one Envoy-R (LCD) running firmware 3.7.31, which I have had for 12 years, and one IQ Envoy, just installed on Sunday, with firmware D7.0.155 .

The Envoy integration that comes with HA works fine with the Envoy-R.
Your integration, when installed through HACS, replaces the built-in integration, and thus breaks my Envoy-R sensors in HA.

It’s apparently not possible to have both the built-in integration and your integration running at the same time. It’s one or the other. Is there a way you could fix this ? The Envoy-R URLs look nothing like the ones for IQ Envoy. Certainly no JSON URLs.

I’ll take another shot at using your D7 integration with the Enlighten credentials.

So, I got your integration to work. I had to check the checkbox at the bottom to get it to work. There is no text next to the checkbox, so I don’t know what it does.

I found a couple issues with the sensors:

I don’t have a consumption CT, so I think that sensor shouldn’t be there, or at least not with this value.
No battery also, so the battery sensor probably shouldn’t be there.

“Total battery percentage” also probably shouldn’t be there.
“Today’s energy consumption” sensor also shouldn’t be there.

The rest looks great - I love seeing the individual sensors for each of the 30 new IQ8+.

I tried to use the Energy tab and add the sensor for the new IQ Envoy.

The first error is because the Envoy-R sensor is not working in your integration.

The second error, I’m not sure. It says "The following entities have state class ‘measurement’, but ‘last_reset’ is missing. This is for the IQ Envoy sensor.

Edit: looks like it works if I use the “Lifetime energy production” sensor instead for my IQ Envoy.

@madbrain Correct, you cannot use both the HACS and the native, as the HACS integration overwrites the native.

Also, for the energy dashboard, you need to use lifetime energy production, otherwise, there needs to be some calculations made with custom helpers.

As for the consumption CT, I believe this is the expected behavior, as the envoy is not able to determine if the home is consuming or if it is being exported back to the grid.

1 Like


Thanks for your response.

I would really like to be able to use integrations for both Envoys. Is there a way to patch the integration so that both the HACS versions and the regular one can coexist ?

If you aren’t able to do it, can you please point me in the direction of what needs to be done ? I’m a programmer, but a C/C++ one, I know nothing about Python or how integrations are implemented in HomeAssistant. Any URLs to relevant docs would be helpful. I would be willing to fork your integration to fix the coexistence issue.

Ideally, it really should be a single integration that supports all versions of the Envoy, and I should be able to add both devices to HomeAssistant, but there is probably a lot more work involved to do that.

As far as the sensor, on my Envoy-R, the “Lifetime” sensor is in MWh , and currently reports 163 MWh, with no decimals. That makes it useless for getting daily data, as 1 MWh takes a pretty long time to cross, typically a matter of weeks or months depending on the season. However, the “Daily” sensor from the Envoy-R works fine in the Energy dashboard under solar. That’s why I was surprised that the “Daily” sensor in your D7 integration for the IQ Envoy does not work in the Energy dashboard.
That part is no big deal - if I could get both integrations to coexist, I would use the Daily sensor for the Envoy-R, and the Lifetime sensor for the IQ Envoy, and HA would add them all up.

In fact, this is what got reported for this week when I switched from the built-in integration (Envoy-R) to yours (IQ Envoy) in the middle of the day yesterday (thursday, 10/13).

You can see the orange data for the Envoy-R, and the brown data for the IQ Envoy.
The Envoy-R has a legacy M190/M215 system connected with 9.46 kW capacity, southeast facing, with 40 micro-inverters and panels.
The IQ Envoy has an IQ8+ system connected, with 11.22 kW capacity, northwest facing, with 30 micro-inverters and panels.
Both systems are generating approximately the same amount of energy each day.
I’d love to be able to monitor the combined total.

Not even Enlighten has managed to monitor the combination at the moment - currently I have two separate Enphase accounts, one for each system. I filed a ticket with Enphase to merge the two sites/accounts into one. They told me it will take a couple weeks, and they will have to disable the production CT on the IQ Envoy. That means the production data will be less accurate. Small price to pay. I hope that doesn’t break your D7 integration.

1 Like

I had the installation company ask Enphase why i couldn’t connect my HA. The repsonse was that they disabled the function for security reasons. If this is true this sucks, because I have to switch to the metered version to get all the info I need.

Hi again,

Sorry for the late reply. I have updated HA to 20221010.0 this evening and I tried once more the custom integration from briancmpbll on Github (GitHub - briancmpbll/home_assistant_custom_envoy).

According to the documentation I’ve checked the ‘Use Enlighten’ option and used my credentials and… it works!

Thank you for your time and your help! :slight_smile:

I’m reading through all of this as I’m not able to get my Enphase connected to my HA. I’m trying to login at the local page now, but when I click on the “Login with Enphase” on the local page I get a blank page with this error:
Invalid oauth client id - envoy-ui-client

Anyone else had that problem? I have no idea how to fix this or what is causing the error.

Contacted the support through the enlighten.enphaseenergy.com page (question mark on the top right, then “contact us” ) Now it works.

Same issue here, but I also don’t understand why this is happening. Started a week or two ago, no changes from my side. My HACS intergration is still working and enphase website and app are also still working. Just not able to login locally with my credentials.

Invalid oauth client id - envoy-ui-client

Doesn’t matter if I change browser or pc, so doesn’t seem to be a local caching thing. I’ll restart my metered gateway tomorrow and see if that changes anything.

1 Like