Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JK balancer support #18

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add JK balancer support #18

wants to merge 4 commits into from

Conversation

syssi
Copy link
Owner

@syssi syssi commented Nov 6, 2021

@bobwho69: Could you download this feature branch and flash the esp32-example.yaml to your esp32:

wget https://github.com/syssi/esphome-jk-bms/blob/add-jk-balancer-support/esp32-example.yaml
esphome run esp32-example.yaml

I've added a single query to this feature branch. Your BMS should respond if it supports the 9600 baud balancer protocol. Please provide some responses of your BMS.

Closes: #16

@bobwho69
Copy link

bobwho69 commented Nov 6, 2021

I'm sorry, I'm a novice pi user, with my ESP Home instance running on a Home Assistant Supervised docker and me not understanding this feature of github... how do I do this feature branch?

@syssi
Copy link
Owner Author

syssi commented Nov 6, 2021

Okay in this case just flash this configuration (you've to change it a bit to use ethernet instead of wifi f.e.):

substitutions:
  name: jk-bms

esphome:
  name: ${name}
  platform: ESP32
  board: esp-wrover-kit

external_components:
  - source: github://syssi/esphome-jk-bms@add-jk-balancer-support
    refresh: 0s

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

api:
  reboot_timeout: 0s

ota:
logger:
  level: VERY_VERBOSE
  logs:
    api.service: WARN
    ota: WARN
    sensor: WARN
    jk_bms_ble: VERY_VERBOSE
    uart_esp32: VERY_VERBOSE

uart:
  id: uart0
  baud_rate: 9600
  rx_buffer_size: 384
  tx_pin: GPIO14
  rx_pin: GPIO4

jk_modbus:
  id: modbus0
  uart_id: uart0

jk_bms:
  id: bms0
  jk_modbus_id: modbus0

sensor:
  - platform: jk_bms
    cell_voltage_1:
      name: "${name} cell voltage 1"

@bobwho69
Copy link

bobwho69 commented Nov 6, 2021

OK tried that, same repeated result. I swapped the pins around and same answer.

[00:24:53][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=152640 (now=157640)
[00:24:53][VV][uart.arduino_esp32:121]:     Wrote 0b01010101 (0x55)
[00:24:53][VV][uart.arduino_esp32:121]:     Wrote 0b10101010 (0xAA)
[00:24:53][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[00:24:53][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[00:24:53][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[00:24:53][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[00:24:53][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[00:24:53][VV][uart.arduino_esp32:142]:     Flushing...
[00:24:53][VV][uart.arduino_esp32:135]:     Read 0b01010101 (0x55)
[00:24:53][VV][uart.arduino_esp32:135]:     Read 0b10101010 (0xAA)
[00:24:53][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[00:24:53][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[00:24:53][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)
[00:24:53][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)
[00:24:53][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)

If this is because of the WT32-ETH01 board I'm using, I am able to try a ESP32 devkit v1 and place a wifi AP in the container to test. Would the pins RX2 (16) and TX2 (17) along with one of the GND pins be suitable on this board?

@syssi
Copy link
Owner Author

syssi commented Nov 6, 2021

Yes. Should work!

@syssi
Copy link
Owner Author

syssi commented Nov 6, 2021

Which GPIOs do you use at the moment at your WT32-ETH01?

@bobwho69
Copy link

bobwho69 commented Nov 6, 2021

I use GPIO5 RXD and GPIO17 TXD and the GND pin below it. Datasheet I am not sure about the (RS)485_EN function pin and it is not on a regular ESP32 so I dont use it.
I will try the other board in the morning with this branch and report back.

@bobwho69
Copy link

bobwho69 commented Nov 6, 2021

I have connected the ESP32 Dev Kit V1 and it reports the same. I have then swapped pins around, same. I then suspected the pins I was using were not correct so I set them to your GPIO14 & 4. same result

[09:22:23][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=114209 (now=119211)
[09:22:23][VV][uart.arduino_esp32:121]:     Wrote 0b01010101 (0x55)
[09:22:23][VV][uart.arduino_esp32:121]:     Wrote 0b10101010 (0xAA)
[09:22:23][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[09:22:23][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[09:22:23][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[09:22:23][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[09:22:23][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[09:22:23][VV][uart.arduino_esp32:142]:     Flushing...
[09:22:23][V][component:186]: Component esphome.coroutine took a long time for an operation (0.09 s).
[09:22:23][V][component:187]: Components should block for at most 20-30ms.
[09:22:23][VV][uart.arduino_esp32:135]:     Read 0b01010101 (0x55)
[09:22:23][VV][uart.arduino_esp32:135]:     Read 0b10101010 (0xAA)
[09:22:23][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[09:22:23][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[09:22:23][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)
[09:22:23][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)
[09:22:23][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)

My next thought
is this jk active balancer using real rs-485 protocol this time? the connector is 3 pin with G, A/H, B/L but you mention 4 pin with GND, Tx and Rx and VBAT on the BMS
could this cause the unexpected data?

@syssi
Copy link
Owner Author

syssi commented Nov 6, 2021

Could you provide a high-res photo of the mainboard?

@bobwho69
Copy link

bobwho69 commented Nov 6, 2021

Syssi I must thank you for this effort you are putting in here! Outstanding!
JK-DZ11-B2A24S rs485 icgogogo
!

Thank you for your help!
Robbie

@bobwho69
Copy link

bobwho69 commented Nov 6, 2021

here is a zoom in on the IC i think you want to see (and was not clear) it says a VP3082

jk-dz11-b2a24s zoom in

@syssi
Copy link
Owner Author

syssi commented Nov 7, 2021

Good catch! This is a "Low-Power RS-485 Transceiver". In this case you have to add a RS485 to TTL converter module between the balancer and the ESP.

@bobwho69
Copy link

bobwho69 commented Nov 7, 2021

Yes, I thought the same, so I reconnected my RS485 module back in, and I see the TX light flash every 5 secs but there is no data received in the logs or RX light on the module.

@bobwho69
Copy link

bobwho69 commented Nov 7, 2021

SUCCESS after research into RS485 problems, by swapping A & B to correct for a polarity error.
It appears to not follow the A to A and B to B rule, but the colour code of red for positive and black for negative

[22:07:49][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=129635 (now=134637)
[22:07:49][VV][uart.arduino_esp32:121]:     Wrote 0b01010101 (0x55)
[22:07:49][VV][uart.arduino_esp32:121]:     Wrote 0b10101010 (0xAA)
[22:07:49][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[22:07:49][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[22:07:49][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:07:49][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:07:49][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[22:07:50][VV][uart.arduino_esp32:142]:     Flushing...
[22:07:50][V][component:186]: Component esphome.coroutine took a long time for an operation (0.08 s).
[22:07:50][V][component:187]: Components should block for at most 20-30ms.
[22:07:50][VV][uart.arduino_esp32:135]:     Read 0b01010101 (0x55)
[22:07:50][VV][uart.arduino_esp32:135]:     Read 0b10010101 (0x95)
[22:07:50][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[22:07:50][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:07:50][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)

@bobwho69
Copy link

bobwho69 commented Nov 7, 2021

Reverting to main branch returns the following: Still at 9600 baud rate

[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b01010111 (0x57)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00010011 (0x13)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000110 (0x06)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000011 (0x03)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b01101000 (0x68)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[22:16:03][VV][uart.arduino_esp32:121]:     Wrote 0b00101001 (0x29)
[22:16:03][VV][uart.arduino_esp32:142]:     Flushing...
[22:16:03][V][component:186]: Component esphome.coroutine took a long time for an operation (0.24 s).
[22:16:03][V][component:187]: Components should block for at most 20-30ms.
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b10101100 (0xAC)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11110101 (0xF5)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11011001 (0xD9)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11110011 (0xF3)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111001 (0xF9)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b00101111 (0x2F)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b11111101 (0xFD)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b10101101 (0xAD)
[22:16:03][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)

@syssi
Copy link
Owner Author

syssi commented Nov 7, 2021

You should use 115200 baud now.

@syssi
Copy link
Owner Author

syssi commented Nov 7, 2021

Please try to use the original protocol again instead of this feature branch:

external_components:
  - source: github://syssi/esphome-jk-bms@main
    refresh: 0s

@bobwho69
Copy link

bobwho69 commented Nov 7, 2021

I have received the same data response as before and the data is not correct. I believe the formatting for the balancer rs485 protocol v1.3 response is not in the code.

@syssi
Copy link
Owner Author

syssi commented Nov 7, 2021

Please provide 4-5 responses.

@bobwho69
Copy link

bobwho69 commented Nov 7, 2021

HI, thank you so much for your patientce. the response is the same every time.

Branch: add-jk-balancer-support
Baud: 115200

[07:09:39][VV][uart.arduino_esp32:121]:     Wrote 0b01010101 (0x55)
[07:09:39][VV][uart.arduino_esp32:121]:     Wrote 0b10101010 (0xAA)
[07:09:39][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:09:39][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:39][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:39][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:39][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:39][VV][uart.arduino_esp32:142]:     Flushing...
[07:09:39][V][component:186]: Component esphome.coroutine took a long time for an operation (0.09 s).
[07:09:39][V][component:187]: Components should block for at most 20-30ms.
[07:09:39][VV][uart.arduino_esp32:135]:     Read 0b01010101 (0x55)
[07:09:39][VV][uart.arduino_esp32:135]:     Read 0b10010101 (0x95)
[07:09:39][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:39][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:09:39][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:39][V][component:186]: Component jk_modbus took a long time for an operation (0.05 s).
[07:09:39][V][component:187]: Components should block for at most 20-30ms.
[07:09:44][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=577880 (now=582881)
[07:09:44][VV][uart.arduino_esp32:121]:     Wrote 0b01010101 (0x55)
[07:09:44][VV][uart.arduino_esp32:121]:     Wrote 0b10101010 (0xAA)
[07:09:44][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:09:44][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:44][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:44][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:44][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:44][VV][uart.arduino_esp32:142]:     Flushing...
[07:09:44][V][component:186]: Component esphome.coroutine took a long time for an operation (0.09 s).
[07:09:44][V][component:187]: Components should block for at most 20-30ms.
[07:09:44][VV][uart.arduino_esp32:135]:     Read 0b01010101 (0x55)
[07:09:44][VV][uart.arduino_esp32:135]:     Read 0b10010101 (0x95)
[07:09:44][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:44][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:09:44][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:44][V][component:186]: Component jk_modbus took a long time for an operation (0.06 s).
[07:09:44][V][component:187]: Components should block for at most 20-30ms.
[07:09:49][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=582880 (now=587881)
[07:09:49][VV][uart.arduino_esp32:121]:     Wrote 0b01010101 (0x55)
[07:09:49][VV][uart.arduino_esp32:121]:     Wrote 0b10101010 (0xAA)
[07:09:49][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:09:49][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:49][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:49][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:49][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:49][VV][uart.arduino_esp32:142]:     Flushing...
[07:09:49][V][component:186]: Component esphome.coroutine took a long time for an operation (0.09 s).
[07:09:49][V][component:187]: Components should block for at most 20-30ms.
[07:09:49][VV][uart.arduino_esp32:135]:     Read 0b01010101 (0x55)
[07:09:49][VV][uart.arduino_esp32:135]:     Read 0b10010101 (0x95)
[07:09:49][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:49][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:09:49][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:49][V][component:186]: Component jk_modbus took a long time for an operation (0.06 s).
[07:09:49][V][component:187]: Components should block for at most 20-30ms.
[07:09:54][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=587880 (now=592881)
[07:09:54][VV][uart.arduino_esp32:121]:     Wrote 0b01010101 (0x55)
[07:09:54][VV][uart.arduino_esp32:121]:     Wrote 0b10101010 (0xAA)
[07:09:54][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:09:54][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:54][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:54][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:54][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:54][VV][uart.arduino_esp32:142]:     Flushing...
[07:09:54][V][component:186]: Component esphome.coroutine took a long time for an operation (0.09 s).
[07:09:54][V][component:187]: Components should block for at most 20-30ms.
[07:09:54][VV][uart.arduino_esp32:135]:     Read 0b01010101 (0x55)
[07:09:54][VV][uart.arduino_esp32:135]:     Read 0b10010101 (0x95)
[07:09:54][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:54][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:09:54][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:54][V][component:186]: Component jk_modbus took a long time for an operation (0.06 s).
[07:09:54][V][component:187]: Components should block for at most 20-30ms.
[07:09:59][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=592880 (now=597881)
[07:09:59][VV][uart.arduino_esp32:121]:     Wrote 0b01010101 (0x55)
[07:09:59][VV][uart.arduino_esp32:121]:     Wrote 0b10101010 (0xAA)
[07:09:59][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:09:59][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:59][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:59][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:09:59][VV][uart.arduino_esp32:121]:     Wrote 0b11111111 (0xFF)
[07:09:59][VV][uart.arduino_esp32:142]:     Flushing...
[07:09:59][V][component:186]: Component esphome.coroutine took a long time for an operation (0.09 s).
[07:09:59][V][component:187]: Components should block for at most 20-30ms.
[07:09:59][VV][uart.arduino_esp32:135]:     Read 0b01010101 (0x55)
[07:09:59][VV][uart.arduino_esp32:135]:     Read 0b10010101 (0x95)
[07:09:59][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:59][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:09:59][VV][uart.arduino_esp32:135]:     Read 0b00000001 (0x01)
[07:09:59][V][component:186]: Component jk_modbus took a long time for an operation (0.06 s).
[07:09:59][V][component:187]: Components should block for at most 20-30ms.

Branch: main
Baud:115200

[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b01001110 (0x4E)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b01010111 (0x57)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00010011 (0x13)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000110 (0x06)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000011 (0x03)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b01101000 (0x68)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:13:55][VV][uart.arduino_esp32:121]:     Wrote 0b00101001 (0x29)
[07:13:55][VV][uart.arduino_esp32:142]:     Flushing...
[07:13:55][V][component:186]: Component esphome.coroutine took a long time for an operation (0.25 s).
[07:13:55][V][component:187]: Components should block for at most 20-30ms.
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b10101100 (0xAC)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11110101 (0xF5)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11011001 (0xD9)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11110011 (0xF3)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111001 (0xF9)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b00101111 (0x2F)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b11111101 (0xFD)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b10101101 (0xAD)
[07:13:55][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)
[07:13:55][V][component:186]: Component jk_modbus took a long time for an operation (0.24 s).
[07:13:55][V][component:187]: Components should block for at most 20-30ms.
[07:14:00][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=13499 (now=18500)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b01001110 (0x4E)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b01010111 (0x57)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00010011 (0x13)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000110 (0x06)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000011 (0x03)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b01101000 (0x68)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:14:00][VV][uart.arduino_esp32:121]:     Wrote 0b00101001 (0x29)
[07:14:00][VV][uart.arduino_esp32:142]:     Flushing...
[07:14:00][V][component:186]: Component esphome.coroutine took a long time for an operation (0.26 s).
[07:14:00][V][component:187]: Components should block for at most 20-30ms.
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b10101100 (0xAC)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11110101 (0xF5)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11011001 (0xD9)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11110011 (0xF3)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111001 (0xF9)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b00101111 (0x2F)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b11111101 (0xFD)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b10101101 (0xAD)
[07:14:00][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)
[07:14:00][V][component:186]: Component jk_modbus took a long time for an operation (0.24 s).
[07:14:00][V][component:187]: Components should block for at most 20-30ms.
[07:14:05][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=18499 (now=23499)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b01001110 (0x4E)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b01010111 (0x57)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00010011 (0x13)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000110 (0x06)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000011 (0x03)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b01101000 (0x68)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:14:05][VV][uart.arduino_esp32:121]:     Wrote 0b00101001 (0x29)
[07:14:05][VV][uart.arduino_esp32:142]:     Flushing...
[07:14:05][V][component:186]: Component esphome.coroutine took a long time for an operation (0.25 s).
[07:14:05][V][component:187]: Components should block for at most 20-30ms.
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b10101100 (0xAC)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11110101 (0xF5)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11011001 (0xD9)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11110011 (0xF3)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111001 (0xF9)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b00101111 (0x2F)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b11111101 (0xFD)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b10101101 (0xAD)
[07:14:05][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)
[07:14:05][V][component:186]: Component jk_modbus took a long time for an operation (0.24 s).
[07:14:05][V][component:187]: Components should block for at most 20-30ms.
[07:14:10][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=23499 (now=28499)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b01001110 (0x4E)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b01010111 (0x57)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00010011 (0x13)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000110 (0x06)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000011 (0x03)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b01101000 (0x68)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:14:10][VV][uart.arduino_esp32:121]:     Wrote 0b00101001 (0x29)
[07:14:10][VV][uart.arduino_esp32:142]:     Flushing...
[07:14:10][V][component:186]: Component esphome.coroutine took a long time for an operation (0.25 s).
[07:14:10][V][component:187]: Components should block for at most 20-30ms.
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b10101100 (0xAC)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11110101 (0xF5)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11011001 (0xD9)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11110011 (0xF3)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111001 (0xF9)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b00101111 (0x2F)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b11111101 (0xFD)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b10101101 (0xAD)
[07:14:10][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)
[07:14:10][V][component:186]: Component jk_modbus took a long time for an operation (0.25 s).
[07:14:10][V][component:187]: Components should block for at most 20-30ms.
[07:14:14][VV][scheduler:152]: Running interval '' with interval=60000 last_execution=4294940274 (now=32978)
[07:14:15][VV][scheduler:152]: Running interval 'update' with interval=5000 last_execution=28499 (now=33499)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b01001110 (0x4E)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b01010111 (0x57)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00010011 (0x13)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000110 (0x06)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000011 (0x03)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b01101000 (0x68)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000000 (0x00)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00000001 (0x01)
[07:14:15][VV][uart.arduino_esp32:121]:     Wrote 0b00101001 (0x29)
[07:14:15][VV][uart.arduino_esp32:142]:     Flushing...
[07:14:15][V][component:186]: Component esphome.coroutine took a long time for an operation (0.26 s).
[07:14:15][V][component:187]: Components should block for at most 20-30ms.
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b10101100 (0xAC)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11110101 (0xF5)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11011001 (0xD9)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11110011 (0xF3)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111001 (0xF9)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b00101111 (0x2F)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111111 (0xFF)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b11111101 (0xFD)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b10101101 (0xAD)
[07:14:15][VV][uart.arduino_esp32:135]:     Read 0b00000000 (0x00)
[07:14:15][V][component:186]: Component jk_modbus took a long time for an operation (0.24 s).
[07:14:15][V][component:187]: Components should block for at most 20-30ms.

@bobwho69
Copy link

bobwho69 commented Nov 7, 2021

If I move my mpp-solar Raspberry Pi from inverter cabinet into battery container, would you get the necessary data from bluetooth? or I could try the TTL-RS485 module on there?
Apologies, at this stage, I know enough to be dangerous, but not enough to be very helpful.
I am able to borrow one of these industrial RS485 - Ethernet that I could try and setup as a virtual COM port on Windows laptop (or prey the Debian drivers work for R Pi 3B) or the RPi 3b that runs mpp-solar

And in my search I found this old youtube video of issues with the arduino libraries and esp32. It is old, so I dont know if it is valid.

@syssi
Copy link
Owner Author

syssi commented Nov 7, 2021

Having a working setup to identify the root cause would be helpful. Please use mpp-solar to identify the supported protocol and baudrate. The YouTube video doesn't apply if your rs485 converter module doesn't have a "driver enable pin". If there is one we should care about. ;-)

@syssi
Copy link
Owner Author

syssi commented Mar 1, 2022

@bobwho69 Any new here? Could you do another try with 9600 baud?

@syssi syssi force-pushed the add-jk-balancer-support branch from 80469cb to 10b90ec Compare March 2, 2022 18:32
@syssi syssi force-pushed the add-jk-balancer-support branch from 33ab28a to 8703651 Compare March 28, 2022 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add JK balancer support
2 participants