Skip to content

Issues with US5000 battery #11

@lslrt

Description

@lslrt

Hi,

I'm using this module (pylontech==0.1.3) with my US5000 battery, I have a single battery connected.
I've noticed two bugs:

  1. When initializing I must set manualBattcoutLimit to 1 otherwise, I've got 3 times " Pylontech RX exception ()" then it fails to create the object when I initialize with the example given in the README.md file : PylontechStack("/dev/ttyUSB0",baud=115200,manualBattcountLimit=5)
  2. SystemParameter seems to be wrongly decoded:
  'SystemParameter': {'ADR': 2,
                     'ChargeLowerLimitCurrent': 1817.9,
                     'ChargeLowerLimitTemperature': -195.3,
                     'ChargeUpperLimitTemperature': -681.4,
                     'DischargeLowerLimitCurrent': 1842.8,
                     'DischargeLowerLimitTemperature': -195.3,
                     'DischargeUpperLimitTemperature': -476.6,
                     'ID': 70,
                     'LENGTH': 50,
                     'LowerLimitOfTotalVoltage': 61.619,
                     'PAYLOAD': b'100E420BEA0AF00D030A4703E8D2F0B3B0A7F80D030A'
                                b'47FC18',
                     'RTN': 0,
                     'UnderVoltageOfTotalVoltage': 45.223,
                     'UnitCellHighVoltageThreshold': -5.622,
                     'UnitCellLowVoltageThreshold': 16.907,
                     'UnitCellVoltage': 4.11,
                     'UpperLimitOfTotalVoltage': 59.602,
                     'VER': 32}}

Using another python module https://github.com/Frankkkkk/python-pylontech, the same frame seems to be more correctly decoded:

b'~20024600B032100E420BEA0AF00D030A4703E8D2F0B3B0A7F80D030A47FC18F27F\r'
Container(
 CellHighVoltageLimit=3.65
 CellLowVoltageLimit=3.05
 CellUnderVoltageLimit=2.8
 ChargeHighTemperatureLimit=60.0
 ChargeLowTemperatureLimit=-10.0
 ChargeCurrentLimit=10.0
 ModuleHighVoltageLimit=54.0
 ModuleLowVoltageLimit=46.0
 ModuleUnderVoltageLimit=43.0
 DischargeHighTemperatureLimit=60.0
 DischargeLowTemperatureLimit=-10.0
 DischargeCurrentLimit=-10.0
)

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions