diy solar

diy solar

Decoding EG4 Lifepower4 BMS data

goldserve

Solar Enthusiast
Joined
Apr 26, 2022
Messages
420
Has anyone looked at the serial stream to decode the data before so I can write a very simple serial to TCP program to query the battery data? I'm using a RS485 + RS232 to Ethernet/Wifi adapter and installed a virtual com port in windows while logging the communication between the BMS application and the battery. The device I got was USR-W510 and here is a screenshot of the logging:

Snip20220925_9.png

Has anyone already done some work on this that can share the battery reporting format coming through?
 
Has anyone looked at the serial stream to decode the data before so I can write a very simple serial to TCP program to query the battery data? I'm using a RS485 + RS232 to Ethernet/Wifi adapter and installed a virtual com port in windows while logging the communication between the BMS application and the battery. The device I got was USR-W510 and here is a screenshot of the logging:

View attachment 113506

Has anyone already done some work on this that can share the battery reporting format coming through?
Yes, there is working code on github, the dbus-serialbattery driver for VenusOS (Victron open sourced it) now supports EG4 Lifepower4. I've installed it and tested it myself. The support is only in the latest released version from about a week ago.

I need a second USB cable to go to my second EG4 battery, then I'll have cloud monitoring/alerts for both of my batteries. It already tracks the cell voltage differences over time, etc, by hooking it up to VenusOS/VRM (Victron's free cloud site).

I actually use a raspberrypi4 instead of a cerbogx from Victron to run it, but those are really hard to find right now. I also have Victron BMV712 as the main system shunt right now since I haven't yet finished setting up direct monitoring of both batteries.
 
For what its worth, I have a C application running on a rabbit 2000 based single board controller that interfaces to the EG4 battery BMS via RS485 and to the EG4-6500ex inverter via RS232. From there, the battery and inverter data is served via a modbus/tcp interface. The code that does the protocol work is available to whoever might want it, just message me and I'll be happy to send it to you!
 
For what its worth, I have a C application running on a rabbit 2000 based single board controller that interfaces to the EG4 battery BMS via RS485 and to the EG4-6500ex inverter via RS232. From there, the battery and inverter data is served via a modbus/tcp interface. The code that does the protocol work is available to whoever might want it, just message me and I'll be happy to send it to you!
Sure, can you send it to me? Would like to see if someone has figured out how to generate and check the checksum instead of hard coding because I want to be able to support multiple packs.
 
No problem, will take me a while (have no internet access right now). I do hard code the checksum though. Two other EEs and I have been hacking at the checksum for a couple of weeks to no avail! Email address?
 
BTW, the code supports up to 16 batteries. I use 12. Also, the XMODEM crc algorithm works fine for the inverter comms.
 
Thanks, this was immensely helpful. The battery pack ID 0 (not sure if valid) might be wrong. I got this from another source.

if batNumber == 0:
command += b'\x00\x01\x00\xFC'
 
I have 1x EG4-LL 12v 400Ah VERSION 1 batteries and 1x EG4-LL 12V 400 Ah VERSION 2 battery that is used as the RS485 master to the other three and allows for connectivity to my Victron Cerbo GX to communicate battery stats. The thing is..... i would like to monitor and data log the health of the batteries separately. I have monitored the RS485 data between the batteries but am not able to decode the commands and responses. Has anyone looked at this before? (e.g. what is being communicated between the RS485 master battery and all the slave batteries?) Anyone know how to decode it?
For reference I have attached some of the monitored data stream and attached it. Log Columns are: #, Time(ms), COM/NET, Length, ASCII, HEX
 

Attachments

  • log.txt
    147.4 KB · Views: 2
Back
Top