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

JK-B2A20S20P-HC temperatures issue #515

Open jopl opened 5 days ago

jopl commented 5 days ago

Hi, I have got an issue with temperatures reading from JK-BMS (JK-B2A20S20P-HC). The ESPHome reads them constantly as 44°C. All other data are perfect. Isn't there any solution for such situation, please? Kind regards, Josef.

syssi commented 5 days ago

Which component / connection type do you use? Could you increase the log level and provide a log? I would like to see the raw traffic.

syssi commented 5 days ago

Which component / connection type do you use? Could you increase the log level and provide a log? I would like to see the raw traffic.

jopl commented 5 days ago

Hi syssi, I am using ESPHome with ESP8266 (ESP-01), directly connected to RX/TX. 2 temperature sensors are connected to appropriate connector on JK/BMS. It is really interesting ... with "level: VERBOSE" I cannot get any temperature (I can get just voltages) like this:

[16:33:39][I][jk_bms:071]: Status frame received
[16:33:39][V][sensor:043]: 'Nap. článku 1 - BMS01': Received new state 3.276000
[16:33:39][D][sensor:093]: 'Nap. článku 1 - BMS01': Sending state 3.27600 V with 3 decimals of accuracy
[16:33:39][V][sensor:043]: 'Nap. článku 2 - BMS01': Received new state 3.276000
[16:33:39][D][sensor:093]: 'Nap. článku 2 - BMS01': Sending state 3.27600 V with 3 decimals of accuracy
...

With "level: DEBUG":

...
[16:40:58][D][sensor:093]: 'Max. napětí článku - BMS01': Sending state 3.27600 V with 3 decimals of accuracy
[16:40:58][D][sensor:093]: 'Max. rozdíl na článcích - BMS01': Sending state 0.00300 V with 3 decimals of accuracy
[16:40:58][D][sensor:093]: 'Průměrné napětí článku - BMS01': Sending state 3.27450 V with 3 decimals of accuracy
[16:40:58][D][sensor:093]: 'Teplota - BMS01': Sending state 44.00000 °C with 0 decimals of accuracy
[16:40:58][D][sensor:093]: 'Teplota baterie 1 - BMS01': Sending state 44.00000 °C with 0 decimals of accuracy
...

I am very sorry for czech language ... "Teplota" = "Temperature" I hope there will be some local issue, but has got no idea ... :-( Is there any other level name to see raw input data, please? Thank you very much for your help in advance. Regards, Josef.

syssi commented 4 days ago

Please use this configuration:

logger:
  baud_rate: 0
  level: DEBUG

uart:
  id: uart_0
  baud_rate: 115200
  rx_buffer_size: 384
  tx_pin: ${tx_pin}
  rx_pin: ${rx_pin}
  debug:
    direction: BOTH

and provide a complete log.

jopl commented 4 days ago

Thanks syssi. I am so sorry, I have got the HW serial port used for JK-BMS communication ... wouldn't be this the problem? Except "debug: direction: BOTH" everzthing is on place ... I can use just remote logging via WiFi at the moment. If I need the HW port for logging, I have to change configuration, but I am able to do it in 14 days ... I amm on vacation out of home :-(. Regards, Josef.

jopl commented 4 days ago

But I am trzing to send you the "complete log" with DEBUG level. Log_BMS01.txt Regards, Josef

syssi commented 4 days ago

It looks like you haven't enable the debug mode of the uart component. Could you please update the uart section too and provide another log?

uart:
  id: uart_0
  baud_rate: 115200
  rx_buffer_size: 384
  tx_pin: ${tx_pin}
  rx_pin: ${rx_pin}
  debug:
    direction: BOTH

The last two lines are the important ones.

jopl commented 4 days ago

Dear syssi, I am sorry, I was afraid to allocate serial port to debug, but I did it and everything went. I am sending the log. Log_BMS01.txt Thx so much. Regards, Josef.

syssi commented 4 days ago

Could you guess the current room / battery temperature? It is cold or warm around the battery at the moment? ;-)

jopl commented 4 days ago

around 20°C, I guess ...

jopl commented 4 days ago

I asked my friend to measure it ... 24°C.

syssi commented 4 days ago

Does the 44 °C measurement change over time or is it constant?

jopl commented 4 days ago

Absolutely no change at all, it is constant from beginning.

syssi commented 4 days ago

If you use the android app there are valid temperature measurements so we can be sure the temperature probes are connected properly?

jopl commented 4 days ago

It's more complicated ... I'm not able to view temperature(s) in app :-(. Just NA is there :-( 3b1c8efe-c6db-4d37-b8eb-b1b289710606 Regards, Josef.

jopl commented 4 days ago

I'm using 2 sensors (in one connector), which came in the package with JK-BMS. They are connected to the BMS well (to left upper connector - marked, based on pinout attached), I double checked it. If you can perceive it as fault, let me know, please. Thx. Josef. IMG_4309

syssi commented 4 days ago

Hmm... could you ask your seller or manufacturer about this issue? It looks like a hardware issue and cannot be resolved here.