An unofficial Python package for interacting with Etekcity ESF-551 Smart Fitness Scales using BLE. Not affiliated with Etekcity, VeSync Co., Ltd., or any of their subsidiaries.
Project description
Etekcity ESF-551 BLE
This package provides a basic unofficial interface for interacting with Etekcity ESF-551 Smart Fitness Scale using Bluetooth Low Energy (BLE). It allows you to easily connect to the scale, receive weight and impedance measurements, and manage the display unit settings. It is a very basic library, providing access to just the most fundamental functionality of the scale.
It has only been tested on the ESF-551 model. I have no idea whether it might also work with some other bluetooth bathroom scale models from Etekcity. If you try it with a different model, please let me know whether it works or not.
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,
EtekcitySmartFitnessScale,
ScaleData,
WeightUnit,
)
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]} Ω")
scale = EtekcitySmartFitnessScale("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())
API Reference
EtekcitySmartFitnessScale
The main class for interacting with the scale.
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.
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)
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
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
Hashes for etekcity_esf551_ble-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6242d952419a5db43e751405e0a5124c0d5fede221afd8242a707aeebe469e8e |
|
MD5 | 9f31abd731547a5689d967ff10ae44e4 |
|
BLAKE2b-256 | 6ae4465b207480761aa2503a091171d2eac4949455135aad4186f567bee2941c |
Hashes for etekcity_esf551_ble-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd3e401cbaebde61ec3ea258dd88307bc0ca8e515f324b7079828abc2cf78957 |
|
MD5 | 26462e98e56955507ad0eb20b50a762a |
|
BLAKE2b-256 | 88038ff13bd546ae7455e6f96891a8020b3b4df232684cc691dd00f2718fb870 |