syssi / esphome-jbd-bms

ESPHome component to monitor and control a Xiaoxiang Battery Management System (JBD-BMS) via UART-TTL or BLE
Apache License 2.0
111 stars 31 forks source link

JBD-AP21S002 no BLE connection #44

Closed Zahnpasta83 closed 1 year ago

Zahnpasta83 commented 1 year ago

Hello,

i tried to get a connection with JBD-AP21S002 BMS but i am unable. Thought there wouldn't be a big difference to the JBD-AP21S001. Is there a possibility to get it run on the S002 Version?

Bildschirm­foto 2023-06-27 um 16 59 10 Bildschirm­foto 2023-06-27 um 16 59 40
syssi commented 1 year ago

Did you update the mac_address to the one of your device? Is the ESP32 able to establish a BLE client connection to the BMS?

Zahnpasta83 commented 1 year ago

Did you update the mac_address to the one of your device? Is the ESP32 able to establish a BLE client connection to the BMS?

Yes i updated the mac address

IMG_2733

How do i establish a BLE client connection with the ESP?

syssi commented 1 year ago

Please increase the debug level of some components using this snippet:

logger:
  level: VERY_VERBOSE
  logs:
    esp32_ble_tracker: VERY_VERBOSE
    jbd_bms_ble: VERY_VERBOSE
    scheduler: DEBUG
    component: DEBUG
    sensor: DEBUG

Flash your ESP another time and provide a complete log. There should be some lines of the esp32_ble_tracker' which reports all visible devices and some log lines of theble_client` component which tries to establish a connection to the BMS. If the connection gets established a component should report which service UUIDs and characteristics are available. If your BMS doesn't like the implementation you will see a disconnect and "Not connected" warnings later on.

Zahnpasta83 commented 1 year ago

logs_bms-akku1_run.txt

syssi commented 1 year ago

Could you provide a link to the Android App of your BMS? The screenshot looks pretty different to app I'm aware of.

Zahnpasta83 commented 1 year ago

I have got only Apple devices

syssi commented 1 year ago

Could you force close the BMS app on your smartphone? Most BMS modules aren't able to handle multiple connections and stops advertising if there is an active connection. Your log indicates the ESP32 doesn't see an advertised device with the MAC address 3E:B3:01:37:C1:A4 at the air. Please make sure the BLE connection LED indicates "no connection" and the ESP32 is close enough to your BMS.

Zahnpasta83 commented 1 year ago

logs_bms-akku1_logs.txt No other device is connected to the BMS.... still no luck. It doesn't work

Zahnpasta83 commented 1 year ago

I tried as well the other BMS (i have got 2) but same problem

Zahnpasta83 commented 1 year ago

I found the problem for some reason the APP shows the MAC address the wrong way around

Bildschirm­foto 2023-06-27 um 18 39 10

this is the correct MAC address

syssi commented 1 year ago

Does it work now? Could you provide some details about your BMS version? I would like to extend the list of supported devices.

Zahnpasta83 commented 1 year ago

Yes it is working now. Here is a picture of the BMS details image

syssi commented 1 year ago

Do you like to share some details about your battery setup? A 18S setup is pretty uncommon, isn't it? Is your 48V inverter simply 60V tolerant or what's the reason for such a system voltage? :-)

Zahnpasta83 commented 1 year ago

You are right 18S is uncommon. I have 3 x Victron Multiplus II 48/5000 and 3 Victron Solarcharger which are also able to handle 64,8V Max. Upper charging limit is at 62,1V for my battery. I made 2 battery packs each with 18S. Each battery pack has 304ah Eve cells with a capacity of about 17,5 kWh.

image image

syssi commented 1 year ago

Good job and pretty nice setup especially the 3D printed parts! Just the cheap network switch doesn't fit into the picture! ;-)

Zahnpasta83 commented 1 year ago

True 😅 maybe I'll swap that out too

GermanTicketGuy commented 3 months ago

Hey Guys, I just wanted to confirm, by reversing the MAC-Adress it worked on the first try. @Zahnpasta83 Thanks a lot! And btw clean setup :)