Skip to content

Commit

Permalink
Add support for Seplos V3 SP6* (B-48100 / B-48200) (#131)
Browse files Browse the repository at this point in the history
* add Seplos V3 SP6* support
* Update README.md
  • Loading branch information
patman15 authored Dec 27, 2024
1 parent 9f5ecee commit 108b47c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This integration allows to monitor Bluetooth Low Energy (BLE) battery management
- Offgridtec LiFePo4 Smart Pro: type A & B (show up as `SmartBat-A`… or `SmartBat-B`…)
- LiTime, Power Queen, and Redodo batteries
- Seplos v2 (show up as `BP0?`)
- Seplos v3 (show up as `SP0`… or `SP1`…)
- Seplos v3 (show up as `SP0`…, `SP1`…, or `SP6`…)
- TDT BMS (show up as e.g., `XDZN`…)

> [!TIP]
Expand Down
4 changes: 4 additions & 0 deletions custom_components/bms_ble/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
"local_name": "SP1*",
"service_uuid": "0000fff0-0000-1000-8000-00805f9b34fb"
},
{
"local_name": "SP6*",
"service_uuid": "0000fff0-0000-1000-8000-00805f9b34fb"
},
{
"local_name": "TBA-*"
},
Expand Down
10 changes: 3 additions & 7 deletions custom_components/bms_ble/plugins/seplos_bms.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,11 @@ def matcher_dict_list() -> list[dict[str, Any]]:
"""Provide BluetoothMatcher definition."""
return [
{
"local_name": "SP0*",
"local_name": pattern,
"service_uuid": BMS.uuid_services()[0],
"connectable": True,
},
{
"local_name": "SP1*",
"service_uuid": BMS.uuid_services()[0],
"connectable": True,
},
}
for pattern in ["SP0*", "SP1*", "SP6*"]
]

@staticmethod
Expand Down
8 changes: 8 additions & 0 deletions tests/advertisement_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@
),
"seplos_bms",
),
(
generate_advertisement_data(
local_name="SP66B2404270002 ",
service_uuids=["0000fff0-0000-1000-8000-00805f9b34fb"],
rssi=-81,
),
"seplos_bms",
),
(
generate_advertisement_data(
local_name="BP02",
Expand Down

0 comments on commit 108b47c

Please sign in to comment.