-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Improve Liontron support #81
Comments
Do you have a Android device and are you able to prepare a btsnoop capture of the BLE traffic? I would like to compare the traffic of the Android App with the implementation here. There is probably a difference (in the command set) which confuses your BMS firmware. |
Not at the moment. I only have iphone available. Send command: DD.A5.03.00.FF.FD.77 (7) |
Could you provide a download link to the Android app of your BMS? |
The log messages aren't helpful without any context. |
The app transmits the following commands periodically to the BMS:
|
Expected response: The start of frame is The app supports these response frames:
|
I've pushed a small change at a feature branch. Please update your YAML from
to
to apply (recompile+flash) this change to your ESP. This is the difference: https://github.com/syssi/esphome-jbd-bms/pull/83/files We are trying to avoid sending an probably unsupported command. |
Hi Sebastian, problem stays the same. It connects, reads values one time an than goes in BMS offline while the BLE Connection stays connected. |
Okay. As next step a btsnoop capture is required to get an idea whats different. |
will try to get an android mobile working.... |
i'm sorry, i do not have an android mobile here available to do a btsnoop.... do you know a possibility with a raspberry pi? Or a Website, which discribes, what to do? |
No. I don't know another way to sniff the communication between the official app and the BMS. |
Could you provide a complete ESPHome log? I best case it will provide some more important details. |
I changed back to the "normal" Branch... |
Could you provide another log using the feature branch? I would like to check the difference. |
I've extracted the important parts of the
|
I've pushed some more changes to the feature branch ( |
logs_testboard2_logs.txt |
It looks like you aren't using the most recent version of the See https://github.com/syssi/esphome-jbd-bms/pull/83/files The |
tried to clear the cache, but i dont think that the download was successfull.. . can you see in the logs which version i [downloaded?](logs_testboard2_logs (2).txt) Refresh time wa sset to 0s, i set it to 30s in esphome |
I've pushed another feature branch to trigger a clean build on your side:
Could you update your YAML and give it another try? Thanks in advance! |
looks very good.... but it disconnected again and does not come online....[ |
I've pushed some more changes. :-) Please recompile again and provide another log. |
seems to stay stable.... some invalid frame length... will take a look tomorrow and check, what homeassist is logging..... Thank you very much for your support so far. I think it will help others, who have liontron as batterys... there was not much to find, before i found yout project.... |
It's not perfect yet. Your BMS firmware has timing issues. I will try to make some more changes next days. |
About the timing: The Android app transmits the following request every 500ms:
The second request is transmitted after
We will have to imitate this behavior/timing because the BMS firmware is unable to schedule responses properly. |
I've pushed another improvement. Does it still work? |
think no... is connected, but does not seem to get Values.... |
Could you change the |
You are using the |
dont think so.. since yesterday i did not change the source... it's still liontron.... INFO ESPHome 2024.7.0 |
Update Interfall updates every second... Cell Voltage updates every update intervall... and stays connected.... it seems |
Sorry, my fault! I was looking on an outdated download/ESPHome log. So the connection keeps only up and running on a fast update interval? Could you play around with the value? |
Could you provide another ESPHome log using the |
Here the logs... Just to let you know and dont confuse you... i have two Batteries, which i try.... mac_address: 70:3e:97:D1:C1:8C - 55 Ah and two temp Sensor Switching Input Charge and Output charge does not work as well... but thats next.... (now it seems to work, for the moment) I switched to 5s Intervall, works,,,, 10s does not work, 8s works as well.... trieing more... By the way: Don't you sleep at all? every time I write you reply within minutes... very fascinating... |
Hi Sebastian, the last Version you provided works for me with Update Interval of 8s. Since the Compile there was no Prooblem. |
That's a bit confusing because to difference to the |
after a rebbot i have sometimes to reboot again.... but since i set to 8s there is no disconnect anymore.... i tried 10s, that did not work properly. Should i try the main branch? |
Yes. Let's try the main branch. This doesn't work out of the box, correct? |
strange.... it seems the only problem was se poll intervall ... with the main branchs it's starting and working as expected ..... dont understand that... |
You didn't tried the default in the past? |
I've merged some minor improvements of the Liontron branch nevertheless now into |
i initialy tried the main branch... everything starts working after changing the update intervall to lower than 15s... i just tried 9s which works as well.... last time i tried 10s it did not work... so lets say its resolved.... hopefully the updateintervall chang3 helps some other guys.... Thans for your support, figuring this out. |
Last question: Could you provide some more details about your Liontron BMS? Do you know the exact model name? Could you tell me the name/model of your battery pack? I would like to add your battery / BMS to the list of supported devices. |
Notes for myself:
|
these are the Batterys. They have the passibility to set a PIN i Think.... as well as changing the name ... but i dont know how.... The commecial Appel Store App "XiaoxiangBMS" seems to have the possibility in the payed version. https://liontron.com/download/german/LISMART1255LX.pdf |
I've implemented a
Could you add the section to your YAML and press the button a few times (once per second). Does your BMS repond or is the |
here ist the Log: Seems to fetch the Name / Model |
|
Hi Sebastian, just to clarify. this is the Name of the Unit not the model Name. This name can be changed, I think. |
Thanks for the clarification. Did you try to get the Mosfet switches working? |
The Switch worked as expected |
Perfect! Feel free to create new issues if you miss something or if you see room for improvements. |
I have a problem connection my liontron bms. BMS Firmware-Version is 2.5.
When i turn off the bluetooth in the website of the esphome interface and reacitvate it, is get values for one time. In the same session the bms is shown to ha as bms errors and going to offline.
I have esphome 2024.06.04 compiled with idf.
In the interface i get [D] [esp32_ble_client:110] [0] [70:3E:97:xx:xx:xx] ESP_GATTC_WRITE_CHAR_EVT
The connection is still blocked than, because i can not find the bms with the mobile phone app. When i disable bluetooth in esphome, the bms can immediately be found with the phone app
When connection is not working …. Hopefully you can help here.
The text was updated successfully, but these errors were encountered: