Lithium Iron Phosphate batteries and their horrible Bluetooth LE BMS implementations.
I've got 8 Vatrer 12v 100Ahr LiFePO4 batteries in two banks powering a remote installation. The absolute #1 selling point of these batteries is that their BMS (battery management system) will look to see if it is too cold to charge the batteries and run a little heater until the cells warm up enough to charge without destroying them.
The #2 selling point is that the BMS units report the battery state of charge, voltage, current and such over BLE (bluetooth low energy). That lets me better track their state when unattended for months and decide when to cut power off to less critical systems or attempt to start a backup generator.
After much jiggery I have this integrated in the control systems, but those little BMS controllers are really nasty to work with.
Woes
-
No sane BLE implementation. They sort of implement a RS-485 interface with a write only string characteristic and a notify only string characteristic. Listen to the one and shout in the other.
-
No sane protocol. I'm pretty sure that is some ancient Modbus controller protocol wrapped in the Bluetooth.
-
No documentation of the protocol. I get it, I'd be ashamed to admit to that too.
-
GIANT DANGER: If a device connects to the BMS, in the BLE sense, then the battery will stop advertising itself and it appears the battery has vanished. If there is a timeout it is more than 12 hours. Lest you think,"well I won't do that then"… there are a lot of sneaky paths for BlueZ and NimBLE that will leave connection stuck on without you knowing it. I found several.
-
You apparently can't reset the BMS, I mean it's not like you can take the batteries out or disconnect the power.
Moral
If one of your batteries drops off bluetooth, then reboot all the devices that were talking to it and it may well come back.