vastra-radiator-valve
Version:
Node.js library to query and configure Vastra's smart radiator valves.
17 lines (12 loc) • 457 B
text/typescript
import NobleBluetoothCentral from "../lib/bluetooth-noble";
import { RadiatorValveScanner } from "../lib/scanner";
NobleBluetoothCentral.create().then(async (bluetooth) => {
const scanner = new RadiatorValveScanner(bluetooth, {
raspberryFix: true,
readTimeout: 3000,
});
const valve = await scanner.findOne();
console.log("serialNumber", await valve.getSerialNumber());
await valve.disconnect();
process.exit(0);
});