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

Multiple RS485 modules on the same interface #142

Closed
Louisvdw opened this issue Jun 23, 2022 · 71 comments
Closed

Multiple RS485 modules on the same interface #142

Louisvdw opened this issue Jun 23, 2022 · 71 comments
Labels
enhancement New feature or request

Comments

@Louisvdw
Copy link
Owner

Multiple RS485 modules on the same interface

@Louisvdw Louisvdw added the enhancement New feature or request label Aug 4, 2022
@andzie82

This comment was marked as outdated.

@Louisvdw

This comment was marked as outdated.

@stanhausc

This comment was marked as outdated.

@ramack

This comment was marked as outdated.

@maxx8888

This comment was marked as outdated.

@seamaster101

This comment was marked as outdated.

@maxx8888

This comment was marked as outdated.

@seamaster101
Copy link

@Louisvdw it appears that the very popular JKBMS (on recently purchased bms supposedly latest firmware) now can setup the RS485 address. I tried today two new JKBMSs on the same bus with different addresses, but no luck. I’m planning to connect 4 BMSs so it will be nice to use single rs485 to USB on the RPI side. Do you plan to address the addressing issue (no pun intended ;0)?

@seamaster101
Copy link

seamaster101 commented May 5, 2023

image

BMS Type: JK_B2A20S20P HW-Version: V11.XW SW-Version: V11.25 Version: V4.10.1

@maxx8888 I installed same type of 4xBMS about 6 months ago and this setting did not exist. I just purchased 8 more JKBMS and when I powered up today, I was surprised to see the new setting exactly as on your image!
The question now is is it possible to upgrade the FW on the older units to handle RS485 address change? Is there a way to upload new FW to JKBMS?

@maxx8888

This comment was marked as outdated.

@seamaster101

This comment was marked as outdated.

@maxx8888

This comment was marked as outdated.

@seamaster101

This comment was marked as outdated.

@seamaster101

This comment was marked as outdated.

@TazerReloaded

This comment was marked as outdated.

@seamaster101
Copy link

seamaster101 commented May 11, 2023

@TazerReloaded TTL is TTL. It is not 485 or 232. This is why you need/use adapter. You can convert TTL to almost any serial protocol with an adapter.
If you want RS485 output you can use TTL to RS485. Then on the other side you can use 485 to usb or 485 to serial or 485 to TTL depending to what are you trying to talk to. RS485 is best for transmitting data over longer cables as it is running on 2 differential wires.
I have successfully used cheap $2 TTL to RS485 on the BMS side then long cat 5 cable then RS485 to usb to the RPI. All from AliExpress.

@TazerReloaded

This comment was marked as outdated.

@Louisvdw

This comment was marked as outdated.

@ramack

This comment was marked as outdated.

@nagstaku
Copy link

Yeah, I would also be willing to help with this. I have some medium programming abilities, and 2x+ EG4 LifePower Batteries.

I've done a lot of work in C#, but I've touched on Python for some projects. I guess i'll snoop and see what the data structures look like. Maybe someone can tell me ahead of time if this is something where a moderate re-write would be required to represent an array of batteries as a single entity, or if there is already similar patterns in use that could be piggy-backed.

@mr-manuel

This comment was marked as outdated.

@ats-rozruch
Copy link

ats-rozruch commented Jul 8, 2023

I have using 4 Daly BMS so I added couple lines to daly.py

In declaration

        self.board = 0
        self.cycle_count = 0

In def refresh_data(self) at the end

                self.write_charge_discharge_mos(ser)
                // new lines
                logger.info("serialbattery current board " + str(self.board) + " cycle count " + str(self.cycle_count))
                self.cycle_count = ((int(self.cycle_count) + 1) % 10)
                if (int(self.cycle_count)) == 0:
                    self.board = ((int(self.board) + 1) % 4)

In generate command

        buffer[1] = self.command_address[0] + self.board # Always serial 40 or 80

In read sentence

        if id != (1 + self.board) or length != 8 or cmd != expected_reply[0]:

Right now my dbus-serial reads 4 different BMS on one RS485 line so mayby it will be possible :)

@anaro-nicolas
Copy link

Hello,
I have 2 daly BMS (8s with can/rs485). I can't get them to work on the same RS485 serial bus, and I believe they have the same device address. Should I request a new firmware? With Daly's PC Monitor, I didn't find any configurable parameter to change it.
Before modifying the code, I would like to be sure about this. Thank you for your response.
best regards - Nicolas

@ats-rozruch
Copy link

BoardNr

I have PCMonitor 2.1.6 on Tab Engineering Model there is an option to change BoardNumber.

@anaro-nicolas

This comment was marked as outdated.

@seamaster101

This comment was marked as outdated.

@BlueY21

This comment was marked as off-topic.

@mr-manuel

This comment was marked as off-topic.

@BlueY21

This comment was marked as off-topic.

@mr-manuel

This comment was marked as off-topic.

@TheVodden

This comment was marked as off-topic.

@mr-manuel
Copy link
Collaborator

@seamaster101

This comment was marked as off-topic.

@ramack

This comment was marked as off-topic.

@BlueY21

This comment was marked as off-topic.

@BlueY21

This comment was marked as off-topic.

@mr-manuel

This comment was marked as off-topic.

@BlueY21

This comment was marked as off-topic.

@TheVodden

This comment was marked as off-topic.

@mr-manuel

This comment was marked as off-topic.

@TheVodden

This comment was marked as off-topic.

@BlueY21

This comment was marked as off-topic.

@TheVodden

This comment was marked as off-topic.

@Quadron

This comment was marked as off-topic.

@Quadron
Copy link

Quadron commented Jul 14, 2024

I have gotten the first battery to communicate with my GX, that is a big improvement for me already.
I have 4, and up to now have only used the renogy BT2 bluetooth adapter to read the data. My batteries don't seem to follow the sequential addresses 0x30, 0x31, 0x32 and 0x33. The log indicates 0x30 success but none of the other adresses. I'm going to try to retrieve those addresses with a windows modbus scan tool (https://store.chipkin.com/products/tools/cas-modbus-scanner), but as my experience with modbus is non existent I hope this will yield results. Any other programs I can try? I also have ubuntu running.

@mr-manuel
Copy link
Collaborator

@Quadron I opened a new issue for this else the focus of this issue is lost: #1099

@mr-manuel
Copy link
Collaborator

This feature is now awailable in the master branch. Not every BMS was adopted and tested yet.

@Quadron

This comment was marked as off-topic.

@bb12489

This comment was marked as off-topic.

@BlueY21

This comment was marked as off-topic.

@Quadron

This comment was marked as off-topic.

@mr-manuel
Copy link
Collaborator

@bb12489 please open a new issue for that.

@BlueY21 @Quadron you need a battery aggregator: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install

@Quadron that could have multiple reasons. Check the parameters page and also this: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/faq/#why-is-my-battery-not-switching-to-floatbulk Please open a new issue for that.

@mr-manuel
Copy link
Collaborator

Since the basic function was now implemented to support multiple batteries on the same interface, I will close this issue. Please open a new issue for every BMS where multiple batteries are not supported yet and where the batteries support this function (RS485/Mobus with address assignment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests