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
403 stars 134 forks source link

Bluetooth stopped working after 1 week. #Update #482

Closed thegoloone closed 2 months ago

thegoloone commented 3 months ago

Hello, I have a strange problem. My esp32 worked for more than one week. And then it stopped working with the error:

[17:44:01][D][esp32_ble_tracker:266]: Starting scan...
[17:44:02][W][jk_bms_ble:237]: [C8:47:8C:EC:58:CD] Not connected
[17:44:05][D][esp32_ble_client:110]: [0] [C8:47:8C:EC:58:CD] Found device
[17:44:05][D][esp32_ble_tracker:661]: Found device C8:47:8C:EC:58:CD RSSI=-77
[17:44:05][D][esp32_ble_tracker:682]:   Address Type: PUBLIC
[17:44:05][D][esp32_ble_tracker:215]: Pausing scan to make connection...
[17:44:05][I][esp32_ble_client:067]: [0] [C8:47:8C:EC:58:CD] 0x00 Attempting BLE connection
[17:44:05][D][esp-idf:000]: W (131678) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[17:44:05][D][esp-idf:000]: W (131795) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[17:44:05][D][esp-idf:000]: W (131891) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[17:44:05][D][esp-idf:000]: W (132005) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x3e

[17:44:05][D][esp-idf:000]: W (132009) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[17:44:05][D][esp32_ble_client:172]: [0] [C8:47:8C:EC:58:CD] ESP_GATTC_DISCONNECT_EVT, reason 62
[17:44:05][D][esp32_ble_client:110]: [0] [C8:47:8C:EC:58:CD] ESP_GATTC_OPEN_EVT
[17:44:05][W][esp32_ble_client:143]: [0] [C8:47:8C:EC:58:CD] Connection failed, status=133

I just can't get what happened. I tried different esp32 modules.

Did someone experienced similar problems?

Thx

thegoloone commented 2 months ago

I ended up setting a D1 Mini wired to the BMS. Unfortunately I don't get every data I got throuth the Bluetooth connection. After about two weeks the Bluetototh connection started working again. I am a bit confused about this.

Now both are working, but both tell me that cell 1 voltage is unknown. Does someone have the same problem with cell 1? --> this was a bug in my card. Sorry.

thegoloone commented 2 months ago

My setup now are one esp which connects by ble to two JKBMS and a D1 Mini Pro which is wired to both BMS by uart. If the Bluetooth fails again, I have my uart Backup :-).