Skip to content

New battery, Emus G1 BMS#1975

Closed
ErikssonPer wants to merge 27 commits intodalathegreat:mainfrom
ErikssonPer:main
Closed

New battery, Emus G1 BMS#1975
ErikssonPer wants to merge 27 commits intodalathegreat:mainfrom
ErikssonPer:main

Conversation

@ErikssonPer
Copy link
Contributor

This adds integration for Emus G1 BMS, www.emusbms.com

Emus works with the pylon integration for the basic stuff but I have made it's own so cellmonitoring and calculation of capacity from the BMS
Also so further implementation of wanted data, error handling and such doesn't interfer with the pylon integration.

It has been running for couple of days during charge and discharge on my system with Growatt SPH inverter and the emus G1 BMS installed on a 1 string 119 cell LFP diy batterypack.

@ErikssonPer ErikssonPer marked this pull request as ready for review January 19, 2026 20:28
// capacity_10mAh = Wh * 1000 / dV (because V = dV/10, and 10mAh units = Ah*100)
const uint16_t v_dV = datalayer.battery.status.voltage_dV;

uint32_t full_10mAh = (uint32_t)((uint64_t)datalayer.battery.info.total_capacity_Wh * 1000ULL / v_dV);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if v_dV would be 0, division would crash the CPU

// EMUS provides the actual series cell count in datalayer.battery.info.number_of_cells (e.g. 119).
// Use that when it is sane. Keep the hard-coded values as a fallback for integrations that do not populate
// number_of_cells (e.g. some Pylon paths set it to a placeholder value).
uint16_t total_cells = TOTAL_NUMBER_OF_CELLS;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These Growatt-HV-CAN changes look great! Could they be added in as a separate PR?

@@ -0,0 +1,267 @@
#include "EMUS-BMS.h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole EMUS-BMS seems to be 80% PYLON-BATTERY.cpp

Since we are limited on memory, we should instead use Pylon-Battery, and add the separate Emus CAN IDs there in the CAN handler.

We can also add a "250kbps ✅ " option to the Pylon battery, to gain even more compatibility with more batteries.

@ErikssonPer
Copy link
Contributor Author

Ok, keeping it compact is a good point.
Added number of cells and cellmonitoring into the pylon integration, removed the emus integration completely and added a 250/500k setting on the config page instead.
Been running it for a day now so I think it's good to go in a while.
image

@dalathegreat
Copy link
Owner

Nice work! Feel free to open a new PR, or update this one!

@ErikssonPer ErikssonPer closed this Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants