Could Someone Give me Advice on Integrating a Custom Battery Management System (BMS) with OpenEMS?

Hello there,

I am new to the OpenEMS community and excited to start integrating OpenEMS into my renewable energy setup. I have a specific challenge that I hope to get some advice on from the experienced members of this forum.

I am working on a project that involves a custom-built Battery Management System (BMS) designed to optimize the performance and lifespan of our battery storage solution.

This BMS is not a standard commercial product and has unique communication protocols and data outputs. I am looking to integrate this BMS with OpenEMS; but I am unsure about the best approach to take.

Custom-built with a focus on Li-ion batteries.
Communication via CAN bus and Modbus.

Data output includes parameters like State of Charge (SoC); State of Health (SoH); voltage; current; temperature; and individual cell data.

Solar panels connected to a hybrid inverter.
Battery storage system with the custom BMS.
A Raspberry Pi running OpenEMS as the central controller.

Developing a custom driver or interface for OpenEMS to communicate with the BMS.
Ensuring real-time data synchronization and accurate state reporting.
Implementing control algorithms to optimize charging and discharging cycles based on the data provided by the BMS.

I would greatly appreciate any guidance or references to documentation that could help me get started. If anyone has experience with similar integrations or has developed custom drivers for OpenEMS; your insights would be incredibly valuable.

Also, I have gone through this post: which definitely helped me out a lot.

Additionally, any tips on debugging communication issues between OpenEMS and external hardware would also be helpful.

Thank you in advance for your assistance.

1 Like

Hi Dom5,

I am unsure on your actual questions. I assume your OpenEMS Edge configuration will eventually look similar to this: (sorry, German)

The image shows:

  • An Ess.Generic.ManagedSymmetric that logically combines a battery inverter and a battery
  • A Battery Inverter (in the image its a KACO blueplanet gridsave 92)
  • A Battery (in the image its a BYD Commercial Battery Box)
  • On the other end, there is a Grid-Meter measuring grid-buy-power and grid-sell-power
  • That information is used as an input for a Balancing-Controller, i.e. a control algorithm that tries to charge the battery on grid-feed-in and discharges the battery when otherwise buying from grid.

Communication via CAN bus and Modbus.

If you can, I would recommend to start with Modbus, because it is very well supported in OpenEMS. You can roughly follow the Implementing a Device tutorial, but instead of a Meter, implement a Battery by providing the modbus register table and mapping the registers to the required datapoints.

And of course I’d appreciate if you could publish the code of your BMS as well as the OpenEMS code. That’s the open source spirit! :slight_smile:


1 Like