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