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

JK/JBD BMS sometimes reports 0 values #51

Closed
4 tasks done
patman15 opened this issue Sep 21, 2024 · 1 comment · Fixed by #53
Closed
4 tasks done

JK/JBD BMS sometimes reports 0 values #51

patman15 opened this issue Sep 21, 2024 · 1 comment · Fixed by #53
Assignees
Labels
bug Something isn't working

Comments

@patman15
Copy link
Owner

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issue.

Describe the issue

v1.6.2 works while v1.6.3 sometimes produces 0 values as it can be seen here:
image

Issue is caused by clearing bytearray which is later assigned (not copied) to final version:
8e9c1b7#diff-ce80ef634830b4483558d11765fb3faca12bf0ee435cd5f85faa072835be557dR106

Reproduction steps

  1. run integration v1.6.2 using JK BMS
  2. wait some time, as it is a timing related issue

Debug logs

2024-09-21 17:06:29.600 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] BMS BatteryOben-00 already connected
2024-09-21 17:06:29.600 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] (BatteryOben-00) Wrong data length (150): bytearray(b'U\xaa\xeb\x90\x02#\x85\r\x83\r\x83\r\x83\r\x83\r\x83\r\x83\r\x83\r\x83\r\x83\r\x83\r\x83\r\x83\r\x85\r\x85\r\x85\r\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\xff\xff\x00\x00\x84\r\x03\x00\t\x00:\x00<\x00F\x00H\x00T\x00\\\x00i\x00v\x00}\x00v\x00l\x00i\x00a\x00K\x00G\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\xf7\x00\x00\x00\x00\x00')
2024-09-21 17:06:29.600 DEBUG (MainThread) [custom_components.bms_ble] BMS data sample {'cell_count': 16, 'delta_voltage': 0.003, 'temp#0': 24.7, 'temp#1': 0.0, 'temp#2': 0.0, 'voltage': 0.0, 'current': 0.0, 'battery_level': 0, 'cycle_charge': 0.0, 'cycles': 0, 'cell#0': 3.461, 'cell#1': 3.459, 'cell#2': 3.459, 'cell#3': 3.459, 'cell#4': 3.459, 'cell#5': 3.459, 'cell#6': 3.459, 'cell#7': 3.459, 'cell#8': 3.459, 'cell#9': 3.459, 'cell#10': 3.459, 'cell#11': 3.459, 'cell#12': 3.459, 'cell#13': 3.461, 'cell#14': 3.461, 'cell#15': 3.461, 'cycle_capacity': 0.0, 'power': 0.0, 'battery_charging': False, 'temperature': 8.233, 'rssi': -74}
@patman15 patman15 self-assigned this Sep 21, 2024
@patman15 patman15 added the bug Something isn't working label Sep 21, 2024
@patman15 patman15 changed the title JK BMS sometimes reports 0 values JK/JBD BMS sometimes reports 0 values Sep 21, 2024
@patman15
Copy link
Owner Author

Code review showed similar issue for JBD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant