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

node-switchbot

Package Overview
Dependencies
Maintainers
2
Versions
327
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-switchbot - npm Package Compare versions

Comparing version 1.4.2-beta.8 to 1.4.2-beta.9

16

lib/switchbot-advertising.js

@@ -355,6 +355,6 @@ "use strict";

_parseServiceDataForWoBulb(buf, onlog) {
if (buf.length !== 6) {
if (buf.length !== 13) {
if (onlog && typeof onlog === "function") {
onlog(
`[_parseServiceDataForWoBulb] Buffer length ${buf.length} !== 6!`
`[_parseServiceDataForWoBulb] Buffer length ${buf.length} !== 13!`
);

@@ -370,4 +370,4 @@ }

const state = byte9 === 0x00 ? "off" : byte9 === 0x80 ? "on" : null;
const lightLevel = byte9 & 0b01111111;
const state = byte9 === 0x01 ? "off" : byte9 === 0x80 ? "on" : null;
const lightLevel = byte9 & 0b00000011;
const delay = !!(byte10 & 0b00000001);

@@ -380,3 +380,2 @@ const networkStatus = !!(byte10 & 0b00000001);

const loopIndex = (((byte12 & 0b01111111) << 8) + byte13) / 10; // in watt
// TODO: voltage ???

@@ -387,2 +386,7 @@ const data = {

state: state,
};
/* const data = {
model: "u",
modelName: "WoBulb",
state: state,
lightLevel: lightLevel,

@@ -396,3 +400,3 @@ delay: delay,

loopIndex: loopIndex,
};
};*/

@@ -399,0 +403,0 @@ return data;

{
"name": "node-switchbot",
"version": "1.4.2-beta.8",
"version": "1.4.2-beta.9",
"description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).",

@@ -5,0 +5,0 @@ "main": "./lib/switchbot.js",

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