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

Wrong cell voltage reading Daly BMS #397

Closed
ats-rozruch opened this issue Jan 7, 2023 · 8 comments · Fixed by #484
Closed

Wrong cell voltage reading Daly BMS #397

ats-rozruch opened this issue Jan 7, 2023 · 8 comments · Fixed by #484
Assignees

Comments

@ats-rozruch
Copy link

ats-rozruch commented Jan 7, 2023

Describe the bug
I have 12S Daly BMS and function read_cells_volts always returning from here

if cells_volts_data is False:
logger.warning("read_cells_volts")
return False

I had to change
cellvolt_buffer = b"\xA5\x40\x94\x08\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
to
cellvolt_buffer = b"\xA5\x40\x94\x08\x00\x00\x00\x00\x00\x00\x00\x00\x82"

becuse BMS doesn't want to answer to that so huge command

Second thing because cell_count is 12 maxFrame were counted wrong

        if (int(self.cell_count) % 3) == 0:
            maxFrame = (int(self.cell_count / 3))
        else:
            maxFrame = (int(self.cell_count / 3) + 1)

Third thing lenFixed should be 13 not 12 because each returned frame with cell voltage have own CRC
lenFixed = (maxFrame * 13) # 0xA5, 0x01, 0x95, 0x08 + 1 byte frame + 6 byte data + 1byte reserved

@towatai
Copy link

towatai commented Feb 5, 2023

Thanks, the "cellvolt_buffer" fixed the problem for me with no cell voltages being read out on my Daly 24V, 8S via RS485. Via UART it worked without problems.

@transistorgit
Copy link
Contributor

Thanks, I had the same problem. I have 2 Dalys, one by RS485 and one by UART. The RS485 one was not working.

  • The old size of cellvolt_buffer was meaningless, as it is a buffer for the command, that is 13 bytes always.
  • The maxframe count was no problem for me as I have 16s, but I confirm that your fix is right
  • lenFixed was also a bug, confirmed

With all these fixes, my daly with RS485 is working fine now. I use it together with AggregateBatteries and that would not work without the cell voltages.

As an explanation why the big buffer is a problem for RS485 but not for UART, I think serialbattery still sends the buffer bytes when Daly already starts to reply. With UART this is ok, because its bidirectional. But RS485 is half-duplex so the datastreams collide and the reply is unreadable.

Further, there is still another problem. After reading cell voltages, the next operation is read_soc_data and the first try always fails. So this leads to a log file flooded with warnings "ERROR:SerialBattery:>>> ERROR: No reply - returning".
This happens with both interface types.
I tried a quick fix with sleep(0.5) between calls but no success. As the read function always flushes the buffers, I don't know where the influencing is. The commands on the serial port for read_soc_data are always the same (a540900800000000000000007d), but on the first try after read_cells_volts the Dalys just don't answer anything.
Can somebody confirm this behavior? @towatai @ats-rozruch ?

@transistorgit
Copy link
Contributor

@ats-rozruch do you plan to make a pull request? if not i would do

@transistorgit
Copy link
Contributor

seems that I was able to also fix the "No reply- Returning" bug, and improved some other bugs. I will create a pull request together with your suggestions if you don't mind.

@towatai
Copy link

towatai commented Mar 8, 2023

Further, there is still another problem. After reading cell voltages, the next operation is read_soc_data and the first try always fails. So this leads to a log file flooded with warnings "ERROR:SerialBattery:>>> ERROR: No reply - returning".
This happens with both interface types.

Yeah, can Confirm This behavior!

@mr-manuel
Copy link
Collaborator

@transistorgit is this issue fixed with your PR or is still something open?

@transistorgit
Copy link
Contributor

yes, I think it's fixed. Can only test with 2 16s systems, though. Runs fine for a month now.

@mr-manuel
Copy link
Collaborator

This is fixed with the next release.

mr-manuel added a commit to mr-manuel/venus-os_dbus-serialbattery that referenced this issue Apr 27, 2023
mr-manuel added a commit that referenced this issue Apr 27, 2023
* Added: Support for HLPdata BMS4S #505
* Added: Support for Seplos BMS #530
* Changed: Fix for #397 #484
* Changed: flake8 settings
* Changed: Improved JBD BMS soc calculation #439
* Changed: Removed wildcard imports from several BMS drivers and fixed black lint errors
* Changed: Simplified condition for Time-To-Go/Soc
* Changed: Sort bms imports
* Removed: Old log message in handle_changed_setting()
Louisvdw added a commit that referenced this issue May 2, 2023
* fix daly rs485 communication for cell voltages

* fix read_serialport_data length calculation, fix daly cell voltage packet offset calculation, add checksum check also. Harden general package validity check.

* revert read_serialport_data() to the original state

* copy read_serialport_data() to daly.py

* fix missing bracket

* black reformatting

---------

Co-authored-by: transitorgit <stahlbock@gmail.com>
Co-authored-by: Louis Van Der Walt <26077665+Louisvdw@users.noreply.github.com>
Louisvdw pushed a commit that referenced this issue May 8, 2023
* changed cell imbalance thresholds

* added battery details
- added: MOS temperature
- added: Balancing switch status

* JKBMS Bluetooth - added battery details (#454)

* added battery details
- added: capacity
- added: MOS temperature
- added: charging switch status
- added: discharging switch status
- added: balancing switch status
- added: show if balancing is active and which cells are balanced
- added: cell imbalance alert

* changed cell imbalance thresholds

* added battery details
- added: MOS temperature
- added: Balancing switch status

* added support for the newer 32s systems, that have slightly different frame-structure

* added stop of scraping if detection of jkbms fails

* lint

* indentation was wrong

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

* merge with baranator:dbus-serialbattery:master

* BLE JK BMS model recognition
Pull request from @tcrichton
#462

* Small fixes
- Added: Setup cronjob when installing driver
- Added: Information how to pair JKBMS changed default pin
- Changed: Bump version to v0.15.0-ble

* Added driver restart script

* added informations to run the driver

* pasted code in wrong function

* fixed cell balancing color

* BLE JK BMS model recognition (#462)

* * Other JK BMS’ have an underscore in their vendor_id
* Don’t forget to include your new PageLynxIonIo in the build lis

* build list is removed upstream

---------

Co-authored-by: Tristan Crichton <stan@tcrichton.co.uk>

* install BLE battery as local independent service

* add disconnect before starting the service

* unique id per BLE device

* enable logging and improve error messages

* Update jkbms_ble from master

* fixes

* moved ble part to installble.sh

* added script to install directly from repository

* added QML

* create empty config.ini for easier user usage

* optimize installation scripts

* changed bash output

* added post install notes

* corrected errors

* fix black lint errors

* fix black lint errors

* fix black lint errors

* bump version

* fixed serial-starter.d
#520

* fix errors, move install notes to show always

* Update install-nightly.sh

* Update install-nightly.sh

* make use of bluetooth configurable

* remove modules with uninstall script

* fix typo

* Added install notes

* 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

* fix UnicodeDecodeError
#485 (comment)

* fix UnicodeDecodeError
#485 (comment)

* 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

* 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

* Added: Show (dis)charge current limitation reason

* added changelog

* corrected file permissions

* 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

* fix typo

* Update readme

* Remove bluetooth option from the config file
Bluetooth classes are now imported automatically, if it's a Bluetooth port

* Small word case changes

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

* fix black lint error

* Improved JBD BMS soc calculation
#439

* Fix for #397
#484

* small fixes

* sort bms imports

* Add support for HLPdata BMS4S
#505

* Add support for Seplos BMS
#530

* change flake8 settings

* fix black lint errors

* removed wildcard imports

* fixed black lint errors

* change flake8 settings

* remove wildcard import and fix black lint errors

* removed wildcard import

* fixed black lint check

* config changes

* 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

* moved BMS to subfolder

* corrected installble to run correct script

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

* changed ble service name
from `dbus-blebattery-$1` to `dbus-blebattery.$1` like the non ble service

* read installed capacity at startup

* disable ANT BMS by default
#479

* fix cell voltage header parser

* rework daly receive routine

* improve read cell voltages - only work on sufficient data, drop only the bad package on checksum error, not the complete transmission

* allow read_soc to also retry serial transmission

* add daly cell balance state info. cells are red only if unbalanced now

* bump version

* typo

* moved read_serialport_data() to daly.py

* revert read_serialport_data() to the state before my changes

* fix connection log startup message.
now voltage/current/soc are displayed correctly

* black reformatting

* flake config change

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

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

* fix black lint errors

* updated config.default.ini

* update nightly install script

* Removed line

* fixed error in HLPdataBMS4S

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

* updated battery template

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* updated battery template

* Progress with config limits reason

* updated CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT default value

* added SoC round for LLT/JBD

* fixed log typo

* reworked installation procedure
Bluetooth BMS is now also fetched from config.ini

* Merge branch 'master' into jkbms_ble

* Merge branch 'master' of into jkbms_ble

* GitHub pages config change

* cleanup

* Renamed scripts for better reading #532

* update docusaurus dependencies

* change sh with bash

* limitation reason cleanup

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

* removed testing line

* Cleanup duplicated files

Files were moved and not deleted

* Cleanup

* MOSFET temperature was displayed twice after merge

* updated changelog

* Small fixes

* fix disconnection behaviour: on disconnect, show '---' after 10s and 'not connected' after 60s

* fix flake errors

* small fix

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

* fixed type error

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

* Changed: Remove wildcard import from dbushelper.py

* small fixes

* flake8 changes

* copied lltjbd_ble from idstein:jdb_ble

* Added and adapted LltJbd_Ble
ATTENTION: Currently it's untested

* small changes

* read production date and append to hardware version

* Set SOC nightly. Button is working, next is send command to bms

* 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

* Added: JKBMS BLE unique identifier

* Added: Jkbms_Ble connection_name()

* Added: Daly unique identifier

* Added: JKBMS BLE serial number, user defined field

* read out daly battery code and use as unique id

* moved production date and added custom field

* clean battery code
strip whitespace and replace one or multiple spaces with one underline
if no battery code generate unique field

* Daly read_capacity change
Read capacity from config file, if no value provided by BMS

* Daly try to fix no reply

* Improvements by @transistorgit

* changed value

* set SOC (and date time) on button press.

* fix battery code parser

* format fix

* format fix

* fix extra long serial timeouts
by calculating max time instead of loop counts

* Small fixes

* updated config file

* updated changelog

* debug daly

* changed release workflow

* Updated from master

* fix blank screen, debug daly

* make Reset SoC a spin box

* fix possible read_capacity problem

* Daly read_balance_state() add missing return

* Daly advanced troubleshooting

* Changed: Improved Daily stability by a lot

* fixes for disable and uninstall
service was not removed and if removed, it was recreated by the serial starter

* optimized USB install method

* updated changelog

* added missing qml to restore-gui.sh

* Improved uninstall

* make executable

* ready to merge with master

---------

Co-authored-by: Eike Baran <derbaranator@gmail.com>
Co-authored-by: Eike Baran <eikebaran89@gmail.com>
Co-authored-by: Tristan Crichton <github@tcrichton.co.uk>
Co-authored-by: Tristan Crichton <stan@tcrichton.co.uk>
Co-authored-by: Stefan Seidel <lkml@stefanseidel.info>
Co-authored-by: seidler2547 <github@stefanseidel.info>
Co-authored-by: Bernd Stahlbock <stahlbock@gmail.com>
Co-authored-by: Bernd <b.stahlbock@gmx.de>
mr-manuel added a commit that referenced this issue May 18, 2023
* Added: Show specific TimeToSoC points in GUI
Only if 0%, 10%, 20%, 80%, 90% and/or 100% are selected

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

* fix black lint error

* fix black lint error

* Improved JBD BMS soc calculation
#439

* Fix for #397
#484

* small fixes

* sort bms imports

* Add support for HLPdata BMS4S
#505

* Add support for Seplos BMS
#530

* change flake8 settings

* fix black lint errors

* removed wildcard imports

* fixed black lint errors

* change flake8 settings

* remove wildcard import and fix black lint errors

* removed wildcard import

* fixed black lint check

* removed wildcard import, fixed black lint errors

* config changes

* removed wildcard import, fixed black lint errors

* remove old log message in handle_changed_setting()

* remove old log message in handle_changed_setting()

* simplified condition for Time-To-Go/Soc

* simplified condition for Time-To-Go/Soc

* fix renogy import

* fix renogy import

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

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

* moved BMS to subfolder

* moved BMS to subfolder

* moved BMS to subfolder

* corrected installble to run correct script

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

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

* changed ble service name
from `dbus-blebattery-$1` to `dbus-blebattery.$1` like the non ble service

* fix small errors

* read installed capacity at startup

* disable ANT BMS by default
#479

* fix cell voltage header parser

* rework daly receive routine

* improve read cell voltages - only work on sufficient data, drop only the bad package on checksum error, not the complete transmission

* allow read_soc to also retry serial transmission

* add daly cell balance state info. cells are red only if unbalanced now

* bump version

* typo

* moved read_serialport_data() to daly.py

* revert read_serialport_data() to the state before my changes

* fix connection log startup message.
now voltage/current/soc are displayed correctly

* black reformatting

* 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

* flake config change

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

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

* fix black lint errors

* updated changelog

* disabled ANT BMS by default
#479

* updated config.default.ini

* fix typo

* update nightly install script

* Removed line

* fixed error in HLPdataBMS4S

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

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

* updated battery template

* updated battery template

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* updated battery template

* Progress with config limits reason

* updated CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT default value

* added SoC round for LLT/JBD

* fixed log typo

* updated nightly script

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* reworked installation procedure
Bluetooth BMS is now also fetched from config.ini

* updated release workflow

* updated readme

* Merge branch 'master' into jkbms_ble

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

* cleanup

* Merge branch 'master' of into jkbms_ble

* GitHub pages config change

* GitHub pages config change

* cleanup

* Renamed scripts for better reading #532

* update docusaurus dependencies

* Renamed scripts for better reading #532

* update docusaurus dependencies

* change sh with bash

* limitation reason cleanup

* limitation reason cleanup

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

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

* removed testing line

* Cleanup duplicated files

Files were moved and not deleted

* Cleanup

* MOSFET temperature was displayed twice after merge

* small typo fixes

* updated changelog

* updated changelog

* Small fixes

* fix disconnection behaviour: on disconnect, show '---' after 10s and 'not connected' after 60s

* fix flake errors

* small fix

* 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

* fixed type error

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

* Changed: Remove wildcard import from dbushelper.py

* small fixes

* 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

* flake8 changes

* copied lltjbd_ble from idstein:jdb_ble

* Added and adapted LltJbd_Ble
ATTENTION: Currently it's untested

* small changes

* read production date and append to hardware version

* Set SOC nightly. Button is working, next is send command to bms

* 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

* Added: JKBMS BLE unique identifier

* Added: Jkbms_Ble connection_name()

* Added: Daly unique identifier

* Added: JKBMS BLE serial number, user defined field

* 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

* read out daly battery code and use as unique id

* moved production date and added custom field

* clean battery code
strip whitespace and replace one or multiple spaces with one underline
if no battery code generate unique field

* Daly read_capacity change
Read capacity from config file, if no value provided by BMS

* Daly try to fix no reply

* Improvements by @transistorgit

* changed value

* set SOC (and date time) on button press.

* fix battery code parser

* format fix

* format fix

* fix extra long serial timeouts
by calculating max time instead of loop counts

* Changed: Merged all install files into one

* updated install docs for nightly build

* Small fixes

* changed config backup

* updated config file

* updated changelog

* debug daly

* changed release workflow

* changed release workflow

* changed release workflow

* changed release workflow

* Updated from master

* fix blank screen, debug daly

* make Reset SoC a spin box

* fix possible read_capacity problem

* Daly read_balance_state() add missing return

* Daly advanced troubleshooting

* Changed: Improved Daily stability by a lot

* fixes for disable and uninstall
service was not removed and if removed, it was recreated by the serial starter

* optimized USB install method

* updated changelog

* added missing qml to restore-gui.sh

* 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

* changed jkbms_ble to dev

* changed order

* final daly 'broken packages handling'

* Last changes for daly read problem
by @transistorgit

* change version in utils based on GitHub tag

* test automatic release version change

* Added: Configure voltage drop

* test automatic release version change

* fix Daly alarms

* fixes small errors in bash files

* fix missing driver name in restart-driver.sh

* linear mode, allow max voltage on soc thesshold

* Daly added one retry if failed

* fixed LLT/JBD cell balancing display

* rename tar after USB install
fixes #638

* add force buttons

* force buttons working

* fixed removing entries

* implement force charge/discharge

* little bit cleaner soc preset

* use existing serial read/write function

* add stop balancong switch

* use existing serial read/write function

* Changed: Get bg colors from MbStyle for dark mode

* prevent short circuit evaluation

* fix merge errors

* added changelog info

* Fix #648

---------

Co-authored-by: Bernd Stahlbock <stahlbock@gmail.com>
Louisvdw pushed a commit that referenced this issue May 31, 2023
* Changes 2023.05.18 (#649)

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

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

* fix black lint error

* fix black lint error

* Improved JBD BMS soc calculation
#439

* Fix for #397
#484

* small fixes

* sort bms imports

* Add support for HLPdata BMS4S
#505

* Add support for Seplos BMS
#530

* change flake8 settings

* fix black lint errors

* removed wildcard imports

* fixed black lint errors

* change flake8 settings

* remove wildcard import and fix black lint errors

* removed wildcard import

* fixed black lint check

* removed wildcard import, fixed black lint errors

* config changes

* removed wildcard import, fixed black lint errors

* remove old log message in handle_changed_setting()

* remove old log message in handle_changed_setting()

* simplified condition for Time-To-Go/Soc

* simplified condition for Time-To-Go/Soc

* fix renogy import

* fix renogy import

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

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

* moved BMS to subfolder

* moved BMS to subfolder

* moved BMS to subfolder

* corrected installble to run correct script

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

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

* changed ble service name
from `dbus-blebattery-$1` to `dbus-blebattery.$1` like the non ble service

* fix small errors

* read installed capacity at startup

* disable ANT BMS by default
#479

* fix cell voltage header parser

* rework daly receive routine

* improve read cell voltages - only work on sufficient data, drop only the bad package on checksum error, not the complete transmission

* allow read_soc to also retry serial transmission

* add daly cell balance state info. cells are red only if unbalanced now

* bump version

* typo

* moved read_serialport_data() to daly.py

* revert read_serialport_data() to the state before my changes

* fix connection log startup message.
now voltage/current/soc are displayed correctly

* black reformatting

* 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

* flake config change

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

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

* fix black lint errors

* updated changelog

* disabled ANT BMS by default
#479

* updated config.default.ini

* fix typo

* update nightly install script

* Removed line

* fixed error in HLPdataBMS4S

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

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

* updated battery template

* updated battery template

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* updated battery template

* Progress with config limits reason

* updated CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT default value

* added SoC round for LLT/JBD

* fixed log typo

* updated nightly script

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* reworked installation procedure
Bluetooth BMS is now also fetched from config.ini

* updated release workflow

* updated readme

* Merge branch 'master' into jkbms_ble

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

* cleanup

* Merge branch 'master' of into jkbms_ble

* GitHub pages config change

* GitHub pages config change

* cleanup

* Renamed scripts for better reading #532

* update docusaurus dependencies

* Renamed scripts for better reading #532

* update docusaurus dependencies

* change sh with bash

* limitation reason cleanup

* limitation reason cleanup

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

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

* removed testing line

* Cleanup duplicated files

Files were moved and not deleted

* Cleanup

* MOSFET temperature was displayed twice after merge

* small typo fixes

* updated changelog

* updated changelog

* Small fixes

* fix disconnection behaviour: on disconnect, show '---' after 10s and 'not connected' after 60s

* fix flake errors

* small fix

* 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

* fixed type error

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

* Changed: Remove wildcard import from dbushelper.py

* small fixes

* 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

* flake8 changes

* copied lltjbd_ble from idstein:jdb_ble

* Added and adapted LltJbd_Ble
ATTENTION: Currently it's untested

* small changes

* read production date and append to hardware version

* Set SOC nightly. Button is working, next is send command to bms

* 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

* Added: JKBMS BLE unique identifier

* Added: Jkbms_Ble connection_name()

* Added: Daly unique identifier

* Added: JKBMS BLE serial number, user defined field

* 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

* read out daly battery code and use as unique id

* moved production date and added custom field

* clean battery code
strip whitespace and replace one or multiple spaces with one underline
if no battery code generate unique field

* Daly read_capacity change
Read capacity from config file, if no value provided by BMS

* Daly try to fix no reply

* Improvements by @transistorgit

* changed value

* set SOC (and date time) on button press.

* fix battery code parser

* format fix

* format fix

* fix extra long serial timeouts
by calculating max time instead of loop counts

* Changed: Merged all install files into one

* updated install docs for nightly build

* Small fixes

* changed config backup

* updated config file

* updated changelog

* debug daly

* changed release workflow

* changed release workflow

* changed release workflow

* changed release workflow

* Updated from master

* fix blank screen, debug daly

* make Reset SoC a spin box

* fix possible read_capacity problem

* Daly read_balance_state() add missing return

* Daly advanced troubleshooting

* Changed: Improved Daily stability by a lot

* fixes for disable and uninstall
service was not removed and if removed, it was recreated by the serial starter

* optimized USB install method

* updated changelog

* added missing qml to restore-gui.sh

* 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

* changed jkbms_ble to dev

* changed order

* final daly 'broken packages handling'

* Last changes for daly read problem
by @transistorgit

* change version in utils based on GitHub tag

* test automatic release version change

* Added: Configure voltage drop

* test automatic release version change

* fix Daly alarms

* fixes small errors in bash files

* fix missing driver name in restart-driver.sh

* linear mode, allow max voltage on soc thesshold

* Daly added one retry if failed

* fixed LLT/JBD cell balancing display

* rename tar after USB install
fixes #638

* add force buttons

* force buttons working

* fixed removing entries

* implement force charge/discharge

* little bit cleaner soc preset

* use existing serial read/write function

* add stop balancong switch

* use existing serial read/write function

* Changed: Get bg colors from MbStyle for dark mode

* prevent short circuit evaluation

* fix merge errors

* added changelog info

* Fix #648

---------

Co-authored-by: Bernd Stahlbock <stahlbock@gmail.com>

* Limit control voltage to max cell voltage

* Rework serial parser (#12)

much cleaner code, as it is optimised for the daly protocol

* updated changelog

* fix black lint error

* fixed black lint error

* added infos to battery template

* JDB BLE support (#499)

* Implementing JBD BLE support. It is built upon Bleak
* Additionally, it provides some handling of for up to 4 temperature probes labels T1 (NTC2), T2 (NTC3), T3 (NTC4) and T4 (NTC5). NTC1 is the BMS module temperature itself
* The device page has been extend to provide more details about the actual used hardware (= product name), firmware version and BLE address

* updated changelog

* Add Supoprt for HeltecSmartBMS (YYBMS) using modbus via RS485 connection (#658)

* Changes 2023.05.24 (#667)

* Check Venus OS version before installing

* fix Jkbms_Ble error

* updated changelog

* updated readme and added donation link

* bugfix: Heltec BMS test_connection breaks on other modbus compliant BMS systems

* bugfix: LLTJBD BMS ignore non ASCII letters for hardware version

* updated readme

* Suppress daly read errors (#13)

* updated descriptions

* Changed logging level and give better feedback
* Changed logging level to debug for unneeded messages
* Give the user feedback, if a BMS is found or not. Useful, if only one BMS is tested.

* small fixes

---------

Co-authored-by: Bernd Stahlbock <stahlbock@gmail.com>
Co-authored-by: Oleg Gurevich <oleg@gurevich.de>
Co-authored-by: Bernd <6627385+transistorgit@users.noreply.github.com>
Co-authored-by: Paul Strawder <paulidstein@gmail.com>
Co-authored-by: Raphael Mack <ramack@raphael-mack.de>
Co-authored-by: Strawder, Paul <paul@coach-ai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants