Replies: 5 comments 2 replies
-
|
I would give the Pylon RS485 binding a try. It does include commands from versions 2.x-3.5. First try to see if you can get any data from the batteries before configuring the inverter or any other optional services. |
Beta Was this translation helpful? Give feedback.
-
|
Well, using https://github.com/Frankkkkk/python-pylontech/ , I discovered is that the battery responds to the 0x42 request (~20024642...), specified by Pylontech protocol v 2.x as "Get analog value, fixed point", By attentive reading of both specifications, I ended up with a short Python script ( https://github.com/muwlgr/scripts/blob/main/relay-inv-bat.py ) operating on 2 USB-RS485 ports and converting inverter's requests and battery's responses in both directions. I just felt I would spend more time finding out if your Java code is capable of doing this exact conversion, so I decided to sketch a WFM/MVP in Python. |
Beta Was this translation helpful? Give feedback.
-
|
So I went deeper into PylonBmsRS485Processor.readCellInformation() fills the following fields of BatteryPack: .numberOfCells , cellVmV[] , .numOfTempSensors , .cellTemperature[] , .packCurrent , .packVoltage , .remainingCapacitymAh , .ratedCapacitymAh PylonBmsRS485Processor.readBatteryInformation() fills the following fields of BatteryPack: .packVoltage , .packCurrent , .packSOC , .bmsCycles , .packSOH , .maxCellmV , .maxCellVNum , .minCellmV , .minCellVNum , .tempAverage , .tempMax , .tempMaxCellNum , .tempMin , .tempMinCellNum Then, PylonInverterRS485Processor.createBatteryInformation() uses the following fields of BatteryPack: .packVoltage , .packCurrent , .packSOC (unfilled without 0x61 response), .bmsCycles (unfilled) , .packSOH (unfilled), .maxCellmV (unfilled) , .maxCellVNum (unfilled) , .minCellmV (unfilled) , .minCellVNum (unfilled) , .tempAverage (unfilled) , .tempMax (unfilled) , .tempMaxCellNum (unfilled) , .tempMin (unfilled) , .tempMinCellNum (unfilled) , MOSFET and BMS temperatures are just filled as .tempAverage My Python code so far does not handle multi-battery packs (that is, responses to 0x42 request with battery number 0xFF), as I don't have multi-battery setup. But it tries to synthesize SOC as ((.remainingCapacitymAh*100-1)/.ratedCapacitymAh), find min. and max. voltages and temperatures along with their indexes to reasonably fill appropriate fields in 0x61 response, and creatively lie in most other cases (replace SOH with calculated SOC, and so on). Probably this approach can be ported to your Java code with some kind of special case handling when the battery does not respond to 0x61 request as Dyness B3 does. |
Beta Was this translation helpful? Give feedback.
-
|
@muwlgr, thanks for the feedback. I changed the way the battery data is read from the BMS for the Pylon RS485 binding to treat it as one big battery per configured BMS. The BMS will always use the master ID (0x12) + the configured BMS Id (starting at 0 for master). |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for that. I added the max bms cycles to the pack data. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear community, I am a bit new in this area, and so far I was unable to make this inverter work directly with this battery.
All I know is that the inverter does not support CAN communication, only RS485 and RS232.
Over RS232, it supports PACE BMS protocol (battery type LIC).
Over RS485 it supports PACE and PYLON protocols (battery types LIP and LIL).
As I understand, PACE is the same as MODBUS over serial line.
Overall, its battery type and BMS protocol configuration is similar to some better-known inverters like PowMr, Daxtromn, Anenji and so on.
The battery prefers CAN communication but also supports RS485.
It has a number of DIP switches, and about 5 variants of switch positions listed in its manual for different type of inverters (https://dyness.com/Public/Uploads/uploadfile/files/20241023/B3UserManualEN.pdf , pages 10..11 of 29).
Of course GOOTÜ brand is not mentioned among them.
Of course PACE/MODBUS or PYLON is not mentioned there at all, only RS485 or CAN.
For some DIP positions, neither RS485 nor CAN is mentioned, only the inverter type.
We made a cable connecting pins 1 and 2 of the inverter RJ45 port to pins 1 and 3 of the battery RJ45 (RS485 A-to-A and B-to-B).
We tried LIP or LIL battery types in the inverter and all 5 DIP switch positions from the battery manual, but were unable to see any non-zero numbers in the inverter's BMS screens.
In Ukrainian technical forums I learned about a similar type of inverter and Dyness B4850 battery, that the inverter supports PYLON protocol version 3.* while the battery supports only 2.*, so a protocol conversion is required. One savvy guy made a firmware for Arduino nano to do this kind of protocol conversion (but he does not distribute its source code).
Ukrainian thread on this topic can be read at https://greenpowertalk.tech/threads/komunikacija-invertora-anenji-6-2kw-i-batareji-dyness-b4850.1543/ but you will need to translate it into your language.
I found this project, ai-republic/bms-to-inverter , and decided to try if it could help me to do this kind of conversion (as I don't have enough experience with Arduinos).
Now I have 2 USB-RS485 adapters plugged into a Linux host, and into the inverter and the battery with their RJ45 sides.
I can see some serial traffic going from the inverter and from the battery (using cu or minicom).
I cloned the project from github, installed JDK 25 and started configurator.jar
Now I would like to get some help from you to avoid enumeration of all possible inverter+bms combinations in the Configurator.
If anyone had some useful experience, I would appreciate if you shared it with me.
Thanks in advance for your responses.
Beta Was this translation helpful? Give feedback.
All reactions