diy solar

diy solar

Monitoring Software-Solar Assistant, JK-BMS, ESPHome and Home Assistant

I am having the hardest time trying to get ESPhome to work with an esp8266 and a project to connect to the junctek shunt.
Electronically everything is working fine as I can read raw data out of the juncteck
monitor into a PC but I just don't understand enough about yaml files and all that other stuff to make head nor tail of the project on GitHub. Are there any kind souls that can help me out with this?
 
Heres a couple shots of my home assistant dashboard that I have been working on this week. Currently pulling data from Daly 16s active balancer on a 48v pack, and also have a Daly 4s BMS on a separate 12v pack. Pulling the data into Home Assistant through the UART port connected to an ESP32 chip running ESPHome. The ESP chip sends all the data from the bms over Wifi.

I have a new JK BMS coming in the mail - planning to set that up the same way this weekend with ESPHome. This one however I can connect via bluetooth instead of having to hard wire it. So the JK will connect to my ESP32 wirelessly over bluetooth and then the ESP32 will then relay that data to my computer over Wifi.
Great job if possible you might list the components you used. Might help others with their projects.
 
Great job if possible you might list the components you used. Might help others with their projects.
I believe I did list everything, its just a Daly BMS and a $5 ESP32 board from amazon plugged into it.
 
I am having the hardest time trying to get ESPhome to work with an esp8266 and a project to connect to the junctek shunt.
Electronically everything is working fine as I can read raw data out of the juncteck
monitor into a PC but I just don't understand enough about yaml files and all that other stuff to make head nor tail of the project on GitHub. Are there any kind souls that can help me out with this?

@Quattrohead I'm starting to dive into this now myself from a Home Assistant angle, so might be able to help, though best to start a new thread. I suggest looking at https://developers.home-assistant.io/docs/development_index/ if you are looking at this from an Home Assistant integration perspective.

@DanF Great thread!
 
Last edited:
Hi, im very new to all of this, so wondering if i am right in thinking that i could connect a esp32 to a jk bms via bluetooth, so, does the esp32 actually have wifi but in? So i could send the data to a raspberry pi via wifi, or via usb?/ethernet? (cable would be better as would be next to each other) the raspberry pi would be running home assistant. (this would all be located in my shed that just gets 2.4g wifi access)
I could then access home assistant on a mobile device running android (does home assistant limit features when accessing on android?) to be able to view the status of my battery banks? (ideally id like to do this with a junktec shunt, but looks even more complicated).

(btw my shed is too far away for the bluetooth on jk bms'es)

From within home assistant, would i then be able to use SOC from the jk bms (and time of day) to activate a smart plug linked to home assistant?

Thanks ?

Think ive got a lot to learn lol.

Im also wanting to do something similar with my epever upower hi all in one inverter as it has no remote access?.
The end of this thread seems to suggest someone has actually managed to do this, but im finding it difficult to know where to start with it all.

 
Hi, im very new to all of this, so wondering if i am right in thinking that i could connect a esp32 to a jk bms via bluetooth, so, does the esp32 actually have wifi but in? So i could send the data to a raspberry pi via wifi, or via usb?/ethernet? (cable would be better as would be next to each other) the raspberry pi would be running home assistant. (this would all be located in my shed that just gets 2.4g wifi access)
I could then access home assistant on a mobile device running android (does home assistant limit features when accessing on android?) to be able to view the status of my battery banks? (ideally id like to do this with a junktec shunt, but looks even more complicated).

(btw my shed is too far away for the bluetooth on jk bms'es)

From within home assistant, would i then be able to use SOC from the jk bms (and time of day) to activate a smart plug linked to home assistant?

Thanks ?

Think ive got a lot to learn lol.

Im also wanting to do something similar with my epever upower hi all in one inverter as it has no remote access?.
The end of this thread seems to suggest someone has actually managed to do this, but im finding it difficult to know where to start with it all.

As far as the jkbms yes you can! I do exactly that.

So you flash the jkbms program to the esp32 using ESPHome (Which is in your Home Assistant). The esp32 has both wifi and bluetooth built in.
The esp32 will need to be near the jkbms and will pull all information from the JK through bluetooth and will send the data to home assistant through the ESPHome (You add a new device and name it in there) for instance mine is just called jk-bms. I use several of these chips so it's a good idea to name them so you know which one you are dealing with later.

Using this method pulls in EVERYTHING! There is even a switch that you can tap on your phone to balance the pack.

I use Solar Assistant (Located near my inverters) to pull all the other data from my smart shunt and both inverters using mqtt in home assistant. There is pretty good documentation on doing that part from the Solar Assistant website.

Once this is all set up you can get really creative! Flash your lights or maybe turn them a different color if your batteries get too low? You name it!!

Here is a picture taken from my android which I use with home assistant like you asked about...

Let me know if I can help,
Dan

HA Mobile.jpg
 
As far as the jkbms yes you can! I do exactly that.

So you flash the jkbms program to the esp32 using ESPHome (Which is in your Home Assistant). The esp32 has both wifi and bluetooth built in.
The esp32 will need to be near the jkbms and will pull all information from the JK through bluetooth and will send the data to home assistant through the ESPHome (You add a new device and name it in there) for instance mine is just called jk-bms. I use several of these chips so it's a good idea to name them so you know which one you are dealing with later.

Using this method pulls in EVERYTHING! There is even a switch that you can tap on your phone to balance the pack.

I use Solar Assistant (Located near my inverters) to pull all the other data from my smart shunt and both inverters using mqtt in home assistant. There is pretty good documentation on doing that part from the Solar Assistant website.

Once this is all set up you can get really creative! Flash your lights or maybe turn them a different color if your batteries get too low? You name it!!

Here is a picture taken from my android which I use with home assistant like you asked about...

Let me know if I can help,
Dan

View attachment 129974
Thats awsome, thank you ?. My original idea was to do exactly like you are doing and have a small tablet on the wall simply showing my two battery bank soc's, but like you suggest, there are so many other possibilities to all of this, i can see that this is the beginnings of my next project lol.
Im now watching some youtube vids on the various esp microcontrollers, as i want to make sure i get the right one initially, although, im sure ill end up getting more than one in the end anyway, they are so cheap.
Lots to read and learn!
 
Thats awsome, thank you ?. My original idea was to do exactly like you are doing and have a small tablet on the wall simply showing my two battery bank soc's, but like you suggest, there are so many other possibilities to all of this, i can see that this is the beginnings of my next project lol.
Im now watching some youtube vids on the various esp microcontrollers, as i want to make sure i get the right one initially, although, im sure ill end up getting more than one in the end anyway, they are so cheap.
Lots to read and learn!
I use these. You'll have to hold the boot button down while plugging into your computer via a USB cable just for the initial program upload to the esp32. After it's loaded everything is wireless from there. (Click on the link below)...

 
Last edited:
I use these. You'll have to hold the boot button down while plugging into your computer via a USB cable just for the initial program upload to the esp32. After it's loaded everything is wireless from there. (Click on the link below...

ESP-WROOM-32
Thats one that im now looking at lol (the link doesnt work for me for some reason, but doesnt matter, i know the one you mean) ?
 
How about these guys ? ESP8266 I have been playing with them.
As I understand it, they work with the same code, just have to program as an ESP8266 not ESP32.
We don't need many pins for the simple serial data we are looking at.
 
How about these guys ? ESP8266 I have been playing with them.
As I understand it, they work with the same code, just have to program as an ESP8266 not ESP32.
We don't need many pins for the simple serial data we are looking at.
ESP8266 does not have bluetooth, it is wifi only. So if you want to use this chip you will have to hardwire the uart pins on the esp8266 to the jk bms and it will work just fine. If you prefer to pull the data from the jk bms wirelessly you can do that over bluetooth with an esp32 chip which has both bluetooth and wifi.

The esp chips pull the data from the jk bms (either over bluetooth or serial), and then they relay that data back to home assistant over wifi. You can control all the settings thru home assistant just the same as you can over the JK phone app.

 
I am using ONE esp32 to talk to 3 JKBMS via BT and upload data to HA via WiFi. All 3 show up in home assistant with no issue.
Nice, i jave two jk's that im hopeing to do the same with. My esp32 arrived the other day, now learning how to use it with visual studio code/platformio, bearing in mind that i have not done any programming for over 20 years lol, gunna take me a while ?
 
Hi, just managed to run a simple program on an esp32 after having to wait to get a new pc as the psu died on my 15+ year old tower! (i bought a mini pc! - great little device)
Esp32 Works ok. (tested with visual studio code)
But i dont yet even have anything to use to run home assistant core on. Anyone know if a rasberry pi 3 B+ would be good enough for this? Any real advantage of a rpi 4 over the 3b+?
Thanks ?
 
Hi, just managed to run a simple program on an esp32 after having to wait to get a new pc as the psu died on my 15+ year old tower! (i bought a mini pc! - great little device)
Esp32 Works ok. (tested with visual studio code)
But i dont yet even have anything to use to run home assistant core on. Anyone know if a rasberry pi 3 B+ would be good enough for this? Any real advantage of a rpi 4 over the 3b+?
Thanks ?
rpi 3 will work fine, its best to use an external USB SSD instead of an SD card
 
Back
Top