Skip to content
A Python app reading Xiaomi Mi Scale data
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
constants.py
example.py
miScale.py
requirements.txt
scale.py
test_scale.py
test_scan_delegate.py

README.md

Reverse Mi Scale

Read Xiaomi Mi Scale v1 data from a Raspberry Pi in Python 3.

Run

  1. Install dependencies
pip install -r requirements.txt
  1. Run the demo (must be run with sudo)
sudo python example.py --help
sudo python example.py
  1. Optionnal, if you want to find your Mi Scale MAC Address
sudo hcitool lescan

Run tests

pytest

Output samples

{
    "UUID": "181d",
    "address": "c8:0f:10:bf:cc:66",
    "isStabilized": false,
    "loadRemoved": true,
    "manufacturerData": "5701c80f10bfcc66",
    "rawData": "820000e2070b0f082924",
    "sequence": 10532,
    "unit": "kg",
    "weight": 0.0
}
{
    "UUID": "181d",
    "address": "c8:0f:10:bf:cc:66",
    "isStabilized": true,
    "loadRemoved": false,
    "manufacturerData": "5701c80f10bfcc66",
    "rawData": "226455e2070b0f0c1d1b",
    "sequence": 7451,
    "unit": "kg",
    "weight": 109.3
}
{
    "UUID": "181d",
    "address": "c8:0f:10:bf:cc:66",
    "isStabilized": true,
    "loadRemoved": true,
    "manufacturerData": "5701c80f10bfcc66",
    "rawData": "a26455e2070b0f082a23",
    "sequence": 10787,
    "unit": "kg",
    "weight": 109.3
}
{
    "UUID": "181d",
    "address": "c8:0f:10:bf:cc:66",
    "isStabilized": false,
    "loadRemoved": false,
    "manufacturerData": "5701c80f10bfcc66",
    "rawData": "02e402b2080101010422",
    "sequence": 1058,
    "unit": "kg",
    "weight": 3.7
}

Source of inspiration

Thanks for providing those awesome open source projects.

You can’t perform that action at this time.