UNPKG

vastra-radiator-valve

Version:

Node.js library to query and configure Vastra's smart radiator valves.

13 lines (9 loc) 379 B
import NobleBluetoothCentral from "../lib/bluetooth-noble"; import { RadiatorValveScanner } from "../lib/scanner"; NobleBluetoothCentral.create().then((bluetooth) => { const scanner = new RadiatorValveScanner(bluetooth); scanner.on("connected", (valve) => { console.log(`Found a radiator valve @ ${valve.peripheral.address}`); }); scanner.start(); });