-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Verify JK-B2A8S20P support #105
Comments
I've extracted the frames from the Cell info (
Settings (
Device info (
|
|
@EasilyBoredEngineer FYI. Most values are fine. Some are a bit off. Invalid or strange values:
|
Hi @syssi, as requested please find attached app screenshots and updated log file. Note:-
|
|
If you increase the log level by:
you can see the raw traffic if you like. |
Thanks @syssi - (deleted hex log above as it was mangled - wasn't obtained properly so was showing the hex in the ascii section) Very verbose logs attached, captured right now after the 4s change. |
reupload of hex dump response, fyi. This is how the BMS responds to the following command:-
|
I've fixed the decoding of the "under temperature protection" and "under temperature protection recovery". It's a signed integer now. |
Thankyou! Now I just have to remember how to synchronise git..... :) |
Let's remove this parts from your config yaml:
and
|
@EasilyBoredEngineer If you use this project as
clones the main branch of this repository every time ( |
great! Thankyou. Yaml changes made. Attached is new log and a screenshot. Note the circled items do nothing when clicked. |
Are you sure the buttons doesn't work? Because it's not documented it try to explain what's happing: If you press the "retrieve settings button" the
If you pree the "retrieve device info" button the BMS should beep and the component should write this to the log:
Could you test again? Does it work or doesn't beep the BMS? |
@syssi - question for you - if I wished to adapt your code to send the bms data out as a struct via serial IO, as well as sending to home assistant, which part of the code would be best to work on / fork? |
No such section noted in log at very verbose level when / after pressing button. Accessing remotely at the moment so cannot confirm whether the BMS beeps or not, apologies, will revisit when next to the ESP. |
This is the most important file about the JK02 (and JK04 protocol): https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_bms_ble/jk_bms_ble.cpp Take a look at the If the Android app connects to the BMS the device info frame is requested first: https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_bms_ble/jk_bms_ble.cpp#L159 The second step is to request the settings + enable the periodic sendout of the cell info frame: https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_bms_ble/jk_bms_ble.cpp#L275 Please make sure between the first request (0x97) and the second (0x96) must be a gap of ~0.5sec. |
Thankyou very much @syssi - really appreciated :) FYI - just changed log level to INFO and CONFIRM - both buttons work. attached log shows the relevant responses. |
Lucky guy! I was already afraid that you might have damaged the RX pin of your BMS or Jikong has introduced some encryption / verification bits at the random part of the request to avoid unsecured/unauthorized traffic. |
Ha! So was I!! Nope, looks like all is working well now with your package.. Now that's not to say that I haven't possibly killed something else on the bms during my 'investigations' (I did make a big spark with my multimeter probe down towards the mosfet end at one stage - lol) - but I'll know that soon enough :) Thanks again for all your help - close as successful if you wish? |
One piece of the puzzle is missing unfortunately: The meaning of each bit of the error bitmask of your device is unknown. Your android app doesn't show a red error message anymore but some bits of the error bitmask are still |
Ok - understood. I've just gone down to the office and tried to find a way to factory reset the bms, but alas on my app there is no such option.. another potential cause may be that I have strange private user data (0123456789012), and can't change it using the android app - wondering if that might be bleeding over into the next byte... I'll try to do some investigations over the coming days:- EBE 'to do':-
|
I've seen another user/log yesterday with the same strange error bitmask. I assume everything is fine with your BMS and something has changed here.
How to identify/reverse engineer the new error bitmask:
|
New finding: The error bitmask of the JK02 protocol has always been broken / isn't implemented properly. I can reproduce the issue with my BMS model too. |
I've fixed the error bitmask. Just some error bits are well known but may be we can find more in future: |
jblance/mpp-solar#224
The text was updated successfully, but these errors were encountered: