-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
JK BMS Temperature problem below 0° #339
Comments
I'm owning a JK B2A24S-15P BMS and just tried cooling down the 2 temperature sensors by using cooling spray. Best regards, |
According to the protocol definition here (jblance/mpp-solar#112 (comment)) the part exceeding 100 is negative temperature, such as 101 is negative 1 degree. So I think the problem is here:
This should be changed to: Best regards, |
Many thanks for you fix and the protocol definition. I have changed it online on my installation. Currently my battery is at +1°C, so maybe I can see if the temperature reading is Ok with the change. |
I made a mistake above. If it helps at all, the change has to be made to: In theory there should be no difference to the original code though ... |
how do you make this change to the scraped ? I'm new programming rasp and vinos os |
Sorry, I'm no native english speaker. |
i have same problem with jk bms showing the wrong temp below 0 c or 32f i.e. 100 c when bms probe go below 0c how can i change this line |
Now I understand, just read here (How to edit utils.py): |
thanks |
ok can not find line 88 self.to_temp(1, temp1 if temp1 <= 100 else 100 - temp1) ? |
I'll add the change to the next release, so you can just wait for that. |
and how long will be as its the only way is see bms has lock out charging at low temp apart from 0 amp charging and thank for feedback |
Well, now there is a copy & paste mistake in the code. Please check temp2, line 89 |
Also the fix was not working for me. Via Bluetooth I got -0°C as current temperature and with the code in version 14.2 I got 100°C. For me
seems to work. I now get 0°C and hopefully can check this night some values below 0°C. I have tested the temperature sensors now with and salt ice bath and my fingers. In the range from -16°C up to 30°C the measurement with the formula above is correct and corresponds the data in the JK-BMS android software. In the android software I could see -0°C and also 0°C and booth were translated to 0°C. |
i have tested your code. Seems to work: |
Hello,
now that we have negativ temperature in germany i have seen that my battery reports 0°C then 50°C then 100°C and then 0°C
So it seems like the negative temperature calculation here is wrong.
dbus-serialbattery/etc/dbus-serialbattery/jkbms.py
Line 88 in 4157bd5
I was already able to find this out:
0x02 = 0b10 -> 2°C
0x01 = 0b1 -> 1°C
0x00 = 0b0 -> 0 °C
0x32 = 0b0110010 -> 0 ?
0x64 = 0b1100100 -> -1 °C
0x65 = 0b1100101 -> -2 °C
0x66 = 0b1100110 -> -3 °C
does anyone have the same problem? i am not really sure how to handle the 0x32 byte. Seems a little bit out of order
possible fix
temp1 = 0 if temp1 == 50 else temp1
temp2 = 0 if temp2 == 50 else temp2
self.to_temp(1, temp1 if temp1 < 100 else 99 - temp1)
self.to_temp(2, temp2 if temp2 < 100 else 99 - temp2)
The text was updated successfully, but these errors were encountered: