Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Add example Jun 19, 2016
.gitignore Initial commit Jun 19, 2016
LICENSE Initial commit Jun 19, 2016
README.md Add dependencies badge Dec 4, 2016
index.js fix when service data not ready yet Nov 24, 2016
package.json Bump version to 0.0.4 Dec 4, 2016

README.md

node-xiaomi-scale

Dependencies

MiScale class

Constructor

constructor optionally accepts mac address string. If string is given, it only emits data from given address.

MiScale.startScanning()

Start BLE scan and search for Mi scale.

MiScale.stopScanning()

Stop BLE scan.

MiScale.on('data', function cb(scale))

If nearby Mi Scale is scanned and if it met given criteria (matching mac address, not a duplicated entry), it emits its data using 'data' event.

scale.address

Bluetooth address of Mi Scale.

scale.svcUUID

Mi Scale service uuid.

scale.svcData

Raw Mi Scale service data.

scale.manufacturerData

Raw Mi Scale manufacturer data.

scale.isStabilized

If scale reading is stabilized, This flag will set to true.

scale.loadRemoved

If weight on scale is removed, This flag will set to true.

scale.unit

Measurement unit.

scale.sequence

Sequence number.

Thanks to

https://github.com/chaeplin, who built Xiaomi scale protocol parser prototype with Python. (https://github.com/chaeplin/Xiaomi_scale_scan)

You can’t perform that action at this time.