Enphase Envoy - Current state of things

Thanks @del13r , I read your guide. But, unfortunately, due to the D7.* firmware, I have to use the Enphase Envoy (DEV) integration from this forum thread. And the “today_s_energy” always 0.

I then convert the sensor.envoy_XXXX_current_power_production to kWh using Riemann Sum helper GUI. And I use this for the Energy Dashboard. It looks it works, at least it has the same value compared to the Enphase Enlighten mobile app (slightly different because Enphase app only has 1 decimal). I hope this is the correct way to get the solar production.

And for the Grid Import and Export, I use the reading from P1 meter connected to the smart meter. I think, this is the way if we have smart meter with P1 port. The reading should have been calculated with the solar panel production. Again, this is my understanding.

Gosh! What a very confusing to setup. I setup Home Assistant mainly for this Energy Dashboard, but it turned out super difficult, with non-working integration, limited documentation. I should not complain, I know. The devs have done very good job, but one of “core” functionality of HA is for this energy monitoring/management, and it is bad. /rant

2 Likes

Is there any idea why the official integration has not yet been updated to support the latest fw? My envoy was just updated and now cannot get it to login. Would much prefer the official Integration to avoid unnecessary churn, but if it isn’t going to be updated for a while will need to look at what options are available.

I did some digging around in GitHub to try and answer this question. Here is what I found.

Let’s start with who is the code owner for the enphase_envoy integration?

According to that list, the owner is

This is the most likely corresponding user in this forum

If we dig a little deeper into GitHub, we can see that the code owner for the enphase_envoy integration has most recently made some commits to another relevant code repository.

I think the common misconception is that just because an integration is “official”, doesn’t automatically mean that the manufacturer was involved or contributed at all. Most of home assistant is community contributions and I would expect no different here.

If I was on v7 firmware, (which I am not so I can’t help test unfortunately) I would have to assume that the jesserizzo repository is being used as the beta for the official integration. This assumption is based solely on the contributions of the official enphase integration code owner.

Maybe if I mention @gregtd, they can comment themselves on the current status.

1 Like

I restarted HA, and suddenly the Enphase integration didn’t work.
I deleted it, restarted HA.

And it failed to connect. How to debug this? My Enphase Enlighten App is working fine.

image

[SOLVED] For whatever reason, the Envoy didn’t connect to WiFi. You can see the WiFi connection status light was red, like this:

image

The Enlighten app received the last report from Envoy was 2 hours ago. I didn’t know how to restart it. I found how to enable AP-mode, to re-configure WiFi, but I didn’t want to do that.

Then, out of sudden, that red-light turned green!

Then I went to HA, re-add the integration. Success! All went fine, all data were still there. Let’s see tomorrow :smiley:

1 Like

Pretty much all of the many different forks/repository choices will be named (DEV) so they won’t get confused with the official integration.

Can I ask what the exact version and url of the repository you are using is so we can all be on the same page here?

Also, can I ask what your decision process was that led you to choosing that specific repo and version?

Example answers that can influence repo choices instead of using the official integration:

  • I have batteries and want to do X with them.
  • I am on version 4.x or 5.x or 7.x.
  • I am on v7.x and am having token trouble.
  • I have 2 independent envoys with different versions.

For example, if I was asking for help, I would visit http://envoy.local/home and grab the following information.

  • Part Number 800-00654-r06
  • Software Version D5.0.62 (5e57a9)

Then I would go to HACS (or whatever method you are using to load unofficial integrations) and go to integrations and click on the integration and then tap the 3 dots and click repository which is how you get the url.

@del13r I am using this repository:

jrutski/home_assistant_envoy_d7_fw: Update for D7 based firmware on Envoy gateways (github.com)

The reason I chose that because of this thread. At least @jrutski posted quite a lot of information, also in several other githubs.

You see, the main part of the integration is this envoy_reader.py

I downloaded that source code, and also from other repository “briancmpbll”. Then I use text editor to compare both files. Pretty much the same, only minor details, like error handling or whatever. So, I would expect others would also be the “same”. From other forum, I read many people success with “briancmpbll”, and I read they have the same issue (confusion) on how to get the value of the solar panel productions and how to add it to the Energy Dashboard.

And me too, I have that confusion! After reading and reading, finally I found that the EASIEST way is to use this entity:

sensor.envoy_XXXXXXXX_current_power_production

Current power production, when the solar panel is generating electricity, this entity will have value in WATT. Otherwise, it would be zero. So, I created helper using Riemann Sum to convert that entity value to kWh, I named it:

sensor.helper_envoy_current_power_production_riemann

That helper would convert the Envoy Current Power from watt to kWh.

But that’s not enough, you still cannot add that to the Energy Dashboard. For that I created a template.sensor like this:

  - sensor:
      name: Solar Panel Production
      state_class: total_increasing
      unit_of_measurement: kWh
      device_class: energy
      icon: mdi:solar-panel-large
      state: >
        {{ states("sensor.helper_envoy_current_power_production_riemann")|float }}

That template.sensor “Solar Panel Production”, I can add it to the Energy Dashboard and it was working fine for two days. The value was the same compared to the Enlighten App “Energy Produced”. So, I can then confirmed the value is correct!.

That’s enough for me.

I also read that we can do the same method with individual inverter entities (convert to kWh then add them all). I am doing that for curiosity.

1 Like

Thanks for sharing what repo you are using, however you havent really explained why you are using that repository.

What problem are you trying to solve by using an unofficial integration?

For example, is it because you:

  • have firmware D7.x and the offical integration doesnt support D7.x ?
  • have batteries ?
  • have single phase power or three phase power?

I ask these questions because different repo’s appear to be trying to solve different specific problems.

I only say this because using specific repositories may solve 1 problem but simultaneously introduce another problem like the one you reported with today_s_energy being 0.

At that point, the repository code author would best understand why this problem was introduced.

The reason because my Enphase Envoy S Metered Gateway has firmware D7.0.88.
And like everyone else in this thread, we cannot use the official integration.

Why?

Because the authentication mechanism has been changed in D7.x firmware.

The official integration is broken because of that.

And this (broken) hasn’t changed for I don’t know how long. To be honest, I can’t wait someone fixed the official integration. I read that the original author also made his last attempt long ago, he made some changes which wasn’t enough. Unfortunately, I don’t save the URL, I think it’s on the envoy_reader.py Github.

So yeah, having official integration would be nice, but it seems it won’t happen anytime soon.

2 Likes

when I read about the repo you are using, it says the following.

Repo: jrutski/home_assistant_envoy_d7_fw

jrutski forked from briancmpbll

Repo: briancmpbll/home_assistant_custom_envoy

briancmpbll is based off work done by DanBeard and forked from jesserizzo/envoy_reader

Repo: DanBeard/enphase_envoy

DanBeard “Copied from ha core and modified for forked envoy_reader lib”.
Official HA Core Enphase_Envoy integration author is jesserizzo and gtdiehl is listed as the code owner.

Repo: homeassistant/components/enphase_envoy/

That’s 4 repo’s. Each repo has variations.
Can you see how all of this fragmentation (forking from another fork) might introduce new issues?

If I was on D7.x firmware, and didn’t have Enphase batteries, i would be more comfortable trying the following pre-release repo written by the author of the official HA Core enphase_envoy integration which is jesserizzo.

gtdiehl has also made commits to this repo and is the listed code owner for the official integration.

Anyone else getting SSL errors today? I am using briancmpbll fork. No issue. I hardcoded the envoy IP in the envoy_reader.py and my IP changed. Duh!

Yeah, those 4 forks might introduce new issues. BUT, since none of those have been updated for a long time, I don’t think so.

Anyway, we will see in a few years :slight_smile:

That’s /s btw.

HA Core enphase_envoy component updated Feb 6 2023 (5 hours ago)

BrianCmpbll updated January 13 2023

jrutski updated Oct 26 2022

DanBeard updated March 10 2022

jesserizzo updated Jan 21 2022

Nah, still won’t hold my breath :slight_smile:

Well, let’s see. Probably next month 2023.3? Who knows!

NOTE: Thanks for the news though, appreciated.

My point in attempting to show the commit history was that the home assistant devs are making changes to the enphase_envoy core component so that it stays compatible with future home assistant releases.

The home assistant devs won’t be responsible for any of the forks mentioned in this thread and the risk is that a new HA release may cause a new issue with an older fork.

If that happens, your only support option is the author of the fork you are using.

1 Like

Once it’s committed/released to core I’m going to be up shit creek trying to figure out how to delete the old and get the official one working lol

1 Like

I am fully aware of that. You see, I just got solar panel installed last week, so I cannot wait the official integration. The DEV version works fine for now. Currently, I am trying to figure out Forecast Solar which is way off.

Here is today, Forecast Solar is the dashed line.

image

And here is the discussion with person who knows about it. It is still not right :laughing:

Can’t get forecast.solar forecast to line up with my production - Configuration - Home Assistant Community (home-assistant.io)

image
image

As I am in Australia which is not supported natively last time I checked, I have to use an add on called Solcast which works well for me.

2 Likes

I had similar forecast issues. I subscribed at the lower tier, got the proper tilt/azimuth for each array and split them apart into two forecasts (front roof/back roof) and now it gets pretty close. Today is a bit of an oddity, but forecast was sun/haze and it is hardcore overcast out of nowhere so seems like the general weather pattern shifted so can’t blame the dev for today.

1 Like

sorry for the delay… Here is what I created for my enphase sensors to plug into the energy dashboard
its been a while since I have done this, so there may be better ways now ???
Did a little more digging (might update this again…)
Use this as your base to learn → Enphase Envoy with Energy Dashboard

I have another HA environment I am building out to try and simplify a lot of things as HASS keeps getting more user friendly. And I also like not having to constantly tutor my friends using it on how to use vi and code files/configs/yaml when they barely know to click-drag-drop in windows.

but not all things are as simple as we would like, so you gotta at least know how to create a template in the configuration yaml for now.

I dropped this at the bottom: (gives me a couple sensors)

template:
  - sensor:
        name: Grid Import Power
        state_class: measurement
        icon: mdi:transmission-tower
        unit_of_measurement: W
        device_class: power
        state: >
            {{ [0, states('sensor.envoy_20230xxxx_current_power_consumption') | int - states('sensor.envoy_202302xxxxxx_current_power_production') | int ] | max }}
  - sensor:
        name: Grid Export Power
        state_class: measurement
        icon: mdi:transmission-tower
        unit_of_measurement: W
        device_class: power
        state: >
            {{ [0, states('sensor.envoy_202302xxxxxxxx_current_power_production') | int - states('sensor.envoy_202302xxxxx_current_power_consumption') | int ] | max }}

Next I restarted then went into the HELPERS section and create 2 energy sensors. This is a new method to replace the 2nd part of the link I posted above…

Now I have the basic sensors for the dashboard
Much easier this way!!!
Only CATCH22 I have encountered is… since it is dark here, my sensor.grid_export_energy isn’t populating a value so I might have to wait until the sun comes up to plug it into the dashboard (that is very odd) Just didn’t wait long enough… it finally popped in there

1 Like

Here is the comparison
Which now that I look at this… seems I have something off, because they do not match perfectly or even close.
The Production is pretty close, but I need to revisit my sensors/templates for import/export energy
Revisited this and made a couple changes for the forcast.solar and co2 signal integrations… will see how this pans out tomorrow.

1 Like