Skip to content

Adding Serial Driver to Own BMS #113

Closed Answered by Louisvdw
JohnMacrae asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @JohnMacrae
The best way is to copy the battery_template.py file and rename that and it's class for your BMS. Then populate the stubs in there.
You will see it inherit from Battery which is the class that holds all the data for the battery, so your new class has all the properties inherited already and you just need to populate them. The rest the driver will do for you when you add your new BMS object to the battery_types to test in dbus-serialbattery.py
You can also look at some of the existing batteries (JBD is a simple one) as an example of what to do.

You will have to send the current, so best would be a dummy value if you do not have it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mr-manuel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants