New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-bthome

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-bthome - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

1

dist/bluetooth/index.d.ts

@@ -6,2 +6,3 @@ import { BluetoothDevice } from './types.js';

private readonly events;
private started;
constructor(serviceUuid: string);

@@ -8,0 +9,0 @@ start(timeout?: number): Promise<void>;

@@ -8,2 +8,3 @@ import noble from '@stoprocent/noble';

events = new EventEmitter();
started = false;
constructor(serviceUuid) {

@@ -13,6 +14,7 @@ this.serviceUuid = serviceUuid.toLocaleLowerCase();

async start(timeout) {
noble.on('discover', this.onDiscoverInternal.bind(this));
try {
await noble.waitForPoweredOn(timeout);
noble.on('discover', this.onDiscoverInternal.bind(this));
await noble.startScanningAsync([this.serviceUuid], true);
this.started = true;
}

@@ -28,2 +30,5 @@ catch (error) {

async stop() {
if (!this.started) {
return;
}
return noble.stopScanningAsync();

@@ -30,0 +35,0 @@ }

8

dist/platform.js

@@ -36,9 +36,13 @@ import { BTHomeAccessory } from './platformAccessory.js';

async discoverDevices() {
if (!this.config.devices || this.config.devices.length === 0) {
this.log.warn('No devices configured');
return;
}
try {
await this.scanner.start(this.config.bluetooth?.powerOnTimeout);
this.scanner.onDiscover(this.onDeviceDiscovered.bind(this));
await this.scanner.start(this.config.bluetooth?.powerOnTimeout);
this.log.info('Bluetooth scanner started');
}
catch (error) {
this.log.error('Failed to initialize bluetooth scanner: ', error);
this.log.error('Failed to initialize bluetooth scanner:', error);
}

@@ -45,0 +49,0 @@ }

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "1.0.3",
"version": "1.0.4",
"description": "A homebridge plugin that adds support for bluetooth devices that use BTHome protocol.",

@@ -8,0 +8,0 @@ "author": "Boris Yonchev",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc