As 'gapfiller' in my PV-configuration I purchased a (secondhand) solar inverter make/type Ginlong Solis Mini 700 4G.
For monitoring of that device in an simple way, I could either use an external energy-meter, or the Ginlong WiFi-stick related to the proprietary Ginlong Monitoring system.
The 1st Option is OK for externally, very straightforward reading the PV-production-information, by addition of a DIY measurement-configuration of kWh-meter with S0-interface and optional RS485-interface, linking to a readout by e.g. Domoticz.
The 2nd Option might be more interesting giving also 'internal' information. It needs investment to a company-solution and related, additional DIY read-back.
I would like to avoid the use of the Ginlong-servers, because it is just an extra part in the chain.
Has anybody seen (or has available) a 3rd Option solution which directly reads the RS485-interface of the inverter by means of a lua-script or Python-script?
Solar Inverter Ginlong Solis Mini 700 4G
Moderator: leecollings
-
- Posts: 858
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: mixed
- Location: Hengelo(Ov)/NL
- Contact:
Solar Inverter Ginlong Solis Mini 700 4G
Last edited by Toulon7559 on Sunday 05 August 2018 21:08, edited 2 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
-
- Posts: 858
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: mixed
- Location: Hengelo(Ov)/NL
- Contact:
Re: Solar Inverter Ginlong Solis Mini 700 4G
(Not with help of Ginlong) some Basic protocol information for the 3rd Option seems to be at https://github.com/graham0/ginlong-wifi/issues/5
But no luck for a 'progressed' script directly applying the RS485-interface, dissecting the modbus-datastream, and compile an upload to Domoticz:
lot of homework to be done .........
Takes some money, but most practical & quickest choice therefore seems to be to buy a datalogging stick for Option 2, and then to apply the solution described here.
But no luck for a 'progressed' script directly applying the RS485-interface, dissecting the modbus-datastream, and compile an upload to Domoticz:
lot of homework to be done .........
Takes some money, but most practical & quickest choice therefore seems to be to buy a datalogging stick for Option 2, and then to apply the solution described here.
Last edited by Toulon7559 on Sunday 29 July 2018 14:52, edited 1 time in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
-
- Posts: 858
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: mixed
- Location: Hengelo(Ov)/NL
- Contact:
Re: Solar Inverter Ginlong Solis Mini 700 4G
Meanwhile
Option1 has been realised by application of a kWh-meter DDS238-1ZN and an ESP8266 (of WEMOS-variant D1)
Applying pin D3 or D4 as pulse-counter at the S0-interface of the kWh-meter and 'fiddling' with ESPEasy and it's rules, you get rather accurate read-out for Power and Energy, with easy upload to Domoticz, etc.. See this thread in ESP-forum. Little effort with good result.
As alternative with DDS238-1ZN and comparable kWh-meters at their RS485-interface more production information can be extracted with high resolution. Look for DDS238 and SDM120 in this forum and in the related Wiki. More effort =>more info.
Option2 has also been realised by installation of a datalogger stick from Ginlong in the LAN-variant. WiFi-variant is equivalent.
Provides access to the Ginlong monitoring website with various info's. Very little effort with basic result.
As DIY-effort a Read-out from that website and upload to Domoticz is possible (by means of a python-script), but slightly disappointing, because essentially same as the readout by Option1 [= Power + Energy], but with worse resolution [1kWh for Energy and 0.1kWh for Power], with update of Power-info rather frequent, but update of Energy-info only once per hour. As further, simple extension in the same python-script an upload to e.g. PVOutput is feasible: see viewtopic.php?f=65&t=7941&start=80#p187971
The Ginlong website shows more information than Power and Energy, but other 'Internal' information from the SOLIS-inverter still not easily accessible by URL-call.
That information at the website has been uploaded from the inverter to the Ginlong servers.
Besides directly reading the RS485-interface of the inverter, therefore it must be possible to intercept at the LAN such data in the upload to the Ginlong-servers, but not clear howto .....
Option1 has been realised by application of a kWh-meter DDS238-1ZN and an ESP8266 (of WEMOS-variant D1)
Applying pin D3 or D4 as pulse-counter at the S0-interface of the kWh-meter and 'fiddling' with ESPEasy and it's rules, you get rather accurate read-out for Power and Energy, with easy upload to Domoticz, etc.. See this thread in ESP-forum. Little effort with good result.
As alternative with DDS238-1ZN and comparable kWh-meters at their RS485-interface more production information can be extracted with high resolution. Look for DDS238 and SDM120 in this forum and in the related Wiki. More effort =>more info.
Option2 has also been realised by installation of a datalogger stick from Ginlong in the LAN-variant. WiFi-variant is equivalent.
Provides access to the Ginlong monitoring website with various info's. Very little effort with basic result.
As DIY-effort a Read-out from that website and upload to Domoticz is possible (by means of a python-script), but slightly disappointing, because essentially same as the readout by Option1 [= Power + Energy], but with worse resolution [1kWh for Energy and 0.1kWh for Power], with update of Power-info rather frequent, but update of Energy-info only once per hour. As further, simple extension in the same python-script an upload to e.g. PVOutput is feasible: see viewtopic.php?f=65&t=7941&start=80#p187971
The Ginlong website shows more information than Power and Energy, but other 'Internal' information from the SOLIS-inverter still not easily accessible by URL-call.
That information at the website has been uploaded from the inverter to the Ginlong servers.
Besides directly reading the RS485-interface of the inverter, therefore it must be possible to intercept at the LAN such data in the upload to the Ginlong-servers, but not clear howto .....
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Re: Solar Inverter Ginlong Solis Mini 700 4G
The new wifi sticks from Ginlong allow to configure a second wifi address where the stick sends the data to.
I have been able to configure this second address and have an Esp8266 D1-mini configured with that ip addrss.
Whatever ITried, the D1-mini does not receive any data from the ginlong wifi stick. The stick seems not even to connect to the D1mini.
Anyone troed this before? I know there is code for pi connecting to the wifi stick but I am blank on pi and linux so for me that is a no go.
Your input is veru much appreciated.
Nico
I have been able to configure this second address and have an Esp8266 D1-mini configured with that ip addrss.
Whatever ITried, the D1-mini does not receive any data from the ginlong wifi stick. The stick seems not even to connect to the D1mini.
Anyone troed this before? I know there is code for pi connecting to the wifi stick but I am blank on pi and linux so for me that is a no go.
Your input is veru much appreciated.
Nico
-
- Posts: 858
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: mixed
- Location: Hengelo(Ov)/NL
- Contact:
Re: Solar Inverter Ginlong Solis Mini 700 4G
No help from Ginlong to get the settings for operation of Server_B.
Just wondering, really nobody that achieved running of such configuration?
Hints welcome for a working setup:
1) How to setup & prepare a remote Server_B?
What software & settings for the server_function?
What (port)settings for the LAN-interface?
2) Which compatible settings at side of the Ginlong_inverter?
Just wondering, really nobody that achieved running of such configuration?
Hints welcome for a working setup:
1) How to setup & prepare a remote Server_B?
What software & settings for the server_function?
What (port)settings for the LAN-interface?
2) Which compatible settings at side of the Ginlong_inverter?
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
-
- Posts: 4
- Joined: Sunday 23 May 2021 22:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Solar Inverter Ginlong Solis Mini 700 4G
Okay, I have recently gotten solar panels as well and have been wrestling with the read-outs. It's a Solis inverter (Ginlong) with a LAN-interface that automatically uploads its statistics to the portal page at m.ginlong.com. I use the mobile app called "Solis Home", so if you use that as well, there's a good chance you can use my read-out method in a similar way.
I have been searching a lot on how to get the statistics in Domoticz. I've seen a lot of information and topics of people approaching this in various ways, some with success, others without any. This is how I approached it, hopefully some of you can use this. I am deliberately crossposting to make sure people that need this or are looking for it find it somewhere.
The approach:
- Make sure you can log in to m.ginglong.com and have the/a username and password available
- In Domoticz, create Dummy hardware with 2 sensors attached to it: 1 for the usage (in watts), which will show how many watts your PV is producing, 1 switch, which will show the status of your PV (on or off). For me, this looks like this:

- Next, put the Python-script below (called ginlong.py in my case) on your Domoticz-device and make sure Python is available on the system.
Make sure you update the parameters under #config and #domoticz settings:
- Make the script executable using command while you are in the directory that contains the script. Due to a lack of knowledge I always do a
Getting output? Great! Most likely you first values are also visible on your newly created Domoticz-devices as well, yay! Treat yourself to a beer at this point!
- Next, create anóther switch in Domoticz (by simply creating one using the Manual option, with random settings). Edit the switch and make it a "Push On" button. In the "On action" and "Off action", put the script location so it is started whenever the button is triggered. For me, this looks like this:

When using the configuration above (so: "script://ginlong.sh"), you are assuming that the script is located in the scripts folder under the Domoticz installation folder. If that's not the case, change the path (google or search the forum on how to incorporate the path)
- Press the update-knop (so the device you just created) and make sure the values are updated
- And here comes the clue: Running the script once every X-minutes. Note that I am no Linux-Raspbian expert and I couldn't get it to work using a crontab-job (just as well though, as I now have everything in Domoticz, which I prefer). Putting a timer on the switch did not allow running the task (pressing the button) often enough and I was wrestling errors in Domoticz whilst trying to get it up and running, eventuelly I ended up using a dzVents script. The script looks like this (basically saying, press the button every 5 minutes):
I'm sure that there's a better way to do this but again: for me ignorance is bliss and I adhere to "if it ain't broken don't fix it" (lazy, jep!) 
That ought to do it!
Disclaimers and more detailed info:
- I am no programmer, developer or whatever, just a hobbyist. Had to "learn" a bit (more) Python and JSON but I am no expert. So: No warranties, and I'm sure it lacks efficiency etc. Knock yourself out on improvements
- I am only reading the current usage/production and the status. The status can have various values I found (0 = off, 1 = on, 2 something else?), but the switch only understands 0 and 1, when it's 2 it shows "Dimmed". Not sure what other statusses other than 0 and 1 mean, enlighten me if you figured it out
- In the JSON I am retrieving there's more values that might be interesting and that can be used for calculations. I couldn't figure it out quickly and had accomplished my goal so this is it for me. Feel free to venture onward!
- This is it for me, I've accomplished the goal I wanted to achieve, so I won't be updating and advancing the functionality. Knock yourself out doing so
- Credits for large parts of the scripting go to the people that had already created this before me, I just modded a bit!
Hopefully this helps the people that were running into the same questions/issues I was. I'm happy about it (and kind of proud as well, gotta be honest
). The end result looks like this:

And now I'm done typing. My fingers are sore...
I have been searching a lot on how to get the statistics in Domoticz. I've seen a lot of information and topics of people approaching this in various ways, some with success, others without any. This is how I approached it, hopefully some of you can use this. I am deliberately crossposting to make sure people that need this or are looking for it find it somewhere.
The approach:
- Make sure you can log in to m.ginglong.com and have the/a username and password available
- In Domoticz, create Dummy hardware with 2 sensors attached to it: 1 for the usage (in watts), which will show how many watts your PV is producing, 1 switch, which will show the status of your PV (on or off). For me, this looks like this:

- Next, put the Python-script below (called ginlong.py in my case) on your Domoticz-device and make sure Python is available on the system.
Make sure you update the parameters under #config and #domoticz settings:
Code: Select all
#!/usr/bin/python
import requests
import urllib, urllib2
import json
#config
username = '[email protected]' #your username to log on to m.ginlong.com
password = 'P@ssw0rd!' #your password to log on to m.ginlong.com
domain = 'm.ginlong.com' #webportal to read
plantId = '965529' #plant id (can be found on m.ginlong.com page information)
lan = '2' #language (2 = English)
#domoticz settings
domoticz_host = 'domoticzuser:[email protected]' #Username/password and IP of Domoticz
domoticz_port = '8080' #Port to connect to Domoticz
domoticz_url = 'json.htm' #URL to post stats to Domoticz, does not require changes normally
domoticz_device_idx = '486' #IDX of Watt meter in Domoticz
domoticz_device_onoff_idx = '485' #IDX of on/off switch (to see whether its on or off for PV)
# Create session for requests
session = requests.session()
#building url
url = 'http://'+domain+'/cpro/login/validateLogin.json'
params = {
"userName": username,
"password": password,
"lan": lan,
"domain": domain,
"userType": "C"
}
#login call
resultData = session.post(url, params=params)
resultJson = resultData.json()
if resultJson['result'].get('isAccept') == 1:
print("Login Succesful!")
else:
print("Login Failed!!")
Exit()
# Get plant details
url = 'http://m.ginlong.com/cpro/epc/plantview/view/doPlantList.json'
cookies = {'language': lan}
resultData = session.get(url, cookies=cookies)
resultJson = resultData.json()
# Uncomment lines below to write the exported json-file to the location noted
#out_file = open("/usr/local/bin/ZPExport.json", "w")
#json.dump(resultJson, out_file, indent = 6)
#out_file.close()
ActualPower = resultJson['result']['pagination']['data'][0].get('curPower')
ActualPowerNoSep = str(ActualPower).split(".")[0]
etoday = resultJson['result']['pagination']['data'][0].get('energyToday')
multiply='1000.0'
etotal1000 = float(etoday) * float(multiply)
etotalstr=str(etotal1000)
etotalstrNoSep = str(etotalstr).split(".")[0]
OnOrOff = resultJson['result']['pagination']['data'][0].get('status')
#logging values
print 'ActualPower: ' + str(ActualPowerNoSep)
print 'etoday: ' + str(etotalstrNoSep)
print 'Status: ' + str(OnOrOff)
#uploading values to domoticz
url = ("http://" + domoticz_host + ":" + domoticz_port + "/" + domoticz_url+ "?type=command¶m=udevice&idx=" + domoticz_device_idx+ "&nvalue=0&svalue=" + str(ActualPowerNoSep))
urlonoff = ("http://" + domoticz_host + ":" + domoticz_port + "/" + domoticz_url+ "?type=command¶m=udevice&idx=" + domoticz_device_onoff_idx+ "&nvalue=" + str(OnOrOff))
urllib.urlopen(url)
urllib.urlopen(urlonoff)
Code: Select all
sudo chmod +x ginlong.py
Code: Select all
[sudo chmod 777 ginlong.py/code] as well to make sure all users can use it. I'm sure it's not needed or a security-thing, but let's just say ignorance is bliss ;)
- Run the script once on the device and make you see output on the commandline.
I start the script using command:
[code]sudo /usr/bin/python /usr/local/bin/ginlong.py
- Next, create anóther switch in Domoticz (by simply creating one using the Manual option, with random settings). Edit the switch and make it a "Push On" button. In the "On action" and "Off action", put the script location so it is started whenever the button is triggered. For me, this looks like this:

When using the configuration above (so: "script://ginlong.sh"), you are assuming that the script is located in the scripts folder under the Domoticz installation folder. If that's not the case, change the path (google or search the forum on how to incorporate the path)
- Press the update-knop (so the device you just created) and make sure the values are updated
- And here comes the clue: Running the script once every X-minutes. Note that I am no Linux-Raspbian expert and I couldn't get it to work using a crontab-job (just as well though, as I now have everything in Domoticz, which I prefer). Putting a timer on the switch did not allow running the task (pressing the button) often enough and I was wrestling errors in Domoticz whilst trying to get it up and running, eventuelly I ended up using a dzVents script. The script looks like this (basically saying, press the button every 5 minutes):
Code: Select all
return {
on = { timer = {"every 5 minutes"} },
execute = function(domoticz, _)
local myDevice = domoticz.devices("Zonnepanelen Update")
if myDevice.state == "On" then
myDevice.switchOn()
else
myDevice.switchOn()
end
end
}

That ought to do it!
Disclaimers and more detailed info:
- I am no programmer, developer or whatever, just a hobbyist. Had to "learn" a bit (more) Python and JSON but I am no expert. So: No warranties, and I'm sure it lacks efficiency etc. Knock yourself out on improvements

- I am only reading the current usage/production and the status. The status can have various values I found (0 = off, 1 = on, 2 something else?), but the switch only understands 0 and 1, when it's 2 it shows "Dimmed". Not sure what other statusses other than 0 and 1 mean, enlighten me if you figured it out

- In the JSON I am retrieving there's more values that might be interesting and that can be used for calculations. I couldn't figure it out quickly and had accomplished my goal so this is it for me. Feel free to venture onward!
- This is it for me, I've accomplished the goal I wanted to achieve, so I won't be updating and advancing the functionality. Knock yourself out doing so

- Credits for large parts of the scripting go to the people that had already created this before me, I just modded a bit!
Hopefully this helps the people that were running into the same questions/issues I was. I'm happy about it (and kind of proud as well, gotta be honest


And now I'm done typing. My fingers are sore...

- waltervl
- Posts: 5779
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Solar Inverter Ginlong Solis Mini 700 4G
You better use another sensor for measuring the Electricity usage as this device has no history logging. See https://www.domoticz.com/wiki/Dummy_for ... lectricity
Better use the Electricity (instant and counter) device.
Better use the Electricity (instant and counter) device.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest