Closed
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
dalathegreat
requested changes
Jan 23, 2026
| // 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); |
Owner
There was a problem hiding this comment.
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; |
Owner
There was a problem hiding this comment.
These Growatt-HV-CAN changes look great! Could they be added in as a separate PR?
| @@ -0,0 +1,267 @@ | |||
| #include "EMUS-BMS.h" | |||
Owner
There was a problem hiding this comment.
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.
Contributor
Author
Owner
|
Nice work! Feel free to open a new PR, or update this one! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.