Skip to content

Commit

Permalink
add ECOWORTHY battery detection
Browse files Browse the repository at this point in the history
  • Loading branch information
patman15 committed Dec 30, 2024
1 parent dbf0296 commit 1e960fb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This integration allows to monitor Bluetooth Low Energy (BLE) battery management
- Ective batteries
- JBD BMS, Jiabaida (show up as `SP..S`…)
- accurat batteries (show up as `GJ-`…)
- ECO-WORTHY bytteries (show up as `DP..S`…)
- Supervolt v3 batteries (show up as `SX1*`…)
- JK BMS, Jikong, (HW version ≥ 6 required)
- Offgridtec LiFePo4 Smart Pro: type A & B (show up as `SmartBat-A`… or `SmartBat-B`…)
Expand Down
6 changes: 5 additions & 1 deletion custom_components/bms_ble/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
{
"local_name": "SX1*",
"service_uuid": "0000ff00-0000-1000-8000-00805f9b34fb"
},
},
{
"manufacturer_id": 8856,
"service_uuid": "0000ff00-0000-1000-8000-00805f9b34fb"
},
{
"local_name": "SP0*",
"service_uuid": "0000fff0-0000-1000-8000-00805f9b34fb"
Expand Down
6 changes: 6 additions & 0 deletions custom_components/bms_ble/plugins/jbd_bms.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def matcher_dict_list() -> list[dict[str, Any]]:
"connectable": True,
}
for pattern in ["SP0?S*", "SP1?S*", "SP2?S*", "GJ-*", "SX1*"]
] + [
{ # ECO-WORTHY LiFePO4 12V 100Ah
"service_uuid": BMS.uuid_services()[0],
"manufacturer_id": 0x2298,
"connectable": True,
}
]

@staticmethod
Expand Down
11 changes: 9 additions & 2 deletions tests/advertisement_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,18 @@
"daly_bms",
),
( # source nRF (https://github.com/patman15/BMS_BLE-HA/issues/22#issuecomment-2198586195)
generate_advertisement_data(
local_name="SX100P-B230201", # Supervolt Battery
generate_advertisement_data( # Supervolt battery
local_name="SX100P-B230201",
service_uuids=["0000ff00-0000-1000-8000-00805f9b34fb"],
manufacturer_data={31488: "\x02\xFF\xFF\x7D"},
),
"jbd_bms",
),
( # source bluetoothctl (https://github.com/patman15/BMS_BLE-HA/issues/134)
generate_advertisement_data( # ECO-WORTHY LiFePO4 12V 100Ah
service_uuids=["0000ff00-0000-1000-8000-00805f9b34fb"],
manufacturer_data={8856: "\x28\x37\xc2\xa5"},
),
"jbd_bms",
),
]

0 comments on commit 1e960fb

Please sign in to comment.