Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@switchbot/homebridge-switchbot-ble

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@switchbot/homebridge-switchbot-ble - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

dist/curtain-accessory.js

1

dist/bot-accessory.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bot = void 0;
class Bot {

@@ -4,0 +5,0 @@ constructor(hap, log, name, bleMac, scanDuration) {

15

dist/switchbot-platform.js
"use strict";
const bot_accessory_1 = require("./bot-accessory");
const curtain_accessory_1 = require("./curtain-accessory");
const PLATFORM_NAME = "SwitchBotPlatform";

@@ -41,3 +42,2 @@ /*

accessories(callback) {
this.log.info("this.config");
let deviceList = [];

@@ -49,5 +49,12 @@ for (var device of this.config.devices) {

// this.log.info(device.scanDuration, typeof device.scanDuration);
if (device.type == 'bot') {
let scanDuration = device.scanDuration || 1000;
deviceList.push(new bot_accessory_1.Bot(hap, this.log, device.name, device.bleMac.toLowerCase(), scanDuration));
let scanDuration = device.scanDuration || 1000;
switch (device.type) {
case 'bot':
deviceList.push(new bot_accessory_1.Bot(hap, this.log, device.name, device.bleMac.toLowerCase(), scanDuration));
break;
case 'curtain':
deviceList.push(new curtain_accessory_1.Curtain(hap, this.log, device.name, device.bleMac.toLowerCase(), scanDuration));
break;
default:
break;
}

@@ -54,0 +61,0 @@ }

{
"name": "@switchbot/homebridge-switchbot-ble",
"version": "1.0.1",
"version": "1.1.0",
"description": "Homebridge integration for SwitchBot BLE series products",

@@ -36,11 +36,11 @@ "license": "ISC",

"devDependencies": {
"@types/node": "10.17.19",
"homebridge": "^1.0.4",
"@types/node": "14.14.6",
"homebridge": "^1.1.6",
"rimraf": "^3.0.2",
"typescript": "^3.8.3"
"typescript": "^4.0.5"
},
"dependencies": {
"@abandonware/noble": "^1.9.2-10",
"node-switchbot": "0.0.5"
"node-switchbot": "0.1.0"
}
}

@@ -10,3 +10,9 @@ <span align="center">

The @switchbot/homebridge-switchbot-bleswitchbot is a nodejs module , and also a homebridge plug-in that directly controls SwitchBot products via BLE.
Now supports:
* [SwitchBot (Bot)](https://www.switch-bot.com/products/switchbot-bot)
* [SwitchBot Curtain(Curtain)](https://www.switch-bot.com/products/switchbot-curtain)
## Installation

@@ -24,2 +30,4 @@ ### Installing bluetooth libraries

```
You can also install it on the homebridge plugins page.
![homebridge-plugins-search](image/homebridge-plugins-search.png)

@@ -53,2 +61,8 @@ ## Configuration

"scanDuration": 2000
},
{
"type": "curtain",
"name": "Curtain 11",
"bleMac": "ec:58:c5:d0:01:11",
"scanDuration": 2000
}

@@ -62,3 +76,3 @@ ]

* `devices` - SwitchBot devices list.
* `type` - Device type. Currently only `bot` is supported.
* `type` - Device type. Currently only supports `bot` and `curtain`.
* `name` - Device name.

@@ -69,1 +83,13 @@ * `bleMac` - Device mac address. You can find it in App settings.

* `scanDuration` - Scan timeout. BLE Central must first scan the advertising. Default is `1000`(unit: ms). Longer time to ensure device discovery but slower response.
## Release-Note
* v1.1.0 (2020-10-29)
* Add support for Curtain.
* v1.0.1 (2020-10-22)
* First public release, supports Bot.
## Community
* [SwitchBot (Official website)](https://www.switch-bot.com/)
* [Facebook @SwitchBotRobot](https://www.facebook.com/SwitchBotRobot/)
* [Twitter @SwitchBot](https://twitter.com/switchbot)

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