Reading Xiaomi Mi Scale data with Web Bluetooth Scanning API

Alternative Title: How I hacked Xiaomi Mi Scale with Web Bluetooth Scanning API

Mi Body Composition Scale (Image source: Xiaomi Website)

Reading the weight data

The output result of “valueDataView.buffer”
The payload format for the Xiaomi Mi Scale (Source: GitHub)
Remember to divide the value by 200

Extra: Reading the Impedance Data

Try It Out

FYI: There’s no way to get the impedance data if you are wearing socks, but I don’t want to show my ugly feet… (And yes, that’s a T-Rex socks)

References

Google Developer Expert in Web Technologies | Front-end Web Developer | Making the web better with Preact, Polymer, Web Components, PWA & Firebase