@lumiastream/tapo-cove 3.0.8 → 3.0.10
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/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare const discover: (config: {
|
|
|
4
4
|
token?: string;
|
|
5
5
|
email?: string;
|
|
6
6
|
password?: string;
|
|
7
|
-
types?: ILumiaDeviceType;
|
|
7
|
+
types?: ILumiaDeviceType[];
|
|
8
8
|
}) => Promise<any>;
|
|
9
9
|
|
|
10
10
|
declare class SuperState {
|
|
@@ -87,7 +87,7 @@ declare class TapoApi {
|
|
|
87
87
|
password: string;
|
|
88
88
|
devices: Array<{
|
|
89
89
|
id: string;
|
|
90
|
-
|
|
90
|
+
host: string;
|
|
91
91
|
}>;
|
|
92
92
|
}) => Promise<Map<string, TapoDeviceKey>>;
|
|
93
93
|
sendState: (config: {
|
package/dist/index.js
CHANGED
|
@@ -361,7 +361,7 @@ var TapoApi = class {
|
|
|
361
361
|
});
|
|
362
362
|
this.setup = (_0) => __async(this, [_0], function* ({ email, password, devices }) {
|
|
363
363
|
const promises = devices.map((device) => __async(this, null, function* () {
|
|
364
|
-
const deviceKey = yield handshake(device.
|
|
364
|
+
const deviceKey = yield handshake(device.host);
|
|
365
365
|
const loginDeviceRequest = {
|
|
366
366
|
method: "login_device",
|
|
367
367
|
params: {
|
|
@@ -452,10 +452,11 @@ var discover = (config) => __async(void 0, null, function* () {
|
|
|
452
452
|
return;
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
+
console.log("deviceInfo: ", deviceInfo);
|
|
455
456
|
switch (deviceInfo.deviceType) {
|
|
456
457
|
case "IOT.SMARTBULB":
|
|
457
458
|
case "SMART.TAPOBULB": {
|
|
458
|
-
if (config.types && config.types
|
|
459
|
+
if (config.types && !config.types.includes(import_lumia_rgb_types.ILumiaDeviceType.LIGHT)) {
|
|
459
460
|
return;
|
|
460
461
|
}
|
|
461
462
|
const isTapo = deviceInfo.deviceType === "SMART.TAPOBULB";
|
|
@@ -483,7 +484,7 @@ var discover = (config) => __async(void 0, null, function* () {
|
|
|
483
484
|
}
|
|
484
485
|
case "IOT.SMARTPLUGSWITCH":
|
|
485
486
|
case "SMART.TAPOPLUG": {
|
|
486
|
-
if (config.types && config.types
|
|
487
|
+
if (config.types && !config.types.includes(import_lumia_rgb_types.ILumiaDeviceType.PLUG)) {
|
|
487
488
|
return;
|
|
488
489
|
}
|
|
489
490
|
const isTapo = deviceInfo.deviceType === "SMART.TAPOPLUG";
|
package/dist/index.mjs
CHANGED
|
@@ -329,7 +329,7 @@ var TapoApi = class {
|
|
|
329
329
|
});
|
|
330
330
|
this.setup = (_0) => __async(this, [_0], function* ({ email, password, devices }) {
|
|
331
331
|
const promises = devices.map((device) => __async(this, null, function* () {
|
|
332
|
-
const deviceKey = yield handshake(device.
|
|
332
|
+
const deviceKey = yield handshake(device.host);
|
|
333
333
|
const loginDeviceRequest = {
|
|
334
334
|
method: "login_device",
|
|
335
335
|
params: {
|
|
@@ -420,10 +420,11 @@ var discover = (config) => __async(void 0, null, function* () {
|
|
|
420
420
|
return;
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
+
console.log("deviceInfo: ", deviceInfo);
|
|
423
424
|
switch (deviceInfo.deviceType) {
|
|
424
425
|
case "IOT.SMARTBULB":
|
|
425
426
|
case "SMART.TAPOBULB": {
|
|
426
|
-
if (config.types && config.types
|
|
427
|
+
if (config.types && !config.types.includes(ILumiaDeviceType.LIGHT)) {
|
|
427
428
|
return;
|
|
428
429
|
}
|
|
429
430
|
const isTapo = deviceInfo.deviceType === "SMART.TAPOBULB";
|
|
@@ -451,7 +452,7 @@ var discover = (config) => __async(void 0, null, function* () {
|
|
|
451
452
|
}
|
|
452
453
|
case "IOT.SMARTPLUGSWITCH":
|
|
453
454
|
case "SMART.TAPOPLUG": {
|
|
454
|
-
if (config.types && config.types
|
|
455
|
+
if (config.types && !config.types.includes(ILumiaDeviceType.PLUG)) {
|
|
455
456
|
return;
|
|
456
457
|
}
|
|
457
458
|
const isTapo = deviceInfo.deviceType === "SMART.TAPOPLUG";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumiastream/tapo-cove",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "GPL",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"lint": "tsc"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@lumiastream/fetch-cove": "^3.0.
|
|
15
|
-
"@lumiastream/lumia-rgb-types": "^3.0.
|
|
16
|
-
"@lumiastream/lumia-rgb-utils": "^3.0.
|
|
14
|
+
"@lumiastream/fetch-cove": "^3.0.9",
|
|
15
|
+
"@lumiastream/lumia-rgb-types": "^3.0.9",
|
|
16
|
+
"@lumiastream/lumia-rgb-utils": "^3.0.9",
|
|
17
17
|
"axios": "*",
|
|
18
18
|
"local-devices": "^4.0.0"
|
|
19
19
|
},
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"tsup": "*",
|
|
24
24
|
"typescript": "*"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "aeb4676ebaf5bfc0fc1a7873c9cdc150fbdf9692"
|
|
27
27
|
}
|