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

Fix protocol sequence bug in JK BMS #136

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions custom_components/bms_ble/plugins/basebms.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ async def _await_reply(
"""Send data to the BMS and wait for valid reply notification."""

self._log.debug("TX BLE data: %s", data.hex(" "))
self._data_event.clear() # clear event before requesting new data
await self._client.write_gatt_char(char or self.uuid_tx(), data)
if wait_for_notify:
await asyncio.wait_for(self._wait_event(), timeout=self.BAT_TIMEOUT)
Expand Down
Loading