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
442 stars 148 forks source link

Lost information #308

Closed Salve87 closed 1 year ago

Salve87 commented 1 year ago

Hello, after months of perfect communication. I now (nothing changed) lost a lot of information. Cell voltages is still updated. Other information as SOC for example is not updated. Using the Bluetooth app on the cell works fine rebooting Homeassistant and the BMS didn’t help. Any other idea’s?

Thanks for support

4DE9C7B6-5360-4F69-93A4-8BAA118CA17C

syssi commented 1 year ago

Could you provide an ESPHome log, the BMS model name and the software/hardware version? I've have an idea what's going on.

Salve87 commented 1 year ago

Could you provide an ESPHome log, the BMS model name and the software/hardware version? I've have an idea what's going on.

The issue showed up yesterday 10:20pm The logs on the phone won’t go back that far. Software/hardware I habe to check when home

2023-04-12 10:27:50,472 INFO 200 GET /static/js/esphome/c.2fd5868c.js (0.0.0.0) 3.40ms 2023-04-12 10:27:51,322 INFO 101 GET /validate (0.0.0.0) 2.57ms 2023-04-12 10:27:51,503 INFO Running command 'esphome --dashboard config /config/esphome/esp32-cam.yaml' 2023-04-12 10:27:51,674 INFO 200 GET /static/js/esphome/c.5cd5d307.js (0.0.0.0) 8.62ms 2023-04-12 10:27:53,858 INFO Process exited with return code 0 2023-04-12 10:27:55,482 INFO 304 GET /devices (0.0.0.0) 2.92ms 2023-04-12 10:28:00,439 INFO 304 GET /devices (0.0.0.0) 2.66ms 2023-04-12 10:28:05,469 INFO 304 GET /devices (0.0.0.0) 2.70ms 2023-04-12 10:29:23,579 INFO 200 GET /devices (0.0.0.0) 3.08ms 2023-04-12 10:34:23,460 INFO 200 GET /devices (0.0.0.0) 2.66ms

syssi commented 1 year ago

This looks like the log of the ESPHome Dashboard. Could you provide the log of the ESHPhome node? It can be downloaded if you open the ESPHome Node tile at the dashboard. There is a "logs" button at the bottm right corner.

Salve87 commented 1 year ago

This looks like the log of the ESPHome Dashboard. Could you provide the log of the ESHPhome node? It can be downloaded if you open the ESPHome Node tile at the dashboard. There is a "logs" button at the bottm right corner.

Do you mean this button? 770A809C-F006-4FC1-B7AE-511C024FABDE

I got to check if I get an download file on the pc. On the cell nothing shows up

syssi commented 1 year ago

No. ;-) Do you use the ESPHome Dashboard? It's an HA Add-On accessible via the main navigation on the left.

Salve87 commented 1 year ago

I

No. ;-) Do you use the ESPHome Dashboard? It's an HA Add-On accessible via the main navigation on the left.

I have it running, but not for the jk bms esp. At that time when installing the esp, I was totally new to HA. A friend of mine flashed the esp… I have another esp laying around. I could flash it this afternoon using the esp dashboard.

syssi commented 1 year ago

Do you have a copy of the YAML configuration?

Salve87 commented 1 year ago

Do you have a copy of the YAML configuration?

Probably not. I was using the file from github

syssi commented 1 year ago

In this case I suggest to start from scratch. Use the BLE configuration example from this project, update the MAC address and flash this configuration using the HA Dashboard to your ESP32. So you have access to the logs in future and you are able to update the device whenever you want.

Salve87 commented 1 year ago

In this case I suggest to start from scratch. Use the BLE configuration example from this project, update the MAC address and flash this configuration using the HA Dashboard to your ESP32. So you have access to the logs in future and you are able to update the device whenever you want.

Ok as suggested, new ESP, new code, new setup: same problem:

This Time I have a log file: logs_esp32-jk-bms_logs (1).txt

Any Idea whats wrong, why its not working all of a sudden ?? Thanks

syssi commented 1 year ago

Could you tell me your BMS model and software/hardware version?

Salve87 commented 1 year ago

Could you tell me your BMS model and software/hardware version?

sure, sorry forgot IMG_6841

syssi commented 1 year ago

Please change the protocol version from JK02 to JK02_32S and compile & flash your ESP with the updated configuration:

substitutions:
  name: jk-bms
  device_description: "Monitor and control a JK-BMS via bluetooth"
  external_components_source: github://syssi/esphome-jk-bms@main
  mac_address: ...
  protocol_version: JK02_32S

Does this fix the issue?

Salve87 commented 1 year ago

JK02_32S

now it won't connect: 19:31:44][D][esp32_ble_tracker:246]: Starting scan... [19:31:46][W][jk_bms_ble:365]: [C8:47:8C:E6:EA:C5] Not connected [19:31:49][D][esp32_ble_client:048]: [0] [C8:47:8C:E6:EA:C5] Found device [19:31:49][D][esp32_ble_tracker:214]: Pausing scan to make connection... [19:31:49][I][esp32_ble_client:064]: [0] [C8:47:8C:E6:EA:C5] 0x00 Attempting BLE connection [19:31:50][D][esp-idf:000]: W (269009) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[19:31:50][D][esp-idf:000]: W (269125) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[19:31:50][D][esp-idf:000]: W (269219) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[19:31:50][D][esp-idf:000]: W (269330) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[19:31:50][D][esp-idf:000]: W (269334) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x3e

[19:31:50][W][esp32_ble_client:134]: [0] [C8:47:8C:E6:EA:C5] Connection failed, status=133 [19:31:50][D][esp32_ble_tracker:246]: Starting scan... [19:31:50][D][esp32_ble_client:048]: [0] [C8:47:8C:E6:EA:C5] Found device [19:31:50][D][esp32_ble_tracker:214]: Pausing scan to make connection... [19:31:50][I][esp32_ble_client:064]: [0] [C8:47:8C:E6:EA:C5] 0x00 Attempting BLE connection

Salve87 commented 1 year ago

JK02_32S

now it won't connect: 19:31:44][D][esp32_ble_tracker:246]: Starting scan... [19:31:46][W][jk_bms_ble:365]: [C8:47:8C:E6:EA:C5] Not connected [19:31:49][D][esp32_ble_client:048]: [0] [C8:47:8C:E6:EA:C5] Found device [19:31:49][D][esp32_ble_tracker:214]: Pausing scan to make connection... [19:31:49][I][esp32_ble_client:064]: [0] [C8:47:8C:E6:EA:C5] 0x00 Attempting BLE connection [19:31:50][D][esp-idf:000]: W (269009) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[19:31:50][D][esp-idf:000]: W (269125) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[19:31:50][D][esp-idf:000]: W (269219) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[19:31:50][D][esp-idf:000]: W (269330) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e

[19:31:50][D][esp-idf:000]: W (269334) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x3e

[19:31:50][W][esp32_ble_client:134]: [0] [C8:47:8C:E6:EA:C5] Connection failed, status=133 [19:31:50][D][esp32_ble_tracker:246]: Starting scan... [19:31:50][D][esp32_ble_client:048]: [0] [C8:47:8C:E6:EA:C5] Found device [19:31:50][D][esp32_ble_tracker:214]: Pausing scan to make connection... [19:31:50][I][esp32_ble_client:064]: [0] [C8:47:8C:E6:EA:C5] 0x00 Attempting BLE connection

Reatart helped now it’s running, Thanks for the support 👍

syssi commented 1 year ago

All measurements are decoded properly again?