An unofficial Python package for interacting with Etekcity Smart Fitness Scales using BLE. Supports ESF-551 (full features), ESF-24 (experimental), and other Etekcity scale models. Not affiliated with Etekcity, VeSync Co., Ltd., or any of their subsidiaries.
Project description
Etekcity ESF-551 & ESF-24 BLE
This package provides a basic unofficial interface for interacting with Etekcity Smart Fitness Scales using Bluetooth Low Energy (BLE). It supports both the Etekcity ESF-551 and Etekcity ESF-24 models.
Features
- ESF-551: Full feature support including weight, impedance, body metrics, and display unit management
- ESF-24: Experimental weight-only support (kilograms only, protocol under analysis)
- Easy connection and notification handling
- Body metrics calculations (ESF-551 only)
- Display unit management (ESF-551 only)
Supported Models
| Model | Status | Features |
|---|---|---|
| ESF-551 | ✅ Fully Supported | Weight, impedance, body metrics, unit changes |
| ESF-24 | 🔬 Experimental | Weight, impedance, unit changes |
Version Status
v0.4.0-beta.3 (Pre-Release):
- ✅ ESF-551: Fully supported and stable
- 🔬 ESF-24: Experimental support (protocol analysis ongoing)
- ♻️ Internal: passive-scan optimisation & universal2 wheel build
- ⚠️ Breaking changes from v0.3.x (architecture refactoring)
Note: This is a pre-release version. PyPI will not automatically suggest upgrades from stable versions (v0.3.x) to this beta version.
Disclaimer: This is an unofficial, community-developed library. It is not affiliated with, officially maintained by, or in any way officially connected with Etekcity, VeSync Co., Ltd. (the owner of the Etekcity brand), or any of their subsidiaries or affiliates. The official Etekcity website can be found at https://www.etekcity.com, and the official VeSync website at https://www.vesync.com. The names "Etekcity" and "VeSync" as well as related names, marks, emblems and images are registered trademarks of their respective owners.
Installation
Install the package using pip:
pip install etekcity_esf551_ble
Quick Start
Here's a basic example of how to use the library:
import asyncio
from etekcity_esf551_ble import (
IMPEDANCE_KEY,
WEIGHT_KEY,
ESF551Scale,
ScaleData,
WeightUnit,
BodyMetrics,
Sex,
)
async def main():
def notification_callback(data: ScaleData):
print(f"Weight: {data.measurements[WEIGHT_KEY]} kg")
print(f"Display Unit: {data.display_unit.name}")
if IMPEDANCE_KEY in data.measurements:
print(f"Impedance: {data.measurements[IMPEDANCE_KEY]} Ω")
# Calculate body metrics (ESF-551 only)
# Note: Replace with your actual height, age and sex
body_metrics = BodyMetrics(
weight_kg=data.measurements[WEIGHT_KEY],
height_m=1.75, # Example height
age=30, # Example age
sex=Sex.Male, # Example sex
impedance=data.measurements[IMPEDANCE_KEY]
)
print(f"Body Mass Index: {body_metrics.body_mass_index:.2f}")
print(f"Body Fat Percentage: {body_metrics.body_fat_percentage:.1f}%")
print(f"Fat-Free Weight: {body_metrics.fat_free_weight:.2f} kg")
print(f"Subcutaneous Fat Percentage: {body_metrics.subcutaneous_fat_percentage:.1f}%")
print(f"Visceral Fat Value: {body_metrics.visceral_fat_value}")
print(f"Body Water Percentage: {body_metrics.body_water_percentage:.1f}%")
print(f"Basal Metabolic Rate: {body_metrics.basal_metabolic_rate} calories")
print(f"Skeletal Muscle Percentage: {body_metrics.skeletal_muscle_percentage:.1f}%")
print(f"Muscle Mass: {body_metrics.muscle_mass:.2f} kg")
print(f"Bone Mass: {body_metrics.bone_mass:.2f} kg")
print(f"Protein Percentage: {body_metrics.protein_percentage:.1f}%")
print(f"Metabolic Age: {body_metrics.metabolic_age} years")
# Create scale (replace XX:XX:XX:XX:XX:XX with your scale's Bluetooth address)
scale = ESF551Scale("XX:XX:XX:XX:XX:XX", notification_callback)
scale.display_unit = WeightUnit.KG # Set display unit to kilograms
await scale.async_start()
await asyncio.sleep(30) # Wait for measurements
await scale.async_stop()
asyncio.run(main())
Multi-Model Usage
For different scale models:
# ESF-551 (full features)
from etekcity_esf551_ble import ESF551Scale
scale = ESF551Scale(address, callback)
# ESF-24 (experimental)
from etekcity_esf551_ble import ESF24Scale
scale = ESF24Scale(address, callback)
For a real-life usage example of this library, check out the Etekcity Fitness Scale BLE Integration for Home Assistant.
API Reference
Scale Classes
EtekcitySmartFitnessScale (Abstract Base)
Abstract base class for all scale implementations.
ESF551Scale
Implementation for ESF-551 scales with full feature support.
ESF24Scale
Experimental implementation for ESF-24 scales (weight-only).
Common Methods:
__init__(self, address: str, notification_callback: Callable[[ScaleData], None], display_unit: WeightUnit = None)async_start(): Start scanning for and connecting to the scale.async_stop(): Stop the connection to the scale.
Common Properties:
display_unit: Get or set the display unit (WeightUnit.KG, WeightUnit.LB or WeightUnit.ST). Returns None if the display unit is currently unknown (not set by the user and not yet received from the scale together with a stable weight measurement).hw_version: Get the hardware version of the scale (read-only).sw_version: Get the software version of the scale (read-only).
ESF551ScaleWithBodyMetrics
An extended version of ESF551Scale that automatically calculates body metrics.
Methods:
__init__(self, address: str, notification_callback: Callable[[ScaleData], None], sex: Sex, birthdate: date, height_m: float, display_unit: WeightUnit = None)async_start(): Start scanning for and connecting to the scale.async_stop(): Stop the connection to the scale.
Properties:
display_unit: Get or set the display unit (WeightUnit.KG, WeightUnit.LB or WeightUnit.ST). Returns None if the display unit is currently unknown (not set by the user and not yet received from the scale together with a stable weight measurement).hw_version: Get the hardware version of the scale (read-only).sw_version: Get the software version of the scale (read-only).
WeightUnit
An enum representing the possible display units:
WeightUnit.KG: KilogramsWeightUnit.LB: PoundsWeightUnit.ST: Stones
ScaleData
A dataclass containing scale measurement data:
name: Scale nameaddress: Scale Bluetooth addresshw_version: Hardware versionsw_version: Software versiondisplay_unit: Current display unit (concerns only the weight as displayed on the scale, the measurement itself is always provided by the API in kilograms)measurements: Dictionary of measurements (currently supports: weight in kilograms and impedance in ohms)
BodyMetrics
A class for calculating various body composition metrics based on height, age, sex, and the weight and impedance as measured by the scale, similar to the metrics calculated and shown in the VeSync app. Note that currently "Athlete Mode" is not supported.
Methods:
__init__(self, weight_kg: float, height_m: float, age: int, sex: Sex, impedance: int)
Properties:
body_mass_index: Body Mass Index (BMI)body_fat_percentage: Estimated body fat percentagefat_free_weight: Weight of non-fat body mass in kgsubcutaneous_fat_percentage: Estimated subcutaneous fat percentagevisceral_fat_value: Estimated visceral fat level (unitless)body_water_percentage: Estimated body water percentagebasal_metabolic_rate: Estimated basal metabolic rate in caloriesskeletal_muscle_percentage: Estimated skeletal muscle percentagemuscle_mass: Estimated muscle mass in kgbone_mass: Estimated bone mass in kgprotein_percentage: Estimated protein percentageweight_score: Calculated weight score (0-100)fat_score: Calculated fat score (0-100)bmi_score: Calculated BMI score (0-100)health_score: Overall health score based on other metrics (0-100)metabolic_age: Estimated metabolic age in years
Sex
An enum representing biological sex for body composition calculations:
Sex.MaleSex.Female
Compatibility
- Tested on Mac (Apple Silicon) and Raspberry Pi 4
- Compatibility with Windows is unknown
Troubleshooting
On Raspberry Pi 4 (and possibly other Linux machines using BlueZ), if you encounter a org.bluez.Error.InProgress error, try the following in bluetoothctl:
power off
power on
scan on
(See https://github.com/home-assistant/core/issues/76186#issuecomment-1204954485)
Support the Project
If you find this unofficial project helpful, consider buying me a coffee! Your support helps maintain and improve this library.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This is an independent project developed by the community. It is not endorsed by, directly affiliated with, maintained, authorized, or sponsored by Etekcity, VeSync Co., Ltd., or any of their affiliates or subsidiaries. All product and company names are the registered trademarks of their original owners. The use of any trade name or trademark is for identification and reference purposes only and does not imply any association with the trademark holder of their product brand.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file etekcity_esf551_ble-0.4.0b3.tar.gz.
File metadata
- Download URL: etekcity_esf551_ble-0.4.0b3.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9eeb5dbad68d826760527ec3cd0bf68f6380e9171c447eb4c2e8e9ca7fe8147
|
|
| MD5 |
ae5cb6b9b425288c793d8c2d4dd43160
|
|
| BLAKE2b-256 |
5ddea0ba4751b741499682eb2835dc2c93dd6129d0067f2c98c70e085452cc76
|
File details
Details for the file etekcity_esf551_ble-0.4.0b3-py3-none-any.whl.
File metadata
- Download URL: etekcity_esf551_ble-0.4.0b3-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1406f34890c6f37ecd230d93bd1fd88aa66852befed7f95da8aa0165b9e2c670
|
|
| MD5 |
4593397d3ce4c8e890e0ca9d5f670419
|
|
| BLAKE2b-256 |
260dd4932c5aaa8f4cafca80d50c14f27746fb8d8ecdd73021bfe40b0e31104e
|