@switchbot/homebridge-switchbot 1.4.0 → 1.4.1-beta.3
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/CHANGELOG.md +18 -0
- package/config.schema.json +83 -11
- package/dist/devices/bots.d.ts +13 -3
- package/dist/devices/bots.d.ts.map +1 -1
- package/dist/devices/bots.js +162 -105
- package/dist/devices/bots.js.map +1 -1
- package/dist/devices/colorbulb.d.ts +13 -3
- package/dist/devices/colorbulb.d.ts.map +1 -1
- package/dist/devices/colorbulb.js +161 -96
- package/dist/devices/colorbulb.js.map +1 -1
- package/dist/devices/contact.d.ts +13 -3
- package/dist/devices/contact.d.ts.map +1 -1
- package/dist/devices/contact.js +117 -63
- package/dist/devices/contact.js.map +1 -1
- package/dist/devices/curtains.d.ts +14 -5
- package/dist/devices/curtains.d.ts.map +1 -1
- package/dist/devices/curtains.js +198 -140
- package/dist/devices/curtains.js.map +1 -1
- package/dist/devices/humidifiers.d.ts +13 -3
- package/dist/devices/humidifiers.d.ts.map +1 -1
- package/dist/devices/humidifiers.js +180 -127
- package/dist/devices/humidifiers.js.map +1 -1
- package/dist/devices/meters.d.ts +13 -3
- package/dist/devices/meters.d.ts.map +1 -1
- package/dist/devices/meters.js +121 -63
- package/dist/devices/meters.js.map +1 -1
- package/dist/devices/motion.d.ts +13 -3
- package/dist/devices/motion.d.ts.map +1 -1
- package/dist/devices/motion.js +104 -45
- package/dist/devices/motion.js.map +1 -1
- package/dist/devices/plugs.d.ts +13 -3
- package/dist/devices/plugs.d.ts.map +1 -1
- package/dist/devices/plugs.js +99 -35
- package/dist/devices/plugs.js.map +1 -1
- package/dist/irdevices/airconditioners.d.ts +11 -3
- package/dist/irdevices/airconditioners.d.ts.map +1 -1
- package/dist/irdevices/airconditioners.js +80 -45
- package/dist/irdevices/airconditioners.js.map +1 -1
- package/dist/irdevices/airpurifiers.d.ts +11 -3
- package/dist/irdevices/airpurifiers.d.ts.map +1 -1
- package/dist/irdevices/airpurifiers.js +68 -31
- package/dist/irdevices/airpurifiers.js.map +1 -1
- package/dist/irdevices/cameras.d.ts +11 -3
- package/dist/irdevices/cameras.d.ts.map +1 -1
- package/dist/irdevices/cameras.js +64 -24
- package/dist/irdevices/cameras.js.map +1 -1
- package/dist/irdevices/fans.d.ts +11 -3
- package/dist/irdevices/fans.d.ts.map +1 -1
- package/dist/irdevices/fans.js +74 -35
- package/dist/irdevices/fans.js.map +1 -1
- package/dist/irdevices/lights.d.ts +11 -3
- package/dist/irdevices/lights.d.ts.map +1 -1
- package/dist/irdevices/lights.js +65 -25
- package/dist/irdevices/lights.js.map +1 -1
- package/dist/irdevices/others.d.ts +11 -3
- package/dist/irdevices/others.d.ts.map +1 -1
- package/dist/irdevices/others.js +71 -31
- package/dist/irdevices/others.js.map +1 -1
- package/dist/irdevices/tvs.d.ts +11 -3
- package/dist/irdevices/tvs.d.ts.map +1 -1
- package/dist/irdevices/tvs.js +81 -42
- package/dist/irdevices/tvs.js.map +1 -1
- package/dist/irdevices/vacuumcleaners.d.ts +11 -3
- package/dist/irdevices/vacuumcleaners.d.ts.map +1 -1
- package/dist/irdevices/vacuumcleaners.js +64 -24
- package/dist/irdevices/vacuumcleaners.js.map +1 -1
- package/dist/irdevices/waterheaters.d.ts +11 -3
- package/dist/irdevices/waterheaters.d.ts.map +1 -1
- package/dist/irdevices/waterheaters.js +64 -24
- package/dist/irdevices/waterheaters.js.map +1 -1
- package/dist/platform.d.ts +10 -10
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +290 -307
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +4 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/nodemon.json +1 -1
- package/package.json +70 -66
- package/src/devices/bots.ts +169 -105
- package/src/devices/colorbulb.ts +170 -99
- package/src/devices/contact.ts +124 -64
- package/src/devices/curtains.ts +207 -145
- package/src/devices/humidifiers.ts +187 -129
- package/src/devices/meters.ts +128 -64
- package/src/devices/motion.ts +110 -45
- package/src/devices/plugs.ts +104 -36
- package/src/irdevices/airconditioners.ts +85 -45
- package/src/irdevices/airpurifiers.ts +73 -31
- package/src/irdevices/cameras.ts +69 -24
- package/src/irdevices/fans.ts +79 -36
- package/src/irdevices/lights.ts +70 -25
- package/src/irdevices/others.ts +76 -31
- package/src/irdevices/tvs.ts +86 -42
- package/src/irdevices/vacuumcleaners.ts +69 -24
- package/src/irdevices/waterheaters.ts +69 -24
- package/src/platform.ts +285 -302
- package/src/settings.ts +4 -1
- package/dist/devices/indoorcam.d.ts +0 -64
- package/dist/devices/indoorcam.d.ts.map +0 -1
- package/dist/devices/indoorcam.js +0 -249
- package/dist/devices/indoorcam.js.map +0 -1
- package/src/devices/indoorcam.ts +0 -309
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
|
|
4
4
|
|
|
5
|
+
## [Beta - Version 1.5.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.5.0) (2021-XX-XX)
|
|
6
|
+
|
|
7
|
+
## What's Changed
|
|
8
|
+
### Major Change To `Logging`:
|
|
9
|
+
* Added the following Logging Options:
|
|
10
|
+
* `Standard`
|
|
11
|
+
* `None`
|
|
12
|
+
* `Debug`
|
|
13
|
+
* Removed Device Logging Option, which was pushed into new logging under debug.
|
|
14
|
+
* Added Device Logging Override for each Device, by using the Device Config.
|
|
15
|
+
|
|
16
|
+
### Major Changes to `refreshRate`:
|
|
17
|
+
* Added an option to override `refreshRate` for each Device, by using the Device Config.
|
|
18
|
+
* Fixed Bug:
|
|
19
|
+
* Housekeeping and updated dependencies.
|
|
20
|
+
|
|
21
|
+
**Full Changelog**: https://github.com/OpenWonderLabs/homebridge-switchbot/compare/v1.4.0...v1.5.0
|
|
22
|
+
|
|
5
23
|
## [Version 1.4.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.4.0) (2021-12-15)
|
|
6
24
|
|
|
7
25
|
## What's Changed
|
package/config.schema.json
CHANGED
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"title": "Offline as Off",
|
|
68
68
|
"type": "boolean",
|
|
69
69
|
"condition": {
|
|
70
|
-
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId);"
|
|
70
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device);"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"configDeviceType": {
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
}
|
|
259
259
|
},
|
|
260
260
|
"refreshRate": {
|
|
261
|
-
"title": "Refresh Rate",
|
|
261
|
+
"title": "Curtain Refresh Rate",
|
|
262
262
|
"type": "number",
|
|
263
263
|
"minimum": 1,
|
|
264
264
|
"placeholder": 5,
|
|
@@ -339,6 +339,43 @@
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
+
},
|
|
343
|
+
"refreshRate": {
|
|
344
|
+
"title": "Device Refresh Rate",
|
|
345
|
+
"type": "number",
|
|
346
|
+
"minimum": 30,
|
|
347
|
+
"placeholder": 360,
|
|
348
|
+
"description": "Indicates the number of seconds between polls of SwitchBot API.",
|
|
349
|
+
"condition": {
|
|
350
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device);"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"logging": {
|
|
354
|
+
"title": "Device Logging Override Setting",
|
|
355
|
+
"type": "string",
|
|
356
|
+
"oneOf": [
|
|
357
|
+
{
|
|
358
|
+
"title": "Standard Logging",
|
|
359
|
+
"enum": [
|
|
360
|
+
"standard"
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"title": "No Logging",
|
|
365
|
+
"enum": [
|
|
366
|
+
"none"
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"title": "Debug Logging",
|
|
371
|
+
"enum": [
|
|
372
|
+
"debug"
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"condition": {
|
|
377
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device);"
|
|
378
|
+
}
|
|
342
379
|
}
|
|
343
380
|
}
|
|
344
381
|
}
|
|
@@ -634,6 +671,33 @@
|
|
|
634
671
|
}
|
|
635
672
|
}
|
|
636
673
|
}
|
|
674
|
+
},
|
|
675
|
+
"logging": {
|
|
676
|
+
"title": "Device Logging Override Setting",
|
|
677
|
+
"type": "string",
|
|
678
|
+
"oneOf": [
|
|
679
|
+
{
|
|
680
|
+
"title": "Standard Logging",
|
|
681
|
+
"enum": [
|
|
682
|
+
"standard"
|
|
683
|
+
]
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"title": "No Logging",
|
|
687
|
+
"enum": [
|
|
688
|
+
"none"
|
|
689
|
+
]
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"title": "Debug Logging",
|
|
693
|
+
"enum": [
|
|
694
|
+
"debug"
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
],
|
|
698
|
+
"condition": {
|
|
699
|
+
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device);"
|
|
700
|
+
}
|
|
637
701
|
}
|
|
638
702
|
}
|
|
639
703
|
}
|
|
@@ -651,21 +715,26 @@
|
|
|
651
715
|
"placeholder": 1,
|
|
652
716
|
"description": "Indicates the number of seconds between pushes to SwitchBot API."
|
|
653
717
|
},
|
|
654
|
-
"
|
|
718
|
+
"logging": {
|
|
655
719
|
"title": "Logging Setting",
|
|
656
720
|
"type": "string",
|
|
657
|
-
"description": "Enable 'Device' or 'Debug' logging.",
|
|
658
721
|
"oneOf": [
|
|
659
722
|
{
|
|
660
|
-
"title": "
|
|
723
|
+
"title": "Standard Logging",
|
|
661
724
|
"enum": [
|
|
662
|
-
"
|
|
725
|
+
"standard"
|
|
726
|
+
]
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"title": "No Logging",
|
|
730
|
+
"enum": [
|
|
731
|
+
"none"
|
|
663
732
|
]
|
|
664
733
|
},
|
|
665
734
|
{
|
|
666
|
-
"title": "
|
|
735
|
+
"title": "Debug Logging",
|
|
667
736
|
"enum": [
|
|
668
|
-
"
|
|
737
|
+
"debug"
|
|
669
738
|
]
|
|
670
739
|
}
|
|
671
740
|
]
|
|
@@ -723,7 +792,9 @@
|
|
|
723
792
|
"options.devices[].contact.hide_lightsensor",
|
|
724
793
|
"options.devices[].contact.hide_motionsensor",
|
|
725
794
|
"options.devices[].colorbulb.set_minStep",
|
|
726
|
-
"options.devices[].colorbulb.adaptiveLightingShift"
|
|
795
|
+
"options.devices[].colorbulb.adaptiveLightingShift",
|
|
796
|
+
"options.devices[].refreshRate",
|
|
797
|
+
"options.devices[].logging"
|
|
727
798
|
]
|
|
728
799
|
}
|
|
729
800
|
]
|
|
@@ -756,7 +827,8 @@
|
|
|
756
827
|
"options.irdevices[].irtv.disable_power",
|
|
757
828
|
"options.irdevices[].other.deviceType",
|
|
758
829
|
"options.irdevices[].other.commandOn",
|
|
759
|
-
"options.irdevices[].other.commandOff"
|
|
830
|
+
"options.irdevices[].other.commandOff",
|
|
831
|
+
"options.irdevices[].logging"
|
|
760
832
|
]
|
|
761
833
|
}
|
|
762
834
|
]
|
|
@@ -783,7 +855,7 @@
|
|
|
783
855
|
"key": "options.pushRate",
|
|
784
856
|
"notitle": true
|
|
785
857
|
},
|
|
786
|
-
"options.
|
|
858
|
+
"options.logging"
|
|
787
859
|
]
|
|
788
860
|
}
|
|
789
861
|
]
|
package/dist/devices/bots.d.ts
CHANGED
|
@@ -25,11 +25,13 @@ export declare class Bot {
|
|
|
25
25
|
mode: serviceData['mode'];
|
|
26
26
|
state: serviceData['state'];
|
|
27
27
|
battery: serviceData['battery'];
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
deviceLogging: string;
|
|
29
|
+
deviceRefreshRate: number;
|
|
30
30
|
botUpdateInProgress: boolean;
|
|
31
31
|
doBotUpdate: Subject<void>;
|
|
32
32
|
constructor(platform: SwitchBotPlatform, accessory: PlatformAccessory, device: device & devicesConfig);
|
|
33
|
+
refreshRate(): void;
|
|
34
|
+
logs(): void;
|
|
33
35
|
/**
|
|
34
36
|
* Parse the device status from the SwitchBot api
|
|
35
37
|
*/
|
|
@@ -58,12 +60,20 @@ export declare class Bot {
|
|
|
58
60
|
* Updates the status for each of the HomeKit Characteristics
|
|
59
61
|
*/
|
|
60
62
|
updateHomeKitCharacteristics(): void;
|
|
61
|
-
apiError(
|
|
63
|
+
apiError(): void;
|
|
62
64
|
private statusCode;
|
|
63
65
|
private offlineOff;
|
|
64
66
|
/**
|
|
65
67
|
* Handle requests to set the "On" characteristic
|
|
66
68
|
*/
|
|
67
69
|
private handleOnSet;
|
|
70
|
+
/**
|
|
71
|
+
* Logging for Device
|
|
72
|
+
*/
|
|
73
|
+
infoLog(...log: any[]): void;
|
|
74
|
+
warnLog(...log: any[]): void;
|
|
75
|
+
errorLog(...log: any[]): void;
|
|
76
|
+
debugLog(...log: any[]): void;
|
|
77
|
+
enablingDeviceLogging(): boolean;
|
|
68
78
|
}
|
|
69
79
|
//# sourceMappingURL=bots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bots.d.ts","sourceRoot":"","sources":["../../src/devices/bots.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,OAAO,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAW,iBAAiB,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"bots.d.ts","sourceRoot":"","sources":["../../src/devices/b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