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

Fixes #595

Merged
merged 3 commits into from
Apr 29, 2023
Merged

Fixes #595

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Added: Config file by @ppuetsch
* Added: Create empty `config.ini` for easier user usage by @mr-manuel
* Added: Cronjob to restart Bluetooth service every 12 hours by @mr-manuel
* Added: Daly BMS read capacity https://github.com/Louisvdw/dbus-serialbattery/pull/594 by transistorgit
* 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
Expand Down Expand Up @@ -41,6 +42,7 @@
* 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
* Changed TimeToSoc description by @mr-manuel
* Changed value positions, added groups and much clearer descriptions by @mr-manuel
* Changed: Disabled ANT BMS by default https://github.com/Louisvdw/dbus-serialbattery/issues/479 by @mr-manuel
* Changed: Fix for https://github.com/Louisvdw/dbus-serialbattery/issues/239 by @mr-manuel
* Changed: Fix for https://github.com/Louisvdw/dbus-serialbattery/issues/311 by @mr-manuel
* Changed: Fix for https://github.com/Louisvdw/dbus-serialbattery/issues/351 by @mr-manuel
Expand Down
5 changes: 4 additions & 1 deletion etc/dbus-serialbattery/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# dbus-serialbattery
See [README on GitHub](https://github.com/Louisvdw/dbus-serialbattery/blob/master/README.md)

* See [README](https://github.com/Louisvdw/dbus-serialbattery/blob/master/README.md) on GitHub

* See [Documentation](https://louisvdw.github.io/dbus-serialbattery/) on GitHub Pages
4 changes: 4 additions & 0 deletions etc/dbus-serialbattery/bms/ant.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# -*- coding: utf-8 -*-

# disable ANT BMS by default as it causes other issues but can be enabled manually
# https://github.com/Louisvdw/dbus-serialbattery/issues/479

from battery import Battery
from utils import read_serial_data, logger
import utils
Expand Down
5 changes: 1 addition & 4 deletions etc/dbus-serialbattery/bms/daly.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,7 @@ def read_capacity(self, ser):
logger.warning("read_capacity")
return False

(
capacity,
cell_volt
) = unpack_from(">LL", capa_data)
(capacity, cell_volt) = unpack_from(">LL", capa_data)
self.capacity = capacity / 1000
return True

Expand Down
2 changes: 1 addition & 1 deletion etc/dbus-serialbattery/bms/sinowealth.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# remove Sinowealth by default as it causes other issues but can be enabled manually
# disable Sinowealth by default as it causes other issues but can be enabled manually
# https://github.com/Louisvdw/dbus-serialbattery/commit/7aab4c850a5c8d9c205efefc155fe62bb527da8e

from battery import Battery, Cell
Expand Down
4 changes: 2 additions & 2 deletions etc/dbus-serialbattery/dbus-serialbattery.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from battery import Battery

# import battery classes
from bms.ant import Ant
from bms.daly import Daly
from bms.ecs import Ecs
from bms.hlpdatabms4s import HLPdataBMS4S
Expand All @@ -32,11 +31,11 @@
from bms.renogy import Renogy
from bms.seplos import Seplos

# from bms.ant import Ant
# from bms.mnb import MNB
# from bms.sinowealth import Sinowealth

supported_bms_types = [
{"bms": Ant, "baud": 19200},
{"bms": Daly, "baud": 9600, "address": b"\x40"},
{"bms": Daly, "baud": 9600, "address": b"\x80"},
{"bms": Ecs, "baud": 19200},
Expand All @@ -47,6 +46,7 @@
{"bms": Renogy, "baud": 9600, "address": b"\x30"},
{"bms": Renogy, "baud": 9600, "address": b"\xF7"},
{"bms": Seplos, "baud": 19200},
# {"bms": Ant, "baud": 19200},
# {"bms": MNB, "baud": 9600},
# {"bms": Sinowealth},
]
Expand Down
2 changes: 1 addition & 1 deletion etc/dbus-serialbattery/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _get_list_from_config(

# Constants - Need to dynamically get them in future
DRIVER_VERSION = "1.0"
DRIVER_SUBVERSION = ".0-jkbms_ble (20230428)"
DRIVER_SUBVERSION = ".0-jkbms_ble (20230429)"
zero_char = chr(48)
degree_sign = "\N{DEGREE SIGN}"

Expand Down