-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
JiKong BMS timout during initialization #90
Comments
Hi! Thanks for the report. I can see the BMS react in different way than expected, so most probably there is a mismatch in the protocol version, or similar. Need to check more details. Have you installed the latest firmware?
|
@patman15 I've already tried to change the timeouts, but likely forgot to send the message with updated and logs. It didn't help a lot. Same error. I'll try to connect with mobile app and see what firmware is there and also will try updating it to see if it helps, thanks. |
I need to check the protocol details that I can see from the log. I know there are different versions out there. Most probably it's a different one. I'll check other information on the Internet to find solutions. |
@SkeLLLa I checked again the code. What puzzles me is that the BMS does respond with wrong messages to a request for the cell information. So far I can only see that different BMS answer with different data but always the same type of reply, while yours just responds with a different type. I haven't found any issue that explains the situation, also, I implemented the
Really hard to remotely guess what happened since all things look actually ok, but the BMS does not answer the request. |
Hi. First answering your questions:
Meanwhile I've installed the app to verify firmware. Here are some readings (if it helps you). |
Hi!
In summary, I still do not see a reason why it wouldn't work as with other users. 😞 Hopefully, some of the possibilities above bring hints. |
Actually batmon-ha didn't work at all, but your integration at least show something in logs.
Currently I also trying to debug and see what's happening with https://github.com/jblance/mpp-solar, it has command line utility for jkbms, but didn't have too much time for tests. If I find something, I'll update you here or submit PR. |
Ok, given your answers, given that the app on the phone works, given that I see replies from the BMS, but just not to the request, I think our best guess is to see what the app does. Can you follow the steps from this guide? Between step 2 and 3, please run the JK app until you see the voltage level, etc., then stop Bluetooth and follow the further steps to get the zip. Out of the zip, I would only need |
Gotcha, will do that when I'll be in location with battery or just ask other person to do that. When I'll have the logs I'll upload them here. |
Hi, I have the same BMS, jk_b2a8s20p, I found that it stopped working since version 1.6.3 Debug logs with and without commit 6efa1e414b7f8b1c25e94719a969cc24f43a31a6: |
@romanshypovskyi that is an amazing hint! Thanks! Looks like the BMS needs some time after connect till accepts commands. |
I just tried this branch and now everything works immediately without errors: |
Ok, I will do a bit cleaner version. I hope I can ask you for a retest before I merge. Unfortunately, I cannot check such behaviour myself. Thanks again for that amazing hint! |
No problem, I will test the new version. Thanks for your work! |
@romanshypovskyi could you please check/confirm, that the updated branch (commit 7a5d7fd) still works? I removed the sleep (which is really ugly) and modified the protocol handling to get it working. Thanks a lot! |
Hi, strange behaviour now, sometimes everything works after first attempt, sometimes after couple of attempts For example after third attempt: With 1 second delay it always works after first attempt |
Thanks a lot, I will take a look why. I'm not happy with keeping the delay, it just is a new source for potential floating issues. That's why I keep fixing it. |
@romanshypovskyi learned something new about the protocol which is implemented wrong in all the other implementations ... |
Hi, looks like everything works fine now, I tried multiple times disable/enable integration, restart HA, and all good: |
😅 Finally! Thanks for your patience and the feedback! I hope you can also see continuous updates when you just leave it running. I'll clean it up for a release now. A spec would make things so much easier. 😶 |
Everything works fine for almost an hour now. Thanks for your work! |
Hey, @patman15 . I was able to gather some logs with esp32 bt proxy. With bt proxy it finally start working and receiving data. It's working not ideally, but since it receives data, Sometimes with following ble proxy config battery sensors become unavailable and then available again (see screenshot and logs attached). So I blame RPi bluetooth adapter. Probably it doesn't work well either because of drivers or just because of RPi enclosure that blocks signal.
home-assistant_bms_ble_2024-12-16T20-44-41.587Z.log |
Checklist
Provide the type of BMS you used:
Jikong Smart BMS
Describe the issue
I've installed this integration in addition to batmon to see if it works. Initially it wasn't picking up battery at all, but eventually (maybe after upgrading to 1.9.1 and upgrading HA to latest version) I've received a notification that the battery was discovered.
So I've added the battery, however it failed during initialization step. I suspect that the problem is somewhere on my end, since batmon addon didn't work either. However if my debug info will help to make this integration better or fix some issues for other users, I'll be glad to help.
I also suspect that my BMS might not satisfy the requirement "(HW version >=11 required)", but didn't know how to check that.
I see that there's a timeout issue there, so might be it's possible to configure bigger timeout values somehow?
Reproduction steps
Debug logs
The text was updated successfully, but these errors were encountered: