Jump to content
C4 Forums | Control4

Control4 Enphase Envoy/IQ Gateway Solar Driver (FREE)


Leighm0

Recommended Posts

enphase_logo

Control4 Enphase Envoy/IQ Gateway Solar Driver

Overview

This driver is used to get the solar values from an Enphase Envoy/IQ Gateway unit. It stores the values in variables, so you can do any kind of programming with it. Also the driver provides a simple webview, where you can see the values.

Following values are supported:

  • Consumption
  • Solar Production
  • Grid Power
  • Excess Solar
  • Total values for the day (Production & Consumption)
  • Current Line Voltage
  • Enpower Connected
  • Grid Status

Envoy/IQ Gateway requirements

An Enphase Envoy S (Metered) or IQ Gateway is required, this will not work with the Standard (Non-metered) Gateways.

Supported Models:

  • IQ Gateway
  • Envoy S Metered

 

Configuring the driver

Enter your Enphase Enlighten Username (e-mail) and Password (Only required if your Envoy is running firmware version 7 or higher).

NOTE: If you run multiple Envoy gateways, change the Discovery Mode property to "Manual" and set the Envoy IP to use for this driver instance.

 

Provided Variables:

PRODUCTION_KW (Int) Power in kW from the solar panels.

CONSUMPTION_KW (Int) Consumption of all loads in kW.

GRID_POWER_KW (Int) Power in kW from or to the grid.

DAILY_ENERGY_PRODUCTION_KWH (Int) Daily energy produced in kWh.

DAILY_ENERGY_CONSUMPTION_KWH (Int) Daily energy consumed in kWh.

EXCESS_SOLAR (Bool) If there is currently excess solar.

EXCESS_SOLAR_KW (Int) Excess energy available in kW.

CURRENT_VOLTAGE (Int) Current voltage reading from the Envoy in volts.

ENPOWER_CONNECTED (Bool) If there is an Enpower connected to the system. (true/false)

GRID_STATUS (String) Current Grid Status. (closed/opened)

 

Driver Available Here:

https://github.com/Leighm0/enphase_gateway/releases

 

 

Link to comment
Share on other sites


  • 2 weeks later...
On 11/22/2023 at 7:29 PM, Leighm0 said:

Control4 Enphase Envoy/IQ Gateway Solar Driver

Driver works great.  I use the Janus BMS Monitor driver for several things and was hoping that it would recognize your driver as an "energy" device, but it doesn't.   I use their generic variable logger to record data from your driver and plot charts / history (see below for a lame first example).   The Janus BMS Monitor also has a built-in energy dashboard, but it seems to only want to be fed by drivers it views as "energy" devices.   It would be cool if somehow you guys and Janus could compare notes so they could consume data from your driver.

Just a thought.  I realize that I am probably a weird outlier / edge case.

 

Screenshot 2023-12-09 at 12.00.16 PM.png

Link to comment
Share on other sites

  • 2 weeks later...
On 12/10/2023 at 3:01 AM, cnicholson said:

Driver works great.  I use the Janus BMS Monitor driver for several things and was hoping that it would recognize your driver as an "energy" device, but it doesn't.   I use their generic variable logger to record data from your driver and plot charts / history (see below for a lame first example).   The Janus BMS Monitor also has a built-in energy dashboard, but it seems to only want to be fed by drivers it views as "energy" devices.   It would be cool if somehow you guys and Janus could compare notes so they could consume data from your driver.

Just a thought.  I realize that I am probably a weird outlier / edge case.

 

Screenshot 2023-12-09 at 12.00.16 PM.png

On vacation at the moment, but I will look into it when I get back... I have never used the Janus BMS Monitor so am not sure what kind of "energy" device it is looking for, I will have to do research.. 

Link to comment
Share on other sites

5 hours ago, Leighm0 said:

On vacation at the moment, but I will look into it when I get back... I have never used the Janus BMS Monitor so am not sure what kind of "energy" device it is looking for, I will have to do research.. 

if you reach out to Janus, they will (happily - I think) link in to your driver.  They have done this for me for a number of other third party drivers and their driver documentation says they are open to this.

Link to comment
Share on other sites

17 hours ago, Leighm0 said:

On vacation at the moment, but I will look into it when I get back... I have never used the Janus BMS Monitor so am not sure what kind of "energy" device it is looking for, I will have to do research.. 

I actually reached out to Janus and they put out a new beta that supports your driver.  I think they flag "energy" drivers based on filename, and presumably they maps variables manually.  Not sure.   Anyway, it seems to work.

Unrelated to the Janus BMS integration, your driver has been kinda flakey for me, giving lots of "Error 7: Can't connect to server" error and it not reporting data.  I'm on v16.

Link to comment
Share on other sites

Glad to see an Enphase driver has been released and hope to get to try this out soon.  My thoughts would be to use this as a virtual critical load panel and shut down / reduce energy based on the Enphase system metrics.  That said the single most important bit of information is whether the grid is up or down.  I also have batteries so knowing both solar and battery status would be key in making automated decisions on when and how much to scale back.  

Link to comment
Share on other sites

On 12/25/2023 at 1:30 AM, cnicholson said:

I actually reached out to Janus and they put out a new beta that supports your driver.  I think they flag "energy" drivers based on filename, and presumably they maps variables manually.  Not sure.   Anyway, it seems to work.

Unrelated to the Janus BMS integration, your driver has been kinda flakey for me, giving lots of "Error 7: Can't connect to server" error and it not reporting data.  I'm on v16.

Sorry, I would need more information about your error, mines been running nonstop without errors since November.  What Enphase firmware are you running? What kind of network do you have, the driver uses mDNS to locate the enphase gateway IP, and if you are on v7 or newer firmware it requires your Enphase login credentials to get tokens for accessing the data on the gateway.

Link to comment
Share on other sites

On 12/25/2023 at 3:12 AM, JackD said:

Glad to see an Enphase driver has been released and hope to get to try this out soon.  My thoughts would be to use this as a virtual critical load panel and shut down / reduce energy based on the Enphase system metrics.  That said the single most important bit of information is whether the grid is up or down.  I also have batteries so knowing both solar and battery status would be key in making automated decisions on when and how much to scale back.  

I will look to add this option into a future release, but for now if you just need to know if the system is On or Off Grid, you could use this driver: https://github.com/warmenhoven/envoy-c4z

Link to comment
Share on other sites

13 hours ago, Leighm0 said:

I would need more information about your error

Hi.  All was working great for several weeks.  Now I get "Error GetDataResponse: Error 7: Couldn't connect to server" non-stop.  See screenshots.   Same credentials work for Enlighten Enphase web app.  Network is Unifi Wifi-- big network but simple set-up, not even using VLANs.  I have four Enphase inverters.  All report good connection with network.  "Live View" works from Enphase app.  

Seems like the driver is talking to the cloud and not to the devices directly and the fact that the web interface works (including live view) seems like problem is not related to my network or communications between my Envoy boxes and the cloud.  I have not tries removing the driver and re-adding it.  I'll give that a try.

Edit: I deleted / re-installed driver.  Same situation.  I did see in the LUA window that driver does seem to try to talk to my local devices (and not, as I had assumed, only to Enphase 'cloud').  See errors below.  So maybe problem is on my side.  I tried rebooted the specific inverter that was not responding.  Same errors.  I'll keep poking around.

Thanks!

 

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/ivp/meters/readings

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/production.json

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/ivp/meters/readings

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/production.json

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/ivp/meters/readings

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/production.json

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/ivp/meters/readings

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/production.json

 

Screenshot 2024-01-01 at 8.17.08 AM.png

Screenshot 2024-01-01 at 8.17.19 AM.png

Screenshot 2024-01-01 at 8.35.45 AM.png

Edited by cnicholson
Link to comment
Share on other sites

On 1/1/2024 at 11:39 PM, cnicholson said:

Hi.  All was working great for several weeks.  Now I get "Error GetDataResponse: Error 7: Couldn't connect to server" non-stop.  See screenshots.   Same credentials work for Enlighten Enphase web app.  Network is Unifi Wifi-- big network but simple set-up, not even using VLANs.  I have four Enphase inverters.  All report good connection with network.  "Live View" works from Enphase app.  

Seems like the driver is talking to the cloud and not to the devices directly and the fact that the web interface works (including live view) seems like problem is not related to my network or communications between my Envoy boxes and the cloud.  I have not tries removing the driver and re-adding it.  I'll give that a try.

Edit: I deleted / re-installed driver.  Same situation.  I did see in the LUA window that driver does seem to try to talk to my local devices (and not, as I had assumed, only to Enphase 'cloud').  See errors below.  So maybe problem is on my side.  I tried rebooted the specific inverter that was not responding.  Same errors.  I'll keep poking around.

Thanks!

 

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/ivp/meters/readings

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/production.json

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/ivp/meters/readings

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/production.json

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/ivp/meters/readings

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/production.json

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/ivp/meters/readings

URL response callback error: driver.lua:492: attempt to call global 'id' (a nil value) https://192.168.1.224/production.json

 

Screenshot 2024-01-01 at 8.17.08 AM.png

Screenshot 2024-01-01 at 8.17.19 AM.png

Screenshot 2024-01-01 at 8.35.45 AM.png

oh you have 4 Enphase Gateways! lol never seen such a big system.. I only built the driver for 1 Enphase gateway.. I'll have to look at adding in an option to select which envoy from a list of discovered ones, this will likely fix the issue as it is probably confusing the driver with the multiple devices being discovered.

I'm currently on vacation so won't be able to look at it for a few weeks.

 

As for the Error on line 492, that looks to be a quick fix, I will issue a new version shortly to fix that.

 

*UPDATE*

I just uploaded Version 17, please see if it helps with the Error Line 492.  It will not help with your multiple Envoy gateways, I will work on that in the next few weeks.

Link to comment
Share on other sites

  • 1 month later...
On 12/25/2023 at 4:12 AM, JackD said:

Glad to see an Enphase driver has been released and hope to get to try this out soon.  My thoughts would be to use this as a virtual critical load panel and shut down / reduce energy based on the Enphase system metrics.  That said the single most important bit of information is whether the grid is up or down.  I also have batteries so knowing both solar and battery status would be key in making automated decisions on when and how much to scale back.  

Have added variables for Grid Status and if an Enpower is connect in the latest updates to this driver.

Link to comment
Share on other sites

On 1/2/2024 at 12:39 AM, cnicholson said:

Screenshot 2024-01-01 at 8.35.45 AM.png

I have now added the ability to turn Discovery to Manual in latest version of my driver - so now you can target a particular Envoy IP address for your multiple Envoy setup... you will need to add multiple instances of the driver in your project if you wish to track them all.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.