GoodWe Solar PV Generation Capture

louisL
Posts: 9
Joined: Thursday 11 August 2016 23:14
Target OS: Linux
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by louisL » Friday 15 June 2018 20:03

ricvee wrote:
Friday 15 June 2018 12:13
I have updated the files /hardware/GoodweAPI.cpp and /hardware/GoodweAPI.h
What is the next step?
Don't try to update individual files, just clone Domoticz from git (https://github.com/domoticz/domoticz) and checkout development. And then build all of Domoticz (see INSTALL.md) and https://www.domoticz.com/wiki/Linux if you are on Linux

If you cannot compile Domoticz from source this way, you will have to wait for an update. As I always compile Domoticz myself, I have no idea where you can find packages from a recent git snapshot, sorry!

ricvee
Posts: 8
Joined: Wednesday 13 May 2015 9:05
Target OS: Linux
Domoticz version: latest
Location: Netherlands
Contact:

Re: GoodWe Solar PV Generation Capture

Post by ricvee » Friday 15 June 2018 21:21

Ok thanks!
But how stable is this development version?
I need a stable version for security, and my sunscreens etc.

wanegedoe
Posts: 2
Joined: Tuesday 12 June 2018 21:50
Target OS: Linux
Domoticz version:
Location: Netherlands
Contact:

Re: GoodWe Solar PV Generation Capture

Post by wanegedoe » Saturday 16 June 2018 7:59

I can share my lua script "as is" and it has some debugging prints.
Thanks louisl for updating the code in GIT for the new server.

Code: Select all

-- Script to pull GoodWe power generation data into Domoticz
-- Based on script from M Grimwade 2015
-- Modified by Wanegedoe
script_version = 6

--------------------------------------------------------------------------
-- stationID of GoodWe and the sensors Idx in domoticz
stationID = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
idx_vpv1  = 143
idx_vpv2  = 144
idx_ipv1  = 145
idx_ipv2  = 146
idx_ppv1  = 155
idx_ppv2  = 156
idx_epvac = 149
idx_vac   = 152
--------------------------------------------------------------------------

-- Function to update a Domoticz sensor object
function update_device(id, value1, value2)
  if value2 == nil then
    commandArray[id] = {['UpdateDevice'] = id .. "|0|" .. value1}
  else
    commandArray[id] = {['UpdateDevice'] = id .. "|0|" .. value1 .. ";" .. value2}
  end
  return
end

-- script starts here
print("goodwe script version " .. script_version)

-- Load the JSON Lua module
-- Load module to print tables from: https://github.com/kikito/inspect.lua
JSON = (loadfile "/src/domoticz/scripts/lua/JSON.lua")()
-- inspect = (loadfile "/src/domoticz/scripts/lua/inspect.lua")()

-- Command array to populate with Domoticz instructions
commandArray = {}

-- Perform an HTTP request to get the raw string from the REST endpoint
local config=assert(io.popen('curl https://eu.goodwe-power.com/Mobile/GetMyDeviceListById_V3?stationId=' .. stationID))
local json_string = config:read('*all')
config:close()
--print(json_string)

-- Decode the JSON formatted string to a Lua table
local t = JSON:decode(json_string)
local t_goodwe = t.result[1]
--print(inspect(t_goodwe))

-- get the data from the tables
update_device(idx_vpv1, t_goodwe.vpv1)
update_device(idx_vpv2, t_goodwe.vpv2)
update_device(idx_ipv1, t_goodwe.ipv1)
update_device(idx_ipv2, t_goodwe.ipv2)

update_device(idx_vac, t_goodwe.vac1)
update_device(idx_epvac, t_goodwe.power, tonumber(t_goodwe.etotal) *1000)

local p_pv1 = tonumber(t_goodwe.vpv1) * tonumber(t_goodwe.ipv1)
local p_pv2 = tonumber(t_goodwe.vpv2) * tonumber(t_goodwe.ipv2)
update_device(idx_ppv1, p_pv1,0)
update_device(idx_ppv2, p_pv2,0)

return commandArray

ricvee
Posts: 8
Joined: Wednesday 13 May 2015 9:05
Target OS: Linux
Domoticz version: latest
Location: Netherlands
Contact:

Re: GoodWe Solar PV Generation Capture

Post by ricvee » Sunday 17 June 2018 21:19

What sensors do you mean in this part, wanegedoe?
I think virtual sensors, what did you define?
idx_vpv1 = 143
idx_vpv2 = 144
idx_ipv1 = 145
idx_ipv2 = 146
idx_ppv1 = 155
idx_ppv2 = 156
idx_epvac = 149
idx_vac = 152

Hcroij
Posts: 9
Joined: Sunday 27 November 2016 17:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Hcroij » Wednesday 20 June 2018 7:58

Would like to thank you guys for the good job done.
After the “update” I was bit scared because all the “hardware” was scrambled but next morning everything came back as it should be.
Goodwe has an extra tab where you can select your region.

Thx again.

Hcroij
Posts: 9
Joined: Sunday 27 November 2016 17:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Hcroij » Friday 29 June 2018 7:14

Just missing ome small thing.
In the goodwe “icon” there is no longer the “total generated” visable.
If you look at the “apparaten” the total Kwh generated is available.
Could someone be so nice and als make this visable in the icon next to daily generated?

Thanks in advance.
Henk Croijmans

bldewit
Posts: 16
Joined: Tuesday 09 May 2017 23:31
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by bldewit » Saturday 08 September 2018 23:39

Today I got the message from my Goodwe app that I should download the new app because Goodwe is abandoning the cloud interface. Anyone have any idea what this means for the interface with Domoticz?

Flitske
Posts: 4
Joined: Monday 12 November 2018 9:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Flitske » Monday 12 November 2018 9:42

Hi guys,

I'm new to Domoticz. I've been running a domoticz system for a few months now and very happy with it. This year i have installed PV panels on my roof with a GoodWe inverter.
Been crawling al around the web searching for a solution. According to this forum it has been updates with a "tab"on ewhich you can select which server you use for the inverter.
Now i want to have this on my domoticz but what i try or do i can't see the "tab" for the server in the hardware settings page on Domoitcz.
I'm runnning 4.9700 and everything is up to date.
if i put in the european server link with my login into a webbrowser i get a message with what my system has done etc. so that all seems to work.

Can you guys help me please.

best regards,
Flitske

bldewit
Posts: 16
Joined: Tuesday 09 May 2017 23:31
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by bldewit » Monday 12 November 2018 11:24

Assuming you have added the "Goodwe solar inverter via Web-API"-hardware you should find these fields beneeth the Timeout-field (there is a 2 or 3 line empty space between the both). First is the "Location"-dropdownfield where you can choose EU or US or Asia, next is your username. Running the same version here, using RPi-hardware. If you don't have these fields in this version it's over my head i'm afraid.... Have you tried deleting and re-adding the hardware-entry (maybe with reboots inbetween just to make sure)?

Flitske
Posts: 4
Joined: Monday 12 November 2018 9:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Flitske » Monday 12 November 2018 13:38

thanks for the info.

Will try when i get back home this afternoon.

Flitske
Posts: 4
Joined: Monday 12 November 2018 9:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Flitske » Tuesday 13 November 2018 0:43

Thanks, i got the tab after restarting the Pi several times. Don't know why it suddenly popped up.

Set everything up and......... GoodWe server down :twisted:

Will check tomorrow

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests