Enphase Envoy with Energy Dashboard

I’ve now created a Home Assistant addon that outputs mqtt from the json steam http://envoy.local/stream/meter

It’s easy to install and configure via a single click of the “add Repository” button in the updated instructions:
https://github.com/vk2him/Enphase-Envoy-mqtt-json

4 Likes

Thats awesome! Great work!

@del13r Out of interest, have you tried @vk2him ’s new mqtt add on? I’ve been chatting to him on the repo because I’ve been having some trouble getting it to work reliably. For me, sometimes it kicks in immediately, sometimes it doesn’t, sometimes it kicks in after several minutes etc. Just looking for another data point…

@Sddawson Not yet, was planning to try it out in the next few days

@del13r OK, thanks. Be interested to hear how you go…

Hi,

I finally got around to doing this.
The only issue I had was that I started doing it on mobile and the configuration tab was not initially obvious to me. On mobile it just shows some gears at the bottom of the page where as on desktop/laptop it actually says the word configuration on the top of the page.
Once I got past that, i was able to configure the addon with the same details I had in the original script I used to run and it now works perfectly.

One thought I had as I was configuring this addon was that in the past I used to use hostnames instead of IP addresses and I would experience issues if I rebooted my router.
I then started reading how home assistant under certain conditions might use cloudfare dns rather than the dns on your lan. see Local DNS! - #109 by CentralCommand
I then replaced my hostnames like envoy.local with the actual IP address in an attempt to give it more resiliency.

1 Like

@del13r Thanks for getting back. The problem I had with long delays before the add-on kicked in seems to have been solved by a Core reboot. I’m very happy with having this run inside HA - one less thing to worry about. Thanks @vk2him! It will be interesting to see how the V7 firmware issue plays out in the long run.

1 Like

cheers, yeah i have unsubscribed from the https://support.enphase.com/s/question/0D53m00006ySLuRCAW/unimpressed-with-loss-of-local-api-connectivity-to-envoys discussion as there are a few people who are rightly upset, but also going off on a different tangent. I am very lucky to be unaffected so far and I cant really contribute as I am on the older v5 version still. I now just check it every now and then to see how people are progressing with it.

There seem to be one or two repo’s where people have got things working with V7. Whether the stream script can be made to work is an open question…

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