diy solar

diy solar

EG4 6000XP - reading SoH via modbus

Ambrotos

New Member
Joined
Feb 7, 2024
Messages
15
Location
Canada
I've been referring to the EG4 Modbus protocol spec (provided by EG4 here) and successfully polling my inverter for the usual suspects (inverter state, battery voltage, PV power in, load power out, bus current, etc.) directly via a DIY modbus controller I'm working on. The one thing I haven't been able to pull is the battery state of health.

As per the spec, both State of Charge (I believe that's a typo in the document, "capacity" is register 97!), and State of Health are input register address 5. I'm not sure how to interpret that. This isn't a register with multiple states mapped to individual bits where you can apply a bitmask to extract the information you want, since elsewhere they clearly spell out which bits map to which values. A good example of this is register 71 where bits 0-3 indicate AutoTestStart, and so on. Address 5 is the only register in the doc that's overloaded like this. I've tried querying both U_INT16 and U_INT32 values from it, and I've tried applying high- and low- WORD and DWORD masks to the return value. The only result I can extract is 42, which is the correct value for my battery's current State of Charge.

Has anyone had any success pulling the battery State of Health from the inverter?

Cheers,

-A

N.B. - since the inverter aggregates all of the batteries' status information into one representation, I'm making the assumption here that battery SoH would represent the worst value reported by any of the attached batteries' BMSs.
 
implemented eg4 6000xp protcol in this, but never tested cause i dont have one :p

this bit is where i process the values, from mutiple or individual registries to create WORDS ect...

oof, i have a typo in comments, the default type is USHORT

might give some answers...
 
Very interesting! Looking at your register map (here) made me realize that while I did try bitmasking on the WORD and D_WORD boundaries, one thing I didn't try was handling the high/low BYTES of the register as individual value. In retrospect, I'm not sure why that didn't occur to me ;) I'm going to give this a try once I'm home and have access to my inverter again.

Thanks for sharing. This might be the clue I needed.

-A
 
Very interesting! Looking at your register map (here) made me realize that while I did try bitmasking on the WORD and D_WORD boundaries, one thing I didn't try was handling the high/low BYTES of the register as individual value. In retrospect, I'm not sure why that didn't occur to me ;) I'm going to give this a try once I'm home and have access to my inverter again.

Thanks for sharing. This might be the clue I needed.

-A
Let us know if that works!
 
Let us know if that works!
Sorry, I suppose I should have updated this thread. No, unfortunately I'm still not able to poll SoH. I did check the high byte of the 16-bit return response from register 5, and it's always 0.

There aren't any other references to SoH or Health in the modbus protocol doc, and all of the references I've found online seem to be based on the project hotnoob linked above. In other words, based on the manufacturer's doc but untested.

I haven't had a lot of time to play this month, but I hope to get back to it shortly. I'll update this thread if I have any luck.

-A
 
Last edited:
Back
Top