Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed Jul 2, 2024
1 parent af773cc commit 6f073c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion etc/dbus-serialbattery/bms/eg4_ll.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def __init__(self, port, baud, address):
command_get_stats = b"\x01\x03\x00\x00\x00\x27\x05\xD0" # Pulled from PC Client
command_get_config = b"\x01\x03\x00\x2D\x00\x5B\x94\x38" # Pulled from PC Client

def unique_identifier(self) -> str:
return self.serial_number

def test_connection(self):
# call a function that will connect to the battery, send a command and retrieve the result.
# The result or call should be unique to this BMS. Battery name or version, etc.
Expand Down Expand Up @@ -158,7 +161,7 @@ def read_gen_data(self):
self.version = (self.BATTERYTYPE + " ver ( " + str(result[0:29]), "utf-8" + ")")
self.custom_field = result[2:27].decode("utf-8")
self.hardware_version = result[27:33].decode("utf-8")
self.unique_identifier = result[33:49].decode("utf-8")
self.serial_number = result[33:49].decode("utf-8")

return True

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 @@ -37,7 +37,7 @@ def _get_list_from_config(


# Constants
DRIVER_VERSION = "1.4.20240629dev"
DRIVER_VERSION = "1.4.20240702dev"
zero_char = chr(48)
degree_sign = "\N{DEGREE SIGN}"

Expand Down

0 comments on commit 6f073c8

Please sign in to comment.