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.2.0-beta.0 to 1.2.0

4

dist/bluetooth/index.js

@@ -54,6 +54,6 @@ import { EventEmitter } from 'events';

}
const mac = peripheral.address.toLowerCase();
const name = advertisementData.localName || this.generateDeviceName(mac);
const serviceData = service.data;
const manufacturerData = this.decodeManufacturerData(advertisementData.manufacturerData);
const mac = peripheral.address.toLowerCase() || manufacturerData?.mac?.toLowerCase() || 'unknown';
const name = advertisementData.localName || this.generateDeviceName(mac);
if (!manufacturerData.serialNumber) {

@@ -60,0 +60,0 @@ manufacturerData.serialNumber = mac;

function decodeModelName(identifier) {
switch (identifier) {
case 0x0001:
return 'Shelly BLU Button1';
return 'SBBT-002C';
case 0x0002:
return 'Shelly BLU DoorWindow';
return 'SBDW-002C';
case 0x0003:
return 'Shelly BLU HT';
return 'SBHT-003C';
case 0x0005:
return 'Shelly BLU Motion';
return 'SBMO-003Z';
case 0x0006:
return 'Shelly BLU Wall Switch 4';
return 'SBBT-004CEU';
case 0x0007:
return 'Shelly BLU RC Button 4';
return 'SBBT-004CUS';
case 0x0008:
return 'Shelly BLU TRV';
return 'SBTR-001AEU';
}

@@ -29,2 +29,3 @@ }

case 0x0A:
result.mac = data.subarray(offset + 1, offset + 7).reverse().toString('hex').match(/.{1,2}/g)?.join(':');
offset += 7;

@@ -31,0 +32,0 @@ break;

@@ -11,4 +11,5 @@ export type BluetoothDevice = {

serialNumber?: string;
mac?: string;
};
export declare class BluetoothError extends Error {
}

@@ -50,3 +50,3 @@ import { BTHomeAccessory } from './platformAccessory.js';

if (!config) {
this.log.debug('Skipping not configured device: ', mac);
this.log.debug('Skipping not configured device:', mac);
return;

@@ -53,0 +53,0 @@ }

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

"type": "module",
"version": "1.2.0-beta.0",
"version": "1.2.0",
"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

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