0.0.4 • Published 7 years ago

node-xiaomi-scale v0.0.4

Weekly downloads
4
License
LGPL-3.0
Repository
github
Last release
7 years ago

node-xiaomi-scale

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)

0.0.4

7 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago