Enphase Envoy - D7 firmware with JWT - A Different Approach

seems getting info from batteries is a universal challenge

really appreciate you digging around for that @del13r

I seem to recall you having a github sponsor or buy me a coffee thing kicking around but i dont see it in this thread

1 Like

thanks for the sentiment, however you might have me confused with briancmpbll.
I noticed he recently removed his buy me a coffee link.

I am just doing this for myself and then sharing how I solved my issues with the wider community.
Thanks anyway!

1 Like

This works great! Thank you. I added the new sensors along with the v7 Envoy integration I had been using.

I’ve noticed some drops in data (mostly because I’m querying every 15 seconds instead of 60) so my instant power graph can show some gaps, as well as my instant readings, but the Energy dashboard works great.

1 Like

personally, I see very rare drop outs (like once a week) and I attribute that to wifi signal loss.

This might be contributing to the issue. Ive found that my envoy is taking 2-5 seconds to respond with data for the production.json data, so it could be holding up other polls occuring at the same time.

There are definitely WiFi issues that I need to look into

I do see that timeout error you mention. It’s happened 123 times so far.

I disabled the Envoy integration now that I see things are working properly without it, and I’ll see if that reduces the errors.

1 Like

I’m having issues with dropouts on the latest iteration of the Enphase integration but in the past week I cannot see any dropouts from @del13r 's solution.

The integration dropouts are only 60 seconds (at 23:00 like clockwork) but they are enough to disable Reimann Sum sensors calculating Export energy until solar production resumes. The Reimann Sum import sensor resumes immediately, with new readings.

I am leaning towards the REST path being the main solution and the integration giving me panel data and a general history. It is easier to get the panel data via the integration - and the panel dropouts don’t have any downstream consequences.

1 Like

Can you go into more detail about how you set up the Riemann sum integration? I’m in the same boat as you with the load only CT

Sure! Here’s what I have come up with, it does seem to be fairly consistent with what the enphase app reports at the end of the day. 100% of the credit for this goes to @del13r - he helped me via DM to figure things out as well!

template sensors

sensors

config

Thanks @jon102034050 and @del13r! Just updated mine. I’ll have to fix some bad data from today, but we’ll see how tomorrow goes.

Just to confirm, what sensors are you using for the Energy Dashboard? If i use Daily Import and Daily Export, am I not just using what I had before? (per your utility meter configuration) Or should I be using the Riemann Import and Export?

Oh, sorry, you’re right - I think I can delete that utility meter config. I am using the energy dashboard with the riemann sum sensors. here’s what it looks like

Has anyone managed to add the enlighten app date selector or the day, week, month etc. header to the apexcharts card?

Here is how I would do it

setup a dashboard with multiple cards and each card would have a different offset for each day.

type: custom:apexcharts-card
graph_span: 1d
span:
  start: day
  offset: -3d
stacked: true
header:
  show: true
  title: Total Power
series:
  - entity: sensor.power_production
    type: column
    name: Produced
    color: '#01B4DE'
    group_by:
      func: avg
      duration: 5min
  - entity: sensor.power_consumption
    transform: return x *-1 ;
    type: column
    name: Consumed
    color: '#F37320'
    group_by:
      func: avg
      duration: 5min
  - entity: sensor.power_net
    type: column
    name: Imported/Exported
    color: '#545456'
    group_by:
      func: avg
      duration: 5min

Examples

1 Like

Thank you so much @del13r. Not only was this thread super useful, but I was able to follow your simple instructions and get everything set up with relative ease.

I was just wondering if you could help me with something odd happening. Every so often my Power Consumption entity will drop to 0w for a minute at a time. This can happen every 3min, but then sometimes it won’t happen for around 20min.

The only thing I’ve done different to your setup is set the interval scan to 60 instead of 15. Any ideas?

1 Like

Hi @yesterdayshero,

Thanks.
In regards to troubleshooting, I would go to settings / logs and look for something like this

Logger: homeassistant.components.rest.data
Source: components/rest/data.py:122
Integration: RESTful (documentation, issues)
First occurred: 10:35:54 AM (34 occurrences)
Last logged: 10:48:08 AM

Error fetching data: https://192.168.1.114/ivp/meters/readings failed with All connection attempts failed

Here is the graph showing when i had some wifi issues earlier today

1 Like

Can I ask if you are still using any other HACS repository for Enphase in parallel to the rest sensor?
The theory is that the envoy is taking too long to respond when asked for production.json when using the HACS solution and this might also cause the rest sensor to time out as well.

Yeah it looks like a connection error. I’ve been running the DEV integration side by side so I might try remove the integration and see how that goes.

Logger: homeassistant.components.rest.data
Source: components/rest/data.py:122
Integration: RESTful (documentation, issues)
First occurred: August 21, 2023 at 7:35:11 PM (207 occurrences)
Last logged: 11:38:52 AM

Error fetching data: https://envoy.local/ivp/meters/readings failed with All connection attempts failed
Error fetching data: https://envoy.local/ivp/meters/readings failed with [Errno -3] Try again

I’ve been involved with attempts to resolve dropouts in the Enphase Integration, but so far no success. My system drops out for a minute at 23:00 every night. A number of other people have reported the same issue.

I have been running this REST version in parallel and it has not experienced any dropouts - well no regular dropouts anyway. I’m about to swap to this as my main solar data supplier.

2 Likes

Thanks for the info. Interesting, as I’m getting drop outs with my Rest method. But I’ll try remove the other integration tonight to see if that helps.

1 Like