node-switchbot 2.5.0-beta.4 → 2.5.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advertising.d.ts +31 -20
- package/dist/advertising.d.ts.map +1 -1
- package/dist/advertising.js +72 -75
- package/dist/advertising.js.map +1 -1
- package/dist/device.d.ts +86 -223
- package/dist/device.d.ts.map +1 -1
- package/dist/device.js +123 -407
- package/dist/device.js.map +1 -1
- package/dist/switchbot.d.ts +1 -2
- package/dist/switchbot.d.ts.map +1 -1
- package/dist/switchbot.js.map +1 -1
- package/dist/types/types.d.ts +21 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/types.js.map +1 -1
- package/package.json +1 -1
package/dist/advertising.d.ts
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import type * as Noble from '@stoprocent/noble';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
export interface Ad {
|
|
8
|
-
id: string;
|
|
9
|
-
address: string;
|
|
10
|
-
rssi: number;
|
|
11
|
-
serviceData: ServiceData;
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
export interface AdvertisementData {
|
|
15
|
-
serviceData: Buffer | null;
|
|
16
|
-
manufacturerData: Buffer | null;
|
|
17
|
-
}
|
|
2
|
+
import type { Ad } from './types/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the advertising data parser for SwitchBot devices.
|
|
5
|
+
*/
|
|
18
6
|
export declare class Advertising {
|
|
19
7
|
constructor();
|
|
20
8
|
/**
|
|
@@ -23,11 +11,34 @@ export declare class Advertising {
|
|
|
23
11
|
* This function processes advertising packets received from SwitchBot devices
|
|
24
12
|
* and extracts relevant information based on the device type.
|
|
25
13
|
*
|
|
26
|
-
* @param peripheral - The peripheral device object from noble.
|
|
27
|
-
* @param onlog - A logging function for debugging purposes.
|
|
28
|
-
* @returns An object containing parsed data specific to the SwitchBot device type, or `null` if the device is not recognized.
|
|
14
|
+
* @param {Noble.Peripheral} peripheral - The peripheral device object from noble.
|
|
15
|
+
* @param {(message: string) => void} [onlog] - A logging function for debugging purposes.
|
|
16
|
+
* @returns {Promise<Ad | null>} - An object containing parsed data specific to the SwitchBot device type, or `null` if the device is not recognized.
|
|
29
17
|
*/
|
|
30
18
|
static parse(peripheral: Noble.Peripheral, onlog?: (message: string) => void): Promise<Ad | null>;
|
|
19
|
+
/**
|
|
20
|
+
* Validates if the buffer is a valid Buffer object with a minimum length.
|
|
21
|
+
*
|
|
22
|
+
* @param {any} buffer - The buffer to validate.
|
|
23
|
+
* @returns {boolean} - True if the buffer is valid, false otherwise.
|
|
24
|
+
*/
|
|
25
|
+
private static validateBuffer;
|
|
26
|
+
/**
|
|
27
|
+
* Parses the service data based on the device model.
|
|
28
|
+
*
|
|
29
|
+
* @param {string} model - The device model.
|
|
30
|
+
* @param {Buffer} serviceData - The service data buffer.
|
|
31
|
+
* @param {Buffer} manufacturerData - The manufacturer data buffer.
|
|
32
|
+
* @param {(message: string) => void} [onlog] - A logging function for debugging purposes.
|
|
33
|
+
* @returns {Promise<any>} - The parsed service data.
|
|
34
|
+
*/
|
|
35
|
+
private static parseServiceData;
|
|
36
|
+
/**
|
|
37
|
+
* Formats the address of the peripheral.
|
|
38
|
+
*
|
|
39
|
+
* @param {Noble.Peripheral} peripheral - The peripheral device object from noble.
|
|
40
|
+
* @returns {string} - The formatted address.
|
|
41
|
+
*/
|
|
42
|
+
private static formatAddress;
|
|
31
43
|
}
|
|
32
|
-
export {};
|
|
33
44
|
//# sourceMappingURL=advertising.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advertising.d.ts","sourceRoot":"","sources":["../src/advertising.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,KAAK,MAAM,mBAAmB,CAAA;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"advertising.d.ts","sourceRoot":"","sources":["../src/advertising.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,KAAK,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,EAAE,EAAE,EAAe,MAAM,kBAAkB,CAAA;AAqBvD;;GAEG;AACH,qBAAa,WAAW;;IAGtB;;;;;;;;;OASG;WACU,KAAK,CAChB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAChC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;IAgCrB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAI7B;;;;;;;;OAQG;mBACkB,gBAAgB;IAkDrC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;CAY7B"}
|
package/dist/advertising.js
CHANGED
|
@@ -15,6 +15,9 @@ import { WoSmartLock } from './device/wosmartlock.js';
|
|
|
15
15
|
import { WoSmartLockPro } from './device/wosmartlockpro.js';
|
|
16
16
|
import { WoStrip } from './device/wostrip.js';
|
|
17
17
|
import { SwitchBotBLEModel } from './types/types.js';
|
|
18
|
+
/**
|
|
19
|
+
* Represents the advertising data parser for SwitchBot devices.
|
|
20
|
+
*/
|
|
18
21
|
export class Advertising {
|
|
19
22
|
constructor() { }
|
|
20
23
|
/**
|
|
@@ -23,122 +26,116 @@ export class Advertising {
|
|
|
23
26
|
* This function processes advertising packets received from SwitchBot devices
|
|
24
27
|
* and extracts relevant information based on the device type.
|
|
25
28
|
*
|
|
26
|
-
* @param peripheral - The peripheral device object from noble.
|
|
27
|
-
* @param onlog - A logging function for debugging purposes.
|
|
28
|
-
* @returns An object containing parsed data specific to the SwitchBot device type, or `null` if the device is not recognized.
|
|
29
|
+
* @param {Noble.Peripheral} peripheral - The peripheral device object from noble.
|
|
30
|
+
* @param {(message: string) => void} [onlog] - A logging function for debugging purposes.
|
|
31
|
+
* @returns {Promise<Ad | null>} - An object containing parsed data specific to the SwitchBot device type, or `null` if the device is not recognized.
|
|
29
32
|
*/
|
|
30
33
|
static async parse(peripheral, onlog) {
|
|
31
34
|
const ad = peripheral.advertisement;
|
|
32
35
|
if (!ad || !ad.serviceData) {
|
|
33
36
|
return null;
|
|
34
37
|
}
|
|
35
|
-
const
|
|
38
|
+
const serviceData = ad.serviceData[0]?.data;
|
|
36
39
|
const manufacturerData = ad.manufacturerData;
|
|
37
|
-
|
|
38
|
-
function validateBuffer(buffer) {
|
|
39
|
-
return buffer && Buffer.isBuffer(buffer) && buffer.length >= 3;
|
|
40
|
-
}
|
|
41
|
-
if (!validateBuffer(serviceData) || !validateBuffer(manufacturerData)) {
|
|
40
|
+
if (!Advertising.validateBuffer(serviceData) || !Advertising.validateBuffer(manufacturerData)) {
|
|
42
41
|
return null;
|
|
43
42
|
}
|
|
44
43
|
const model = serviceData.subarray(0, 1).toString('utf8');
|
|
45
|
-
|
|
44
|
+
const sd = await Advertising.parseServiceData(model, serviceData, manufacturerData, onlog);
|
|
45
|
+
if (!sd) {
|
|
46
|
+
onlog?.(`[parseAdvertising.${peripheral.id}.${model}] return null, parsed serviceData empty!`);
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
const address = Advertising.formatAddress(peripheral);
|
|
50
|
+
const data = {
|
|
51
|
+
id: peripheral.id,
|
|
52
|
+
address,
|
|
53
|
+
rssi: peripheral.rssi,
|
|
54
|
+
serviceData: { model, ...sd },
|
|
55
|
+
};
|
|
56
|
+
onlog?.(`[parseAdvertising.${peripheral.id}.${model}] return ${JSON.stringify(data)}`);
|
|
57
|
+
return data;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Validates if the buffer is a valid Buffer object with a minimum length.
|
|
61
|
+
*
|
|
62
|
+
* @param {any} buffer - The buffer to validate.
|
|
63
|
+
* @returns {boolean} - True if the buffer is valid, false otherwise.
|
|
64
|
+
*/
|
|
65
|
+
static validateBuffer(buffer) {
|
|
66
|
+
return buffer && Buffer.isBuffer(buffer) && buffer.length >= 3;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Parses the service data based on the device model.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} model - The device model.
|
|
72
|
+
* @param {Buffer} serviceData - The service data buffer.
|
|
73
|
+
* @param {Buffer} manufacturerData - The manufacturer data buffer.
|
|
74
|
+
* @param {(message: string) => void} [onlog] - A logging function for debugging purposes.
|
|
75
|
+
* @returns {Promise<any>} - The parsed service data.
|
|
76
|
+
*/
|
|
77
|
+
static async parseServiceData(model, serviceData, manufacturerData, onlog) {
|
|
46
78
|
switch (model) {
|
|
47
79
|
case SwitchBotBLEModel.Bot:
|
|
48
|
-
|
|
49
|
-
break;
|
|
80
|
+
return WoHand.parseServiceData(serviceData, onlog);
|
|
50
81
|
case SwitchBotBLEModel.Curtain:
|
|
51
82
|
case SwitchBotBLEModel.Curtain3:
|
|
52
|
-
|
|
53
|
-
break;
|
|
83
|
+
return WoCurtain.parseServiceData(serviceData, manufacturerData, onlog);
|
|
54
84
|
case SwitchBotBLEModel.Humidifier:
|
|
55
|
-
|
|
56
|
-
break;
|
|
85
|
+
return WoHumi.parseServiceData(serviceData, onlog);
|
|
57
86
|
case SwitchBotBLEModel.Meter:
|
|
58
|
-
|
|
59
|
-
break;
|
|
87
|
+
return WoSensorTH.parseServiceData(serviceData, onlog);
|
|
60
88
|
case SwitchBotBLEModel.MeterPlus:
|
|
61
|
-
|
|
62
|
-
break;
|
|
89
|
+
return WoSensorTH.parseServiceData_Plus(serviceData, onlog);
|
|
63
90
|
case SwitchBotBLEModel.Hub2:
|
|
64
|
-
|
|
65
|
-
break;
|
|
91
|
+
return WoHub2.parseServiceData(manufacturerData, onlog);
|
|
66
92
|
case SwitchBotBLEModel.OutdoorMeter:
|
|
67
|
-
|
|
68
|
-
break;
|
|
93
|
+
return WoIOSensorTH.parseServiceData(serviceData, manufacturerData, onlog);
|
|
69
94
|
case SwitchBotBLEModel.MotionSensor:
|
|
70
|
-
|
|
71
|
-
break;
|
|
95
|
+
return WoPresence.parseServiceData(serviceData, onlog);
|
|
72
96
|
case SwitchBotBLEModel.ContactSensor:
|
|
73
|
-
|
|
74
|
-
break;
|
|
97
|
+
return WoContact.parseServiceData(serviceData, onlog);
|
|
75
98
|
case SwitchBotBLEModel.ColorBulb:
|
|
76
|
-
|
|
77
|
-
break;
|
|
99
|
+
return WoBulb.parseServiceData(serviceData, manufacturerData, onlog);
|
|
78
100
|
case SwitchBotBLEModel.CeilingLight:
|
|
79
|
-
|
|
80
|
-
break;
|
|
101
|
+
return WoCeilingLight.parseServiceData(manufacturerData, onlog);
|
|
81
102
|
case SwitchBotBLEModel.CeilingLightPro:
|
|
82
|
-
|
|
83
|
-
break;
|
|
103
|
+
return WoCeilingLight.parseServiceData_Pro(manufacturerData, onlog);
|
|
84
104
|
case SwitchBotBLEModel.StripLight:
|
|
85
|
-
|
|
86
|
-
break;
|
|
105
|
+
return WoStrip.parseServiceData(serviceData, onlog);
|
|
87
106
|
case SwitchBotBLEModel.PlugMiniUS:
|
|
88
|
-
|
|
89
|
-
break;
|
|
107
|
+
return WoPlugMini.parseServiceData_US(manufacturerData, onlog);
|
|
90
108
|
case SwitchBotBLEModel.PlugMiniJP:
|
|
91
|
-
|
|
92
|
-
break;
|
|
109
|
+
return WoPlugMini.parseServiceData_JP(manufacturerData, onlog);
|
|
93
110
|
case SwitchBotBLEModel.Lock:
|
|
94
|
-
|
|
95
|
-
break;
|
|
111
|
+
return WoSmartLock.parseServiceData(serviceData, manufacturerData, onlog);
|
|
96
112
|
case SwitchBotBLEModel.LockPro:
|
|
97
|
-
|
|
98
|
-
break;
|
|
113
|
+
return WoSmartLockPro.parseServiceData(serviceData, manufacturerData, onlog);
|
|
99
114
|
case SwitchBotBLEModel.BlindTilt:
|
|
100
|
-
|
|
101
|
-
break;
|
|
115
|
+
return WoBlindTilt.parseServiceData(serviceData, manufacturerData, onlog);
|
|
102
116
|
default:
|
|
103
|
-
|
|
104
|
-
onlog(`[parseAdvertising.${peripheral.id}] return null, model "${model}" not available!`);
|
|
105
|
-
}
|
|
117
|
+
onlog?.(`[parseAdvertising.${model}] return null, model "${model}" not available!`);
|
|
106
118
|
return null;
|
|
107
119
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Formats the address of the peripheral.
|
|
123
|
+
*
|
|
124
|
+
* @param {Noble.Peripheral} peripheral - The peripheral device object from noble.
|
|
125
|
+
* @returns {string} - The formatted address.
|
|
126
|
+
*/
|
|
127
|
+
static formatAddress(peripheral) {
|
|
114
128
|
let address = peripheral.address || '';
|
|
115
129
|
if (address === '') {
|
|
116
|
-
const str = peripheral.advertisement.manufacturerData
|
|
117
|
-
.toString('hex')
|
|
118
|
-
.slice(4, 16);
|
|
130
|
+
const str = peripheral.advertisement.manufacturerData?.toString('hex').slice(4, 16) || '';
|
|
119
131
|
if (str !== '') {
|
|
120
|
-
address = str.
|
|
121
|
-
for (let i = 2; i < str.length; i += 2) {
|
|
122
|
-
address = `${address}:${str.substring(i, i + 2)}`;
|
|
123
|
-
}
|
|
132
|
+
address = str.match(/.{1,2}/g)?.join(':') || '';
|
|
124
133
|
}
|
|
125
134
|
}
|
|
126
135
|
else {
|
|
127
136
|
address = address.replace(/-/g, ':');
|
|
128
137
|
}
|
|
129
|
-
|
|
130
|
-
id: peripheral.id,
|
|
131
|
-
address,
|
|
132
|
-
rssi: peripheral.rssi,
|
|
133
|
-
serviceData: {
|
|
134
|
-
model,
|
|
135
|
-
...sd,
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
if (onlog && typeof onlog === 'function') {
|
|
139
|
-
onlog(`[parseAdvertising.${peripheral.id}.${model}] return ${JSON.stringify(data)}`);
|
|
140
|
-
}
|
|
141
|
-
return data;
|
|
138
|
+
return address;
|
|
142
139
|
}
|
|
143
140
|
}
|
|
144
141
|
//# sourceMappingURL=advertising.js.map
|
package/dist/advertising.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advertising.js","sourceRoot":"","sources":["../src/advertising.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"advertising.js","sourceRoot":"","sources":["../src/advertising.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD;;GAEG;AACH,MAAM,OAAO,WAAW;IACtB,gBAAe,CAAC;IAEhB;;;;;;;;;OASG;IACH,MAAM,CAAC,KAAK,CAAC,KAAK,CAChB,UAA4B,EAC5B,KAAiC;QAEjC,MAAM,EAAE,GAAG,UAAU,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