Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
* Removed: ANT BMS was commented out, sice it connects to every serial device attached Louisvdw#479
  • Loading branch information
mr-manuel authored Apr 29, 2023
2 parents b113bff + ec04969 commit ae1e447
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
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

0 comments on commit ae1e447

Please sign in to comment.