Enphase Envoy with Energy Dashboard

I do see production CT plugged in (P1).
I dont see any consumption CT plugged in. (C1 or C2)

image

Yes there’s only one CT plugged in and it’s monitoring the solar panels coming in. What’s really weird is that it appeared the computer was calculating everything just fine before without the metering set up but now I’m wondering if it just wasn’t set up correctly from the start.

you need 2 CT clamps (each one has blue and white wires)

sourced from

1 Like

You need two CT’s to measure both production and consumption. You have a nice separate box for your Enphase components - mine have been installed on a single switchboard with all the circuit breakers for the house. I’d get call the installers and ask them to come back as they haven’t connected the Consumption CT. I’ll post a photo showing where my Consumption CT is installed

Aaah that makes sense. You know what’s funny is that I’ve been using an Aeotec Energy Meter and I have two CTs (on for each phase) monitoring my power use from the grid. Now that I have the solar system connected, if I’m producing more than what I need, the Aeotec meter will show a negative number (watts). It will also obviously show that I’m using less power from the grid when the solar starts producing. For the time being, I wonder if there’s a way to incorporate that with the envoy to set up the Energy dashboard for the time being?

Here is a photo of where my Consumption CT is connected - it is directly after the main fuse for the house per the diagram I have above.

A second CT for Generation is connected over the power cables that come directly from the panels on my roof (I have two banks of panels - so one red wire per bank of panels). There is a third smaller CT you can also see in this photo - thats for the Hot Water System that is heated with Off Peak Power. Where I live in country NSW, I pay $0.15 per KWh for Off peak and i am paid $0.20 per KWh for export,

1 Like

Ok. Well I definitely can confirm that my installer has NOT installed the consumption CT clamp which sounds like is the problem. :disappointed:

1 Like

The weird thing is that they have done something to fool you to think they have - hence why you’re seeing generation in your Enphase online graphs after they 'fixed" it?

Have a few things…
First wanted to comment on the CO2 Signal.
When looking at the integration, it shows no errors. (seems good right?)
image
…but click on it and look at the details, mine does not report anything.

I’ve let this sit for a while… no change.

Next item @del13r (sorry on the other thread… I couldn’t locate this one in the slew of posts from the older thread). Much appreciate your work in this, I’ve read this top to bottom.

My setup is: Envoy Combiner (X-IQ-AM1-240-3-ES) connected to a 400amp (split x2-200amp main panels). So I have 2 sets of CT’s. I’ve verified all my connections are good with Enphase support

Enlighten output for today

Prior to the “Energy” integration, I was using my own setup to monitor values. This is just polling/using the default Enphase sensors, so I know I have good data.

For the life of me, I cannot get a single value to post in the energy section
image

I can see values using your sensors/templates you created (except for the import power/energy), which I am not sure if that is related to me producing more than I need… so nothing is being imported at the moment??
image

Here are the sensor lookups


…and here are the code blocks (inserted into configuration.yaml)

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_xxx_current_power_consumption') | int - states('sensor.envoy_xxx_current_power_production') | int ] | max }}

  - sensor:
      name: Grid Export Power
      state_class: measurement
      icon: mdi:solar-panel-large
      unit_of_measurement: W
      device_class: power
      state: >
        {{ [0, states('sensor.envoy_xxx_current_power_production') | int - states('sensor.envoy_xxx_current_power_consumption') | int ] | max }}

  - sensor:
      name: Solar Power Corrected
      state_class: measurement
      icon: mdi:solar-panel-large
      unit_of_measurement: W
      device_class: power
      state: >
        {% set value = states('sensor.envoy_xxx_current_power_production') | int %}
        {% if value  <= 5 %}
          0
        {% elif is_state("sun.sun","below_horizon") %}
          0
        {%- else -%}
          {{ value }}
        {%- endif %}


sensor:
  - platform: integration
    name: Grid Import Energy
    source: sensor.grid_import_power
    unit_prefix: k
    unit_time: h
    method: left

  - platform: integration
    name: Grid Export Energy
    source: sensor.grid_export_power
    unit_prefix: k
    unit_time: h
    method: left

  - platform: integration
    name: Solar Energy Corrected
    source: sensor.solar_power_corrected
    unit_prefix: k
    unit_time: h

I can add a couple of the items… but not the import energy

This all I get
image

The odd thing I can see is the grid import energy doesn’t have a device_class: energy showing up


EDIT: I was able to use the customize section for entities and add the device_class and unit_of_measurement to Grid Import Power. Very odd that HA would not pick this up from the template sensor definition. This allowed me to add it into the Energy config… However I still do not get accurate values. My exported should be much more than 8.5kWh


image

1 Like

Looking good. Energy dashboard has a 1.2 hour (1h12m) lag which is frustrating. The import sensor would have formatted correctly once the sensor saw positive numbers.
Your exported number will be from when you created the sensor, that’s when recording started for this sensor, not the start of the day. Tomorrow will be correct

still fiddlin’ with this… going back through every post in this thread again (since there are updates along the way). I reverted the “Solar Production” back to the Lifetime Energy Production and this starting to give better output, however it is still not matching up to Enlighten. I will give this a day as you just mentioned (that makes sense what you said). Will need to look closer at the “Solar Energy Corrected” setup to see if I missed something… that one just isn’t producing output.

image

As the integration sensors are only recently created by you, there will only be data there which only started recording from when they were created recently, there won’t be a full day of data yet.

I noticed a variation in this block throughout the thread…
→ This line: {% if value <= 5 -%} in some examples is missing the “-” between the 5 and % sign.
and the use of single quotes vs double quotes for sun.sun and below_horizon
pretty sure the quotes part is a non-issue, but I unsure on the “dash” part?

Also didn’t realize this block uses the “Current Power Production” instead of Lifetime Production… so that answers my question why the outputs are soo different. (Like you said, tomorrow should show better results).

  - sensor:
      name: Solar Power Corrected
      state_class: measurement
      icon: mdi:solar-panel-large
      unit_of_measurement: W
      device_class: power
      state: >
        {% set value = states('sensor.envoy_xxxxxxx_current_power_production') | int %}
        {% if value  <= 5 -%}
          0
        {% elif is_state('sun.sun','below_horizon') %}
          0
        {%- else -%}
          {{ value }}
        {%- endif %}

Another question… I’ve noticed some screenshots showing the Green Non-Fossil Fuel gauge… what triggers this to show up? Is this the NO2 Signal integration?
image

Speaking of NO2 Signal, thanks for the curl example… I am now using that to find something remotely close to my location that works… I’m in Colorado, so this one doesn’t report back (which explains the “unavailable” as I pointed out earlier)

bash-5.1# curl 'https://api.co2signal.com/v1/latest?countryCode=US-NW-PSCO' -H 'auth-token: xxxxxxxxx' --silent | jq .
{
  "_disclaimer": "This data is the exclusive property of Tomorrow and/or related parties. If you're in doubt about your rights to use this data, please contact [email protected]",
  "status": "ok",
  "countryCode": "US-NW-PSCO",
  "data": {
    "fossilFuelPercentage": null
  },
  "units": {
    "carbonIntensity": "gCO2eq/kWh"
  }
}

Aside from those questions/comments, my gauges are improving by the min now!

If you are ever unsure, go to dev tools / template and paste it in to get an instant result.

image

image

In my case, i got the same result regardless of the minus next to the %.

Correct. Given your curl result is null, that would explain why you dont have it in energy dashboard yet.

Another dead give away is when you visit the GUI at https://www.electricitymap.org/map and it says “Live data temporarily unavailable”

I found a suitable CO2 Signal location “US-CENT-SWPP”

@del13r I think you have racked up at least a case of beers from everyone you have helped out here! I’m sure I speak for everyone when I say… THANK YOU Very much for your support!

1 Like

Thanks for the info del13r. It works just great.

Might be an idea to put this in bold in the first post. I set this up yesterday afternoon following your instructions and was pulling my hair out for ages trying to work out why the custom sensors were not being graphed and why my graphs looked totally wrong.

I know HA has the 2 hour message at the top of page but as the custom sensors were showing data via dev tools I assumed they were working and something else was broken. Just as I was about to post here about it, they showed up. I’m assuming it is the same thing this morning as I have just added the co2 data which isn’t showing on the energy dashboard yet.

1 Like

Good idea. Telling people to be patient can be a bit hit and miss. I’ve updated the original post.

1 Like

I have a question for you on this… this is pretty nice data to collect, so I’m following you lead on this.
I run the IQ-7a inverters. In the spec sheet they list a power factor of 0.85 (leading/lagging). So I’m trying to figure out which power factor in the json output is what the spec sheet is referring to.
image

I expanded your code to grab the production and consumption value, then set up some ranges:
image

…I’m currently on the phone with enphase to get their take on this also… I think it would be very useful info to log this data. Would help us more to know when its time to clean off the panels for better production.

EDIT: Enphase support cringed at api questions… referred me to their forums, which looks super clunky https://community.enphase.com/s/topic/0TO2G0000009nLJWAY/enlighten-and-envoy?tabset-b0285=2

Thank you very much, just follow it and is now working great, I have a sense monitor, and was not getting the correct numbers until I follow your recommendations

1 Like

I expected as much. You are asking questions that they probably don’t have in their script. As an observation, my consumption power factor went up and down with how much is was/wasn’t consuming.