Enphase Envoy with Energy Dashboard

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.

curl -k
OR
curl --insecure
(Allow insecure server connections when using SSL)

1 Like

The commissioned token is only 1 hour.

iat: 1637288889
GMT : Friday, 19 November 2021 2:28:09 AM

exp: 1637292489
GMT : Friday, 19 November 2021 3:28:09 AM

whereas my uncomissioned token was 7 days.

1 Like

Would you be kind enough to share what you have done in your dashboard? Sounds interesting.

It’s in my Github repo - I’ve setup the power Wheel card, it changes colour based on import/export

followed every step and succeeded. .only problem : battery load is NOT included :expressionless: still thanks for helping {“system_id”:xxxxxxx,“modules”:19,“size_w”:4750,“current_power”:0,“energy_today”:0,“energy_lifetime”:18048343,“summary_date”:“2021-12-07”,“source”:“meter”,“status”:“power”,“operational_at”:1472819400,“last_report_at”:1638859821,“last_interval_end_at”:1638859793}* Connection #0 to host api.enphaseenergy.com left intact

Thanks @vk2him for the detailed response. I’ll have a look at your code after Christmas. I spent about a week and a half between HA, IFTTT, Node Red and Alexa trying to get something going from a total walk-up start to home automation generally.

Not to mention installation dramas, bouncing back and forth between attempted supervised and HA OS installations. Then finding that the RGBW globe I tried originally, a “white label” Tuya globe (Kogan, for other Aussies), required a major effort to configure the integration. I mean, having to sign up for a Developer account as well as an app account, then putting in BOTH pairs of credentials, only to be told that one (or more) was wrong, even though they were copied and pasted from the Tuya site. FFS!

I need to be doing other things for the next couple of weeks. So tuya-convert and MQTT can wait a while.

Happy wife, happy life.

So yes, I’m aware that the Enphase feed isn’t real-time, and I’ve seen references to your code before. But for now, I’ve got a working system that does enough to keep the wife happy. All she wants is a light that changes colour, without having to log on to a laptop or launch a phone app.

And my dashboard is PVOutput. I have generation back to Feb 2015 from Enphase. Consumption and nett for the last 3 or 4 years, since I found that my Wattson transmitter was readable by an OptiSmart gateway, which could supply a consumption feed to PVOutput. When the new Envoy went in, I just changed the consumption feed to Enphase. That’ll do me for now.

In due course I’ll go a bit deeper and set up a real time dashboard.

But between now and Christmas I have to set up a light show with HA and 24 Meross RGBW’s.

Did I mention that it’s a good idea to keep the wife happy?

Hi @rudiB,

Have you tried clicking this link http://envoy/production.json yet?
There is a storage section of that json file hosted on the Envoy.
Mine is blank as I don’t have a battery.

"storage":[{"type":"acb","activeCount":0,"readingTime":0,"wNow":0,"whNow":0,"state":"idle"}]}

What sort of battery is it?
If you can see the battery status at https://enlighten.enphaseenergy.com/web/ there is a bunch of different methods you could try polling the cloud API.

Method
v2/systems/energy_lifetime
v2/systems/monthly_production
v2/systems/stats
v2/systems/inventory
v2/systems/production_meter_readings
v2/systems/detail
v2/systems/summary
v2/systems/rgm_stats
v2/envoys/index
v2/systems/index
v2/systems/address
v1/systems/summary
v1/systems/stats
v1/systems/index
v1/systems/energy_lifetime
v1/systems/monthly_production
v1/systems/rgm_stats
v1/envoys/index
v1/systems/alerts
v2/unmonitored_systems/index
v2/unmonitored_systems/inventory
v2/arrays/summary
v2/arrays/index
v2/systems/consumption_stats
v2/systems/consumption_lifetime
v2/acm_mappings
v2/systems/profile
v2/systems/search_system_id
v2/systems/inverters_summary_by_envoy_or_site

Ah right. I already have that. I thought you were talking about something else. Thank you.

2 enphase battery’s T3. I have no knowledge about json. i will have
to look in to that.

Not a lot at the moment. I am realy new in HA. I have 2 CT’s one on the input of the electricity (verbruik) and one on the input of the solar panels 'opbrengst)(( 0 it is dark at the moment :slight_smile: )

i am on the (hated) V7 envoy You remember) so I don’t think this is an option for me. I hav V5 so i could do all the local stuff. The installation guys for the battery updated my Envoy.

Hi,

Here are some key statements I found about the 3T battery at https://enphase.com/sites/default/files/2021-08/Enphase-DS-Encharge-3T-UK.pdf

Monitoring
Enlighten Manager and MyEnlighten monitoring options; API integration

Four embedded IQ8X-BAT Microinverters

Smart
• Mobile app-based monitoring and control

So, after reading that, I’m confident you should be able to retrieve information about the battery via API.

I’ve asked you to try visiting these url’s before but you have not said if you have tried these urls yet.

https://enlighten.enphaseenergy.com/systems/

Or

https://enlighten.enphaseenergy.com/web/

My point is, these 2 links are the graphical point and click version of the data you are trying to find in the api. If you go to these links and can see the battery level, then this is what will help you confirm that persisting with the API will work.

The information syntax/format that both the local API and cloud API return when queried are both in JSON format.

See highlighted text in yellow for example

Obvious question but, have you updated your global currency setting at configuration /general / currency?