Enphase Envoy with Energy Dashboard

It looks like it may be safer staying with V5 for the time being.
I have seen posts suggesting contacting Enphase with downgrade request or preventing the upgrade to V7 for particular system.
Have anyone successfully tried that (contacting Enphase)?

Is the upgrade path known? Can I perhaps filter some ports / URL on my router to prevent upgrade while still keeping the cloud connectivity (until I may be able to cut the cord one day)?

Yes I contacted Enphase support by phone - after discussion the helpful lady I spoke to said they could downgrade me from V7 to V5 and keep me permanently on V% till I called and asked to be upgraded. I needed v5 so my mqtt script worked. I’ve now made my script an add-on to Home Assistant to give readings once per second for realtime display

Thanks! I Just did the same. Very helpful lady (on a noisy call center line). Few minutes on hold while she talked to a senior tech support person and then confirmed I will not be upgraded unless I request to. :slight_smile:
Time to invest into more automation! Thanks a lot for your contribution.

1 Like

Cool dashboard! Can you share some tips / guide for me to create something like this?

Did anyone try logging per-panel (=per inverter) data?
I can access http://envoy.local/api/v1/production/inverters on my envoy and that displays what I want:

[
  {
    "serialNumber": "xxxxxxxxxxxx",
    "lastReportDate": 1650422620,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 367
  },
... and so on ...
]

However, when I try curl query on seemingly the same URL it fails:

curl --anyauth -u installer:xxxxxxxx 192.168.1.122/api/v1/production/inverters/
{
  "status": 404,
  "error": "",
  "info": "Resource /api/v1/production/inverters/192.168.1.122/api/v1/production/inverters/ not found",
  "moreInfo": ""
}

Similar URLs work just fine in curl:

curl --anyauth -u installer:xxxxxxxx 192.168.1.122/stream/meter/
curl --anyauth -u installer:xxxxxxxx 192.168.1.122/ivp/meters/readings/
curl --anyauth -u installer:xxxxxxxx 192.168.1.122/api/v1/production/

Anything I am missing? Thanks!

Oh I noticed what I was missing:

http://

Fixed the curl parameters and getting what I expected:

curl --anyauth -u installer:<redacted> http://192.168.1.122/api/v1/production/inverters/

:slight_smile:

Hello everyone!

This thread is amazing, and started getting me through my configuration of the Energy settings. But I have to ask… has this been started up on a new thread that’s more consolidated in the “best practice” configuration at this stage? There are so many different perspectives, fixes, etc–its a bit overwhelming to go through and absorb.

Thanks!

1 Like

Good point. I might do a re-write and break it down into so its easier to understand. I was rushing to fit so much into a single post. The original post 1 still works if you fully follow the instructions.

Even with that said, you’ve done an amazing thing for the community, and it truly is appreciated!.

1 Like

We are all using the same Envoy API {URL}/stream/meter
I am wondering if anyone succeeded in understanding of the dependencies of the individual values in each JSON record.
To be specific: I have Envoy on a common US split phase (120V + 120V 180°) system.
The production consists of set of 240V inverters connected between the two phases with one current sensor (CT).
On the consumption side there are two phases (A and B) with respective CTs.
All that Envoy is able to measure are three (3) currents and two (2) voltages and phase differences between the currents and voltages expressed as Power Factor.
Yet the API spews many more values. This may be fine - if the arithmetic between the different values would match, right?
Voltages: The Envoy can measure only pair of voltages (on the split phase system) (ph-a and ph-b) but reports three pairs - one each for “production” “net-consumption” and “total-consumption” that are each slightly DIFFERENT. Playing with the numbers in Excel it looks like “total-consumption” voltages are averages of the “production” and “net-consumption”. All I can think of is that the ADC is multiplexed and the readings are taken at different moments.
Apparent power (s) is mostly matching product of Voltage * Current (as it should) though the errors are more than what would look like a rounding error but stay mostly well below 1W though I have noticed random excursions much higher than that.
For Power (p) and Reactive power (q) the "total-consumption"="production"+"net-consumption". At least something else I can agree with.
In case of the Apparent Power (s) the “net-consumption” sign needs to be flipped depending on the direction of the total flow (from or to utility).
But the power factor values reported by Envoy are far from matching the expected PF=p/s formula.
On top of that - how could there be two different power factors related to a single phase generation?
Can anyone explain the dependencies so I can sleep again?
I want to throw away redundant properties and calculate what I want from the fundamental measured values.

@mvana - I’ve written a python script that uses the /stream/meter and converts it to a mqtt feed for Home Assistant - I use all three phases and the script can isolate all values needed. Check it out here:

https://github.com/vk2him/Enphase-Envoy-mqtt-json/

1 Like

@vk2him Thanks - I reviewed (and played) with your code. Big thanks!
My issue is not in accessing the values but in making sense out of them.
As an example a Power Factor is a ratio between Real Power (p) and Apparent Power (s).
The stream contains all three properties(pf, p, s) (and for each of the phases and for “production”, “net-consumption” and “total-consumption”) but the math doesn’t agree.

This is probably a question to raise with Enphase - however they are not very responsive to this sort of enquiry - refer to this (very very) long thread https://support.enphase.com/s/question/0D53m00006ySLuRCAW/unimpressed-with-loss-of-local-api-connectivity-to-envoys

I am aware of this thread. And I assume we are using unsupported API so don’t expect more from Enphase than from the community. But will try. Thanks.

This work is incredible, thank you!. I’ve only installed HAAS for the fist time yesterday and already have my enphase coming in to the energy dashboard properly. I’m blown away by what is possible with HAAS.

Now, my time of use tariff structure also changes throughout the year - is it possible to include this in your above script somehow?

Edit: I found another post you’d linked to, where you’ve broken down in to seasonal tariffs. Will unpack that later.

Hi, Maybe try Using Home Assistant to calculate my energy bill using data from my Solar Inverter

1 Like

Thank you - I found this post of yours after replying above. I haven’t followed it through yet but it looks really good!

I’ve got 1 second mqtt data streaming in from my envoy now using your script add-on; it’s really impressive. This is the first time I’ve used mqtt so I’m learning a lot. For example, I named some sensors attributes that I decided not to use and I’ve got no idea how I can now remove those entities from my HA? Anyway…

I’m planning to incorporate the great work in post 1 and similar with the more frequent envoy data from mqtt, although I’m not sure of this is wasteful on resources. I might stick with 1 sec live electricity costs and leave the data I’m likely to refer to historically as 1 minute data.

Thanks @alexeiw123 , gld it’s useful for you. To remove an entity, navigate to Settings → Entities and search for the one you want to remove and click it - if it’s able to be deleted you’ll see delete highlighted in Red at the bottom left.

Logging/recording 1 second or 1 minute updates will use quite a lot of disk space in your database - do you “really” need to record costs per second/minute? Real-time data is really only useful in real-time. You can always display per second but only record in broader blocks of say 15 mins - this will save a lot of space and still give you meaningful reports and per second real-time views.

Rather than getting stuck with the entities that I couldn’t remove I just restored a backup from a half hour earlier and set it up as I wanted to. I wasn’t able to delete them though, all the sensors coming through from envoy via mqtt show this: Is it possible to assign them a unique ID or delete them through the broker somehow?

This entity ('sensor.mqtt_production') does not have a unique ID, therefore its settings cannot be managed from the UI.

Yes 1 second data is really only needed for seeing the real-time metrics such as instant cost and powers. I do have some automation set up with my EV that is charging from excess solar (above 10 kW export limit) so the 1 minute interval data is very useful for checking that it is behaving as intended. I don’t really need to be keeping this for more than a day or two though.

I really don’t have a clue where to start in setting this up - I’d be grateful if if you could explain that to me or point me to a resource! At the moment I’m using @del13r’s code to use the official enphase integration for the energy dashboard and tariffs. I’m not doing anything with the mqtt sensors that are updating every second yet but am considering the live cost view, 3 ph voltage plots and if I would benefit form a higher resolution energy plot.

I’m really new to HA, so I have no idea if that history view goes on forever, or if it’s got some FIFO logic. Very much in the learning phase.