Repository navigation
JBD: support reliable MOS control and extended diagnostics - #419
Merged
Merged
Conversation
fl4p
added a commit
that referenced
this pull request
Oct 17, 2026
…y type (#419 follow-up) - fetch_device_info exited factory mode with 28 28, which also saves to EEPROM (dbus-serialbattery lltjbd), on every add-on start. Now 00 00. - Settings registers time out after 2 s and the read stops after 3 unanswered in a row; at 16 s each a clone could stay in factory mode for ~15 minutes before the first sample. - A BMS that refuses factory mode still returns basic info, so the sampler doesn't re-enter it every discovery period. - Register 0x16 is no longer DeviceInfo.sn: sn is the HA device identifier, and clones sharing a factory serial would merge into one device. - display_name and temperature_names apply to every type via discovery; extra values carry their own topic prefix instead of a hardcoded jbd/. - Changelog entries within the 30-word gate.
fl4p
added a commit
that referenced
this pull request
Oct 17, 2026
…o EEPROM rewrite loop Review findings on the #419 switch path: - MQTT switch commands run in the background loop, concurrently with the sampler: its disconnect (keep_alive off) could cut the factory-mode sequence after 56 78, leaving the BMS in factory mode, and both could wait on future 0x03 at once. Register I/O and __aexit__ now share a lock, and a command that arrives disconnected is applied by the next fetch instead of a connect outside ConnectLock. - The algorithm's switch call raised on a verification failure and lost the sample; the calibration branch asks every sample while a protection holds charge off, so each poll was a factory-mode write + EEPROM save. The sampler now logs the failure, and a written state is not rewritten for 10 minutes. - "Already in that state" skipped a command a protection was forcing, so the FET came back when it cleared; the skip now needs problem_code 0. - The other FET's bit comes from the last command, not from a protection. - A refused reply (status != 0) reaches the waiter instead of a 16 s timeout; the status is checked after the checksum. - fetch_device_info sends 00 00 even if the enter ack was lost.
Owner
|
Thanks, merged and released in 2.25. I changed a few things on top (63c3df7, e46a566, ef589fe):
If you can, please check 2.25 on your 14S: switch charge off/on from HA, and once with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
keep_aliveis disabled, preserve the other MOS state, ignore already-satisfied retained commands, and verify each writedisplay_nameand comma-separatedtemperature_nameswithout changing MQTT topics or entity unique IDsOn supported JBD firmware, this can re-enable charging when an undervoltage event has left the charge MOS disabled, including states where standard app controls are unavailable. Active protection conditions are not bypassed.
Scope
Extended JBD settings are read-only. Existing charge and discharge switches remain the only settings this change writes.
Validation
git diff --checkpassedCloses #418