Skip to content

Conversation

@mistralbkru
Copy link

I remove LittleFS, style.css & index.html > main.cpp, change deprecated func for ArduinoJson v7
I use platformio. Tested on esp32 c3 super mini + JK_B2A8S20P. Protocol 19.

Thanks for your great work!

photo_2026-01-04_14-06-55

@Giddy-Up224
Copy link

I use platformio.

@mistralbkru, what do you mean? You didn't include platformio.ini in your pull request. If you want to see this project as a real PIO project you're welcome to clone my fork of it that's adapted for PIO and build/upload it.

And why would you want to remove LittleFS from the original repo? It's used by the webserver. Admittedly, it's easier using PROGMEM and a raw string literal as I did in my small LED_on-off_Webserver and avoiding the need for a file server and uploading the .css and .html files after every new code upload. But I don't see that you've added anything to retain that functionality.

@mistralbkru
Copy link
Author

I removed LittleFS and moved index.html and style.css into PROGMEM.

I replaced some functions in ArduinoJson because they are deprecated in version 7 of ArduinoJson. For example, I replaced device.createNestedArray("cell_voltages") with device["cell_voltages"].to().

I am using PlatformIO, but the changes in jk-bms.ino should also work in the Arduino IDE. Please ignore the fact that I am using it.

I thought everything was clear from the diff. If you consider the changes useless, just close the pull request.

@Giddy-Up224 , Sorry, I didn’t see your fork.

@mxkr303
Copy link

mxkr303 commented Jan 7, 2026

Hey Guys, I tried both of your scripts and I´m getting a Error 534 via Serial Monitor.
I bought an esp32 c3 super mini for this project.
Did any of you ever experienced this issue?
I got exactly the same software version.

My guess is a problem with the passcode for the bms. Via the App, my bms asks for a password to view some data.
Screenshot_2026-01-07-12-07-04-021_de kai_morich serial_usb_terminal

@Giddy-Up224
Copy link

I removed LittleFS and moved index.html and style.css into PROGMEM.

I replaced some functions in ArduinoJson because they are deprecated in version 7 of ArduinoJson. For example, I replaced device.createNestedArray("cell_voltages") with device["cell_voltages"].to().

I am using PlatformIO, but the changes in jk-bms.ino should also work in the Arduino IDE. Please ignore the fact that I am using it.

I thought everything was clear from the diff. If you consider the changes useless, just close the pull request.

@Giddy-Up224 , Sorry, I didn’t see your fork.

@mistralbkru, my apologies! I obviously did not investigate your PR as closely as I should have. I just checked the diff again and see that you did use a raw string literal. (I don't know how I missed that)

I'm not this repo's owner or maintainer, I'm just following and your PR caught my interest. @peff74 is the one to approve or reject your PR.

If you wish to open a PR with these changes on my fork of it, I would be happy to merge it.

Thanks for your contribution! And sorry for reacting without thorough investigation. 😢

Copy link

@Giddy-Up224 Giddy-Up224 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed the changes and compiled and uploaded to my ESP32. All the functionality remains intact from what I can tell. I don't have a BMS to test with right now, so I cannot verify all functions for sure. However, it appears that no functionality has been compromised. It's just gotten easier to upload and go on with life, rather than fiddling with uploading files after every compile and upload. (Yeah, I know there's an Arduino extension that takes care of that for you, but that's another something for a noob to learn. And the .css and .html files aren't in a data folder as required for that method.)

@peff74
Copy link
Owner

peff74 commented Jan 7, 2026

Hi,
I'm glad you're using the code.
I wrote it for myself as an alternative to syssi because I wanted to use the 2 BMS and heating control.
But then I managed to do it with his version.
Regarding the change, I deliberately decided to leave the website files outside the code, as this makes changing the website much easier and faster.
It also makes the code clearer (in my opinion).
Of course, it requires a little more code for file management.
Have I overlooked any other improvements? If not, I would leave it as it is for now, as it is still in the experimental stage for me.

@Giddy-Up224
Copy link

Hi, I'm glad you're using the code. I wrote it for myself as an alternative to syssi because I wanted to use the 2 BMS and heating control. But then I managed to do it with his version. Regarding the change, I deliberately decided to leave the website files outside the code, as this makes changing the website much easier and faster. It also makes the code clearer (in my opinion). Of course, it requires a little more code for file management. Have I overlooked any other improvements? If not, I would leave it as it is for now, as it is still in the experimental stage for me.

@peff74 Understood — thanks for clarifying your intent and for sharing the code.

@mistralbkru I won’t be pushing this upstream, but you’re welcome to open a PR on my fork. If you do, consider moving parts of the logic into header files to keep the main file cleaner.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants