@switchbot/homebridge-switchbot 1.13.1-beta.6 → 1.14.0

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.
@@ -9,7 +9,7 @@
9
9
  "editor.defaultFormatter": "esbenp.prettier-vscode"
10
10
  },
11
11
  "[typescript]": {
12
- "editor.defaultFormatter": "vscode.typescript-language-features"
12
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
13
13
  },
14
14
  "typescript.format.enable": true,
15
15
  "editor.rulers": [
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
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
+ ## [Version 1.14.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.14.0) (2022-06-25)
6
+
7
+ ## What's Changed
8
+
9
+ - Add support for Smart Lock commands over OpenAPI. Thanks [tom-todd](https://github.com/tom-todd) [#382](https://github.com/OpenWonderLabs/homebridge-switchbot/pull/337) & [#387](https://github.com/OpenWonderLabs/homebridge-switchbot/pull/337)
10
+ - Housekeeping and updated dependencies.
11
+
12
+ **Full Changelog**: https://github.com/OpenWonderLabs/homebridge-switchbot/compare/v1.13.0...v1.14.0
13
+
5
14
  ## [Version 1.13.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.13.0) (2022-05-04)
6
15
 
7
16
  ## What's Changed
@@ -29,10 +29,7 @@
29
29
  "default": "Keep your token a secret!"
30
30
  }
31
31
  },
32
- "required": [
33
- "openToken",
34
- "notice"
35
- ]
32
+ "required": ["openToken", "notice"]
36
33
  },
37
34
  "options": {
38
35
  "type": "object",
@@ -77,93 +74,63 @@
77
74
  "oneOf": [
78
75
  {
79
76
  "title": "Bot",
80
- "enum": [
81
- "Bot"
82
- ]
77
+ "enum": ["Bot"]
83
78
  },
84
79
  {
85
80
  "title": "Curtain",
86
- "enum": [
87
- "Curtain"
88
- ]
81
+ "enum": ["Curtain"]
89
82
  },
90
83
  {
91
84
  "title": "Plug",
92
- "enum": [
93
- "Plug"
94
- ]
85
+ "enum": ["Plug"]
95
86
  },
96
87
  {
97
88
  "title": "Meter",
98
- "enum": [
99
- "Meter"
100
- ]
89
+ "enum": ["Meter"]
101
90
  },
102
91
  {
103
92
  "title": "Motion Sensor",
104
- "enum": [
105
- "Motion Sensor"
106
- ]
93
+ "enum": ["Motion Sensor"]
107
94
  },
108
95
  {
109
96
  "title": "Contact Sensor",
110
- "enum": [
111
- "Contact Sensor"
112
- ]
97
+ "enum": ["Contact Sensor"]
113
98
  },
114
99
  {
115
100
  "title": "Color Bulb",
116
- "enum": [
117
- "Color Bulb"
118
- ]
101
+ "enum": ["Color Bulb"]
119
102
  },
120
103
  {
121
104
  "title": "Humidifier",
122
- "enum": [
123
- "Humidifier"
124
- ]
105
+ "enum": ["Humidifier"]
125
106
  },
126
107
  {
127
108
  "title": "Smart Fan",
128
- "enum": [
129
- "Smart Fan"
130
- ]
109
+ "enum": ["Smart Fan"]
131
110
  },
132
111
  {
133
112
  "title": "Smart Lock",
134
- "enum": [
135
- "Smart Lock"
136
- ]
113
+ "enum": ["Smart Lock"]
137
114
  },
138
115
  {
139
116
  "title": "Strip Light",
140
- "enum": [
141
- "Strip Light"
142
- ]
117
+ "enum": ["Strip Light"]
143
118
  },
144
119
  {
145
120
  "title": "Meter Plus (US)",
146
- "enum": [
147
- "MeterPlus"
148
- ]
121
+ "enum": ["MeterPlus"]
149
122
  },
150
123
  {
151
124
  "title": "Meter Plus (JP)",
152
- "enum": [
153
- "Meter Plus (JP)"
154
- ]
125
+ "enum": ["Meter Plus (JP)"]
155
126
  },
156
127
  {
157
128
  "title": "Plug Mini (US)",
158
- "enum": [
159
- "Plug Mini (US)"
160
- ]
129
+ "enum": ["Plug Mini (US)"]
161
130
  },
162
131
  {
163
132
  "title": "Plug Mini (JP)",
164
- "enum": [
165
- "Plug Mini (JP)"
166
- ]
133
+ "enum": ["Plug Mini (JP)"]
167
134
  }
168
135
  ],
169
136
  "condition": {
@@ -202,15 +169,11 @@
202
169
  "oneOf": [
203
170
  {
204
171
  "title": "Press",
205
- "enum": [
206
- "press"
207
- ]
172
+ "enum": ["press"]
208
173
  },
209
174
  {
210
175
  "title": "Switch",
211
- "enum": [
212
- "switch"
213
- ]
176
+ "enum": ["switch"]
214
177
  }
215
178
  ],
216
179
  "condition": {
@@ -223,63 +186,43 @@
223
186
  "oneOf": [
224
187
  {
225
188
  "title": "Outlet",
226
- "enum": [
227
- "outlet"
228
- ]
189
+ "enum": ["outlet"]
229
190
  },
230
191
  {
231
192
  "title": "Garage Door",
232
- "enum": [
233
- "garagedoor"
234
- ]
193
+ "enum": ["garagedoor"]
235
194
  },
236
195
  {
237
196
  "title": "Door",
238
- "enum": [
239
- "door"
240
- ]
197
+ "enum": ["door"]
241
198
  },
242
199
  {
243
200
  "title": "Lock",
244
- "enum": [
245
- "lock"
246
- ]
201
+ "enum": ["lock"]
247
202
  },
248
203
  {
249
204
  "title": "Faucet",
250
- "enum": [
251
- "faucet"
252
- ]
205
+ "enum": ["faucet"]
253
206
  },
254
207
  {
255
208
  "title": "Fan",
256
- "enum": [
257
- "fan"
258
- ]
209
+ "enum": ["fan"]
259
210
  },
260
211
  {
261
212
  "title": "Window",
262
- "enum": [
263
- "window"
264
- ]
213
+ "enum": ["window"]
265
214
  },
266
215
  {
267
216
  "title": "Window Covering",
268
- "enum": [
269
- "windowcovering"
270
- ]
217
+ "enum": ["windowcovering"]
271
218
  },
272
219
  {
273
220
  "title": "Stateful Programmable Switch (Only Works in 3rd Party Home Apps)",
274
- "enum": [
275
- "stateful"
276
- ]
221
+ "enum": ["stateful"]
277
222
  },
278
223
  {
279
224
  "title": "Switch",
280
- "enum": [
281
- "switch"
282
- ]
225
+ "enum": ["switch"]
283
226
  }
284
227
  ],
285
228
  "placeholder": "outlet",
@@ -405,15 +348,11 @@
405
348
  "oneOf": [
406
349
  {
407
350
  "title": "Performance Mode",
408
- "enum": [
409
- "0"
410
- ]
351
+ "enum": ["0"]
411
352
  },
412
353
  {
413
354
  "title": "Silent Mode",
414
- "enum": [
415
- "1"
416
- ]
355
+ "enum": ["1"]
417
356
  }
418
357
  ],
419
358
  "condition": {
@@ -426,15 +365,11 @@
426
365
  "oneOf": [
427
366
  {
428
367
  "title": "Performance Mode",
429
- "enum": [
430
- "0"
431
- ]
368
+ "enum": ["0"]
432
369
  },
433
370
  {
434
371
  "title": "Silent Mode",
435
- "enum": [
436
- "1"
437
- ]
372
+ "enum": ["1"]
438
373
  }
439
374
  ],
440
375
  "condition": {
@@ -587,21 +522,15 @@
587
522
  "oneOf": [
588
523
  {
589
524
  "title": "Standard Logging",
590
- "enum": [
591
- "standard"
592
- ]
525
+ "enum": ["standard"]
593
526
  },
594
527
  {
595
528
  "title": "No Logging",
596
- "enum": [
597
- "none"
598
- ]
529
+ "enum": ["none"]
599
530
  },
600
531
  {
601
532
  "title": "Debug Logging",
602
- "enum": [
603
- "debug"
604
- ]
533
+ "enum": ["debug"]
605
534
  }
606
535
  ],
607
536
  "condition": {
@@ -609,12 +538,7 @@
609
538
  }
610
539
  }
611
540
  },
612
- "required": [
613
- "deviceId",
614
- "configDeviceType",
615
- "configDeviceName",
616
- "logging"
617
- ]
541
+ "required": ["deviceId", "configDeviceType", "configDeviceName", "logging"]
618
542
  },
619
543
  "uniqueItems": true
620
544
  },
@@ -650,165 +574,111 @@
650
574
  "oneOf": [
651
575
  {
652
576
  "title": "Air Conditioner (IR)",
653
- "enum": [
654
- "Air Conditioner"
655
- ]
577
+ "enum": ["Air Conditioner"]
656
578
  },
657
579
  {
658
580
  "title": "DIY Air Conditioner (IR)",
659
- "enum": [
660
- "DIY Air Conditioner"
661
- ]
581
+ "enum": ["DIY Air Conditioner"]
662
582
  },
663
583
  {
664
584
  "title": "TV (IR)",
665
- "enum": [
666
- "TV"
667
- ]
585
+ "enum": ["TV"]
668
586
  },
669
587
  {
670
588
  "title": "DIY TV (IR)",
671
- "enum": [
672
- "DIY TV"
673
- ]
589
+ "enum": ["DIY TV"]
674
590
  },
675
591
  {
676
592
  "title": "Light (IR)",
677
- "enum": [
678
- "Light"
679
- ]
593
+ "enum": ["Light"]
680
594
  },
681
595
  {
682
596
  "title": "DIY Light (IR)",
683
- "enum": [
684
- "DIY Light"
685
- ]
597
+ "enum": ["DIY Light"]
686
598
  },
687
599
  {
688
600
  "title": "IPTV (IR)",
689
- "enum": [
690
- "IPTV"
691
- ]
601
+ "enum": ["IPTV"]
692
602
  },
693
603
  {
694
604
  "title": "DIY IPTV (IR)",
695
- "enum": [
696
- "DIY IPTV"
697
- ]
605
+ "enum": ["DIY IPTV"]
698
606
  },
699
607
  {
700
608
  "title": "Set Top Box (IR)",
701
- "enum": [
702
- "Set Top Box"
703
- ]
609
+ "enum": ["Set Top Box"]
704
610
  },
705
611
  {
706
612
  "title": "DIY Set Top Box (IR)",
707
- "enum": [
708
- "DIY Set Top Box"
709
- ]
613
+ "enum": ["DIY Set Top Box"]
710
614
  },
711
615
  {
712
616
  "title": "DVD (IR)",
713
- "enum": [
714
- "DVD"
715
- ]
617
+ "enum": ["DVD"]
716
618
  },
717
619
  {
718
620
  "title": "DIY DVD (IR)",
719
- "enum": [
720
- "DIY DVD"
721
- ]
621
+ "enum": ["DIY DVD"]
722
622
  },
723
623
  {
724
624
  "title": "Fan (IR)",
725
- "enum": [
726
- "Fan"
727
- ]
625
+ "enum": ["Fan"]
728
626
  },
729
627
  {
730
628
  "title": "DIY Fan (IR)",
731
- "enum": [
732
- "DIY Fan"
733
- ]
629
+ "enum": ["DIY Fan"]
734
630
  },
735
631
  {
736
632
  "title": "Projector (IR)",
737
- "enum": [
738
- "Projector"
739
- ]
633
+ "enum": ["Projector"]
740
634
  },
741
635
  {
742
636
  "title": "DIY Projector (IR)",
743
- "enum": [
744
- "DIY Projector"
745
- ]
637
+ "enum": ["DIY Projector"]
746
638
  },
747
639
  {
748
640
  "title": "Camera (IR)",
749
- "enum": [
750
- "Camera"
751
- ]
641
+ "enum": ["Camera"]
752
642
  },
753
643
  {
754
644
  "title": "DIY Camera (IR)",
755
- "enum": [
756
- "DIY Camera"
757
- ]
645
+ "enum": ["DIY Camera"]
758
646
  },
759
647
  {
760
648
  "title": "Air Purifier (IR)",
761
- "enum": [
762
- "Air Purifier"
763
- ]
649
+ "enum": ["Air Purifier"]
764
650
  },
765
651
  {
766
652
  "title": "DIY Air Purifier (IR)",
767
- "enum": [
768
- "DIY Air Purifier"
769
- ]
653
+ "enum": ["DIY Air Purifier"]
770
654
  },
771
655
  {
772
656
  "title": "Speaker (IR)",
773
- "enum": [
774
- "Speaker"
775
- ]
657
+ "enum": ["Speaker"]
776
658
  },
777
659
  {
778
660
  "title": "DIY Speaker (IR)",
779
- "enum": [
780
- "DIY Speaker"
781
- ]
661
+ "enum": ["DIY Speaker"]
782
662
  },
783
663
  {
784
664
  "title": "Water Heater (IR)",
785
- "enum": [
786
- "Water Heater"
787
- ]
665
+ "enum": ["Water Heater"]
788
666
  },
789
667
  {
790
668
  "title": "DIY Water Heater (IR)",
791
- "enum": [
792
- "DIY Water Heater"
793
- ]
669
+ "enum": ["DIY Water Heater"]
794
670
  },
795
671
  {
796
672
  "title": "Vacuum Cleaner (IR)",
797
- "enum": [
798
- "Vacuum Cleaner"
799
- ]
673
+ "enum": ["Vacuum Cleaner"]
800
674
  },
801
675
  {
802
676
  "title": "DIY Vacuum Cleaner (IR)",
803
- "enum": [
804
- "DIY Vacuum Cleaner"
805
- ]
677
+ "enum": ["DIY Vacuum Cleaner"]
806
678
  },
807
679
  {
808
680
  "title": "Others (IR)",
809
- "enum": [
810
- "Others"
811
- ]
681
+ "enum": ["Others"]
812
682
  }
813
683
  ],
814
684
  "condition": {
@@ -898,9 +768,7 @@
898
768
  "oneOf": [
899
769
  {
900
770
  "title": "Fan",
901
- "enum": [
902
- "Fan"
903
- ]
771
+ "enum": ["Fan"]
904
772
  }
905
773
  ],
906
774
  "condition": {
@@ -931,21 +799,15 @@
931
799
  "oneOf": [
932
800
  {
933
801
  "title": "Standard Logging",
934
- "enum": [
935
- "standard"
936
- ]
802
+ "enum": ["standard"]
937
803
  },
938
804
  {
939
805
  "title": "No Logging",
940
- "enum": [
941
- "none"
942
- ]
806
+ "enum": ["none"]
943
807
  },
944
808
  {
945
809
  "title": "Debug Logging",
946
- "enum": [
947
- "debug"
948
- ]
810
+ "enum": ["debug"]
949
811
  }
950
812
  ],
951
813
  "condition": {
@@ -953,11 +815,7 @@
953
815
  }
954
816
  }
955
817
  },
956
- "required": [
957
- "deviceId",
958
- "configRemoteType",
959
- "logging"
960
- ]
818
+ "required": ["deviceId", "configRemoteType", "logging"]
961
819
  },
962
820
  "uniqueItems": true
963
821
  },
@@ -980,31 +838,22 @@
980
838
  "oneOf": [
981
839
  {
982
840
  "title": "Standard Logging",
983
- "enum": [
984
- "standard"
985
- ]
841
+ "enum": ["standard"]
986
842
  },
987
843
  {
988
844
  "title": "No Logging",
989
- "enum": [
990
- "none"
991
- ]
845
+ "enum": ["none"]
992
846
  },
993
847
  {
994
848
  "title": "Debug Logging",
995
- "enum": [
996
- "debug"
997
- ]
849
+ "enum": ["debug"]
998
850
  }
999
851
  ]
1000
852
  }
1001
853
  }
1002
854
  }
1003
855
  },
1004
- "required": [
1005
- "name",
1006
- "logging"
1007
- ]
856
+ "required": ["name", "logging"]
1008
857
  },
1009
858
  "layout": [
1010
859
  {
@@ -1012,9 +861,7 @@
1012
861
  "title": "SwitchBot Account Info",
1013
862
  "expandable": true,
1014
863
  "expanded": false,
1015
- "items": [
1016
- "credentials.openToken"
1017
- ]
864
+ "items": ["credentials.openToken"]
1018
865
  },
1019
866
  {
1020
867
  "type": "fieldset",
@@ -1135,4 +982,4 @@
1135
982
  ]
1136
983
  }
1137
984
  ]
1138
- }
985
+ }
package/package.json CHANGED
@@ -1,82 +1,82 @@
1
1
  {
2
- "displayName": "Homebridge SwitchBot",
3
- "name": "@switchbot/homebridge-switchbot",
4
- "version": "1.13.1-beta.6",
5
- "description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.",
6
- "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",
7
- "license": "ISC",
8
- "repository": {
9
- "type": "git",
10
- "url": "git://github.com/OpenWonderLabs/homebridge-switchbot.git"
2
+ "displayName": "Homebridge SwitchBot",
3
+ "name": "@switchbot/homebridge-switchbot",
4
+ "version": "1.14.0",
5
+ "description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.",
6
+ "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",
7
+ "license": "ISC",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git://github.com/OpenWonderLabs/homebridge-switchbot.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/OpenWonderLabs/homebridge-switchbot/issues"
14
+ },
15
+ "engines": {
16
+ "homebridge": "^1.5.0",
17
+ "node": "^14.19.3 || ^16.15.1 || ^18.4.0"
18
+ },
19
+ "main": "dist/index.js",
20
+ "scripts": {
21
+ "check": "npm install && npm outdated",
22
+ "update": "ncu -u && npm update && npm install",
23
+ "lint": "eslint src/**.ts",
24
+ "watch": "npm run build && npm link && nodemon",
25
+ "build": "rimraf ./dist && tsc",
26
+ "prepublishOnly": "npm run lint && npm run build",
27
+ "postpublish": "npm run clean",
28
+ "clean": "rimraf ./dist",
29
+ "test": "eslint src/**.ts"
30
+ },
31
+ "funding": [
32
+ {
33
+ "type": "Paypal",
34
+ "url": "https://paypal.me/donavanbecker"
11
35
  },
12
- "bugs": {
13
- "url": "https://github.com/OpenWonderLabs/homebridge-switchbot/issues"
14
- },
15
- "engines": {
16
- "homebridge": "^1.4.1",
17
- "node": "^14.19.1 || ^16.15.0 || ^18.1.0"
18
- },
19
- "main": "dist/index.js",
20
- "scripts": {
21
- "check": "npm install && npm outdated",
22
- "update": "ncu -u && npm update && npm install",
23
- "lint": "eslint src/**.ts",
24
- "watch": "npm run build && npm link && nodemon",
25
- "build": "rimraf ./dist && tsc",
26
- "prepublishOnly": "npm run lint && npm run build",
27
- "postpublish": "npm run clean",
28
- "clean": "rimraf ./dist",
29
- "test": "eslint src/**.ts"
30
- },
31
- "funding": [
32
- {
33
- "type": "Paypal",
34
- "url": "https://paypal.me/donavanbecker"
35
- },
36
- {
37
- "type": "GitHub",
38
- "url": "https://github.com/sponsors/donavanbecker"
39
- }
40
- ],
41
- "publishConfig": {
42
- "access": "public"
43
- },
44
- "keywords": [
45
- "homebridge-plugin",
46
- "switchbot",
47
- "humidifier",
48
- "humidity",
49
- "temperature",
50
- "bot",
51
- "curtains",
52
- "windows",
53
- "ble",
54
- "ir"
55
- ],
56
- "dependencies": {
57
- "@homebridge/plugin-ui-utils": "^0.0.19",
58
- "axios": "^0.27.2",
59
- "rxjs": "^7.5.5",
60
- "async-mqtt": "^2.6.2",
61
- "fakegato-history": "^0.6.3"
62
- },
63
- "devDependencies": {
64
- "@types/node": "^17.0.42",
65
- "@typescript-eslint/eslint-plugin": "^5.27.1",
66
- "@typescript-eslint/parser": "^5.27.1",
67
- "eslint": "^8.17.0",
68
- "eslint-config-prettier": "8.5.0",
69
- "eslint-plugin-prettier": "4.0.0",
70
- "homebridge": "^1.4.1",
71
- "nodemon": "^2.0.16",
72
- "npm-check-updates": "^13.1.4",
73
- "prettier": "2.6.2",
74
- "rimraf": "^3.0.2",
75
- "ts-node": "^10.8.1",
76
- "typescript": "^4.7.3",
77
- "typescript-axios-wb": "^1.0.3"
78
- },
79
- "optionalDependencies": {
80
- "node-switchbot": "^1.2.0"
36
+ {
37
+ "type": "GitHub",
38
+ "url": "https://github.com/sponsors/donavanbecker"
81
39
  }
40
+ ],
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "keywords": [
45
+ "homebridge-plugin",
46
+ "switchbot",
47
+ "humidifier",
48
+ "humidity",
49
+ "temperature",
50
+ "bot",
51
+ "curtains",
52
+ "windows",
53
+ "ble",
54
+ "ir"
55
+ ],
56
+ "dependencies": {
57
+ "@homebridge/plugin-ui-utils": "^0.0.19",
58
+ "axios": "^0.27.2",
59
+ "rxjs": "^7.5.5",
60
+ "async-mqtt": "^2.6.2",
61
+ "fakegato-history": "^0.6.3"
62
+ },
63
+ "devDependencies": {
64
+ "@types/node": "^18.0.0",
65
+ "@typescript-eslint/eslint-plugin": "^5.29.0",
66
+ "@typescript-eslint/parser": "^5.29.0",
67
+ "eslint": "^8.18.0",
68
+ "eslint-config-prettier": "8.5.0",
69
+ "eslint-plugin-prettier": "4.0.0",
70
+ "homebridge": "^1.5.0",
71
+ "nodemon": "^2.0.18",
72
+ "npm-check-updates": "^14.1.1",
73
+ "prettier": "2.7.1",
74
+ "rimraf": "^3.0.2",
75
+ "ts-node": "^10.8.1",
76
+ "typescript": "^4.7.4",
77
+ "typescript-axios-wb": "^1.0.3"
78
+ },
79
+ "optionalDependencies": {
80
+ "node-switchbot": "^1.3.0"
81
+ }
82
82
  }