Open waconiglio opened 3 weeks ago
Great! I only have 12v units, and wanted to try and support the 24 and 48 units if I could. Don't see why you couldn't but the ID's from 16 to 64 is a change that we will just need to handle in discovery and exceptions logic.
Have a look at https://github.com/waconiglio/eg4-ll-s/tree/lls_48v ; You'll have to change all those 64 addresses back to 16, but if you wait long enough I might get it done for you. I used command strings from my EG4 desktop software, so that might also be doing something different than yours. You could substitute yours back in trivially. Just leave off the address byte from beginning and CRC 2-byte from end. I didn't mess with any of the packet interpretation, so it still reads cells as if battery is 12 V battery. It ran without error all weekend. The CRC check on read was key to this.
I have made some code changes, and added logic to do the CRC calculation in code, rather then having a large command tables for each of the BMS ID’s. I have also made some updates to allow you to set what the master BMS id is. This is done by defining the a list in the driver of all the BMS ID that are in your setup. The first number in the list is treated as the master.
I also pulled in the serial port setup / serial call to the driver, as I have been working on trying to stop no-reply. Made some headway there, but I am seeing that a few still happen each hour the driver is running. They don’t cause the driver to stop or to crash. Data is held in memory, and thus the stats on that units would just not be updated during that polling event (every 5 seconds right now)
This list of BMS ID is on line 67. You will need to set that correctly for your setup
Try this out, and let me know if there is other things that you are seeing that need to be address to be able to support the 48 and 24 BMS units.
Thanks!
https://github.com/tuxntoast/eg4-ll/blob/main/egll.py
On Aug 26, 2024, at 10:45 AM, William A. Coniglio @.***> wrote:
Have a look at https://github.com/waconiglio/eg4-ll-s/tree/lls_48v https://github.com/waconiglio/eg4-ll-s/tree/lls_48v ; You'll have to change all those 64 addresses back to 16, but if you wait long enough I might get it done for you. I used command strings from my EG4 desktop software, so that might also be doing something different than yours. You could substitute yours back in trivially. Just leave off the address byte from beginning and CRC 2-byte from end. I didn't mess with any of the packet interpretation, so it still reads cells as if battery is 12 V battery. It ran without error all weekend. The CRC check on read was key to this.
— Reply to this email directly, view it on GitHub https://github.com/tuxntoast/eg4-ll/issues/1#issuecomment-2310737227, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6JR7SOXSLONDU2GNGI3HTZTNSR7AVCNFSM6AAAAABM6TCBN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJQG4ZTOMRSG4. You are receiving this because you commented.
I’ve forked your repo to drive my 48 volt LL-S battery. It has 6 address switches instead of 4, and address 64 is special.
1) Initial effort will be to get my single battery online and displaying properly. (50% done) 2) Factor the send string into address-command-crc to avoid a giant command table. CRC is a Modbus-style CRC16 in little endian order. CRC code is done already. 3) Document the differences between the 4 and 6 switch versions. Are there any voltage-specific differences? Can we auto-detect? 4) PR, then discuss PR to dbus-serialbattery ?) Multiple batteries? Mixed version chains? I can’t test with my current hardware.
What are your thoughts?