homebridge-bthome
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -29,2 +29,16 @@ { | ||
} | ||
}, | ||
"bluetooth": { | ||
"title": "Bluetooth settings", | ||
"type": "object", | ||
"properties": { | ||
"powerOnTimeout": { | ||
"title": "Device power on timeout", | ||
"description": "Maximum time (in ms) to wait for the bluetooth device to be powered on", | ||
"type": "integer", | ||
"minimum": 1000, | ||
"default": 10000, | ||
"required": true | ||
} | ||
} | ||
} | ||
@@ -31,0 +45,0 @@ } |
@@ -15,3 +15,2 @@ import noble from '@stoprocent/noble'; | ||
await noble.waitForPoweredOn(timeout); | ||
await noble.stopScanningAsync(); | ||
await noble.startScanningAsync([this.serviceUuid], true); | ||
@@ -18,0 +17,0 @@ } |
@@ -38,3 +38,3 @@ import { BTHomeAccessory } from './platformAccessory.js'; | ||
this.scanner.onDiscover(this.onDeviceDiscovered.bind(this)); | ||
await this.scanner.start(); | ||
await this.scanner.start(this.config.bluetooth?.powerOnTimeout); | ||
this.log.info('Bluetooth scanner started'); | ||
@@ -41,0 +41,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"type": "module", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"private": false, | ||
@@ -8,0 +8,0 @@ "description": "A homebridge plugin that adds support for bluetooth devices that use BTHome protocol.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
58117
708