-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Tian Power (Revov) BMS Integration #14
Comments
@NicholasHerbst are the communications protocol available for these BMS? I do not see anything on Tian Power's website. |
@Louisvdw yes, I have access to the communication protocol. Where would be the most appropriate place to share this document? |
@NicholasHerbst You should be able to attach the doc to a comment here. |
I've started some work on this myself. Added some progress here - I need to work out where some of the variables sit tomorrow. |
Nice work @csloz |
Will do. It's progressing fast. Can read the battery voltage, and individual cells now, although some of the details are still MIA. Take a look at the thread on powerforum for progress. (linked above) Ideally I need someone else to do some testing to make sure params are correct. @NicholasHerbst are you up for some beta testing? |
Ok, have forked it, and made a pull request. It's a BETA version. Will still make some updates as I'm missing some data still (need to work out where it sits). Example logs below; 2022-05-03 17:41:50.031904500 WARNING:SerialBattery:Modbus Address: 124 |
I realised I'm a bit dof just now. Their data format is quite straightforward - I just didn't notice that till now. Sample info packet: [7C:01:01:76:01:10:8D:20:0D:17:8D:21:0D:2F:8D:3B:0D:32:CD:E3:0D:B3:8D:23:0D:0D:8D:24:0D:24:0D:11:8D:21:0D:18:8D:21:02:01:75:30:03:01:27:10:04:01:46:50:05:03:00:49:00:48:20:4B:06:05:00:00:10:10:00:00:00:00:00:01:07:01:00:85:08:01:15:24:09:01:27:10:0A:01:00:01:0B:01:00:00:83:00:0C:01:00:00:37:AE:0D:01:00:40:00:00:0E:01:00:40:00:00:0F:01:00:1A:3A:04:10:01:00:09:57:AD:BA:0D] Once I spotted that they seperate out the packet info with byte/length pairs suddenly the data makes much more sense. 7C:01:01:76 (bus/cmd/req/length) I'll have a play looking at the byte pair values in word/float signed/unsigned etc to see if the weirder values make more sense, but, by George, I think he's got it! |
This is awesome work!
I am sorry that I have not been able to respond sooner – have had a very busy work week schedule.
I will gladly assist with any testing or other from next week as required.
Keep up the great work!
Regards,
From: csloz ***@***.***>
Sent: Wednesday, 04 May 2022 12:09
To: Louisvdw/dbus-serialbattery ***@***.***>
Cc: NicholasHerbst ***@***.***>; Mention ***@***.***>
Subject: Re: [Louisvdw/dbus-serialbattery] Tian Power (Revov) BMS Integration (#14)
I realised I'm a bit dof just now.
Their data format is quite straightforward - I just didn't notice that till now.
Sample info packet:
[7C:01:01:76:01:10:8D:20:0D:17:8D:21:0D:2F:8D:3B:0D:32:CD:E3:0D:B3:8D:23:0D:0D:8D:24:0D:24:0D:11:8D:21:0D:18:8D:21:02:01:75:30:03:01:27:10:04:01:46:50:05:03:00:49:00:48:20:4B:06:05:00:00:10:10:00:00:00:00:00:01:07:01:00:85:08:01:15:24:09:01:27:10:0A:01:00:01:0B:01:00:00:83:00:0C:01:00:00:37:AE:0D:01:00:40:00:00:0E:01:00:40:00:00:0F:01:00:1A:3A:04:10:01:00:09:57:AD:BA:0D]
Once I spotted that they seperate out the packet info with byte/length pairs suddenly the data makes much more sense.
7C:01:01:76 (bus/cmd/req/length)
Then from there its simply
01:10 with length 16 (10 in HEX) is our battery cell info
02:01 75:30 = 3000 -> 30
03:01 27:10 = 10000 ->100
04:01 46:50 = 18000 ->180
05:03 00:49 00:49 20:4A = 3 pairs? 73/73/8266 ??
06:05 00:00 10:10 00:00 00:00 00:01 Alarm bits
07:01 00:85 = 133 -> Cycles
08:01 15:3C = 5436 -> Volts (54.36)
09:01 27:10 = 10000 -> 100
0A:01 00:01 = 1
0B:01 00:00 83:66 = 0, 33670 (3.367?)
0C:01 00:00 37:AE = 0, 14254 (0.14254?)
0D:01 00:40 00:00 = 64, 0
0E:01 00:40 00:00 = 64, 0
0F:01 00:1A 4A:3F = 26, 190007 (unsigned? signed, tbd...)
10:01 00:09 57:AD = 9, 22445 (22.445?)
I'll have a play looking at the byte pair values in word/float signed/unsigned etc to see if the weirder values make more sense, but, by George, I think he's got it!
—
Reply to this email directly, view it on GitHub <#14 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/APGAYMKFWY2OEGJ5H3EHL4TVIJEFPANCNFSM43S3RYWA> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/APGAYMJ72SJAIN673367IWLVIJEFPA5CNFSM43S3RYWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIKLDQLY.gif> Message ID: ***@***.*** ***@***.***> >
|
Haven't had a chance to do any code changes since i noticed the packet format, but the code is up at the revov branch in my github if you want to pull it to test. I need to rewrite the parser code to correctly interpret each data size. Will hopefully get time next week. Its usable as is, and seems pretty stable, even if missing some values still. I've had it running on mine for almost a week now. https://github.com/csloz/dbus-serialbattery/tree/revov |
I also have a Revov battery with the BMS supplied by them and wish to, specifically, get the SoC data fed into the Victron Cerbo GX. |
I am trying to find answers to an issue I picked up since the installation of the dbus-serialbattery system and upgrading the Cerbo GX Firmware to get the former to work. Yesterday, due to the cloud cover and low charging rate through the MPPT and the looming load shedding, I wanted to charge the batteries (Rovov) through the inverter and thus started the Scheduled Charge. I immediately noticed that the charging rate was very low compared to what I witnessed before. I unplugged the USB cable from the battery’s BMS hoping that would solve the issue, without any success. I then upgraded the inverter’s firmware, again with no success. This morning, I decided to look for reasons and the first I came across was the “charge current control management” under the features. In there it is said that the “CCCM limits the current when the battery is close to full or close to empty. When your battery is full, the reduced charge current will give the balancers in your BMS time to work When your battery is close to empty the reduced discharge current will limit that a sudden large load will pull your battery cells below their protection values. The CCCM limits the charge/discharge current depending on the SOC - between 99% - 100% => 5A charge - between 95% - 98% => 1/4 Max charge - between 91% - 95% => 1/2 Max charge”. With the Revov battery SoC remaining at 100%, I am wondering if that is the reason for poor rate of charge? |
It would be limiting your charge yes. |
I made the changes in the utils.py and restarted the system through by running “sh /data/etc/dbus-serialbattery/installrelease.sh” and rebooted the Cerbo GX. The charging then worked as expected until I plugged the USB back in. I then got a low voltage alarm on the inverter which I had to clear before restarting the entire system (inverter and Cerbo GX) for it to work. So, now the USB cable is unplugged wating for the new revov.py script. I want to repeat my offer. If there is anything I can help with, let me know. |
Anyone want to test a new beta please https://github.com/Louisvdw/dbus-serialbattery/releases/tag/v0.12b4 |
Hello, I’m the online sales manager of Tian Power, if you need, I can call our technical experts to help you. and if you have any questions about our products, please feel free to contact me! |
@TianPower what could really help would be if you have a BMS that you could send that I can test with. It's not easy solving problems virtually. |
@TianPower I guess having the documented BMS protocol would also help. The current implementation is based on the reverse engineering (as documented here #212 ). Having the official protocol would help us to improve the implementation and add more features. |
@TianPower I've been working on a prometheus exporter for your BMS, largely using the work done here and on related projects to help reverse engineer the communication protocol. So far, I haven't been able to figure out the checksum algorithm, and have resorted to hardcoding messages. To second @pchiquit's request: if you could publish the communication protocol, this would be immensely helpful. Thanks in advance (and also to everybody here whose work has given me a place to start)! |
I'm very sorry not to reply your message in time, now I will follow up your questions ,Can you provide the model of the BMS? @mike-marcacci Do you mean Upper computer? |
Thanks @TianPower! "Upper computer" may be what I mean by checksum, I'm not entirely sure; @slim-bean put together what is probably the most useful document I've found here, from his reverse-engineering efforts. When observing requests made by the Windows tool supplied by EG4, the second-to-last byte contains a value that I haven't been able to predict, and I assumed was some form of checksum, despite it not matching any CRC algorithm I've tried. For example, requests for current battery metrics appear to be the following, based on the address of the queried battery:
I'm not entirely sure what the specific model of the BMS is – it's the one used in the EG4 LifePower4 batteries. A video showing the battery teardown reveals some numbers on the main board that didn't mean anything to me, but might to you:
EDIT: the below questions appear to be somewhat answered by this post. I do have a number of other questions that I'm struggling to answer via reverse-engineering, but which would probably be covered in a communication protocol documentation. For example, group 4 of the response appears to return the battery's "full capacity" in cAh, but this differs from what the UI displays. (In my case the message on one of my batteries reports 101.32Ah while the UI reports what I believe is a truncated 100.00Ah.) It makes sense that the UI might try and make some "friendlier" numbers, but is my inference that this is "full capacity" even correct? Similarly, group 3 appears to contain either the state-of-charge in percentage * 100, or the "remaining capacity" in cAh – both of which report identically on the UI. If the former assertion about "full capacity" is correct, though, then these numbers shouldn't actually be the same, and it's unclear which value this group actually represents. Apologies for hijacking this thread a bit, but thanks so much for your time @TianPower – you all are making some great products, and I'm looking forward to getting better visibility into our battery performance! |
Hey Gents, What was the max amount of batteries you guys were able to integrate with this mod? And i furthermore assume no additional hardware is required besides the USB-RS485? |
I have a couple of different Tian Power BMS and can assist with testing / data collection. The BMS are both 48V 15/16S, one is 50AH and other is 100Ah. They seem to have a charge / discharge limiting board installed on them. Please let me know if this has been of assistance and if I can do anything else. ETA I also have a few different copies of the OEM windows software |
Integrate the Tian Power BMS via RS485 to Victron Venus OS-equipped devices.
It uses CRC-16-ANSI function
The text was updated successfully, but these errors were encountered: