fl4p / batmon-ha

Add-on for Home Assistant to connect JK, JBD, Daly, ANT, SOK and Supervolt BMS via Bluetooth
MIT License
293 stars 55 forks source link

Initial work to add SOK BMS #78

Closed mdshw5 closed 1 year ago

mdshw5 commented 1 year ago

This work is adapted from https://github.com/Louisvdw/dbus-serialbattery/issues/350, using specifications drafted from reverse engineering work by @zuccaro. I have yet to test it, so this PR should be considered a work in progress.

fl4p commented 1 year ago

Great, let me know when you tested it and I'll merge

fl4p commented 1 year ago

This just caught my eye: voltage = (statistics.mean(cells)*4)/1000 you can just write: voltage = sum(cells)/1000

Does this BMS only support 4 cells?

mdshw5 commented 1 year ago

Yes the BMS only supports 4 cells. I have a lot of testing to do, and this is the first time I’ve started a BLE project, so lots to wrap my head around!

fl4p commented 1 year ago

Ok cool. I appreciate your effort! let me know if you need any help

fl4p commented 1 year ago

Any update? Did you get it to work?

mdshw5 commented 1 year ago

No, I did not get this to work. After some preliminary testing I lost interest and forgot. It will require quite a bit more hands on time testing and debugging, and I'm not sure when I'll get around to it.