Skip to content

Commit

Permalink
v21
Browse files Browse the repository at this point in the history
Bug fix for Enpower nil error, Thanks to RollyandSam.
  • Loading branch information
Leighm0 committed Aug 15, 2024
1 parent 1884e2a commit de99b2a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ Current Grid Status. (closed/opened)
- **v20**
- Added Discovery Mode (Auto/Manual) for the ability to manually set which Envoy IP to use. (Useful if you run multiple Envoy Gateways)

- **v21**
- Bug fix for Enpower nil error, Thanks to RollyandSam.

## Compiled Driver Available from Releases:
https://github.com/Leighm0/enphase_gateway/releases

Expand Down
8 changes: 5 additions & 3 deletions driver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,11 @@ function GetDataResponse(strError, responseCode, tHeaders, data, context, url)
ENPHASE.DailyProduction(production_today)
ENPHASE.DailyConsumption(consumption_today)
elseif (context["data_type"] == "grid-status") then
local enpower_connected = data["enpower"]["connected"]
local grid_status = data["enpower"]["grid_status"]
ENPHASE.GridStatus(enpower_connected, grid_status)
if (data["enpower"]) then
local enpower_connected = data["enpower"]["connected"]
local grid_status = data["enpower"]["grid_status"]
ENPHASE.GridStatus(enpower_connected, grid_status)
end
end
elseif (responseCode == 400) then
dbg("GetDataResponse: " .. context.data_type .. " Error 400.")
Expand Down
4 changes: 2 additions & 2 deletions driver.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<name>Enphase Gateway</name>
<model>IQ/Envoy S Metered Gateways</model>
<created>11/3/2023 12:00 AM</created>
<modified>2/14/2024 12:00 AM</modified>
<version>20</version>
<modified>8/15/2024 12:00 AM</modified>
<version>21</version>
<control>lua_gen</control>
<driver>DriverWorks</driver>
<large image_source="c4z">icons\device_lg.png</large>
Expand Down
3 changes: 3 additions & 0 deletions www/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,6 @@ Current Grid Status. (closed/opened)

- **v20**
- Added Discovery Mode (Auto/Manual) for the ability to manually set which Envoy IP to use. (Useful if you run multiple Envoy Gateways)

- **v21**
- Bug fix for Enpower nil error, Thanks to RollyandSam.

0 comments on commit de99b2a

Please sign in to comment.