node-switchbot
Advanced tools
Comparing version 3.4.1 to 3.4.2-beta.0
@@ -15,3 +15,3 @@ import { Buffer } from 'node:buffer'; | ||
import { WoPresence } from './device/wopresence.js'; | ||
import { WoRelaySwitch1Plus } from './device/worelayswitch1plus.js'; | ||
import { WoRelaySwitch1 } from './device/worelayswitch1.js'; | ||
import { WoRelaySwitch1PM } from './device/worelayswitch1pm.js'; | ||
@@ -135,6 +135,6 @@ import { WoSensorTH } from './device/wosensorth.js'; | ||
return WoLeak.parseServiceData(serviceData, manufacturerData, emitLog); | ||
case SwitchBotBLEModel.RelaySwitch1: | ||
return WoRelaySwitch1.parseServiceData(serviceData, manufacturerData, emitLog); | ||
case SwitchBotBLEModel.RelaySwitch1PM: | ||
return WoRelaySwitch1PM.parseServiceData(serviceData, manufacturerData, emitLog); | ||
case SwitchBotBLEModel.RelaySwitch1Plus: | ||
return WoRelaySwitch1Plus.parseServiceData(serviceData, manufacturerData, emitLog); | ||
default: | ||
@@ -141,0 +141,0 @@ emitLog('debug', `[parseAdvertising.${model}] return null, model "${model}" not available!`); |
@@ -18,3 +18,3 @@ import { EventEmitter } from 'node:events'; | ||
import { WoPresence } from './device/wopresence.js'; | ||
import { WoRelaySwitch1Plus } from './device/worelayswitch1plus.js'; | ||
import { WoRelaySwitch1 } from './device/worelayswitch1.js'; | ||
import { WoRelaySwitch1PM } from './device/worelayswitch1pm.js'; | ||
@@ -230,4 +230,4 @@ import { WoSensorTH } from './device/wosensorth.js'; | ||
case SwitchBotBLEModel.Keypad: return new WoKeypad(peripheral, this.noble); | ||
case SwitchBotBLEModel.RelaySwitch1: return new WoRelaySwitch1(peripheral, this.noble); | ||
case SwitchBotBLEModel.RelaySwitch1PM: return new WoRelaySwitch1PM(peripheral, this.noble); | ||
case SwitchBotBLEModel.RelaySwitch1Plus: return new WoRelaySwitch1Plus(peripheral, this.noble); | ||
default: return new SwitchbotDevice(peripheral, this.noble); | ||
@@ -234,0 +234,0 @@ } |
@@ -318,5 +318,5 @@ import type { MacAddress, SwitchBotBLEModel, SwitchBotBLEModelFriendlyName, SwitchBotBLEModelName } from './types.js'; | ||
export type relaySwitch1PlusServiceData = serviceData & { | ||
model: SwitchBotBLEModel.RelaySwitch1Plus; | ||
modelName: SwitchBotBLEModelName.RelaySwitch1Plus; | ||
modelFriendlyName: SwitchBotBLEModelFriendlyName.RelaySwitch1Plus; | ||
model: SwitchBotBLEModel.RelaySwitch1; | ||
modelName: SwitchBotBLEModelName.RelaySwitch1; | ||
modelFriendlyName: SwitchBotBLEModelFriendlyName.RelaySwitch1; | ||
mode: boolean; | ||
@@ -323,0 +323,0 @@ state: boolean; |
@@ -106,4 +106,4 @@ import type { Buffer } from 'node:buffer'; | ||
Keypad = "y", | ||
RelaySwitch1 = ";", | ||
RelaySwitch1PM = "<", | ||
RelaySwitch1Plus = ";", | ||
Unknown = "Unknown" | ||
@@ -134,4 +134,4 @@ } | ||
Keypad = "WoKeypad", | ||
RelaySwitch1 = "WoRelaySwitch1Plus", | ||
RelaySwitch1PM = "WoRelaySwitch1PM", | ||
RelaySwitch1Plus = "WoRelaySwitch1Plus", | ||
Unknown = "Unknown" | ||
@@ -162,4 +162,4 @@ } | ||
Keypad = "Keypad", | ||
RelaySwitch1 = "Relay Switch 1", | ||
RelaySwitch1PM = "Relay Switch 1PM", | ||
RelaySwitch1Plus = "Relay Switch 1 Plus", | ||
Unknown = "Unknown" | ||
@@ -166,0 +166,0 @@ } |
@@ -71,4 +71,4 @@ export var SwitchBotModel; | ||
SwitchBotBLEModel["Keypad"] = "y"; | ||
SwitchBotBLEModel["RelaySwitch1"] = ";"; | ||
SwitchBotBLEModel["RelaySwitch1PM"] = "<"; | ||
SwitchBotBLEModel["RelaySwitch1Plus"] = ";"; | ||
SwitchBotBLEModel["Unknown"] = "Unknown"; | ||
@@ -100,4 +100,4 @@ })(SwitchBotBLEModel || (SwitchBotBLEModel = {})); | ||
SwitchBotBLEModelName["Keypad"] = "WoKeypad"; | ||
SwitchBotBLEModelName["RelaySwitch1"] = "WoRelaySwitch1Plus"; | ||
SwitchBotBLEModelName["RelaySwitch1PM"] = "WoRelaySwitch1PM"; | ||
SwitchBotBLEModelName["RelaySwitch1Plus"] = "WoRelaySwitch1Plus"; | ||
SwitchBotBLEModelName["Unknown"] = "Unknown"; | ||
@@ -129,4 +129,4 @@ })(SwitchBotBLEModelName || (SwitchBotBLEModelName = {})); | ||
SwitchBotBLEModelFriendlyName["Keypad"] = "Keypad"; | ||
SwitchBotBLEModelFriendlyName["RelaySwitch1"] = "Relay Switch 1"; | ||
SwitchBotBLEModelFriendlyName["RelaySwitch1PM"] = "Relay Switch 1PM"; | ||
SwitchBotBLEModelFriendlyName["RelaySwitch1Plus"] = "Relay Switch 1 Plus"; | ||
SwitchBotBLEModelFriendlyName["Unknown"] = "Unknown"; | ||
@@ -133,0 +133,0 @@ })(SwitchBotBLEModelFriendlyName || (SwitchBotBLEModelFriendlyName = {})); |
{ | ||
"name": "node-switchbot", | ||
"type": "module", | ||
"version": "3.4.1", | ||
"version": "3.4.2-beta.0", | ||
"description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).", | ||
@@ -61,3 +61,3 @@ "author": "OpenWonderLabs (https://github.com/OpenWonderLabs)", | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^3.11.0", | ||
"@antfu/eslint-config": "^3.11.2", | ||
"@types/aes-js": "^3.1.4", | ||
@@ -68,3 +68,3 @@ "@types/debug": "^4.1.12", | ||
"@types/mdast": "^4.0.4", | ||
"@types/node": "^22.10.0", | ||
"@types/node": "^22.10.1", | ||
"@types/semver": "^7.5.8", | ||
@@ -71,0 +71,0 @@ "@types/sinon": "^17.0.3", |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3338614
471
10333
1
1
4