Skip to main content

CraftBeerPi4 Xiaomi Scale integration plugin

Project description

CBPi4 Xiaomi Scale

This CBPi4 Plugin Contains A Sensor class of a Bluetooth Xiaomi scale and the logic of Fill step (filling a vessel with liquid)

Installation:

You can install it directly via pypi.org:

  • sudo pip3 install cbpi4-XiaomiScale

Alternatively you can install (or clone) it from the GIT Repo. In case of updates, you will find them here first:

Xiaomi Scale

Setup

  • Get your scale's mac address. You can get it via the "zepp life" app:
    • Download the app and connect your device as the device instructions show.
    • Once the device has been connected open the app and go to the profile tab.
    • You should see your device in the "My devices" section, tap it.
    • The value in the "Bluetooth address" field is your device's mac address.

*Works only on linux based systems

Parameters:

  • Configurable:

    • Xiaomi Scale device Mac address.
    • Offset (insert the base weight of the rig standing on the scale in KG).
    • Gravity (insert the gravity of the liquid you want to measure, in SG). This field is irrelevant if Display type is Weight.
    • Display Type. Choose whether you would like to see the sensor value as weight or as liquid volume.
  • Fixed in Code:

    • Sensor sampling interval (maybe made configurable in future releases)

Fill Step

Parameters:

  • Configurable:
    • Volume. The target volume to fill.
    • Actor. If none is given, this step only measures the volume.
    • Sensor - to measure to volume.
    • Reset - Choose whether you want to reset the sensor after this step is done.

Changelog:

  • 28.01.23: (0.2.1) Added Toggle state (enable/disable sensor) action
  • 06.09.22: (0.2.0) Initial release

A Word of Caution

Please be careful using a Xiaomi Bluetooth scale, namely - do not put it in direct contact with hot things, and be careful to not shutter the glass. I'm not responsible for whatever damage or injury that may happen as a result of your use of a Xiaomi Scale, or any other instrument.

Credits

Thanks to lolouk44 for the code responsible for extracting the weight of the scale

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

cbpi4-XiaomiScale-0.2.1.tar.gz (17.7 kB view details)

Uploaded Source

File details

Details for the file cbpi4-XiaomiScale-0.2.1.tar.gz.

File metadata

  • Download URL: cbpi4-XiaomiScale-0.2.1.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for cbpi4-XiaomiScale-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b96c51d7ecbc0869871b58777e68fae680d25031f5bea6dfa3e75b34cc0f7b91
MD5 6b60ed6a687cd090075e6f9f635edbef
BLAKE2b-256 85eb2755e3d2f71750f304bcd18fb32d44ab15b13cb2a69d751797479550d0ec

See more details on using hashes here.

Supported by

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