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

Add support for Seplos BMS #530

Merged
merged 13 commits into from
May 2, 2023
Merged

Add support for Seplos BMS #530

merged 13 commits into from
May 2, 2023

Conversation

wollew
Copy link
Contributor

@wollew wollew commented Apr 13, 2023

I was unhappy with the limited data provided from the Seplos BMS via CAN bus so I decided to go the serial way. So far this works well for me, the alarm stuff is still mostly untested because changing the settings in the BMS app to trigger the corresponding alarm is a PITA.
Feel free to comment on and/or fix my most likely rather unidiomatic Python usage, it is not my "native" language.

(also see #138).

wollew and others added 5 commits April 10, 2023 10:25
TODOS (at least):
* revisit the stupid timing stuff, still does not read data reliably
* validate return code and checksums
* use address to support multiple packs
* read and populate alarm data
* cleanup logging
* calculate real checksums instead of hard wired for one command
* fixes serial reading from Seplos by simply using readline()
* validates checksums, return codes
* clean up logging
* proper encoding of arbitrary cid2 commands including address, length and checksums

Still TODO:
* read alarm data
@mr-manuel
Copy link
Collaborator

mr-manuel commented Apr 27, 2023

Hi, thanks for your PR. Somehow the GitHub Actions did not run in your fork. Can you please check this? Probably you have to enable it in your repository settings under Actions -> General -> Actions permissions select Allow all actions and reusable workflows.

Please also change the wildcard imports to specific imports.

@mr-manuel mr-manuel changed the title support for Seplos BMS Add support for Seplos BMS Apr 27, 2023
mr-manuel added a commit to mr-manuel/venus-os_dbus-serialbattery that referenced this pull request Apr 27, 2023
@mr-manuel
Copy link
Collaborator

It's ok now. The other errors can be ignored, they are fixed in my PR.

Thanks!

I will merged your changes in the jkbms_ble branch tomorrow, so you can use it with all the new stuff :-)

The template is already reworked in another PR.
Copy link
Collaborator

@mr-manuel mr-manuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mr-manuel mr-manuel mentioned this pull request Apr 27, 2023
mr-manuel added a commit that referenced this pull request 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()
@wollew
Copy link
Contributor Author

wollew commented Apr 27, 2023

You're quick. Thanks for the planned merge to jkbms_ble , I doesn't look like Louisvdw will be working on it too soon, so jkbms_ble looks like the new master to me :-) Seplos does have a bluetooth interface as well, no documentation though. Maybe I'll try to play around with it eventually.

@mr-manuel
Copy link
Collaborator

You're welcome. Louisvdw returns mid May :-)

@mr-manuel
Copy link
Collaborator

Could you please provide me the data for the comparison table?

@wollew
Copy link
Contributor Author

wollew commented Apr 28, 2023

I added the supported data in #591

@mr-manuel
Copy link
Collaborator

Since we are improving this driver constantly, we will add a new value in future. Is there any value that can be read from the BMS that is unique and helps to identify a BMS, when multiple BMS are attached? Like serial number?

If yes, please write it as string to self.unique_identifier. See mr-manuel@89cfe0a#diff-9d9b25b4a5dcc9b6f162c96264601c1986789dd796a6b170586076a746fabbc0R102-R103

@wollew
Copy link
Contributor Author

wollew commented Apr 28, 2023

I don't think there is such a thing for the Seplos, neither the documentation nor the official app show any hints of something that could be used as a unique id.

@mr-manuel
Copy link
Collaborator

Ok, no problem.

@mr-manuel
Copy link
Collaborator

Do your BMS provide charge and discharge limits? #4

If yes, could you change that the limits are read from the BMS?

@wollew
Copy link
Contributor Author

wollew commented May 2, 2023

See 7b5bc0c, unfortunately these limits are not available.

@Louisvdw Louisvdw merged commit 9cf3b9a into Louisvdw:master May 2, 2023
@mr-manuel mr-manuel mentioned this pull request May 4, 2023
12 tasks
Louisvdw pushed a commit that referenced this pull request 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 pull request 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 pull request 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>
@mr-manuel
Copy link
Collaborator

Hello @wollew,

unfortunately some grid meters are now recognized as Seplos BMS. Please check in the test_connection() for a setting that is Seplos BMS specific, such as a field that contains Seplos or something like that.

@wollew
Copy link
Contributor Author

wollew commented Jun 11, 2023

Ok, that's going to prove interesting, because all the documented commands to the BMS have no indication on what type of BMS it is in their response. There are more undocumented commands that maybe could prove useful for this, I'll see what I can do, will most likely need a few days until I can work on it, though.
Talking about BMS protocol documentation, I couldn't find a dedicated location to add them to the repo, would that be something to do?

@mr-manuel
Copy link
Collaborator

You can add the documentation to this PR in a comment. If someone searches for the integration it's found very fast. Ok, if there is no specific field or command maybe I have a solution

@wollew
Copy link
Contributor Author

wollew commented Jun 12, 2023

I've opened #706 to maybe fix the grid meter problem, depends on what these meters return. It's obviously not the "right" fix, but until I've checked the other BMS commands it might just be good enough. Do you have a link to the grid meter issue?

@wollew
Copy link
Contributor Author

wollew commented Jun 12, 2023

Seplos BMS protocol spec: 16647-SEPLOS-BMS-Communication-ProtocolV2-0.pdf

@mr-manuel
Copy link
Collaborator

There is no issue opened, but @transistorgit will send me the relevant data as soon he has time to reproduce the issue. You can see this as done, since I implemented a check to validate the received data for all BMS.

@andreas-bulling
Copy link

Would be fantastic to get Bluetooth support - is anyone working on this atm? No idea where to start, though - I assume there is no documentation?

@wollew
Copy link
Contributor Author

wollew commented Jan 2, 2024

I am not working on it. I did play around quite a while ago, but without any documentation (you're right, AFAIK there's none) did not get very far :-( Seeing that the "new" Seplos 3.0 has a new bluetooth app means they'll likely have a new protocol as well. So I am also doubtful it's worth investing too much time in supporting a version that's not even sold any more. But, if anyone comes up with reasonable docs I'm willing to try anyway.

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 this pull request may close these issues.

None yet

4 participants