-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add initial support for smart lithium batteries #47
base: main
Are you sure you want to change the base?
Conversation
Hi, just bought some of these too. And yeah, I agree the data doesn't seem to match the spec. I asked for help from Victron. |
With Victron's help, figured it out. The issue is that integers are packed in little-endian order across the bytes. So I reversed the entire struct to make it tranctable: orymate/victron-ble@add-smart-lithium...stefanor:victron-ble:add-smart-lithium |
I assume it's just this size battery, but I could be wrong.
@stefanor Great, thanks a lot! I've tested it with my batteries and all the values look good.
|
I guess you should add that model to the database too |
Ah, you did. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing this! I was playing around with it too, and have a few suggestions based on that work.
Co-authored-by: Raj Laud <[email protected]>
Co-authored-by: Raj Laud <[email protected]>
Thanks @rajlaud, it works nice: {
"name": "B3",
"address": "D6:F3:AA:C2:82:6D",
"rssi": -67,
"payload": {
"balancer_status": "balanced",
"battery_temperature": 16,
"battery_voltage": 13.36,
"bms_flags": 6,
"cell_voltages": [
3.34,
3.34,
3.34,
3.34,
null,
null,
null,
null
],
"error_flags": 0,
"model_name": "SmartLithium Battery 12V/160Ah"
}
} |
Summary 📝
Add initial support for smart lithium batteries
Details
I've implemented the parsing based on the pdf and tested on a bunch of 160Ah batteries. @stefanor worked together with Victron to fix the byte order, and the data gathered with this code seems to match what the VictronConnect app says.
Checks