Ah, no worries figured it out, you gave me the idea!
Just for info for anyone searching (like I was)... if you're doing it via JK BMS ESPHome in Home Assistant - this will allow the BMS and the bluetooth of the ESP32 to talk to each other (and allowing you to extend the range on wifi). No wires or UART needed!!!
Go here for full source code
https://github.com/syssi/esphome-jk-bms (thanks to the authors of this, you're amazing!)
You need an ESP32 (ebay, aliexpress...etc...)
Add the ESP32 device to ESPHome (by usb is the easiest to first upload the code to it). Once you've done that you can connect and edit wirelessly.
You'll need to put this code in the ESPhome Yaml section - a section of my code below ... you'll need to add the sensors and the binary senors - if you follow the example from here and on the code, you'll see.
You'll need to scan for the bluetooth mac address of the JK BMS. Put this code in your Yaml below and remove all the parts after it
esp32_ble_tracker:
and look for the bluetooth devices it will list in the logs output - you'll see 'JK...' grab the mac of that and put it below.
example of my Yaml code that worked for me - be careful yaml is extremely syntax/case sensitve!
external_components:
- source: github://syssi/esphome-jk-bms@main
esphome:
name: 24vbms
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "removed"
ota:
password: "removed"
wifi:
ssid: "removed"
password: "removed"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "24Vbms Fallback Hotspot"
password: "removed"
captive_portal:
# if you want to use mqtt on it's own rather than Home Assistant remove the hash -
#mqtt:
# broker: your mqqt IP or name
# username: youruser
# password: yourpassword
esp32_ble_tracker: #this is the tracker that will let you find the Bluetooth devices - look for JK, remove parts after this while your scanning for it.
#add these parts once you have the mac address
ble_client:
- mac_address: put the mac address here
id: client0
jk_bms_ble:
- ble_client_id: client0
protocol_version: JK02
throttle: 5s
id: bms0
Fill in all the sensors here (see example yaml in github codes)
Hopefully you stumble across this ... and it helps!