syssi / esphome-jk-bms

ESPHome component to monitor and control a Jikong Battery Management System (JK-BMS) via UART-TTL or BLE
Apache License 2.0
474 stars 161 forks source link

Splitting the Codebase into the reading and Esphome part? #179

Closed kinsi55 closed 2 years ago

kinsi55 commented 2 years ago

My ESP handles many tasks, and one of them is supposed to be geting / publishing and using the values from the BMS. With how the classes of this component are structured, as far as I can tell, using just the part that handles reading the values isnt easily possible.

I think splitting it into two codebases could make sense? Then one could use just the reading library part and do anything they want with the values

syssi commented 2 years ago

Do you want to use this implementation without using ESPHome?

kinsi55 commented 2 years ago

Yeah that was the idea, integrating this component / reading the BMS with my other code running on the same ESP but without the ESPHome part

syssi commented 2 years ago

I must admit my C++ skills are too limited to prepare and maintain a library. The target group of this project is so small that it is hardly worth the effort.

kinsi55 commented 2 years ago

Understandable, no worries. I was just mainly trying to not reinvent the wheel. I guess I will have to dig through the code and try to figure out the communication to do that afterall :D

syssi commented 2 years ago

Feel free to copy the important parts and ask questions if something isn't obvious.