Enphase Envoy with Energy Dashboard

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 ?

I am currently fortunate enough to be on Software Version R5.0.55
People who had v7.x.x forced onto their systems automatically have now reported issues accessing information locally from http://envoy.local/
Once the device is on v7.x.x, there now suddenly seems to be an extra step required to access the information.
The extra step has something to do with generating a JSON Web Token (JWT) via https://entrez.enphaseenergy.com/
On that site, you can generate an uncommissioned token that expires after 7 days and that will allow you to access http://envoy.local/production.json

I have not been able to help so far with testing this issue as I am currently on the unaffected software.

Hi @mckibbin.mark

I just noticed there is a new feature in dev tools called statistics that might offer guidance with your currency issue.

Yes mine is identical, as it seems to be working I think I will just ignore it, maybe somewhere there are some EUR that we have not found yet.

My apologies if this has already been covered, I haven’t had time to read the entire thread yet.

I just need a little help to polish my first automation. I have set up a LIFX RGBW bulb to emulate a Wattson, a simple device that shows the status of solar import/export by changing the colour of an LED. I’ve been able to find all the info I needed to set it up by searching this site and the HA documentation.

Except for one thing. How do I test for the Envoy being online? At the moment, if the Envoy drops comms with my IOT WLAN, the bulb just keeps the last state before comms dropped. This was highlighted yesterday with a sudden change of weather coinciding with the Envoy going offline. The bulb was showing bright blue, indicating export at >4kW, in the middle of a sudden heavy shower. IME that’s just not possible, so I looked at the Envoy’s web interface page and saw the comms were down.

What I’d like to do is have the automation switch the bulb to a distinctive scene (perhaps flashing alternating red and blue) when the Envoy’s data is unavailable.

I’m using the default Envoy integration.

By way of background:

I recently had additional panels added to my array, my Envoy was updated from the old Envoy R to an Envoy S with metering, and my solar generation was changed from single phase to 3 phase.

My old system had a Wattson attached, which used 5 CT clamps to measure 3 phase consumption and single phase generation. I had the additional 4 clamps required to measure 3 phase generation, but there wasn’t room in the meter box to add them. In fact with the Envoy S connections and the 5 existing CT clamps it was a struggle to put the front panel back in place. So the Wattson clamps had to be removed. We soon realised just how much we relied on the Wattson to help us schedule loads. It was so convenient having it in the kitchen, visible from the living room where we spend most of our time when we’re indoors.

If I were you I’d work out a way to get the Watson working which might mean paying an electrician to add a sub-meter box since your main box is full.

In the mean time, you can setup a binary sensor and a device tracker:

binary_sensor:
  - platform: ping
    host: ipaddress_of_your_envoy
    name: "envoy"
    count: 2
    scan_interval: 30

device_tracker:
  - platform: ping
    hosts:
      device_name_1: ipaddress_of_your_envoy
      count: 2

You can then monitor the state of the entity binary_sensor.envoy for your automations. The problem with this is that you’re monitoring using the default Enphase integration and this isn’t real-time - I wrote some code to allow real-time monitoring of your Envoy locally and not depending upon the Enphase cloud. This only works if you have 5.x.x firmware in the Envoy - Enphase are in the process of upgrading every Envoy to the newest version 7.x.x which breaks this. Some have blocked internet access for the Envoy to ensure they don’t get upgraded to 7.x.x - I was unlucky and they upgraded mine so my code no longer works. if you have 5.x.x you may want to check it out as it gives readings every second and I have emulated the Watson in my dashboard cause the colour codes are very intuitive. GitHub - vk2him/Enphase-Envoy-mqtt-json: Takes real time stream from Enphase Envoy and publishes to mqtt broker

1 Like

I work with a smappee. Works just like the Watson. It gives real time data and works perfect with HA. The only thing i need from the envoy is the load status off the enphase battery. That is why I keep trying.