Skip to content

Commit

Permalink
Many improvements (#620)
Browse files Browse the repository at this point in the history
* added balancing switch status

* added balancing switch status

* changed default config file
- added missing descriptions
- changed name

* indentation was wrong

* adding fix for Venus OS >= v3.00~14 QML files

* added cell balancing status for JKBMS

* changed ConsumedAmpHours
should be None instead of 0, if not available

* TimeToSoc fixes
- Added: Show TimeToSoc only, if enabled
- Changed: description in config file
- Changed: default value TIME_TO_SOC_VALUE_TYPE = 1

* resorted functions

* fix CPU overload
- changed: how often Time-To-Soc is calculated in seconds

* fix Time-to-Go and Time-to-SoC
- changed: Time-To-Go has to be always a positive int
since it's used from dbus-systemcalc-py
- changed: how Time-to-SoC is string is generated and displayed
(format like Time-To-Go)

* small fixes

* Show MOSFET temperature from JKBMS
Pull request from @baphomett
#440

* bump version to 1.0.0
respecting semantic versioning

* added uninstall script and fixed reinstall
- `/data/conf/serial-starter.d` was not recreated if deleted

* small fixes
- added description in utils.py
- change qml files in destination not source

* typo

* fixed cell balancing color for cells 13-24

* updated description in default config file

* Updated logging to get relevant informations

* clearer config file

* make config file clearer

* fix #421
- #421

* missing removals

* corrected typo, added missing +x in release.yml

* added info for new issue

* fix black lint errors

* optimize installation scripts

* added script to install directly from repository

* fixed serial-starter.d
#520

* smaller fixes

* fix #351

* fix System Switch in IO page

* fix #239
by @TimGFoley

* fix black lint errors

* run code analyse only on code change

* fix #311

* Separate Time-To-Go and Time-To-SoC activation

* remove duplicated and incorrect log message on handle_changed_setting

* properly log max battery currents on startup

* optimize uninstall script

* fix typo in log_settings

* add charge mode display

* Added: Temp name for sensor 1 & 2
Added the possibility to give a name to temperature sensor 1 & 2
This allows to see which sensor is low and high

* Added: Choose how battery temperature is assembled

* fix black lint errors

* Added/Changed alarms for JKBMS
* Added: HighInternalTemperature alarm for JKBMS
* Changed: Temperature alarm to not trigger all in the same condition

* Removed Alarms/HighCellVoltage
It does not exist on the dbus

* Changed: Moved charge mode
from IO page to Paramaters page

* Merge branch 'master' into master

* Added: Show (dis)charge current limitation reason

* Added changelog

* corrected file permissions

* Update readme

* Small word case changes

* fix dbus-daemon memory leak

`poll_battery` is already called from the dbus mainloop in a separate thread. Opening a new thread here (and especially never closing it) will accumulate threads and leads to problems like `dbus-daemon` memory usage increasing over time, leading to eventual reboot
by @seidler2547

* Added: Show specific TimeToSoC points in GUI
Only if 0%, 10%, 20%, 80%, 90% and/or 100% are selected

* fix black lint error

* removed wildcard import, fixed black lint errors

* removed wildcard import, fixed black lint errors

* remove old log message in handle_changed_setting()

* simplified condition for Time-To-Go/Soc

* fix renogy import

* added BMS info and cleanup
* MNB
* Revov
* Sinowealth

* moved BMS to subfolder

* Added self.unique_identifier to the battery class
Used to identify a BMS when multiple BMS are connected
planned for future use

* fix small errors

* added linear voltage recalculation interval
In the config file can now be defined how often CVL, CCL and DCL is recalculated

* revert Daly adaption

* replaced penalty voltage calculation
with automatically calculated penalty voltages to simplify config
max voltage is kept until batteries are balanced

* flake config change

* updated changelog

* disabled ANT BMS by default
#479

* fix typo

* fixed wrong variable assignment
`str` instead of `int`

* updated battery template

* updated nightly script

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* updated release workflow

* updated readme

* deploy to github pages only
on changes in master or docusaurus branch

* cleanup

* GitHub pages config change

* Renamed scripts for better reading #532

* update docusaurus dependencies

* limitation reason cleanup

* changed default config settings
FLOAT_CELL_VOLTAGE from 3.350V to 3.375V
LINEAR_LIMITATION_ENABLE from False to True

* small typo fixes

* updated changelog

* fix disconnection behaviour & small fixes
* on disconnect, show '---' after 10s and 'not connected' after 60s by @transistorgit
* small fixes in shell script
* added restart driver script

* fixed file permission

* Added: apply max voltage if CVCM_ENABLE is False
before float voltage was applied

* Added: BMS disconnect behaviour
* Choose to block charge/discharge on disconnect
* Trigger Venus OS alarm

* Changed: Remove wildcard import from dbushelper.py

* Added: Show additional data in device page
* show self.unique_identifier as serial number
* show self.production as device name

* Added: JKBMS unique identifier & fixed data length

* move config.ini before update

* read production date by @tranistorgit
this adds the battery production date

* Changed: Merged all install files into one

* updated install docs for nightly build

* changed config backup

* changed release workflow

* changed release workflow

* changed release workflow

* optimized USB install method

* Daly improvements
* Set SoC on button press by @transistorgit
* Improved driver stability by @transistorgit & @mr-manuel

* moved production date and added custom field

---------

Co-authored-by: Daniel Hillenbrand <[email protected]>
  • Loading branch information
mr-manuel and codeworkx authored May 8, 2023
1 parent 2184aa6 commit 25e6fd4
Show file tree
Hide file tree
Showing 20 changed files with 710 additions and 192 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Pre-release

on:
push:
tags:
# only match pre release
# matches:
# v1.0.0alpha20230507
# v1.0.0-beta20230507
# v1.0.0-development-20230507
- "v*.*.[0-9]+-?[a-zA-Z]*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: build release archive
run: |
find . -type f -name "*.py" -exec chmod +x {} \;
find . -type f -name "*.sh" -exec chmod +x {} \;
find . -type f -name "run" -exec chmod +x {} \;
tar -czvf venus-data.tar.gz \
--mode='a+rwX' \
--exclude __pycache__ \
--exclude bms/battery_template.py \
--exclude bms/revov.py \
--exclude bms/test_max17853.py \
etc/dbus-serialbattery/ \
rc/
- name: Release
uses: softprops/action-gh-release@v1
with:
files: venus-data.tar.gz
prerelease: true
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ name: Release
on:
push:
tags:
- "v*.*.*"
# do not match pre release
# matches:
# v1.0.0
# v1.0.123
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
build:
Expand All @@ -23,7 +27,8 @@ jobs:
--exclude bms/battery_template.py \
--exclude bms/revov.py \
--exclude bms/test_max17853.py \
etc/dbus-serialbattery/
etc/dbus-serialbattery/ \
rc/
- name: Release
uses: softprops/action-gh-release@v1
Expand Down
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,22 @@
* Added: Create empty `config.ini` for easier user usage by @mr-manuel
* Added: Daly BMS - Read capacity https://github.com/Louisvdw/dbus-serialbattery/pull/594 by @transistorgit
* Added: Daly BMS - Read production date and build unique identifier by @transistorgit
* Added: Daly BMS - Set SoC by @transistorgit
* Added: Daly BMS - Show "battery code" field that can be set in the Daly app by @transistorgit
* Added: Device name field (found in the GUI -> SerialBattery -> Device), that show a custom string that can be set in some BMS, if available by @mr-manuel
* Added: Driver uninstall script by @mr-manuel
* Added: Fix for Venus OS >= v3.00~14 showing unused items https://github.com/Louisvdw/dbus-serialbattery/issues/469 by @mr-manuel
* Added: HighInternalTemperature alarm (MOSFET) for JKBMS by @mr-manuel
* Added: Improved maintainability (flake8, black lint), introduced code checks and automate release build https://github.com/Louisvdw/dbus-serialbattery/pull/386 by @ppuetsch
* Added: JKBMS - MOS temperature https://github.com/Louisvdw/dbus-serialbattery/pull/440 by @baphomett
* Added: JKBMS - Uniqie identifier and show "User Private Data" field that can be set in the JKBMS App to identify the BMS in a multi battery environment by @mr-manuel
* Added: Possibility to add `config.ini` to the root of a USB flash drive on install via the USB method by @mr-manuel
* Added: Post install notes by @mr-manuel
* Added: Read charge/discharge limits from JKBMS by @mr-manuel
* Added: Recalculation interval in linear mode for CVL, CCL and DCL by @mr-manuel
* Added: Reset values to None, if battery goes offline (not reachable for 10s). Fixes https://github.com/Louisvdw/dbus-serialbattery/issues/193 https://github.com/Louisvdw/dbus-serialbattery/issues/64 by @transistorgit
* Added: Script to install directly from repository by @mr-manuel
* Added: Serial number field (found in the GUI -> SerialBattery -> Device), that show the serial number or a unique identifier for the BMS, if available by @mr-manuel
* Added: Show charge mode (absorption, bulk, ...) in Parameters page by @mr-manuel
* Added: Show charge/discharge limitation reason by @mr-manuel
* Added: Show MOSFET temperature for JKBMS https://github.com/Louisvdw/dbus-serialbattery/pull/440 by @baphomett
Expand All @@ -39,7 +45,8 @@
* Changed: `reinstall-local.sh` to recreate `/data/conf/serial-starter.d`, if deleted by `disable.sh` --> to check if the file `conf/serial-starter.d` could now be removed from the repository by @mr-manuel
* Changed: Added QML to `restore-gui.sh` by @mr-manuel
* Changed: Bash output by @mr-manuel
* Changed: Default config file by @mr-manuel
* Changed: Daly BMS - Improved driver stability by @transistorgit & @mr-manuel
* Changed: Default config file by @ppuetsch
* Added missing descriptions to make it much clearer to understand by @mr-manuel
* Changed name from `default_config.ini` to `config.default.ini` https://github.com/Louisvdw/dbus-serialbattery/pull/412#issuecomment-1434287942 by @mr-manuel
* Changed TimeToSoc default value `TIME_TO_SOC_VALUE_TYPE` from `Both seconds and time string "<seconds> [<days>d <hours>h <minutes>m <seconds>s]"` to `1 Seconds` by @mr-manuel
Expand All @@ -57,11 +64,13 @@
* Changed: Fixed black lint errors by @mr-manuel
* Changed: Fixed cell balancing background for cells 17-24 by @mr-manuel
* Changed: Fixed Time-To-Go is not working, if `TIME_TO_SOC_VALUE_TYPE` is set to other than `1` https://github.com/Louisvdw/dbus-serialbattery/pull/424#issuecomment-1440511018 by @mr-manuel
* Changed: Improved install workflow via USB flash drive by @mr-manuel
* Changed: Improved JBD BMS soc calculation https://github.com/Louisvdw/dbus-serialbattery/pull/439 by @aaronreek
* Changed: Logging to get relevant data by @mr-manuel
* Changed: Many code improvements https://github.com/Louisvdw/dbus-serialbattery/pull/393 by @ppuetsch
* Changed: Moved BMS scripts to subfolder by @mr-manuel
* Changed: Removed cell voltage penalty. Replaced by automatic voltage calculation. Max voltage is kept until cells are balanced and reset when cells are inbalanced by @mr-manuel
* Changed: Removed all wildcard imports and fixed black lint errors by @mr-manuel
* Changed: Removed cell voltage penalty. Replaced by automatic voltage calculation. Max voltage is kept until cells are balanced and reset when cells are inbalanced by @mr-manuel
* Changed: Renamed scripts for better reading #532 by @mr-manuel
* Changed: Reworked and optimized installation scripts by @mr-manuel
* Changed: Separate Time-To-Go and Time-To-SoC activation by @mr-manuel
Expand Down
21 changes: 21 additions & 0 deletions docs/docs/faq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ See [this page](../general/install#how-to-change-the-default-limits).

See the Victron Energy documentation how to get [root access](https://www.victronenergy.com/live/ccgx:root_access#root_access).


## How to aggregate multiple batteries?

You need an additional driver for that. Here are a few listed:


### [BatteryAggregator](https://github.com/pulquero/BatteryAggregator) by [pulquero](https://github.com/pulquero)

Automatically merges connected batteries. Additional configuration for excluded batteries, total capacity and custom merging possible.

Can be installed through the [SetupHelper](https://github.com/kwindrem/SetupHelper) of [kwindrem](https://github.com/kwindrem).

### [dbus-aggregate-batteries](https://github.com/Dr-Gigavolt/dbus-aggregate-batteries) by [Dr-Gigavolt](https://github.com/Dr-Gigavolt)

Automatically merges connected batteries. Takes consideration of SmartShunt, Multies, Quattros, SmartSolars, BlueSolars and MPPT for current calculation. Additional configuration possible.

### [venus-os_dbus-mqtt-battery](https://github.com/mr-manuel/venus-os_dbus-mqtt-battery) by [mr-manuel](https://github.com/mr-manuel)

Virtual battery that has to be fed over MQTT in case you want to merge your data how you'd like. Venus OS Large with Node-RED recommended.


## Why do I need a BMS for lithium batteries?
Lithuim cells are great at storing energy, but they can be dangerous. An overcharged cell can cause a fire. A Battery Management System (BMS) first priority is to protect the cells in your battery from any potential hazards.

Expand Down
37 changes: 27 additions & 10 deletions docs/docs/general/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ In [VRM](https://vrm.victronenergy.com/) look under the device list for your ins
1. Download and copy the [latest release](https://github.com/Louisvdw/dbus-serialbattery/releases) `venus-data.tar.gz` to the root of a USB flash drive that is in FAT32 format (a SD card is also an option for GX devices, but not for Raspberry Pi).

2. Plug the flash drive/SD into the Venus device and reboot. It will automatically extract and install to the correct locations and try the driver on any connected devices.
2. OPTIONAL (`>= v1.0.0`): Create a `config.ini` file in the root of your USB flash drive with your custom settings. Put `[DEFAULT]` in the first line of the file and add all the values you want to change below. You only have to insert the values you want to change, all other values are fetched from the `config.default.ini`. In the [`config.default.ini`](https://github.com/Louisvdw/dbus-serialbattery/blob/jkbms_ble/etc/dbus-serialbattery/config.default.ini) you find all possible settings that you can copy over and change.

3. Reboot the GX (in the Remote Console go to `Settings` &rarr; `General` &rarr; `Reboot?`).
> If you put a `config.ini` in the root of the USB flash drive, then an existing `config.ini` will be overwritten.
3. Plug the flash drive/SD into the Venus device and reboot. It will automatically extract and install to the correct locations and try the driver on any connected devices.

4. Reboot the GX (in the Remote Console go to `Settings` &rarr; `General` &rarr; `Reboot?`).


### Install over SSH
Expand All @@ -74,9 +78,9 @@ In [VRM](https://vrm.victronenergy.com/) look under the device list for your ins
2. Run these commands to install or update to the latest release version.

```bash
wget -O /tmp/install-release.sh https://raw.githubusercontent.com/Louisvdw/dbus-serialbattery/master/etc/dbus-serialbattery/install-release.sh
wget -O /tmp/install.sh https://raw.githubusercontent.com/Louisvdw/dbus-serialbattery/master/etc/dbus-serialbattery/install.sh

bash /tmp/install-release.sh
bash /tmp/install.sh

reboot
```
Expand Down Expand Up @@ -110,10 +114,10 @@ In [VRM](https://vrm.victronenergy.com/) look under the device list for your ins
> This version is installed directly from the repository and can contain errors. Not recommended for production environments unless you know what you do.
```bash
wget -O /tmp/install-nightly.sh https://raw.githubusercontent.com/Louisvdw/dbus-serialbattery/jkbms_ble/etc/dbus-serialbattery/install-nightly.sh && bash /tmp/install-nightly.sh
wget -O /tmp/install.sh https://raw.githubusercontent.com/Louisvdw/dbus-serialbattery/jkbms_ble/etc/dbus-serialbattery/install.sh && bash /tmp/install.sh
```

Select `2` for `jkbms_ble`.
Select `2` for `nightly build` and then select the branch you want to install from.

### BMS specific settings

Expand Down Expand Up @@ -218,13 +222,15 @@ bash /data/etc/dbus-serialbattery/reinstall-local.sh

## Uninstall/remove the driver

To uninstall/remove the driver run the uninstall script. The script is included from driver version `> v0.14.3`.
To uninstall the driver run the uninstall script. The script is included from driver version `>= v1.0.0`.

```bash
bash /data/etc/dbus-serialbattery/uninstall.sh
```

To uninstall/remove previous driver versions `<= v0.14.3` run this commands.
To uninstall previous driver versions `<= v0.14.3` run this commands:

**Uninstall**

```bash
# handle read only mounts
Expand All @@ -239,8 +245,19 @@ rm -rf /opt/victronenergy/dbus-serialbattery
# kill driver, if running
pkill -f "python .*/dbus-serialbattery.py"

# remove install-script from rc.local
sed -i "/sh \/data\/etc\/dbus-serialbattery\/reinstall-local.sh/d" /data/rc.local
# remove install script from rc.local
sed -i "/sh \/data\/etc\/dbus-serialbattery\/reinstalllocal.sh/d" /data/rc.local

# restore GUI changes
bash /data/etc/dbus-serialbattery/restore-gui.sh
```

> If after the uninstall for some reason several items in the GUI were red, DO NOT reboot your GX device. See [Uninstalling driver bricked my cerbo #576](https://github.com/Louisvdw/dbus-serialbattery/issues/576)
**Remove**

If you want to remove also the install files of the driver run this after you run the uninstall script/commands:

```bash
rm -rf /data/etc/dbus-serialbattery
```
42 changes: 21 additions & 21 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2064,9 +2064,9 @@
integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==

"@types/node@*":
version "18.16.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.3.tgz#6bda7819aae6ea0b386ebc5b24bdf602f1b42b01"
integrity sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q==
version "20.1.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.1.0.tgz#258805edc37c327cf706e64c6957f241ca4c4c20"
integrity sha512-O+z53uwx64xY7D6roOi4+jApDGFg0qn6WHcxe5QeqjMaTezBO/mxdfFXIVAVVyNWKx84OmPB3L8kbVYOTeN34A==

"@types/node@^17.0.5":
version "17.0.45"
Expand Down Expand Up @@ -2125,9 +2125,9 @@
"@types/react" "*"

"@types/react@*":
version "18.2.0"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.0.tgz#15cda145354accfc09a18d2f2305f9fc099ada21"
integrity sha512-0FLj93y5USLHdnhIhABk83rm8XEGA7kH3cr+YUlvxoUGp1xNt/DINUMvqPxLyOQMzLmZe8i4RTHbvb8MC7NmrA==
version "18.2.5"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.5.tgz#f9403e1113b12b53f7edcdd9a900c10dd4b49a59"
integrity sha512-RuoMedzJ5AOh23Dvws13LU9jpZHIc/k90AgmK7CecAYeWmSr3553L4u5rk4sWAPBuQosfT7HmTfG4Rg5o4nGEA==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
Expand Down Expand Up @@ -2411,9 +2411,9 @@ ajv@^8.0.0, ajv@^8.9.0:
uri-js "^4.2.2"

algoliasearch-helper@^3.10.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.12.0.tgz#0fe39d49b0290e4aa5e1fe733bd24d857d258e94"
integrity sha512-/j1U3PEwdan0n6P/QqSnSpNSLC5+cEMvyljd5CnmNmUjDlGrys+vFEOwjVEnqELIiAGMHEA/Nl3CiKVFBUYqyQ==
version "3.13.0"
resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.13.0.tgz#1ccca7056fd27c2b0b5c92dd5c0abf4314bec3b8"
integrity sha512-kV3c1jMQCvkARtGsSDvAwuht4PAMSsQILqPiH4WFiARoa3jXJ/r1TQoBWAjWyWF48rsNYCv7kzxgB4LTxrvvuw==
dependencies:
"@algolia/events" "^4.0.1"

Expand Down Expand Up @@ -2789,9 +2789,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464:
version "1.0.30001482"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001482.tgz#8b3fad73dc35b2674a5c96df2d4f9f1c561435de"
integrity sha512-F1ZInsg53cegyjroxLNW9DmrEQ1SuGRTO1QlpA0o2/6OpQ0gFeDRoq1yFmnr8Sakn9qwwt9DmbxHB6w167OSuQ==
version "1.0.30001485"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001485.tgz#026bb7319f1e483391872dc303a973d4f513f619"
integrity sha512-8aUpZ7sjhlOyiNsg+pgcrTTPUXKh+rg544QYHSvQErljVEKJzvkYkCR/hUFeeVoEfTToUtY9cUKNRC7+c45YkA==

ccount@^1.0.0:
version "1.1.0"
Expand Down Expand Up @@ -3556,9 +3556,9 @@ [email protected]:
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==

electron-to-chromium@^1.4.284:
version "1.4.380"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.380.tgz#195dc59d930c6b74efbee6f0e6a267ce4af5ed91"
integrity sha512-XKGdI4pWM78eLH2cbXJHiBnWUwFSzZM7XujsB6stDiGu9AeSqziedP6amNLpJzE3i0rLTcfAwdCTs5ecP5yeSg==
version "1.4.385"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.385.tgz#1afd8d6280d510145148777b899ff481c65531ff"
integrity sha512-L9zlje9bIw0h+CwPQumiuVlfMcV4boxRjFIWDcLfFqTZNbkwOExBzfmswytHawObQX4OUhtNv8gIiB21kOurIg==

emoji-regex@^8.0.0:
version "8.0.0"
Expand Down Expand Up @@ -6801,9 +6801,9 @@ [email protected]:
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

std-env@^3.0.1:
version "3.3.2"
resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.3.2.tgz#af27343b001616015534292178327b202b9ee955"
integrity sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==
version "3.3.3"
resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.3.3.tgz#a54f06eb245fdcfef53d56f3c0251f1d5c3d01fe"
integrity sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==

string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2:
version "4.2.3"
Expand Down Expand Up @@ -7451,9 +7451,9 @@ webpack-sources@^3.2.2, webpack-sources@^3.2.3:
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==

webpack@^5.73.0:
version "5.81.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.81.0.tgz#27a2e8466c8b4820d800a8d90f06ef98294f9956"
integrity sha512-AAjaJ9S4hYCVODKLQTgG5p5e11hiMawBwV2v8MYLE0C/6UAGLuAF4n1qa9GOwdxnicaP+5k6M5HrLmD4+gIB8Q==
version "5.82.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.82.0.tgz#3c0d074dec79401db026b4ba0fb23d6333f88e7d"
integrity sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg==
dependencies:
"@types/eslint-scope" "^3.7.3"
"@types/estree" "^1.0.0"
Expand Down
9 changes: 9 additions & 0 deletions etc/dbus-serialbattery/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,17 @@ def __init__(self, port, baud, address):
# max battery charge/discharge current
self.max_battery_charge_current = None
self.max_battery_discharge_current = None
self.has_settings = 0

self.init_values()

# used to identify a BMS when multiple BMS are connected - planned for future use
self.unique_identifier = None

# fetched from the BMS from a field where the user can input a custom string
# only if available
self.custom_field = None

def init_values(self):
self.voltage = None
self.current = None
Expand Down Expand Up @@ -919,3 +924,7 @@ def log_settings(self) -> None:
logger.info(f"Serial Number/Unique Identifier: {self.unique_identifier}")

return

def reset_soc_callback(self, path, value):
# callback for handling reset soc request
return
Loading

0 comments on commit 25e6fd4

Please sign in to comment.