SG700MD & DATABOX communications Data Structure - need help

SG700MD & DATABOX

I have a SG700MD inverter connected to a DATABOX USB modem. I am able to communicate to it via my ‘C’ app in Linux
I can send commands and receive data. My problem is some of the returned data I don’t know what it is.

Anybody figure out the data stream bits and bytes that are returned.

Here is my header file I wrote for sending and receiving.

#pragma pack(1) 
 
#define	HEAD		0x43	// Don't know why this, when tracing their app, they always send the first by hex 43

#define CMD_HELLO	0xfc
#define CMD_DEVICE	0xc0
#define CMD_OOR		0xc1
#define CMD_UNK		0xc2
#define CMD_POWER	0xc3


#define	VALUE_STATUS 	0x0000
#define VALUE_ON		0x0001
#define VALUE_OFF		0x0002
#define VALUE_REBOOT	0x0003


struct CU_Head {
	unsigned char	head;
	unsigned char	cmd;
	short	databoxid;
	short	areaid;
	int		inverterid;
	unsigned char	stuff[3];	// Not sure what these are, ON the return I'm guessing total energy ever created but I can't reverse decode it to what the app displays
	unsigned char	value;
};

struct CU_SendMsg {
	struct CU_Head	head;
	unsigned char	check;
};


struct CU_RecvHello {
	struct CU_Head	head;
	unsigned char	check;
};
struct CU_RecvInverterStatus {
	struct CU_Head	head;
	unsigned char	check;
	unsigned short	DCVoltage;
	unsigned short	DCCurrent;
	unsigned short	ACVoltage;
	unsigned short	ACCurrent;
	unsigned char 	unknown;
	unsigned short	Temp;
	unsigned char	status;
};

The first message I have to send is a HELLO commands
(NOTE all bytes are HEX bytes)
HELLO Message ( Other than the 43 header and the FC command all bytes are zero and then the checkdigit
SEND => 43FC 0000 0000 0000 0000 0000 0000 3F

The receive I get the ID of the DATABOX back In this case 1329
RECV <= 43FC 1329 0000 0000 0000 0000 0000 7B

STATUS Message
I send the Databox ID along with the hex ID of the inverter I want to query In this example the inverterid is 41002481
SEND => 43C0 1329 0000 4100 2481 0000 0000 25

I receive the header back with some other data which I’m guessing is the Total power generated, but can’t reverse engineer it.
The hex is 3FD06B which their app displays as 1.63 Kwh All the other data I have figured out with the exception of the unknown byte and status byte.
RECV <= 43C0 1329 0000 4100 2481 3FD0 6B00 9F 03D9 0000 2FD5 0000 0000 5D00

Anybody else figure out the data-packet that is returned on a status query.

I’m able to turn the unit on / off / reboot all fine, but the status bytes are still confusing. If anybody needs help with the commands I have figured out let me know I can give you examples of what to send.

Thanks
Andy

I could not even to get to communicate with it using wifi module not the modem provided by the company.
On the other note, do you experience the issue with the inverter where if there is even a slightest change in sun intensity, inverter looses MMPT and goes to 0 for about 20 seconds until it locks on the MPPT track again?

I actually don’t have anything installed yet. I’m just writing code. The solar panel is leaned up against the house and 2/3 of it is shaded. I’m hoping later this week to actually get them mounted so they get full sun. Then run my app to poll the device every 30 seconds for stats.

I’ll let you know if I see any weirdness.

As for the communications, I found it won’t change speed of the USB modem, it has to be 9600,8,N,1 anything else it won’t respond. I figured that out using CUTECOM and playing with the settings. At least in CUTECOM I was able to create the 1 string that it needs to initialize the unit and start the communcations.

please let me know how it goes. And good luck

I’ve posted the code

https://github.com/awysocki/databox24

to avoid that the MPPT looses connection by some shadows and because the MPPT is very slow, it is helpful to add some capacitors in parallel to the MC4 inputs of the inverter.

Actually I am setting up some SD microinverters too and you can see the workaround here (it’s in German but with lots of pictures so I guess it should be clear) → WVC + SG inverter @ photovoltaikforum.com

1 Like