li3: add Lithionics Li3 house battery BMS -> Home Assistant MQTT
Publishes the RV's 12V LiFePO4 house battery to HA via MQTT discovery (pack voltage, 4 cell voltages, current, SOC, BMS/battery temp, status). Connects over the battery's BLE HM-10 UART module (service ffe0/char ffe1, no pairing) using bleak; protocol reverse-engineered from the com.lithionics.bms Android app's own BLE/parsing code. Deliberately named li3/ and van-li3-battery, not battery/van-battery — that name is reserved for the host's own AC/UPS power-supply monitor (different hardware, unrelated concern). Self-heals a bluetoothd discovery-state wedge (Discovering stuck "yes", connects failing with le-connection-abort-by-local) that shows up after repeated failed connects to this device on the Pi's onboard adapter: the daemon retries scan/connect internally (MQTT session and HA entities stay up across retries) and restarts bluetooth.service itself after 3 consecutive scan failures, rate-limited to once per 5 min.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"ble_address": "B0:D2:78:5C:16:87",
|
||||
"broker": "localhost",
|
||||
"port": 1883,
|
||||
"username": "CHANGE_ME",
|
||||
"password": "CHANGE_ME",
|
||||
"client_id": "van-li3-battery",
|
||||
"device_id": "li3_battery",
|
||||
"device_name": "Li3 Battery",
|
||||
"discovery_prefix": "homeassistant",
|
||||
"publish_interval_s": 15
|
||||
}
|
||||
Reference in New Issue
Block a user