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
480 stars 161 forks source link

Can I use this integration to connect 3*BMS boards (JK-BD6A20S10P) ? #406

Closed klugev303 closed 3 months ago

klugev303 commented 10 months ago

Good afternoon and Happy New Year!

Can I use this integration to connect *3BMS boards JK-BD6A20S10P* ? For this I will need 3ESP32 boards? Or is it possible to code several BMS using one ESP32 board? If it's not difficult, can you provide examples of writing code for 3 BMS boards? What is the best (more reliable) way to connect via Bluetooth or RS485?

Thank you!

PS: I use ESP Home v. 2023.12.5 HomeAssistant: Core 2023.12.1 Supervisor 2023.12.0 Operating System 11.2

syssi commented 9 months ago

These combinations are possible:

  1. A single ESP32 which talks using three different ble_client connections to 3 BLE devices. Crashs are very likely.
  2. A single ESP32 using three different hardware UARTs connected to 3 different BMS. Should be rock solid.
  3. One ESP8266/ESP32 per device (BLE vs. RS485) for improved stability.
klugev303 commented 9 months ago

These combinations are possible:

1. A single ESP32 which talks using three different `ble_client` connections to 3 BLE devices. Crashs are very likely.

2. A single ESP32 using three different hardware UARTs connected to 3 different BMS. Should be rock solid.

3. One ESP8266/ESP32 per device (BLE vs. RS485) for improved stability.

If it's not difficult, can you provide examples of writing code for 3 BMS boards?

syssi commented 9 months ago

Please try the attached example: esp32-ble-example-three-devices.yaml.txt

klugev303 commented 9 months ago

Please try the attached example: esp32-ble-example-three-devices.yaml.txt

Thank you very much, I will try it, all the best to you!

Fliacik commented 8 months ago

Hi its safe connecting 3 bms to 1 esp ? I mean ground loop problem throught this bms? If one bms do offline P- than its posible loop ground throught gps (gnd) port and power goes this way of I maybe wrong ?

syssi commented 8 months ago

IMO this depends how you power the ESP. What do you think?

Fliacik commented 8 months ago

If you connect 3bms into one ESP you connect all bms grounds together. When one bms go to fail state or disconnect P- all traffic will be redirect to esp ground. Thats do loop gnd.