collin80 / TeslaBMS

143 stars 91 forks source link

BMS stops responding and must be rebooted #13

Closed BobbyBleacher closed 2 months ago

BobbyBleacher commented 4 years ago

A few times a day I've noticed my BMS will just stopped outputting any information and no longer responds to commands even though I can still use screen to get to serial interaction. I'm not sure if that is directly related to my fork specifically or if this happens in Collin's original code, but I can't figure out why or where to set some data logging to figure out how to fix whatever's broken. I'm guessing that maybe there's some sort of memory that's filling up that isn't properly being flushed. I keep it running non-stop.

The only fix currently is for me to send a reboot command to the pi powering it. Any help narrowing down the issue would be appreciated because this is otherwise a completely autonomous system.

collin80 commented 4 years ago

Well, there are lots of units out in the wild running with code based off of the code here so it seems likely that there isn't a problem with this code. However, I have not personally run this exact code for days on end. You might try tracking the results of queries to the BMS boards to see if there's something you can point your finger at. Maybe the comm is getting corrupted, maybe they really just aren't replying at all anymore, maybe the code isn't actually sending data to the BMS modules. So, you will probably need to add some instrumentation to bms.getAllVoltTemp() and the functions it calls.