Grmume / renogy-smart-battery

Playground for the 100ah LiFePo Renogy Smart Battery RS485 interface
MIT License
21 stars 7 forks source link

More Registry Info #4

Open epfenninger opened 2 years ago

epfenninger commented 2 years ago

Registries 5018-5021 report in .1C, so 80 would be 8C Registry 5103 is the status of the battery heater. 0-255 (0 being off, 255 being on-high) Not sure on the intermediate values but it shuts off at 50F

Do you want me to continue one thread with this stuff or create separate issues?

sdellysse commented 2 years ago

I've implemented your per-cell-temperature findings in my fork, which is currently waiting on PR: https://github.com/sdellysse/renogy-smart-battery/blob/main/renogy_smart_readout.py#L26-L29

sdellysse commented 2 years ago

Maybe for the battery heater value, you could rename 0x13ef in that fork to heater_status and if you wanna be super fance, maybe do something like add a scaling function bytewide_percentage that would map/scale values between 0x00 and 0xff to 0% to `100%? that's just what pops in my head first

sdellysse commented 2 years ago

Side note: I'm guessing you have a battery with that heater built in? How do you like it? I was too cheap to buy one though I could see the usefulness

epfenninger commented 2 years ago

It has been a set-and-forget solution which is great because it is 25 degrees out and it allows us to still run the computer setup in the van as well as keep in charged via solar.

We actually have five batteries in parallel (Renogy only recommends four) and I'm interested to see how well they're balancing. Fifth battery is having issues right now (I think I initiated a firmware update and the battery has gone unresponsive) but the other four: Status AH Voltage Current Temp(f) Battery Number : 0------------------------- CHARGING 77.288 13.4 0.27 60 49.1 Battery Number : 1------------------------- CHARGING 73.984 13.3 0.67 0 51.8 Battery Number : 2------------------------- CHARGING 73.724 13.4 0.64 0 53.6 Battery Number : 3------------------------- CHARGING 77.74 13.4 0.45 0 50.900000000000006

Grmume commented 2 years ago

Thanks for the details about the additional registers! For the heater status you could use the linear(...) scaling function with a factor of 0.392. @sdellysse I hope I will get around to take a look at your pull request this evening

sdellysse commented 2 years ago

Heh, I didn't even think of trying to use the linear scaling to create percent-over-range. It's a hack but it'll work for now haha

sdellysse commented 2 years ago

@epfenninger @Grmume check out my fork when you can, I found ascii strings that specify the model number, the serial, and the manufacturer

sdellysse commented 2 years ago

also, I created a discord server in case either of you would be interested, I figure it'd be easier to collaborate there: https://discord.gg/s5s5evmy

sdellysse commented 2 years ago

and found firmware version string as well

gambleben commented 2 years ago

I've been working on a parallel project to integrate Renogy smart batteries with Victron cerbo. The main project is at https://github.com/Louisvdw/dbus-serialbattery. There's a branch there for Renogy that I've contributed to and a beta release if you have Victron equipment and want to try it out. You can also see my fork at https://github.com/gambleben/dbus-serialbattery. renogy.py is where I've added my code to read key values from the BMS.

In addition to what you have found so far, I've found the Modbus registers 5037 (hex 13AD) and 5040 (hex 13B0) seem to correspond to 2 BMS temperature readings. I haven't taken mine apart yet, but in the Youtube video by Will Prowse it shows 2 temp sensors on the top of the BMS. I have the bluetooth adapter, and confirmed that these readings correspond to the readings in the Renogy app. I've been debating opening mine up and holding an ice cube against one of them to validate my assumption and see if I can find a low temp protection flag and see if there's a register that changes to show that charging is disabled.

I also suspect that the registers from modbus address 5200 -5216 correspond to BMS limits such as low voltage warnings, low voltage protect, over voltage protect, high voltage warning, etc. Would love to collaborate with you guys to finish reverse engineering as much as possible.

gambleben commented 2 years ago

also, I created a discord server in case either of you would be interested, I figure it'd be easier to collaborate there: https://discord.gg/s5s5evmy @sdellysse The Discord invite looks like it expired - would you mind sending another one? Thanks!