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

Status "unavailable" every three minutes... #133

Closed
5 tasks done
Prokopchini opened this issue Dec 29, 2024 · 7 comments · Fixed by #136
Closed
5 tasks done

Status "unavailable" every three minutes... #133

Prokopchini opened this issue Dec 29, 2024 · 7 comments · Fixed by #136
Assignees
Labels
bug Something isn't working

Comments

@Prokopchini
Copy link

Checklist

  • I have tried the latest version of BMS_BLE-HA.
  • I have enabled debug logging for my installation.
  • 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.
  • I have filled out the issue template to the best of my ability.

Provide the type of BMS you used:

JK-B2A8S20P

Describe the issue

Every three minutes entities in HA go into unavailable status and after 30 seconds appear again

Reproduction steps

1.
2.
3.
...

Debug logs

Unexpected error fetching LiFePo4 data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/bms_ble/coordinator.py", line 97, in _async_update_data
battery_info = await self._device.async_update()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/bms_ble/plugins/basebms.py", line 257, in async_update
await self._connect()
File "/config/custom_components/bms_ble/plugins/basebms.py", line 214, in _connect
await self._init_connection()
File "/config/custom_components/bms_ble/plugins/jikong_bms.py", line 194, in _init_connection
-32 if int(self._bms_info.get("sw_version", "")[:2]) < 11 else 0
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '\x00\x00'

@Prokopchini Prokopchini added the bug Something isn't working label Dec 29, 2024
@patman15
Copy link
Owner

Thanks for reporting, can you please attach a debug log of the last minute or so before the exception occurs? Thanks!

@Prokopchini
Copy link
Author

Thanks for reporting, can you please attach a debug log of the last minute or so before the exception occurs? Thanks!

home-assistant_bms_ble_2024-12-29T22-03-50.100Z.log

@patman15 patman15 self-assigned this Dec 30, 2024
@patman15
Copy link
Owner

Hey! Could you check the version on the linked branch? I hope it is a simple fix. 🤞

@Prokopchini
Copy link
Author

Hey! Could you check the version on the linked branch? I hope it is a simple fix. 🤞

Hi, I'm sorry - but I don't understand - what is this "version on the linked branch"

@Prokopchini
Copy link
Author

I think I got it - I need to copy the changes to my file. Thanks, I'll try

@patman15
Copy link
Owner

Hi, I'm sorry - but I don't understand - what is this "version on the linked branch"

Please select this branch and follow the manual install instructions.

@Prokopchini
Copy link
Author

Hi, I'm sorry - but I don't understand - what is this "version on the linked branch"

Please select this branch and follow the manual install instructions.

Thank you! Everything worked out! Everything has been working correctly for three hours now

@patman15 patman15 linked a pull request Dec 30, 2024 that will close this issue
patman15 added a commit that referenced this issue Dec 30, 2024
issue with JK BMS streaming data, fixes #133
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.

2 participants