diy solar

diy solar

Is there an esphome for lifepower4

goldserve

Solar Enthusiast
Joined
Apr 26, 2022
Messages
425
My internet search is failing me but is there a way to get eg4 lifepower4 bms data into mqtt?
 
The parts are out there, not sure if there is a complete package yet though. Modbus registers are documented on EG4's website, and there is are Modbus components in esphome.
 
Bumping this thread to see if there are solutions for EG4 lifepower4 or PaceBMS used in Jakiper or SOK server rack batteries.
 
Have you looked into using Solar Assistant to connect between the 2 and be the primary broker?

I haven't used that functionality in SA, but it's being shown in the configuration dialog.
 
Personally I'm also interested in what @goldserve is asking for; I get and understand what SolarAssistant is great for, but as a supporter of OpenSource their license violating status makes them a non-starter for me.
 
I got the pace BMS reporting to MQTT through home assistant plugin using a TCP serial connection to the RS232 port. Now, I am looking for a script or something that will read the EG4 lifepower4 packs through another TCP RS485 port connection and can parse, send to Mosquitto server.
 
I got the pace BMS reporting to MQTT through home assistant plugin using a TCP serial connection to the RS232 port. Now, I am looking for a script or something that will read the EG4 lifepower4 packs through another TCP RS485 port connection and can parse, send to Mosquitto server.
Which HASS plugin?
 
@goldserve You made me look at the EG4 protocol description last night and killed my sleep. It isn't actually all that complex, but setting it up in ESPHome is beyond me. FWIW, it sounds like you would need an ESP32 rather than an ESP8266 if you went that route.

Pulling it over the serial-IP link might be marginally easier (with appropriate programming skills). What scares me most though is the debugging...
 
yes, I’ve looked at that manual but it seems that protocol is for can bus or something. It doesn’t line up with the rs485 data that is being sent and received. I’ve started modifying the Hass plugin to talk to the battery but no one has implemented the crc or checksum function. I don’t get how that is calculated. I could just ignore all of that like the victron lifepower4 plugin. Any clues?
 
That is nice work. I cannot get ESPhome to work properly in home assistant, the devices keep disappearing offline without a static IP and I'm just finding it a ginormous pain in my arse. A direct USB connection into my home assistant server would be perfect.
 
I don’t get how that is calculated.
Now I see that the document has been replaced with a more proper modbus document (same link). The calculation method was in the document I was originally reading, but not sure if I will be able to find it again.
 
It would be very good if you can find that document again because I am pulling my hair like the last person in the thread above. For now, I'm leaning towards just ignoring the CRC.
 
It would be very good if you can find that document again because I am pulling my hair like the last person in the thread above. For now, I'm leaning towards just ignoring the CRC.
This was what I was looking at before.
 

Attachments

  • EG4_LifePower4_Communication_Protocol.pdf
    366.8 KB · Views: 31
Seems like the CRC method in this doc is pretty standard for MODBUS but the serial protocol is a little different. From the thread above, the checksum bits only looks to be 1 byte and not 2-bytes. I'll try to use some ideas in the document to see if I can come up with their scheme for the RS485 serial checksum.
 
Yeah, I can't figure this one out. For example,

Function 1 - Read data 7e 01 01 00 fe 0d has a checksum of 0xFE and the sum of the numbers is 0x02
Function 67 - Read protection parameters 7e 01 43 00 fe 0d also has a checksum of 0xFE but the sum of the numbers is 0x44
 
Yeah, I can't figure this one out. For example,

Function 1 - Read data 7e 01 01 00 fe 0d has a checksum of 0xFE and the sum of the numbers is 0x02
Function 67 - Read protection parameters 7e 01 43 00 fe 0d also has a checksum of 0xFE but the sum of the numbers is 0x44
Are you doing the ASCII sums or hex sums? That is where they lost me.
 
Back
Top