UNPKG

node-mi-flora-classic-updated

Version:

Node package for xiaomi mi flora plant sensor. Version 0.1.1 of original with update to support abandonware version of noble.

19 lines (13 loc) 349 B
const MiFlora = require('../index'); let flora = new MiFlora(); flora.startScanning(); flora.on('data', function (data) { console.log('data', data); }); flora.on('firmware', function (data) { console.log('firmware', data); }); setInterval(function () { console.log('every 15 seconds, rescan devices'); flora.startScanning(); }, 15000);