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-PB bms compatibility. Target: 1 ESP in a "listening mode" connected to RS485 network. #464
base: main
Are you sure you want to change the base?
Conversation
JK-PB2A16S-20P model jk-bms. Two bms connected to that RS485 internal network. ubuntu connected in a "listening mode" using a USB<->RS485 adaptor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have installed clang-format (v14 now)
I have created a new component: "jk_rs485". It is for JK-PB HW v14. To compile: Pending:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I have changed erroneusly components/jk_bms_ble/jk_bms_ble.cpp file.
I do know how to solve this error.
Other changes are new files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something wrong here?
It is marked as failed.
I will have a look as soon as possible. Please give me some time! :-) |
Sorry!! I am very newbie at github. |
No problem. Feel free to ask any questions. |
Many thanks, Sebastian. Certainly, I do not know how to manage/arrange the "code + configuration.yaml" to demultiplex the info arraiving from RS485. So, I have got the info about every BMS connected to the RS485 network (it does not matter how many are: max 16). I know how to pass the UART information to the jk_rs485 component (but only one). But I have achieve the goal of sharing the same UART with two jk_rs485 components. I would like to:
I do not know if this is possible. Many thanks!! |
any chance you could put a wiring diagram together so I can test with my 3 new JK BMS? |
|
Which Ethernet wires go to tx and rx on the ESP board? |
|
it is not ethernet. It is RS485, ok? |
USB plugs into the ESP32 dev board and RJ45 into the RS485 port in the inverter? |
Sorry my mistake. Forget my previous answer.
ESP TXRX to a serial2RS485 converter. From this converter to the right (any
of the two) existing RJ45 connectors.
|
Can you point to a code that should be loaded to ESPHome please? |
+ uart1 & uart2 protocol numbers + device_info settings * RS485: + Network Nodes available (text sensor). Automatically detects nodes in the network. + status heating binary sensor bug corrected + temperature 5 + more params + developing talk pin for rs485 request or settings (not ready yet)
Hi, I'm trying to install the 1 master 6 slaves yaml file and it always fails. `INFO ESPHome 2024.3.1
|
Hi @dgbiuro, could you try with the last update just uploaded now? Many thanks!! |
Latest ESPhome update needs changes: 'talk_pin' is a required option for [0]
Where should talk_pin assigned? |
Any pin of your choice. It is not mandatory to connect tx_pin to TTL to RS485 converter. It is not mandatory to connect talk_pin to TTL to RS485 converter. Assign to "talk_pin" any free pin that can act as "output". I have got the code to act as "master" or "pseudo-master". I am publishing this soon. Today or tomorrow, maybe. |
@denveronly, have you tried last version with your 7 BMSs? Did it work? |
+Temperature sensor absent alarm bug corrected as well. + Added: discharging_overcurrent_protection_release_time_sensor_; discharging_short_circuit_protection_release_time_sensor_ charging_overcurrent_protection_release_time_sensor_ charging_short_circuit_protection_release_time_sensor_ cell_undervoltage_protection_release_time_sensor_ cell_overvoltage_protection_release_time_sensor_ Updated two examples yaml Updated HASS Dashboards
+PRECHARGING_TIME_FROM_DISCHARGE Two examples updated HASS Dashboard updated. Renewed Protection dashboards.
When this is fully merged will it allow the outputs to be used to feed an MQTT broker, looking forward to this one now I have my SMA SI's in closed loop with a JK-PB2A16S20P using canbus. |
Hi @txubelaxu, sorry it took me so long to respond.
My DIP switches and addresses in yaml file are the same. I have one master jk-bms and two slaves. I have shortened the code to just bms-0, 1 and 2. I didn't connect the talk pin as you said it is not mandatory. Many thanks for helping |
hi @dgbiuro, that is anormal network data. Is it correctly connected to the network? Talk pin is not mandatory if you want ESP to acting only in "listening mode". |
JK-PB2A16S-20P model jk-bms.
Two bms connected to that RS485 internal network.
ubuntu connected in a "listening mode" using a USB<->RS485 adaptor.