FiveStar/Sunmagic RS232 Protocol Decoding

lost_sock

Member
Joined
Jan 21, 2019
Messages
28
Reaction score
20
I have the FiveStar VL-3524M 3KW 24V inverter, from other threads seen I believe it to have the same insides as the Sunmagic PW3024. I'm not sure who the actual original manufacturer is, but I think these are clone of a clone of a clone territory.

It has been working well as a simple "UPS" type backup on a LFP bank, but I'm starting to add solar panels and I want to be able to track PV stats now but the software sucks. My end goal is to script something to push data from the serial interface to a Home Assistant MQTT broker. There is code out there that does this for most of the other inverters, these oddballs aren't supported though. Maybe someone has already been down this path?

Just a disclaimer: I mostly have no idea what I'm doing, but through persistence and key bashing I usually get somewhere.

The inverter has 2 serial interfaces, USB and RJ45>DB9 cable. I've tried both and functionality is identical. They don't work with any Voltronic compatible software. There was a CD included with WinPower 5.0.0.2 and V-Series Runtime.

WinPower looks to be software intended for UPSs rather than inverters. Very basic, no PV stats.

V-Series Runtime has the PV stats!

Now the fun begins, sniffing and trying to figure out the serial protocol...

When WinPower is talking to the inverter it looks to use a very simple Megatec/Voltronic mash up. I went through all the query commands listed in those protocols and the only ones that work are Q1 and QMD or MD.

RS232 2400BPS 8N1
Command: Q1
Response: (235.3 220.0 230.2 018 50.0 2.19 30.0 10000000)

Input voltage: 235.3V
??? maybe rated voltage: 220V
Output voltage: 230.2V
Load: 18%
Output frequency: 50hz
???: 2.19
Temp: 30 deg
8-bit status: 10000000

Command: QMD or MD (Same result)
Result: INV+M,800,1/1,220,220,2,12.0,11.5,13.8

Model: INV+M
???: 800
Input/Output Phase: 1/1
Rated Input Voltage: 220
Rated Output Voltage: 220
Number of batteries: 2
Rated battery voltage: 12V
User config???: 11.5V
User config???: 13.8V

Ok, so the point where I'm stuck at the moment is decoding how V-Series Runtime talks to the inverter, the PV stats I'm after are hiding in here somewhere! The serial command issued from V-Series is "CMSG.INV-HB" and the inverter returns a chunk that I'm yet to decipher. I've jumped around converting bytes to decimal with the hopes that an obvious number would jump out with no luck.

56 50 48 42 49 0f 00 00 00 00 00 00 00 00 01 04 VPHBI...........
1e 13 09 f4 01 0e 09 f4 01 1c 01 64 00 00 14 14 ...Ă´...Ă´...d....
00 42 05 05 02 01 01 2f 00 00 11 14 7d 7d 7d 7d .B...../....}}}}
7d 7d 02 02 01 01 64 64 8e 88 69 74 87 e6 02 01 }}....ddŽˆit‡æ..
01 01 01 02 02 01 00 02 00 73 82 06 00 c0 .........s‚..À
 
I have the FiveStar VL-3524M 3KW 24V inverter, from other threads seen I believe it to have the same insides as the Sunmagic PW3024. I'm not sure who the actual original manufacturer is, but I think these are clone of a clone of a clone territory.

It has been working well as a simple "UPS" type backup on a LFP bank, but I'm starting to add solar panels and I want to be able to track PV stats now but the software sucks. My end goal is to script something to push data from the serial interface to a Home Assistant MQTT broker. There is code out there that does this for most of the other inverters, these oddballs aren't supported though. Maybe someone has already been down this path?

Just a disclaimer: I mostly have no idea what I'm doing, but through persistence and key bashing I usually get somewhere.

The inverter has 2 serial interfaces, USB and RJ45>DB9 cable. I've tried both and functionality is identical. They don't work with any Voltronic compatible software. There was a CD included with WinPower 5.0.0.2 and V-Series Runtime.

WinPower looks to be software intended for UPSs rather than inverters. Very basic, no PV stats.

V-Series Runtime has the PV stats!

Now the fun begins, sniffing and trying to figure out the serial protocol...

When WinPower is talking to the inverter it looks to use a very simple Megatec/Voltronic mash up. I went through all the query commands listed in those protocols and the only ones that work are Q1 and QMD or MD.

RS232 2400BPS 8N1
Command: Q1
Response: (235.3 220.0 230.2 018 50.0 2.19 30.0 10000000)

Input voltage: 235.3V
??? maybe rated voltage: 220V
Output voltage: 230.2V
Load: 18%
Output frequency: 50hz
???: 2.19
Temp: 30 deg
8-bit status: 10000000

Command: QMD or MD (Same result)
Result: INV+M,800,1/1,220,220,2,12.0,11.5,13.8

Model: INV+M
???: 800
Input/Output Phase: 1/1
Rated Input Voltage: 220
Rated Output Voltage: 220
Number of batteries: 2
Rated battery voltage: 12V
User config???: 11.5V
User config???: 13.8V

Ok, so the point where I'm stuck at the moment is decoding how V-Series Runtime talks to the inverter, the PV stats I'm after are hiding in here somewhere! The serial command issued from V-Series is "CMSG.INV-HB" and the inverter returns a chunk that I'm yet to decipher. I've jumped around converting bytes to decimal with the hopes that an obvious number would jump out with no luck.

56 50 48 42 49 0f 00 00 00 00 00 00 00 00 01 04 VPHBI...........
1e 13 09 f4 01 0e 09 f4 01 1c 01 64 00 00 14 14 ...Ă´...Ă´...d....
00 42 05 05 02 01 01 2f 00 00 11 14 7d 7d 7d 7d .B...../....}}}}
7d 7d 02 02 01 01 64 64 8e 88 69 74 87 e6 02 01 }}....ddŽˆit‡æ..
01 01 01 02 02 01 00 02 00 73 82 06 00 c0 .........s‚..À
May help you to look at some of my prior work in this area.


From a very cursory look at your bytes there, i'd suggest look at byte pairs both little and big endian and compare with values
Or sniff some more data so you can compare again different times, and see which bytes change.
 
Huge breakthrough today! I grabbed a bunch of the responses and found that by spoofing the inverter I could feed the response back to V-Series to get the actual values related to the chunk. After a bunch of diffing something clicked and I managed to get all the important bits decoded! The rest are likely settings and checksum, I'll explore a bit further down the line. For now I have enough that I can start looking into how to script the push to mqtt.

The Solar Charge Current was an annoying one because it's split in two! Solar charge current for this response is 3.8A (3A + 800mA)

Code:
56 50 48 42 49 0C 00 00 00 00 00 00 00 00 01 04 1E 32 09 F3 01 FF 08 F4 01 07 01 64 00 12 24 14 03 47 05 06 02 01 01 4B 00 03 1F 14 7D 7D 7D 7D 7D 7D 02 02 02 01 64 64 8E 88 69 7D 87 E6 02 01 01 01 02 02 02 01 00 08 00 73 82 06 00 1F

56 50 48 42 49 0C 00 00 00 00 00 00 00 00 - ???

01 04 - Inverter Software Version

1E - ???

32 09 - Input Voltage: 235.4 V
F3 01 - Input Frequency: 49.9 Hz
FF 08 - Output Voltage: 230.3 V
F4 01 - Output Frequency: 50.0 Hz
07 01 - Battery Voltage: 26.3 V
64 00 - Battery Capacity: 100%
12 - Load Percentage: 18%
24 - Inverter Temp: 36 deg
14 - Controller Code: 0x20

03 47 05 06 02 - ???

01 01 - Charger Software Version: 1.01

4B 00 - PV Voltage: 75 V

03 - Solar Charge Current A - 3A

1F - Charger Temp: 31 deg
14 - Charger Controller Code: 20

7D 7D 7D 7D 7D 7D 02 02 02 01 64 64 8E 88 69 7D 87 E6 02 01 01 01 02 02 02 01 00 - ???

08 - Solar Charge Current mA - 800mA

00 73 82 06 00 - ???

1F - ???
 
This is awesome. Im trying to do the same thing with a Fivestar inverter but it's just a 1KVA model.

I can't seem to get communication going via the RJ-45 port. Mine doesn't have USB. I have made an RJ-45 to RS-232 cable and I'm pretty sure it's correct, but maybe it's not. What have you used to connect to it?
 
This is awesome. Im trying to do the same thing with a Fivestar inverter but it's just a 1KVA model.

I can't seem to get communication going via the RJ-45 port. Mine doesn't have USB. I have made an RJ-45 to RS-232 cable and I'm pretty sure it's correct, but maybe it's not. What have you used to connect to it?
Your rs232 usb device is recognised by windows ?

i found on mine that without the ground wire it did not want to work, i have a cheapy rs232 to usb converter though

can also swop around the two data cables in case you have it wrong way round
 
This is awesome. Im trying to do the same thing with a Fivestar inverter but it's just a 1KVA model.

I can't seem to get communication going via the RJ-45 port. Mine doesn't have USB. I have made an RJ-45 to RS-232 cable and I'm pretty sure it's correct, but maybe it's not. What have you used to connect to it?
I used an old pl2303 usb to db9 serial adapter so the pinout should be standard on the db9 side. Luckily mine came with the rj45-db9 cable though. Did you get the same software, winpower and v-series?
 
This is awesome. Im trying to do the same thing with a Fivestar inverter but it's just a 1KVA model.

I can't seem to get communication going via the RJ-45 port. Mine doesn't have USB. I have made an RJ-45 to RS-232 cable and I'm pretty sure it's correct, but maybe it's not. What have you used to connect to it?
don't forget rx to tx and tx to rx on the other end
 
Oh and the baud rate
Try different speeds

Some are finicky at what speed the coms are

ie my battery loves buad rate of 9600

Otherwise i get no connection
Suppose my cheapy rs232 may be part of that problem
 
I feel like such a muppet.

So mine is part of an inverter trolley I bought. I tested the com port with a multimeter and got nothing. Opened it up, and this is what I found. No connection to the inverter at all.

Buy cheap, buy twice I guess :)

20230617_105112.jpg
 
I feel like such a muppet.

So mine is part of an inverter trolley I bought. I tested the com port with a multimeter and got nothing. Opened it up, and this is what I found. No connection to the inverter at all.

Buy cheap, buy twice I guess :)

Haha! Oh well that explains it, looks like you got the "wireless" version lol.
 
With the sun finally out today I discovered a quirk in the PV stats. The numbers were saying that I was generating way more solar power than what was possible for my setup.

You would think that PV Voltage * Solar Charge Current = PV Power... nope!

The 'Solar Charge Current' isn't the current drawn from the panels, it's how much current is being drawn by the charger from the solar input o_0

So... weird way to do it, but ok. Battery Voltage * Solar Charge Current = PV Power
 
Yea suppose it depends on products

I have an axpert

On watch power windows app the following is logged

Device mode ie line mode/battery mode

Time
Ac voltage
Ac freq
Pv input volt
Pv input power in watt
Output apparent power
Output active power
Battery voltage
Battery capacity
Charging current
Battery discharge current
Output voltage
Output freq
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X