Skip to content

Commit 5f15d28

Browse files
authored
detailed BT matcher for JBD (#112)
* detailed BT matcher for JBD * detailed BT matcher for accurat and Supervolt V3 detection
1 parent 2d6e3ed commit 5f15d28

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ This integration allows to monitor Bluetooth Low Energy (BLE) battery management
2424
- Supervolt v1 batteries
2525
- Elektronicx batteries (show up as `LT-`…)
2626
- Ective batteries
27-
- JBD BMS, Jiabaida
28-
- accurat batteries
29-
- Supervolt v3 batteries
27+
- JBD BMS, Jiabaida (show up as `SP..S`…)
28+
- accurat batteries (show up as `GJ-`…)
29+
- Supervolt v3 batteries (show up as `SX1*`…)
3030
- JK BMS, Jikong, (HW version >=11 required)
3131
- Offgridtec LiFePo4 Smart Pro: type A & B (show up as `SmartBat-A`… or `SmartBat-B`…)
3232
- LiTime, Power Queen, and Redodo batteries

custom_components/bms_ble/manifest.json

+17
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,25 @@
1515
"manufacturer_id": 2917
1616
},
1717
{
18+
"local_name": "SP0?S*",
1819
"service_uuid": "0000ff00-0000-1000-8000-00805f9b34fb"
1920
},
21+
{
22+
"local_name": "SP1?S*",
23+
"service_uuid": "0000ff00-0000-1000-8000-00805f9b34fb"
24+
},
25+
{
26+
"local_name": "SP2?S*",
27+
"service_uuid": "0000ff00-0000-1000-8000-00805f9b34fb"
28+
},
29+
{
30+
"local_name": "GJ-*",
31+
"service_uuid": "0000ff00-0000-1000-8000-00805f9b34fb"
32+
},
33+
{
34+
"local_name": "SX1*",
35+
"service_uuid": "0000ff00-0000-1000-8000-00805f9b34fb"
36+
},
2037
{
2138
"local_name": "SP0*",
2239
"service_uuid": "0000fff0-0000-1000-8000-00805f9b34fb"

custom_components/bms_ble/plugins/jbd_bms.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ def matcher_dict_list() -> list[dict[str, Any]]:
5858
"""Provide BluetoothMatcher definition."""
5959
return [
6060
{
61+
"local_name": pattern,
6162
"service_uuid": BMS.uuid_services()[0],
6263
"connectable": True,
63-
},
64+
}
65+
for pattern in ["SP0?S*", "SP1?S*", "SP2?S*", "GJ-*", "SX1*"]
6466
]
6567

6668
@staticmethod

0 commit comments

Comments
 (0)