Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cell voltages and TimeToSoC items on dbus #90

Merged
merged 5 commits into from
Feb 6, 2022
Merged

Add support for cell voltages and TimeToSoC items on dbus #90

merged 5 commits into from
Feb 6, 2022

Conversation

CaptKrisp
Copy link
Contributor

@CaptKrisp CaptKrisp commented Feb 6, 2022

-battery.py
Help prevent terminating when BMS doesn't return valid SoC data.

  • utils.py
    Add config variable: BATTERY_CAPACITY
    -dbushelper.py
    Add support for individual cell voltages.
    Add support for TimeToSoC for 5% SoC.
    All times will be positive regardless of whether charge/discharge.
    When charging and SoC is >= to a SoC percentage that percentage value will be None (or "-").
    When discharging and SoC is <= to a SoC percentage that percentage value will be None (or "-").
    If not charging or discharging all TimeToSoC will be None (or "-").
    -daly.py
    Improve reliability of data read from Daly BMS
    Add cellvolt_buffer to read cell voltages and to accommodate up to 48 cells (Daly current max supported cells).
    read_soc_data attempts 3 times to read soc_data from Daly before failing. This greatly increases the read reliability of some Daly devices.
    Add function read_alarm_data for most previously defined dbus Alarms items.
    Add function read_cells_volts to read read all individual cell voltages for up to 48 cells. Tested only with 4 cell BMS.
    Add logger.warning messages to understand which dataset read failed.

…dbus

-battery.py
    Help prevent terminating when BMS doesn't return valid SoC data.
- utils.py
    Add config variable: BATTERY_CAPACITY
-dbusfelper.py
    Add support for individual cell voltages.
    Add support for TimeToSoC for 5% SoC.
        All times will be positive regardless of whether charge/discharge.
        When charging and SoC is >= to a SoC percentage that percentage value will be None (or "-").
         When discharging and SoC is <= to a SoC percentage that percentage value will be None (or "-").
        If not charging or discharging all TimeToSoC will be None (or "-").
-daly.py
    Add cellvolt_buffer to read cell voltages and to accommodate up to 48 cells (Daly current max supported cells).
    read_soc_data attempts 3 times to read soc_data from Daly before failing.  This greatly increases the read reliability of some Daly devices.
    Add function read_alarm_data for most previously defined dbus Alarms items.
    Add function read_cells_volts to read read all individual cell voltages for up to 48 cells. Tested only with 4 cell BMS.
    Add logger.warning messages to understand which dataset read failed.
Improve validity of data read in read_soc_data by ensuring current value is within acceptable range
Copy link
Owner

@Louisvdw Louisvdw left a comment

Choose a reason for hiding this comment

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

The value BATTERY_CAPACITY = 50 does not seem to be used.
Cell voltage is already included in a earlier Pull Request which I will merge with this.
Thanks for the contribution

@CaptKrisp
Copy link
Contributor Author

The value BATTERY_CAPACITY = 50 does not seem to be used.

Thanks for catching that. It is utilized in the get_settings, which I forgot to include the the repo copy. It is there now. Shall I issue another PR for the change?

@Louisvdw
Copy link
Owner

Louisvdw commented Feb 6, 2022

yes just create a new PR with the missing code and I will add it in

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