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

Midpoint deviation #311

Closed
merlep opened this issue Nov 29, 2022 · 6 comments
Closed

Midpoint deviation #311

merlep opened this issue Nov 29, 2022 · 6 comments
Assignees

Comments

@merlep
Copy link

merlep commented Nov 29, 2022

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

VenusOS (please complete the following information):

  • Device type: [e.g. VenusGX, Cerbo, Raspberry Pi]
  • Firmware Version [e.g. 262]

Battery/BMS (please complete the following information):

  • BMS/Battery type: [e.g. LTT, Daly]
  • Cells: [e.g. 16]
  • Interface: [e.g. USB-RS485, USB-RS232, Ve.Direct]

Additional context
Add any other context about the problem here.

@Louisvdw
Copy link
Owner

Is this a new feature request or possible bug? I don't see any details except the heading.

@merlep
Copy link
Author

merlep commented Nov 29, 2022

It seems that Midpoint deviation as implemented on a BMV 702 is an unsigned number ie always above 0 . With the ddbus implementation ( which I guess is supposed to mimic the BMV implementation ) I see both positive and negative numbers reported to VenusOS remote console. I say "seems" as the Maths given in Victron datasheet does not indicate its an absolute number , however their description on setting up an alarm in the handbook indicates its can only be a positive number. Furthermore I have only ever seen a positive deviation on my system having had several battery batteries in the past

@merlep
Copy link
Author

merlep commented Nov 29, 2022

I made a statement , not sure if you can see it on not. Basically how Victron implements deviation and how its done on dbusSerialdriver is slightly different . Victron implementation is unsigned whilst in dBusSerialdriver it is signed. Not a big deal , just how one implements an Alarm Rule for deviation on VRM is slightly different

@mr-manuel mr-manuel self-assigned this Apr 20, 2023
@mr-manuel
Copy link
Collaborator

Sorry, but I can't understand it neither.

  1. You are saying that basically it's working, but it should be implemented like Victron does?
  2. You saw, that the midpoint deviation sometimes was calculated negative by dbus-serialbattery and it should always be positive?

I could add abs() to the midpoint deviation to unsign the value.

@merlep
Copy link
Author

merlep commented Apr 21, 2023 via email

mr-manuel added a commit to mr-manuel/venus-os_dbus-serialbattery that referenced this issue Apr 21, 2023
mr-manuel added a commit to mr-manuel/venus-os_dbus-serialbattery that referenced this issue Apr 21, 2023
@mr-manuel
Copy link
Collaborator

A fix will be released with the next version.

@mr-manuel mr-manuel mentioned this issue Apr 25, 2023
mr-manuel added a commit that referenced this issue Apr 25, 2023
* Changed: Fix System Switch in IO page
* Changed: Fix #239 by @TimGFoley
* Changed: Fix #311
* Changed: Run code analyse only on code change
* Changed: Separate Time-To-Go and Time-To-SoC activation
* Changed: fix UnicodeDecodeError #485 (comment)
Louisvdw pushed a commit that referenced this issue May 6, 2023
* added balancing switch status

* added balancing switch status

* changed default config file
- added missing descriptions
- changed name

* indentation was wrong

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

* added cell balancing status for JKBMS

* changed ConsumedAmpHours
should be None instead of 0, if not available

* TimeToSoc fixes
- Added: Show TimeToSoc only, if enabled
- Changed: description in config file
- Changed: default value TIME_TO_SOC_VALUE_TYPE = 1

* resorted functions

* fix CPU overload
- changed: how often Time-To-Soc is calculated in seconds

* fix Time-to-Go and Time-to-SoC
- changed: Time-To-Go has to be always a positive int
since it's used from dbus-systemcalc-py
- changed: how Time-to-SoC is string is generated and displayed
(format like Time-To-Go)

* small fixes

* Show MOSFET temperature from JKBMS
Pull request from @baphomett
#440

* bump version to 1.0.0
respecting semantic versioning

* added uninstall script and fixed reinstall
- `/data/conf/serial-starter.d` was not recreated if deleted

* small fixes
- added description in utils.py
- change qml files in destination not source

* typo

* fixed cell balancing color for cells 13-24

* updated description in default config file

* Updated logging to get relevant informations

* clearer config file

* make config file clearer

* fix #421
- #421

* missing removals

* corrected typo, added missing +x in release.yml

* added info for new issue

* fix black lint errors

* optimize installation scripts

* added script to install directly from repository

* fixed serial-starter.d
#520

* smaller fixes

* 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

* remove duplicated and incorrect log message on handle_changed_setting

* properly log max battery currents on startup

* 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

* fix black lint errors

* 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

* Merge branch 'master' into master

* Added: Show (dis)charge current limitation reason

* Added changelog

* corrected file permissions

* Update readme

* Small word case changes

* 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
by @seidler2547

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

* fix black lint error

* removed wildcard import, fixed black lint errors

* removed wildcard import, fixed black lint errors

* 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

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

* fix small errors

* 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

* updated changelog

* disabled ANT BMS by default
#479

* fix typo

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

* updated battery template

* updated nightly script

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* updated release workflow

* updated readme

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

* cleanup

* GitHub pages config change

* Renamed scripts for better reading #532

* update docusaurus dependencies

* limitation reason cleanup

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

* small typo fixes

* updated changelog

* 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

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

* Changed: Remove wildcard import from dbushelper.py

* 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

---------

Co-authored-by: Daniel Hillenbrand <[email protected]>
Louisvdw pushed a commit that referenced this issue May 8, 2023
* added balancing switch status

* added balancing switch status

* changed default config file
- added missing descriptions
- changed name

* indentation was wrong

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

* added cell balancing status for JKBMS

* changed ConsumedAmpHours
should be None instead of 0, if not available

* TimeToSoc fixes
- Added: Show TimeToSoc only, if enabled
- Changed: description in config file
- Changed: default value TIME_TO_SOC_VALUE_TYPE = 1

* resorted functions

* fix CPU overload
- changed: how often Time-To-Soc is calculated in seconds

* fix Time-to-Go and Time-to-SoC
- changed: Time-To-Go has to be always a positive int
since it's used from dbus-systemcalc-py
- changed: how Time-to-SoC is string is generated and displayed
(format like Time-To-Go)

* small fixes

* Show MOSFET temperature from JKBMS
Pull request from @baphomett
#440

* bump version to 1.0.0
respecting semantic versioning

* added uninstall script and fixed reinstall
- `/data/conf/serial-starter.d` was not recreated if deleted

* small fixes
- added description in utils.py
- change qml files in destination not source

* typo

* fixed cell balancing color for cells 13-24

* updated description in default config file

* Updated logging to get relevant informations

* clearer config file

* make config file clearer

* fix #421
- #421

* missing removals

* corrected typo, added missing +x in release.yml

* added info for new issue

* fix black lint errors

* optimize installation scripts

* added script to install directly from repository

* fixed serial-starter.d
#520

* smaller fixes

* 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

* remove duplicated and incorrect log message on handle_changed_setting

* properly log max battery currents on startup

* 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

* fix black lint errors

* 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

* Merge branch 'master' into master

* Added: Show (dis)charge current limitation reason

* Added changelog

* corrected file permissions

* Update readme

* Small word case changes

* 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
by @seidler2547

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

* fix black lint error

* removed wildcard import, fixed black lint errors

* removed wildcard import, fixed black lint errors

* 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

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

* fix small errors

* 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

* updated changelog

* disabled ANT BMS by default
#479

* fix typo

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

* updated battery template

* updated nightly script

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* updated release workflow

* updated readme

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

* cleanup

* GitHub pages config change

* Renamed scripts for better reading #532

* update docusaurus dependencies

* limitation reason cleanup

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

* small typo fixes

* updated changelog

* 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

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

* Changed: Remove wildcard import from dbushelper.py

* 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

* Changed: Merged all install files into one

* updated install docs for nightly build

* changed config backup

* changed release workflow

* changed release workflow

* changed release workflow

* 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

---------

Co-authored-by: Daniel Hillenbrand <[email protected]>
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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Eike Baran <[email protected]>
Co-authored-by: Tristan Crichton <[email protected]>
Co-authored-by: Tristan Crichton <[email protected]>
Co-authored-by: Stefan Seidel <[email protected]>
Co-authored-by: seidler2547 <[email protected]>
Co-authored-by: Bernd Stahlbock <[email protected]>
Co-authored-by: Bernd <[email protected]>
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

No branches or pull requests

3 participants