Skip to main content

A utility for reading from and managing a Wyze Scale X

Project description

wyze_scale_tool - A utility for reading from and managing a Wyze Scale X

This is a proof-of-concept python library and stand-alone program for communicating with a Wyze Scale X.

Installation

pip install wyze_scale_tool

CLI Usage

The CLI interface supports most of the functionality of the protocol, including creating, modifying and deleting users, querying weights, changing scale settings (units, etc.), and even a live-weighing mode that continuously shows the current measured weight from the scale.

Example Usage

To get a list of all cached weights of all users on the scale

wyze_scale_tool weights

To explore more of the options that are available, you can use --help

wyze_scale_tool --help

API Usage

This also exposes an API that can be used to communicate with a Wyze Scale X

import asyncio

from wyze_scale_tool import WyzeScale

async def main():
    mac_address = "AA:BB:CC:DD:EE:FF"

    scale = WyzeScale(mac_address)

    async with scale:
        users = await scale.get_users()
        for user in users:
            async for weight in scale.get_weights(user):
                print("User: %s Time: %s Weight: %s" % (
                    bytes.hex(user.user_id), weight.timestamp_str(), weight.weight_lbs))


if __name__ == "__main__":
    try:
        asyncio.run(main())
    except asyncio.CancelledError:
        pass

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

wyze_scale_tool-1.0.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wyze_scale_tool-1.0.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file wyze_scale_tool-1.0.0.tar.gz.

File metadata

  • Download URL: wyze_scale_tool-1.0.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for wyze_scale_tool-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6a9b0ccd4775cdda4d2373e9fc28a4d022533fc378a51b1852d3281e95a71920
MD5 e96d5487b1da377850e701d3e8d01a15
BLAKE2b-256 5c1fa563219bde07b6af1a41c2962b8850c7c3f4bdc356d7e0c3dcc7a4c37126

See more details on using hashes here.

File details

Details for the file wyze_scale_tool-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wyze_scale_tool-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5feb523010d77ee23e87f07566f0aa2dbd774676ed5bbdd30d518c91826bea7
MD5 eb97271d72f0325bc613fdb86e28b224
BLAKE2b-256 a685fbd053fe4091ec02c7f69d91ff7023150335e467a1f3303428cd86ecae71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page