GoodWe Solar PV Generation Capture

Moderator: leecollings

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

Re: GoodWe Solar PV Generation Capture

Post by louisL »

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: 24
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 »

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 »

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: 24
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 »

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: 24
Joined: Sunday 27 November 2016 16:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Hcroij »

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: 24
Joined: Sunday 27 November 2016 16:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Hcroij »

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: 59
Joined: Tuesday 09 May 2017 23:31
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: GoodWe Solar PV Generation Capture

Post by bldewit »

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?
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
Flitske
Posts: 5
Joined: Monday 12 November 2018 8:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Flitske »

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: 59
Joined: Tuesday 09 May 2017 23:31
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: GoodWe Solar PV Generation Capture

Post by bldewit »

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)?
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
Flitske
Posts: 5
Joined: Monday 12 November 2018 8:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Flitske »

thanks for the info.

Will try when i get back home this afternoon.
Flitske
Posts: 5
Joined: Monday 12 November 2018 8:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Flitske »

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
JamesBacon
Posts: 1
Joined: Wednesday 12 June 2019 9:33
Target OS: Windows
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by JamesBacon »

tiaanv wrote: Friday 24 February 2017 12:49 A couple of things.

...
I'm really hoping you're still around D:
Would you be able to add me on Discord so we can discuss how you went about doing this? Please you'd be such a help. Sorry for bumping a year old topic D:
But I really want to retrieve data directly from the inverter and not from the Web Portal.
ckies
Posts: 1
Joined: Wednesday 11 December 2019 9:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by ckies »

tiaanv wrote: Friday 24 February 2017 12:49 A couple of things.

the USB port can be used, but be aware that it is USB HID device, so it is a little bit tricky to get working on most platforms that are generally serial orientated.

Then the next big thing is RS485. This is an option but NOT for the ES series of inverters, as Goodwe have disabled all rs485 functionality (EZLOGGER), and dedicated these ports on the ES for BMS (battery management) and the EZMeter (energy meter). so you will have no joy in that regard.

Most ES inverters however come with the Wifi connection.... This is rather simple to get working using UDP datagrams. The protocol is similar to the RS485 protocol, but it uses a different data structure.

I have implemented this with perfect success using the VERA platform with a custom plugin (I use this as my home controller, but also have domoticz).

I may not disclose the exact protocol details, as there is a confidentiality agreement with Goodwe that binds me, but drop me a personal message if you need some guidance.

This approach makes the interaction with the inverter mealtime, I poll every 2 seconds in my environment, and has the benefit of being wireless ;)
Hi Tiaanvg - Hope you are able to get this? I just installed a GW5048D-ES and find their default web and phone interfaces quite useless from a home automation point of view - slow updates and data is smoothed. I'm keen to dynamically switch loads in and out via nodeRed. For this I need faster and more regular data. AFter some searching - your post is the first one I found with a glimmer of hope. I just registered as a user and cannot send you a PM. Hoping you could assist? Any help will be much appreciated!
Kind Regards
Carl
mgammon
Posts: 1
Joined: Thursday 23 January 2020 13:35
Target OS: Linux
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by mgammon »

ckies wrote: Wednesday 11 December 2019 9:37 Hi Tiaanvg - Hope you are able to get this? I just installed a GW5048D-ES and find their default web and phone interfaces quite useless from a home automation point of view - slow updates and data is smoothed. I'm keen to dynamically switch loads in and out via nodeRed. For this I need faster and more regular data. AFter some searching - your post is the first one I found with a glimmer of hope. I just registered as a user and cannot send you a PM. Hoping you could assist? Any help will be much appreciated!
Kind Regards
Carl
Hi Carl, I'm needing the same thing, for the GW3748D-ES. Did you get anywhere?

It's seriously frustrating that these inverters have no published mechanism to get at such fundamentally basic information!

Regards
Marc
Derekdeclercq
Posts: 1
Joined: Saturday 11 April 2020 22:08
Target OS: -
Domoticz version:
Contact:

Re: GoodWe Solar PV Generation Capture

Post by Derekdeclercq »

Also looking for any info on the udp protocol if anybody had any luck please
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests