External limiting an GTIL2 SUN-1000G2 with raspberry

completelycharged

Well-known member
Joined
Mar 7, 2018
Messages
1,053
Forgot to add.... the reason I was looking at the thread again is that it appears the main boards for the GTIL units are available on Aliexpress for half the price of a full unit, just lacking the heatsink, case, fan, display.... and then started to think if they could be controlled then all you need is the board...
 

Trucki

New member
Joined
Mar 9, 2021
Messages
3
I tried to write Register 40-42 but it seams they are read only?

Screenshot2.PNG


Screenshot1.PNG
 

completelycharged

Well-known member
Joined
Mar 7, 2018
Messages
1,053
Just as a sense check (i may have digit pairs the wrong way round) is your unit serial number either 21012948 or 12109284 ?
If that matches your serial then the port your accessing is filtered and offset or input registers

Can you try a 0x04 read input register instead of 0x03 ? Guessing this will not work.

The curious bit is the non response to a register write.

I also thought I read in one post that there are two different RS485/serial access points and one has more privilage.

So, if this is a full port not going through a secondary device I wonder if a write to a particular address with a partiicular value would then unlock the port.... ?
 
Last edited:

Trucki

New member
Joined
Mar 9, 2021
Messages
3
This are my modbus settings:
MOdbus Settings.PNG


My SN is:
SN.png


Reading Holding Register 4 gives me:
04:57:24.550 [ID: 00003] INIT: Read Holding Registers (code $03)
04:57:24.565 [-------->] SEND: 01 03 00 04 00 01 C5 CB
04:57:24.666 [<--------] RECV: 01 03 02 30 31 6D 90 00
04:57:24.666 [ID: 00003] DONE: Read Holding Registers (code $03)
04:57:24.681 [ID: 00003] PASS: Normal response
04:57:24.697 1 holding register was processed.
04:57:24.713 Value of holding register 4 is 12337

Reading Holding Register 3 gives me:
04:58:00.204 [ID: 00004] INIT: Read Holding Registers (code $03)
04:58:00.204 [-------->] SEND: 01 03 00 03 00 01 74 0A
04:58:00.319 [<--------] RECV: 01 03 02 32 31 6C F0 00
04:58:00.319 [ID: 00004] DONE: Read Holding Registers (code $03)
04:58:00.335 [ID: 00004] PASS: Normal response
04:58:00.351 1 holding register was processed.
04:58:00.366 Value of holding register 3 is 12849

I don't think that my modbus settings are wrong.
Reading Holding Register 70 (Grid Voltage) gives me 2264, which seams to be right (226.4V).

Never heard about a 2nd RS232 Port. Can you give me more information (i.e. Pinout?)
 

completelycharged

Well-known member
Joined
Mar 7, 2018
Messages
1,053
Looks ok in terms of data accuracy as the serial and other bits match up.

Within the protocol document there is a process flow diagram, which has no filtering for registers other than the valid 01-7D range (0x00-0x7C)

Only options I can think of are :
1. external port is purposefully firmware limited due to it being hooked up to an untrusted wifi signal and therefore a risk (understandable and would pose a certification risk for grid connection)
2. External port is switched to full mode via secret address and register value write
3. Secondary port exists (unclear as to the main center chip) which then has full access
4. Firmware is fully locked down and would otherwise need a jtag download and re-programming (or just one flag removing to say it is locked down ?).

The LCD route is an interesting one but I know my wind unit just connects the dump load while it reboots if you change any significant settings, so the issue with the output going to zero from a previous poster makes sense as the unit is internally booting back up.

The way that some of the registers are setup leads me to believe some, but not all methods of power control work without a reboot because otherwise the device would not work in the first place. This is why I was thinking register 40-42, but they are locked.
 

BartDP

New member
Joined
Jan 22, 2021
Messages
3
Does someone has experience with using these GTILs with already a existing invertor in the house/net ?
As seems they can't detect the current direction ...
When you set these on (activate, connect to the 230V) and there is already injection to the net (from the existing invertor), they see this as 'power used from the net' ( seen on the display )
I don't have my batteries yet, so can't test/see how they would react.
Would they finally detect it is injection and stop feeding the net ? ( as for example if 1000 W is injected by the other invertor and they want to compensate this the display reading would go to 2000 W ?)
Anyone knows ?
 

digelectronics12

New member
Joined
Apr 1, 2021
Messages
1
Hi, I found this page after looking for answers for doing the same thing. What people said here seems like it got way too complicated for me. I am planning on a way that seems more simple to me. Maybe it may be helpful to others that find this pages for same reason as me as well.
I am doing the following:
Clamp Current Sensor 100A/50ma ong each power line that go to an audio amplifier with 50ohm input resister that has differential input for signal isolation (signal isolation is a must to not get any cross over signal from other clamp current sensors, and differential inputs will also help reduce electrical noise), so that 100A = 2.5V AC, setting audio amp to approximately 0 to 2 gain so the output can be adjusted if needed to be 2.5-5V max AC (prefer around 4V to compensate for bridge rectifier diode voltage drop lost). Then convert that to DC with a bridge rectifier and capacitor with some resister (2K-4.7K range) across that capacitor to drain capacitor. Then using a four channel analog to digital converter module connected to a raspberry pi 3 near the power line clamp current sensor, and make a program to read each channel voltage and figure out what value to send over wifi network to other raspberry pi 3 next to inverter via either telnet or ssh or ftp or putty or some command line messaging. The raspberry pi next to inverter will listen for or read the value from the other raspberry pi monitoring the input power lines, and then with a program get that value and have code adjust the audio volume output and arrange for it to output a consistence 60hz sound that will go in to a class D audio amplifier with output of 2.5V max. Then that will go in to a 1 to 1 audio isolation transformer (signal isolation is a must in to internal limiter port or could get a ground loop problem making things go out of whack) that will go in to the internal limiter connection in to the inverter. This sill be like simulating the 60hz from the clamp current sensors on the power lines but through the wifi network using multiple raspberry pi 3 units. To mimic the power line clamp current sensor make a program to listen to or read from the power line monitoring raspberry pi 3 to tell what value it should be on the inverter limiter side and simply have the volume adjust to the desired value with a program code. I have 2 inverters at different locations and do not want to run a long wire though the house or over the house. So I will have two raspberry pi 3 listen or reading from the main power monitor raspberry pi 3 with 2 clamp current sensor to calculate what each inverter should do.
The RS485 serial communication for the external limit input is interesting but from what I gather the RS485 seems too complicated to figure out the protocol if not the manufacture, but would be nice if its figured out. Will be waiting to hear about that more.
 

Serg

New member
Joined
Oct 24, 2018
Messages
5
I have been interested in this inverter for a while but neither have the tech knowledge neither I have it yet :) but my 2 cents on this:

- There is a repository in Github that allows mqtt over the inverter so you don't need to use the shinemonitor to monitor it. I believe there is also a mapping showing the registers. (https://github.com/TradeFace/modbusmqtt/issues/1)

- Also, a different inverter (Sofar), with the help of the modbus manual, allows to put the inverter in passive mode that allows to send instructions to control the charge or discharge rates of the battery (https://www.raspberrypi.org/forums/viewtopic.php?t=259427)

Keep us posted with any updates, really good job here.
 

MartinCZ

New member
Joined
Jul 8, 2020
Messages
3
hi folks,
I have created a small ESP32 program (https://github.com/BlackSmith/GFSunInverter), for reading data from an inverter. Benefit of this solution is it can be powered from the inverter (RS232 - pin 9 - 12V). I have ready PR into https://docs.openmqttgateway.com, for sending data to mqtt broker if someone looks for it.
Now I can identify these registers:
Code:
# Register:0 Value:2               ???
# Register:1 Value:256             ???
# Register:2 Value:1               ???
# Register:3 Value:12601           # device ID  2x chars
# Register:4 Value:12594           # device ID  2x chars
# Register:5 Value:12594           # device ID  2x chars
# Register:6 Value:12336           # device ID  2x chars
# Register:7 Value:14641           # device ID  2x chars
# Register:43 Value:12336          ???
# Register:59 Value:512            ???  // may be bit flags; this value is if inverter works
# Register:60 Value:2              # Custom Power  int16
# Register:63 Value:5752           # Total Power   int16
# Register:70 Value:2313           # AC Voltage  int16
# Register:86 Value:5340           # Average power int16
# Register:109 Value:601           # DC Voltage    int16

What I want to detect when the inverter limits its output. Is there any chance to detect it from registers? I do not want to setup it, only detect. After that, I will able to automatic switch on some other electric devices in the house (heating, ...).
 
Last edited:
Top