-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Sometimes cell voltage is wrong on Daly #165
Comments
Data that came in:
@Louisvdw any idea, why the 0x90 command already comes in, although the cell voltage command is not finished yet? Could it be there is some kind of race condition that already fires the next command and we still have to wait for cell voltages to finish before? |
Ok did some further investigation and it seems like the daly reports less cells on random frames a few times... Now with the fix in my PR at least the totally wrong values are filtered out, but in this case we should skip the whole frame. Is there any problem with skipping the values (e.g. by returning false)? So that would mean we still wrote them to the cells array, but we should not publish them. Does this have any side effects on min/max cells or whatever if we update the array but do not publish them? Btw in dbus-serialbattery/etc/dbus-serialbattery/dbushelper.py Lines 160 to 176 in 2775113
You check if we return false and add it to the error counter, however even if false is returned, it is still published. Shouldn't we avoid the publishing if false is returned @Louisvdw? |
The Daly BMS comms protocol is really very bad. The way that they created their protocol and the speed with which the BMS can talk (9600) mean that there is very little time to get all the data from the BMS as there are only a limited amount of bytes that can be transfered in 1 sec. It is for that reason that the Daly driver has the poll step cycles and only read some datasets on every few cycles. So to answer your question if we can skip cell values if there is a problem I would suggest that we do. Any wrong cell values do have an impact on the min/max cell voltage that we publish. So wrong values are a bit of a issue, but skipped values just give delayed results (and responses). Perhaps keeping the cell values in a temporary variable and only update the battery values when all the checks are good is a good option? Other values still need to be updated (like SOC, current and voltage) each cycle so a complete skip on updates on a false might not be the best option. We might need to be a bit more smarter with the cycles and split the cell values into two cycle numbers if the amount of cells are too much for the poll time. |
How does wrong cells voltage affect the min/max values? those are requested seperately: dbus-serialbattery/etc/dbus-serialbattery/daly.py Lines 258 to 272 in 2775113
So even if the cells voltages are wrong, if Daly reports the min/max correctly it should be fine, or not? |
Originally for the Daly we only read the Min/Max value and not the cell values. |
For now i disabled battery cells voltage again. After a few hours suddenly no cell voltages were read anymore, but all the other values still worked. Very weird. Will try to monitor min/max only now instead of all the single cell voltages, as that are the most important values anyways. Thanks for your feedback. Will disable voltage cell reading as well in my PR, but leave the rest of the logic as it is more correct as before. |
I made some Daly bms changes.
https://github.com/Louisvdw/dbus-serialbattery/releases/tag/v0.12b2a |
I testet it. |
Closed in favor of #397. |
Follow up to #160
Sometimes wrong values come in. Here is such a sample:
Will check this. A first fix is to properly check for the low voltage value here:
#166
Will investigate later if i can improve the byte parsing, maybe there was an error in the order that can be detected earlier.
The text was updated successfully, but these errors were encountered: