Closed n-benchoubane closed 2 years ago
Please test my latest commit: https://github.com/dreadnought/python-daly-bms/commit/f3928a39586da72190ff6a41e2af6560464e4567
get_cell_voltages
was handling it better than get_temperatures
actually, but _read
function had a bug. get_temperatures
had max_responses=3
hard-coded, so it was always sending 3 requests and returned a list, even when there was only one sensor. Now it's the same in both functions and the bug should be fixed.
Thank you very much! It works perfectly.
I was curious if you don't mind me asking about how to get the n_cycles for the sinowealth if it is possible.
You're welcome. It seems to be possible, as I see the cycles field in the Windows app. I've added it to --status
now (https://github.com/dreadnought/python-daly-bms/commit/751b395834bf2f710eb0bef1b368263920dc163e), you can test it and report back if the returned value looks realistic.
Brilliant! It works really well :) Thank you very much.
Hello !
I did the experiment on the 3S BMS and I got the following error with the
get_cell_voltages
function:TypeError: a bytes-like object is required, not 'int' (Line https://github.com/dreadnought/python-daly-bms/blob/cddafd09dbe1115f085d006ff46ad9ee21b97794/dalybms/daly_bms.py#L257)
After looking at the
get_temperatures
function, I noticed that theresponse_data
was a list instead of an array of bytes.Thus, in BMS 3S, we only get one frame of data for the cell voltages. I have included the following fix:
Is there another way around it?
Many thanks to you!