[RELEASE] New Enphase Envoy driver supports token based authentication

It seems like different token methods being accepted on different firmwares (or regions). I'm using my code on my Envoy since the beginning.

Let me try changing mine also to Bearer and see if it works. Then I can update my code which will work for both of us.

I was in a similar boat as user3923, and your linked code finally got it working. I appreciate it

1 Like

@vpsupun We could definitely be dealing with different regions, models, and firmware. I am in California and I have the "IQ Gateway" (SKU X-IQ-AMI-240-4) on firmware D7.3.120. It appears this used to be called the "IQ Envoy"

I did a minor update with more solid token validation. And updated the auth token header as "Bearer".

EnvoyLocalData - Version : 0.0,4

Please give it a try to let me know your feedback

Thanks to both of you @augoisms and @vpsupun - the latest drivers from each of you work!

Indeed, thank you very much for figuring this out. Has been working well here too for the past few weeks.

Does this show production in measurement of energy or power?

Energy and power.

Is this driver connecting to the Envoy over the LAN? If so, which ports and protocols are used?

image

Hi,
Please use your Envoy LAN (or WAN) IP. Make sure it's accessible from the Hubitat (Same network).

Hi Guys, I'm by no means a programmer, but can you walk thru how you install this driver, I get the area to paste the code into Hubitat.. but what / where to configure the access to our envoy? Also how do you actually then run the driver script to poll? I'm trying to find a way to get the status of the power grid / solar and use that to adjust the temperature settings on our Ecobee's if grid is down and were on battery backup, I would raise the temp (reduce our AC load)

Is it feasible to add consumption data to the code? I by no means am a programmer, but swapping out the variables from production to consumption works perfectly fine. I just have it set up as a separate driver at this time. Was just hoping to make it work more efficiently.

As many of you have requested, I just added the consumption data also to the Device.
And now the power is showing the net power = production - consumption

Please test it and let me know if there any issues.

Please note, for this change, I had to rename most of the state variables. Therefor, check and update the rules created based on this Driver.

1 Like

Updated it today, looking good so far! I'll keep an eye out on it. I did change my units to output in kWh and kW, but that's just a personal preference/update on my end.

I'm looking forward to getting my enphase setup in the next couple of weeks, though only the standard version as I already have iotawatt measuring various currents. I assume this works with the standard version too? Is there a local API or cloud only?

One more question, is there anything you can control with this, or is it more for accessing data?

Thanks very much!

Hello,

This should work with all new Enhpase devices that uses new firmware.

All the data will be pulled from local API. BUT, the initial authentication (token retrieval) happens through the cloud API.

2 Likes

Thank you for the driver. Please know it is inspiring an influxdb and grafana dashboard:

The dashboard is still a work in progress, and not prime time yet...

Cheers!

1 Like

Has anyone added battery state of charge to this driver?
My system includes some 5P batteries, and it would be nice to have Hubitat be aware of their state of charge.

Will you please share the dashboard with us when it’s complete? Looks awesome!

Yes can do. It is for grid tied panels.

Delayed due to life, and will plan to post to this forum this month.