Enphase Envoy with Energy Dashboard

Hey folks

Just commissioned an Enphase Envoy system and got the integration into HASS working well.

One thing that I can’t get my head around is what consumption is being measured by sensor.envoy_current_power_consumption?

What I’m finding is that the above consumption sensor has an almost linear relationship with solar production, which is unusual. The issue this creates for me is that the export sensor, which I’ve created as per @del13r instructions in the first post is never positive as for some reason my consumption always exceeds production.

image

I don’t have a lot of data yet but if I look in the Enlighten portal, I already have enough exported energy today to register in the above Home Assistant sensor as a positive value.

Thanks in advance.

Production CT clamp appears fine as it is near 0 when the sun is down.
Consumption CT clamp is definitely not reporting properly.
I’d suggest calling the installer to double check their work and placement of the consumption CT Clamp.

This state for sensor.envoy_SERIALNUMBER_current_power_consumptiom
image

should match

the consumption value on this page http://envoy.local/home
image

That is where sensor.envoy_SERIALNUMBER_current_power_consumption gets its data from.

Here is what a perfect sunny day looks like for me from https://enlighten.enphaseenergy.com/web

As an example: From 2am to 7am, the pool pump was on. Then 6am to 7am, my air conditioning comes on.
This house consumption and grid import can be clearly seen on the graph before the panels start producing power from 7am onwards and then I start exporting from 8am onwards.

Thanks for the reply. I’m not sure about the Consumption CT clamp being incorrectly installed… This is what mine looks like so far today - clear sunny day in Melbourne. The issue is that Enlighten clearly reports export to the grid (albeit small) but that is simply not registering in HA.

So the issue could be something in the way HASS is collecting and aggregating the data perhaps from the template sensors? Perhaps something to do with the different sampling frequency between Enlighten and HASS?

I’ve also checked http://envoy.local and the “spot” consumption figure there matches the HASS value 100%. So I’m wondering if the issue is in the above - data sampling/aggregation by HASS?

I disagree.
Your graph is showing import and export at the same time.
It is physically impossible to be both importing and exporting power at the exact same time.
Grid Electricity can only flow 1 way or the other.
import = grid charges you when panels generate less than house consumption
export = grid compensates you when panels generate more than house consumption

Hah! Nailed it. That makes so much sense, thank you.

Will go back to the installers.

1 Like

A more clear way to show the installer is do this with your graph.

Correct install only showing import OR export
(never both sides of the horizontal line for the same period of time)

Incorrect install showing BOTH import AND export
(very rare to have values on both sides of the horizontal line for the same period of time)

This is why I love the internet. The problem is clear.

Thanks a lot for your help mate. The installers are already onto it. Their project coordinator knew the exact issue I was talking about. Sounds like it happens a fair bit.

1 Like

cheers, just overexplaining and cleaning up my posts to help anyone else in the same position in future.

Something very strange going on. Checked literally 30 minutes later and graph now looks “normal” with zero exports for the day.

Wth?

Either way, installer on their way today so hopefully will get to the bottom of this.

Edit - 45 minutes later - back to wacky numbers.

This works a treat thanks, although I am getting this in the Energy Config panel. Any ideas as it seems to be working.

image

Hi @mckibbin.mark

Not sure if your issue is the same, but I did have an issue in the past I documented in the link below I had with Energy Dashboard

Thanks for that but unfortunately No EUR found but I did a AUD search and found only 2 entries whereas you had 3

Go to dev tools /states
Type in the sensor you have an issue with.
This is what I see in my system


Next, go to file editor / configuration.yaml
And paste here what you have for the sensor.
Here is mine.


  - sensor:
      - name: Tariff Price
        unit_of_measurement: AUD/kWh
        state: >
            {% if is_state('utility_meter.daily_energy', 'DE_Peak') %}
                {{ 0.4961 * 0.73 }}
            {% elif is_state('utility_meter.daily_energy', 'DE_Shoulder') %}
                {{ 0.2052 * 0.73 }}
            {% elif is_state('utility_meter.daily_energy', 'DE_OffPeak') %}
                {{ 0.1675 * 0.73 }}
            {% else %}
                {{ 0.1675 * 0.73 }}
            {% endif %}

Can someone help me please. I am new in Home assistant and even newer in using API’s. I have HA set up and running on a PI now for a few weeks and realy seems a lot af fun…mostly… a few day’s ago a company set up a battery system with Envoy metered. they could give me 0 technical information about the data readout. after a lot of reading i found the API web of enphase and created a API account , a first application account and this one is green (life) so i think i can use it. Just to start i wanted to use the curl command from a CMD screen to test. Only thing is i just can’t get it running. Every time i got this error {“reason”:“401”,“message”:[“Not authorized to access requested resource”]}* Connection #0 to host api.enphaseenergy.com left intact. iam just not sure where to find all parameters for curl -v “https://api.enphaseenergy.com/api/v2/systems/67/summary?key=1234567890123&user_id=1234567” . is there any location, link, document,website where i can find this information in a simple way .

There are 2 types of API access.

1 is accessing the data in the cloud via https://api.enphaseenergy.com/api/v2/systems/YOURSYSTEMID/summary?key=APPLICATION-API-KEY&user_id=ENLIGHTEN-USERID
That method is documented here.
https://developer.enphase.com/docs/quickstart.html

The other method is direct to the Enphase Envoy at http://envoy.local/production.json which is currently poorly documented and we are waiting for better documentation from Enphase.

1 Like

Del13r thanks for answering. I am so happy someone answers the question. I already have been reading the page you proposed .I tried that several times the problem is that i still alway’s have the 401 error. i think that i use the ‘wrong’ ENLIGHTEN-USERID’ key . is there a way to find this key so i am absolutely sure that that part is correct. Once more i hope You can find the time to help me start this.

I haven’t needed the cloud API yet as I need more instant data than historical so I usually only query the http://envoy.local/ API.

The cloud API URL requires 3 inputs.
Here is how to get them.

Went to https://developer.enphase.com/admin/applications

This page shows the API key.
Just below that, I selected and copied the Authorisation URL

And pasted it into the address bar of a new tab in my browser and pressed enter

Then I pressed “Yes, Allow Access”

This page shows you your user ID. Note it down somewhere so you can use it.

Now you know both your user ID and API key.
Lastly, you need to find your system ID.
This can be found at either
https://enlighten.enphaseenergy.com/systems/

Screen Shot 2021-12-06 at 8.53.12 am

or
https://enlighten.enphaseenergy.com/web/

Then you put it all together into the URL

curl -v "https://api.enphaseenergy.com/api/v2/systems/YOURSYSTEMID/summary?key=YOURAPIKEY&user_id=YOURUSERID"

Result via
curl -v “URL”

You can also do this just in the web browser

FYI, the data shown via the cloud API at https://api.enphaseenergy.com/api/ could be 15 mins late due to this setting on the Envoy.

Screen Shot 2021-12-06 at 9.18.56 am

This is why I prefer to poll the Envoy locally and get data that immediately instead of 15 mins late. Plus there should not be any limits on how often you can poll an Envoy locally whereas Cloud API currently has these limits for the free Watt plan.
image

365 days a year / 12 months a year =
30.4167 days in a month

10,000 hits per month / 30.4167 days in a month =
328.76 hits per day / 24 hours in a day =
13.69 hits per hour

3600 seconds per hour / 13.69 hits per hour allowed =
1 hit every 262.80 seconds / 60 seconds per minute =
1 hit every 4m 23s allowed.

High frequency isnt really needed with Cloud API as the envoy only makes contact and dumps data every 15 mins, so there is really no point checking the cloud that often as you wont see any difference in the results until the next 15 minute dump your envoy makes to the cloud.

You are best off polling the cloud for new info every 15 mins anyway.

Try starting with http://envoy.local/production.json instead if you want just current stats instead of cloud based historical stats and aren’t satisfied with cloud API.

Thanks all for this information. I will start wit that and keep you informed. Just one thing. I was told that the local api I not longer working. Am I wrong there ?