Need testers for updated Enphase Envoy sensor

Just tested these changes. Works fine with our Envoy-S metered. :slight_smile:

@gregtd. Would it be an option for you to optionally add phase information to your integration? In order to use it one would need installer access to the Envoy-S and you would have to read the stream (http://IP-ADDRESS/stream/meter) as the envoy_reader does not seem to support this, but It would be a welcome addition to your great integration!

Never mind… on the envoy-reader bugreports I found that the information can be aqquired without reading the stream and envoy-reader might support this in the future.

Kind regards,

Michel

I may have judged to fast. After restarting HA I first got some data, but now my envoy is down/unresponsive. It looks like this version somehow crashes the envoy.

I can confirm that my envoy came back shortly after stopping home assistant so it seems to be related to this new version.
I have started HA again and now the envoy becomes unresponsive again.

@michel72 To confirm that it’s the Envoy sensor can you comment out only the platform: enphase_envoy portion of your configuration.yaml and start Home Assistant again?

That is strange, definitely not my intention of killing a device! :cry:

Anything in the logs?

I have been testing for a while after re-downloading the files and trying to recreate the exact same situation as before, when I had this issue.

I can’t reproduce. The envoy-s does become noticeably slower then before, buy It will remain online now.

I think both the new integration and my own rest sensors together are a little too much for the envoy.

I’m wondering if it’s the streaming of the metered data?

I’ve looked into my code again and used tcpflow and the code only polls 4 urls on the envoy device every 60seconds.

Could be, but I did not notice the slow page loads before.

I am quit sure the envoy-s going offline before was a “freak incident” since I can not reproduce that anymore.

Ok, thanks for the update. I don’t have access to an Envoy-S metered with 4.x firmware but will keep an eye out for this as yeah I shouldn’t be slowing down the device, not a good thing.

My firmware is no longer on 4, but on D5.0.50 (20f047)
Enphase Netherlands was so kind to update it for us, since the installer did not know how to do that.

Hi,
Do you see any noticable difference between V4 and 5.050?
I didnt know Envoy S was updatable remotely by enphase.

No, no noticeable difference.

I cannot update to HA 2020.12.0 as after update the values aren’t read anymore… must downgrade to ha 0.118

I’m using envoy metered Software Version:R4.10.35

Same Issue here

There was a bug in the library which has been fixed and merged. It appears it will be released with 2020.12.1

Though when it is released it won’t include the fixes that I have posted in this thread, that PR still has to be approved.

Can anyone confirm that the ‘current_energy_consumed’ is the sum of energy from all inputs? Grid, solar (and battery if you have one) and therefore total grid energy used is that figure - the figure from the current_energy_production sensor?

@Stubbs From what I’ve seen the Consumption data that is retrieved from the Envoy is the sum of all energy that is flowing into panel. Though there are two different configurations I have seen on Envoys, as you can read below.

EDIT: I found this document I guess the Consumption CTs can be installed differently which can effect what total means to your system. Enphase Consumption Monitoring

Net Consumption versus Total Consumption
....
• Net - If the solar production CT is installed on the load side of the consumption CTs, then you can leave the consumption meter set as Net.
• Total - If the solar array is line side connected or if the solar production CT is installed on a separate circuit from the consumption CTs, then select Total.

I don’t have an Envoy that supports Consumption but looking into the code and seeing what is returned by various Envoys from http://x.x.x.x/production.json I have seen two different data structures being returned. One structure was only one consumption value
{"production":[{"type":"inverters","wNow":59,"whLifetime":25137952.8325,"readingTime":1608318607,"activeCount":35},{"type":"eim","activeCount":1,"whLifetime":47578.252,"whLastSevenDays":351.252,"whToday":30.252,"wNow":-0.049,"rmsCurrent":0.28,"rmsVoltage":248.877,"reactPwr":0.899,"apprntPwr":34.795,"pwrFactor":-0.0,"readingTime":1608318607}],"consumption":[{"type":"eim","activeCount":0,"whLifetime":0,"whLastSevenDays":0,"whToday":0,"wNow":0,"varhLeadToday":0,"varhLagToday":0,"vahToday":0,"varhLeadLifetime":0,"varhLagLifetime":0,"vahLifetime":0,"rmsCurrent":0,"rmsVoltage":0,"reactPwr":0,"apprntPwr":0,"pwrFactor":0}]}

and another was two sets of values; total and net.
{"production":[{"type":"inverters","activeCount":26,"readingTime":1608317131,"wNow":6,"whLifetime":7998977},{"type":"eim","activeCount":0,"measurementType":"production","readingTime":1608317143,"wNow":0.0,"whLifetime":0.0,"varhLeadLifetime":0.0,"varhLagLifetime":0.0,"vahLifetime":0.0,"rmsCurrent":4.312,"rmsVoltage":242.022,"reactPwr":-506.461,"apprntPwr":521.678,"pwrFactor":0.0,"whToday":0.0,"whLastSevenDays":0.0,"vahToday":0.0,"varhLeadToday":0.0,"varhLagToday":0.0}],"consumption":[{"type":"eim","activeCount":0,"measurementType":"total-consumption","readingTime":1608317143,"wNow":0.0,"whLifetime":0.0,"varhLeadLifetime":0.0,"varhLagLifetime":0.0,"vahLifetime":0.0,"rmsCurrent":4.566,"rmsVoltage":242.05,"reactPwr":506.461,"apprntPwr":1105.183,"pwrFactor":0.0,"whToday":0.0,"whLastSevenDays":0.0,"vahToday":0.0,"varhLeadToday":0.0,"varhLagToday":0.0},{"type":"eim","activeCount":0,"measurementType":"net-consumption","readingTime":1608317143,"wNow":0.0,"whLifetime":0.0,"varhLeadLifetime":0.0,"varhLagLifetime":0.0,"vahLifetime":0.0,"rmsCurrent":0.254,"rmsVoltage":242.077,"reactPwr":0.0,"apprntPwr":30.767,"pwrFactor":0.0,"whToday":0,"whLastSevenDays":0,"vahToday":0,"varhLeadToday":0,"varhLagToday":0}],"storage":[{"type":"acb","activeCount":0,"readingTime":0,"wNow":0,"whNow":0,"state":"idle"}]}

I don’t know if the difference is configuration, hardware, or firmware. On your Envoy if you open a browser to the URL I mentioned above (replacing x.x.x.x with your IP Address) you will see the data being returned. If you have two Consumption parts then they should have a measurementType of total-consumption for the first and net-consumption for the second. Though if you only have one Consumption section then I do not know if it’s total or net, but it would be helpful to let me know what if it’s total or net in your installation. To easily read JSON data, I copy and paste it into http://jsonviewer.stack.hu/

I have seen a request to have the integration in Home Assistant give total and net consumption data. That is being worked on in an indirect way, moving the setup and configuration from text configuration (configuration.yaml) to the Home Assistant UI (Config Flow) which should give the user the option to select what conditions they want to monitor.

I know long answer!

One more update, hopefully the last one. Than PR #42857 should be approved and merged maybe at some point after the holidays.

The change made should be background operations and no functional change. It was to make sure no HTTP requests were made when updating Home Assistant entity info. The only HTTP requests that should be made are in different methods

The updated files are located here: sensor.py and manifest.json

Last changes working fine here. :slight_smile:

Looking at my production.json I’m getting both total & net, I guess I need to wait for daylight to go & see if I can work out what the CTs are attached to.

Just wanted to give an update on the progress of the changes.

The main PR #42857 as well PR #44600 have been merged into the dev branch in Home Assistant. I don’t know when they will get released, but I suspect being so close to the 2021.1 release, that it probably won’t be until the 2021.2 release. The changes will be released in the 2021.1 release.

PR #42857 - Reduces HTTP calls made to the Envoy devices
PR #44600 - Fixes an issue seen when retrieving inverter data from firmware <3.9 that don’t support inverter data gathering

The updated files are located at sensor.py and manifest.json

3 Likes