homey-api 1.10.6 → 1.10.8
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/assets/specifications/HomeyAPIV3Cloud.json +138 -23
- package/assets/types/homey-api.d.ts +139 -9
- package/assets/types/homey-api.private.d.ts +139 -9
- package/lib/HomeyAPI/HomeyAPIV2/Device.js +5 -1
- package/lib/HomeyAPI/HomeyAPIV2/DeviceCapability.js +14 -0
- package/lib/HomeyAPI/HomeyAPIV2/Item.js +6 -0
- package/lib/HomeyAPI/HomeyAPIV2.js +1 -1
- package/lib/HomeyAPI/HomeyAPIV3/ManagerFlow.js +34 -0
- package/lib/HomeyAPI/HomeyAPIV3.js +7 -0
- package/package.json +1 -1
|
@@ -66,6 +66,25 @@
|
|
|
66
66
|
},
|
|
67
67
|
"parameters": {}
|
|
68
68
|
},
|
|
69
|
+
"getApp": {
|
|
70
|
+
"method": "get",
|
|
71
|
+
"path": "/app/:id",
|
|
72
|
+
"private": false,
|
|
73
|
+
"scopes": [
|
|
74
|
+
"homey.app.readonly"
|
|
75
|
+
],
|
|
76
|
+
"crud": {
|
|
77
|
+
"type": "getOne",
|
|
78
|
+
"item": "App"
|
|
79
|
+
},
|
|
80
|
+
"parameters": {
|
|
81
|
+
"id": {
|
|
82
|
+
"in": "path",
|
|
83
|
+
"type": "string",
|
|
84
|
+
"required": true
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
69
88
|
"installFromAppStore": {
|
|
70
89
|
"method": "post",
|
|
71
90
|
"path": "/store",
|
|
@@ -140,7 +159,7 @@
|
|
|
140
159
|
}
|
|
141
160
|
},
|
|
142
161
|
"setAppSetting": {
|
|
143
|
-
"method": "
|
|
162
|
+
"method": "put",
|
|
144
163
|
"path": "/app/:id/setting/:name",
|
|
145
164
|
"private": false,
|
|
146
165
|
"scopes": [
|
|
@@ -164,6 +183,26 @@
|
|
|
164
183
|
}
|
|
165
184
|
}
|
|
166
185
|
},
|
|
186
|
+
"unsetAppSetting": {
|
|
187
|
+
"method": "delete",
|
|
188
|
+
"path": "/app/:id/setting/:name",
|
|
189
|
+
"private": false,
|
|
190
|
+
"scopes": [
|
|
191
|
+
"homey.app.control"
|
|
192
|
+
],
|
|
193
|
+
"parameters": {
|
|
194
|
+
"name": {
|
|
195
|
+
"in": "path",
|
|
196
|
+
"type": "string",
|
|
197
|
+
"required": true
|
|
198
|
+
},
|
|
199
|
+
"id": {
|
|
200
|
+
"in": "path",
|
|
201
|
+
"type": "string",
|
|
202
|
+
"required": true
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
167
206
|
"getAppStd": {
|
|
168
207
|
"method": "post",
|
|
169
208
|
"path": "/app/:id/crashlog",
|
|
@@ -325,6 +364,15 @@
|
|
|
325
364
|
],
|
|
326
365
|
"parameters": {}
|
|
327
366
|
},
|
|
367
|
+
"getLog": {
|
|
368
|
+
"method": "get",
|
|
369
|
+
"path": "/bridge/log",
|
|
370
|
+
"private": false,
|
|
371
|
+
"scopes": [
|
|
372
|
+
"homey.system.readonly"
|
|
373
|
+
],
|
|
374
|
+
"parameters": {}
|
|
375
|
+
},
|
|
328
376
|
"pairBridge": {
|
|
329
377
|
"method": "post",
|
|
330
378
|
"path": "/bridge",
|
|
@@ -744,6 +792,9 @@
|
|
|
744
792
|
},
|
|
745
793
|
"virtualClass": {
|
|
746
794
|
"type": "string"
|
|
795
|
+
},
|
|
796
|
+
"uiIndicator": {
|
|
797
|
+
"type": "string"
|
|
747
798
|
}
|
|
748
799
|
}
|
|
749
800
|
}
|
|
@@ -1041,8 +1092,7 @@
|
|
|
1041
1092
|
},
|
|
1042
1093
|
"data": {
|
|
1043
1094
|
"in": "body",
|
|
1044
|
-
"type": "object"
|
|
1045
|
-
"required": true
|
|
1095
|
+
"type": "object"
|
|
1046
1096
|
}
|
|
1047
1097
|
}
|
|
1048
1098
|
},
|
|
@@ -1066,8 +1116,7 @@
|
|
|
1066
1116
|
},
|
|
1067
1117
|
"data": {
|
|
1068
1118
|
"in": "body",
|
|
1069
|
-
"type": "object"
|
|
1070
|
-
"required": true
|
|
1119
|
+
"type": "object"
|
|
1071
1120
|
}
|
|
1072
1121
|
}
|
|
1073
1122
|
},
|
|
@@ -1091,8 +1140,7 @@
|
|
|
1091
1140
|
"required": true,
|
|
1092
1141
|
"properties": {
|
|
1093
1142
|
"name": {
|
|
1094
|
-
"type": "string"
|
|
1095
|
-
"required": true
|
|
1143
|
+
"type": "string"
|
|
1096
1144
|
},
|
|
1097
1145
|
"data": {
|
|
1098
1146
|
"required": true
|
|
@@ -1622,6 +1670,10 @@
|
|
|
1622
1670
|
"in": "body",
|
|
1623
1671
|
"type": "object"
|
|
1624
1672
|
},
|
|
1673
|
+
"state": {
|
|
1674
|
+
"in": "body",
|
|
1675
|
+
"type": "object"
|
|
1676
|
+
},
|
|
1625
1677
|
"droptoken": {
|
|
1626
1678
|
"in": "body",
|
|
1627
1679
|
"type": "string"
|
|
@@ -1667,6 +1719,10 @@
|
|
|
1667
1719
|
"in": "body",
|
|
1668
1720
|
"type": "object"
|
|
1669
1721
|
},
|
|
1722
|
+
"state": {
|
|
1723
|
+
"in": "body",
|
|
1724
|
+
"type": "object"
|
|
1725
|
+
},
|
|
1670
1726
|
"droptoken": {
|
|
1671
1727
|
"in": "body",
|
|
1672
1728
|
"type": "string"
|
|
@@ -1807,6 +1863,21 @@
|
|
|
1807
1863
|
"required": true
|
|
1808
1864
|
}
|
|
1809
1865
|
}
|
|
1866
|
+
},
|
|
1867
|
+
"triggerAdvancedFlow": {
|
|
1868
|
+
"method": "post",
|
|
1869
|
+
"path": "/advancedflow/:id/trigger",
|
|
1870
|
+
"private": false,
|
|
1871
|
+
"scopes": [
|
|
1872
|
+
"homey.flow.start"
|
|
1873
|
+
],
|
|
1874
|
+
"parameters": {
|
|
1875
|
+
"id": {
|
|
1876
|
+
"in": "path",
|
|
1877
|
+
"type": "string",
|
|
1878
|
+
"required": true
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1810
1881
|
}
|
|
1811
1882
|
}
|
|
1812
1883
|
},
|
|
@@ -1856,16 +1927,16 @@
|
|
|
1856
1927
|
"idCamelCase": "geolocation",
|
|
1857
1928
|
"items": {},
|
|
1858
1929
|
"operations": {
|
|
1859
|
-
"
|
|
1930
|
+
"getOptionAddress": {
|
|
1860
1931
|
"method": "GET",
|
|
1861
|
-
"path": "/option/
|
|
1932
|
+
"path": "/option/address",
|
|
1862
1933
|
"scopes": [
|
|
1863
1934
|
"homey.geolocation.readonly"
|
|
1864
1935
|
]
|
|
1865
1936
|
},
|
|
1866
|
-
"
|
|
1937
|
+
"setOptionAddress": {
|
|
1867
1938
|
"method": "PUT",
|
|
1868
|
-
"path": "/option/
|
|
1939
|
+
"path": "/option/address",
|
|
1869
1940
|
"scopes": [
|
|
1870
1941
|
"homey.geolocation"
|
|
1871
1942
|
],
|
|
@@ -1876,9 +1947,9 @@
|
|
|
1876
1947
|
}
|
|
1877
1948
|
}
|
|
1878
1949
|
},
|
|
1879
|
-
"
|
|
1950
|
+
"unsetOptionAddress": {
|
|
1880
1951
|
"method": "DELETE",
|
|
1881
|
-
"path": "/option/
|
|
1952
|
+
"path": "/option/address",
|
|
1882
1953
|
"scopes": [
|
|
1883
1954
|
"homey.geolocation"
|
|
1884
1955
|
]
|
|
@@ -1910,6 +1981,33 @@
|
|
|
1910
1981
|
"homey.geolocation"
|
|
1911
1982
|
]
|
|
1912
1983
|
},
|
|
1984
|
+
"getOptionMode": {
|
|
1985
|
+
"method": "GET",
|
|
1986
|
+
"path": "/option/mode",
|
|
1987
|
+
"scopes": [
|
|
1988
|
+
"homey.geolocation.readonly"
|
|
1989
|
+
]
|
|
1990
|
+
},
|
|
1991
|
+
"setOptionMode": {
|
|
1992
|
+
"method": "PUT",
|
|
1993
|
+
"path": "/option/mode",
|
|
1994
|
+
"scopes": [
|
|
1995
|
+
"homey.geolocation"
|
|
1996
|
+
],
|
|
1997
|
+
"parameters": {
|
|
1998
|
+
"value": {
|
|
1999
|
+
"in": "body",
|
|
2000
|
+
"required": true
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
"unsetOptionMode": {
|
|
2005
|
+
"method": "DELETE",
|
|
2006
|
+
"path": "/option/mode",
|
|
2007
|
+
"scopes": [
|
|
2008
|
+
"homey.geolocation"
|
|
2009
|
+
]
|
|
2010
|
+
},
|
|
1913
2011
|
"getState": {
|
|
1914
2012
|
"method": "get",
|
|
1915
2013
|
"path": "/state",
|
|
@@ -2688,6 +2786,26 @@
|
|
|
2688
2786
|
}
|
|
2689
2787
|
}
|
|
2690
2788
|
},
|
|
2789
|
+
"replay": {
|
|
2790
|
+
"method": "post",
|
|
2791
|
+
"path": "/replay",
|
|
2792
|
+
"private": false,
|
|
2793
|
+
"scopes": [
|
|
2794
|
+
"homey.system"
|
|
2795
|
+
],
|
|
2796
|
+
"parameters": {
|
|
2797
|
+
"frequency": {
|
|
2798
|
+
"in": "body",
|
|
2799
|
+
"type": "string",
|
|
2800
|
+
"required": true
|
|
2801
|
+
},
|
|
2802
|
+
"data": {
|
|
2803
|
+
"in": "body",
|
|
2804
|
+
"type": "array",
|
|
2805
|
+
"required": true
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
},
|
|
2691
2809
|
"emulate": {
|
|
2692
2810
|
"method": "post",
|
|
2693
2811
|
"path": "/:frequency/emulate",
|
|
@@ -3213,8 +3331,8 @@
|
|
|
3213
3331
|
"id": "vdevice",
|
|
3214
3332
|
"idCamelCase": "vdevice",
|
|
3215
3333
|
"items": {
|
|
3216
|
-
"
|
|
3217
|
-
"id": "
|
|
3334
|
+
"VirtualDriverDummySocket": {
|
|
3335
|
+
"id": "virtualdriverdummysocket",
|
|
3218
3336
|
"schema": {
|
|
3219
3337
|
"type": "object",
|
|
3220
3338
|
"properties": {
|
|
@@ -3224,8 +3342,8 @@
|
|
|
3224
3342
|
}
|
|
3225
3343
|
}
|
|
3226
3344
|
},
|
|
3227
|
-
"
|
|
3228
|
-
"id": "
|
|
3345
|
+
"VirtualDeviceDummySocket": {
|
|
3346
|
+
"id": "virtualdevicedummysocket",
|
|
3229
3347
|
"schema": {
|
|
3230
3348
|
"type": "object",
|
|
3231
3349
|
"properties": {
|
|
@@ -3472,16 +3590,13 @@
|
|
|
3472
3590
|
"required": true,
|
|
3473
3591
|
"properties": {
|
|
3474
3592
|
"name": {
|
|
3475
|
-
"type": "string"
|
|
3476
|
-
"required": true
|
|
3593
|
+
"type": "string"
|
|
3477
3594
|
},
|
|
3478
3595
|
"icon": {
|
|
3479
|
-
"type": "string"
|
|
3480
|
-
"required": true
|
|
3596
|
+
"type": "string"
|
|
3481
3597
|
},
|
|
3482
3598
|
"parent": {
|
|
3483
|
-
"type": "string"
|
|
3484
|
-
"required": true
|
|
3599
|
+
"type": "string"
|
|
3485
3600
|
}
|
|
3486
3601
|
}
|
|
3487
3602
|
}
|
|
@@ -2095,7 +2095,7 @@
|
|
|
2095
2095
|
|
|
2096
2096
|
export namespace HomeyAPIV3Cloud.ManagerVirtualDevice {
|
|
2097
2097
|
|
|
2098
|
-
export class
|
|
2098
|
+
export class VirtualDeviceDummySocket {
|
|
2099
2099
|
|
|
2100
2100
|
|
|
2101
2101
|
|
|
@@ -2105,7 +2105,7 @@
|
|
|
2105
2105
|
|
|
2106
2106
|
}
|
|
2107
2107
|
|
|
2108
|
-
export class
|
|
2108
|
+
export class VirtualDeviceHomeyBridge {
|
|
2109
2109
|
|
|
2110
2110
|
|
|
2111
2111
|
|
|
@@ -2115,7 +2115,7 @@
|
|
|
2115
2115
|
|
|
2116
2116
|
}
|
|
2117
2117
|
|
|
2118
|
-
export class
|
|
2118
|
+
export class VirtualDeviceInfrared {
|
|
2119
2119
|
|
|
2120
2120
|
|
|
2121
2121
|
|
|
@@ -2145,7 +2145,7 @@
|
|
|
2145
2145
|
|
|
2146
2146
|
}
|
|
2147
2147
|
|
|
2148
|
-
export class
|
|
2148
|
+
export class VirtualDriverDummySocket {
|
|
2149
2149
|
|
|
2150
2150
|
|
|
2151
2151
|
|
|
@@ -2155,7 +2155,7 @@
|
|
|
2155
2155
|
|
|
2156
2156
|
}
|
|
2157
2157
|
|
|
2158
|
-
export class
|
|
2158
|
+
export class VirtualDriverHomeyBridge {
|
|
2159
2159
|
|
|
2160
2160
|
|
|
2161
2161
|
|
|
@@ -2165,7 +2165,7 @@
|
|
|
2165
2165
|
|
|
2166
2166
|
}
|
|
2167
2167
|
|
|
2168
|
-
export class
|
|
2168
|
+
export class VirtualDriverInfrared {
|
|
2169
2169
|
|
|
2170
2170
|
|
|
2171
2171
|
|
|
@@ -3127,6 +3127,25 @@
|
|
|
3127
3127
|
|
|
3128
3128
|
getApps(
|
|
3129
3129
|
|
|
3130
|
+
):
|
|
3131
|
+
Promise<HomeyAPIV3Cloud.ManagerApps.App>;
|
|
3132
|
+
|
|
3133
|
+
getApp(
|
|
3134
|
+
|
|
3135
|
+
|
|
3136
|
+
|
|
3137
|
+
|
|
3138
|
+
opts: {
|
|
3139
|
+
|
|
3140
|
+
|
|
3141
|
+
id: string,
|
|
3142
|
+
|
|
3143
|
+
|
|
3144
|
+
},
|
|
3145
|
+
|
|
3146
|
+
|
|
3147
|
+
|
|
3148
|
+
|
|
3130
3149
|
):
|
|
3131
3150
|
Promise<HomeyAPIV3Cloud.ManagerApps.App>;
|
|
3132
3151
|
|
|
@@ -3238,6 +3257,29 @@
|
|
|
3238
3257
|
|
|
3239
3258
|
|
|
3240
3259
|
|
|
3260
|
+
):
|
|
3261
|
+
Promise<any>;
|
|
3262
|
+
|
|
3263
|
+
unsetAppSetting(
|
|
3264
|
+
|
|
3265
|
+
|
|
3266
|
+
|
|
3267
|
+
|
|
3268
|
+
opts: {
|
|
3269
|
+
|
|
3270
|
+
|
|
3271
|
+
name: string,
|
|
3272
|
+
|
|
3273
|
+
|
|
3274
|
+
|
|
3275
|
+
id: string,
|
|
3276
|
+
|
|
3277
|
+
|
|
3278
|
+
},
|
|
3279
|
+
|
|
3280
|
+
|
|
3281
|
+
|
|
3282
|
+
|
|
3241
3283
|
):
|
|
3242
3284
|
Promise<any>;
|
|
3243
3285
|
|
|
@@ -3451,6 +3493,11 @@
|
|
|
3451
3493
|
|
|
3452
3494
|
getBridges(
|
|
3453
3495
|
|
|
3496
|
+
):
|
|
3497
|
+
Promise<any>;
|
|
3498
|
+
|
|
3499
|
+
getLog(
|
|
3500
|
+
|
|
3454
3501
|
):
|
|
3455
3502
|
Promise<any>;
|
|
3456
3503
|
|
|
@@ -3657,6 +3704,10 @@
|
|
|
3657
3704
|
virtualClass: string,
|
|
3658
3705
|
|
|
3659
3706
|
|
|
3707
|
+
|
|
3708
|
+
uiIndicator: string,
|
|
3709
|
+
|
|
3710
|
+
|
|
3660
3711
|
},
|
|
3661
3712
|
|
|
3662
3713
|
|
|
@@ -4514,6 +4565,10 @@
|
|
|
4514
4565
|
|
|
4515
4566
|
|
|
4516
4567
|
|
|
4568
|
+
state: object,
|
|
4569
|
+
|
|
4570
|
+
|
|
4571
|
+
|
|
4517
4572
|
droptoken: string,
|
|
4518
4573
|
|
|
4519
4574
|
|
|
@@ -4554,6 +4609,10 @@
|
|
|
4554
4609
|
|
|
4555
4610
|
|
|
4556
4611
|
|
|
4612
|
+
state: object,
|
|
4613
|
+
|
|
4614
|
+
|
|
4615
|
+
|
|
4557
4616
|
droptoken: string,
|
|
4558
4617
|
|
|
4559
4618
|
|
|
@@ -4679,6 +4738,25 @@
|
|
|
4679
4738
|
|
|
4680
4739
|
|
|
4681
4740
|
|
|
4741
|
+
opts: {
|
|
4742
|
+
|
|
4743
|
+
|
|
4744
|
+
id: string,
|
|
4745
|
+
|
|
4746
|
+
|
|
4747
|
+
},
|
|
4748
|
+
|
|
4749
|
+
|
|
4750
|
+
|
|
4751
|
+
|
|
4752
|
+
):
|
|
4753
|
+
Promise<any>;
|
|
4754
|
+
|
|
4755
|
+
triggerAdvancedFlow(
|
|
4756
|
+
|
|
4757
|
+
|
|
4758
|
+
|
|
4759
|
+
|
|
4682
4760
|
opts: {
|
|
4683
4761
|
|
|
4684
4762
|
|
|
@@ -4749,12 +4827,12 @@
|
|
|
4749
4827
|
|
|
4750
4828
|
|
|
4751
4829
|
|
|
4752
|
-
|
|
4830
|
+
getOptionAddress(
|
|
4753
4831
|
|
|
4754
4832
|
):
|
|
4755
4833
|
Promise<any>;
|
|
4756
4834
|
|
|
4757
|
-
|
|
4835
|
+
setOptionAddress(
|
|
4758
4836
|
|
|
4759
4837
|
|
|
4760
4838
|
|
|
@@ -4773,7 +4851,7 @@
|
|
|
4773
4851
|
):
|
|
4774
4852
|
Promise<any>;
|
|
4775
4853
|
|
|
4776
|
-
|
|
4854
|
+
unsetOptionAddress(
|
|
4777
4855
|
|
|
4778
4856
|
):
|
|
4779
4857
|
Promise<any>;
|
|
@@ -4804,6 +4882,35 @@
|
|
|
4804
4882
|
|
|
4805
4883
|
unsetOptionLocation(
|
|
4806
4884
|
|
|
4885
|
+
):
|
|
4886
|
+
Promise<any>;
|
|
4887
|
+
|
|
4888
|
+
getOptionMode(
|
|
4889
|
+
|
|
4890
|
+
):
|
|
4891
|
+
Promise<any>;
|
|
4892
|
+
|
|
4893
|
+
setOptionMode(
|
|
4894
|
+
|
|
4895
|
+
|
|
4896
|
+
|
|
4897
|
+
|
|
4898
|
+
opts: {
|
|
4899
|
+
|
|
4900
|
+
|
|
4901
|
+
value: *,
|
|
4902
|
+
|
|
4903
|
+
|
|
4904
|
+
},
|
|
4905
|
+
|
|
4906
|
+
|
|
4907
|
+
|
|
4908
|
+
|
|
4909
|
+
):
|
|
4910
|
+
Promise<any>;
|
|
4911
|
+
|
|
4912
|
+
unsetOptionMode(
|
|
4913
|
+
|
|
4807
4914
|
):
|
|
4808
4915
|
Promise<any>;
|
|
4809
4916
|
|
|
@@ -5594,6 +5701,29 @@
|
|
|
5594
5701
|
|
|
5595
5702
|
|
|
5596
5703
|
|
|
5704
|
+
):
|
|
5705
|
+
Promise<any>;
|
|
5706
|
+
|
|
5707
|
+
replay(
|
|
5708
|
+
|
|
5709
|
+
|
|
5710
|
+
|
|
5711
|
+
|
|
5712
|
+
opts: {
|
|
5713
|
+
|
|
5714
|
+
|
|
5715
|
+
frequency: string,
|
|
5716
|
+
|
|
5717
|
+
|
|
5718
|
+
|
|
5719
|
+
data: Array<any>,
|
|
5720
|
+
|
|
5721
|
+
|
|
5722
|
+
},
|
|
5723
|
+
|
|
5724
|
+
|
|
5725
|
+
|
|
5726
|
+
|
|
5597
5727
|
):
|
|
5598
5728
|
Promise<any>;
|
|
5599
5729
|
|
|
@@ -7477,7 +7477,7 @@
|
|
|
7477
7477
|
|
|
7478
7478
|
export namespace HomeyAPIV3Cloud.ManagerVirtualDevice {
|
|
7479
7479
|
|
|
7480
|
-
export class
|
|
7480
|
+
export class VirtualDeviceDummySocket {
|
|
7481
7481
|
|
|
7482
7482
|
|
|
7483
7483
|
|
|
@@ -7487,7 +7487,7 @@
|
|
|
7487
7487
|
|
|
7488
7488
|
}
|
|
7489
7489
|
|
|
7490
|
-
export class
|
|
7490
|
+
export class VirtualDeviceHomeyBridge {
|
|
7491
7491
|
|
|
7492
7492
|
|
|
7493
7493
|
|
|
@@ -7497,7 +7497,7 @@
|
|
|
7497
7497
|
|
|
7498
7498
|
}
|
|
7499
7499
|
|
|
7500
|
-
export class
|
|
7500
|
+
export class VirtualDeviceInfrared {
|
|
7501
7501
|
|
|
7502
7502
|
|
|
7503
7503
|
|
|
@@ -7527,7 +7527,7 @@
|
|
|
7527
7527
|
|
|
7528
7528
|
}
|
|
7529
7529
|
|
|
7530
|
-
export class
|
|
7530
|
+
export class VirtualDriverDummySocket {
|
|
7531
7531
|
|
|
7532
7532
|
|
|
7533
7533
|
|
|
@@ -7537,7 +7537,7 @@
|
|
|
7537
7537
|
|
|
7538
7538
|
}
|
|
7539
7539
|
|
|
7540
|
-
export class
|
|
7540
|
+
export class VirtualDriverHomeyBridge {
|
|
7541
7541
|
|
|
7542
7542
|
|
|
7543
7543
|
|
|
@@ -7547,7 +7547,7 @@
|
|
|
7547
7547
|
|
|
7548
7548
|
}
|
|
7549
7549
|
|
|
7550
|
-
export class
|
|
7550
|
+
export class VirtualDriverInfrared {
|
|
7551
7551
|
|
|
7552
7552
|
|
|
7553
7553
|
|
|
@@ -8529,6 +8529,25 @@
|
|
|
8529
8529
|
|
|
8530
8530
|
getApps(
|
|
8531
8531
|
|
|
8532
|
+
):
|
|
8533
|
+
Promise<HomeyAPIV3Cloud.ManagerApps.App>;
|
|
8534
|
+
|
|
8535
|
+
getApp(
|
|
8536
|
+
|
|
8537
|
+
|
|
8538
|
+
|
|
8539
|
+
|
|
8540
|
+
opts: {
|
|
8541
|
+
|
|
8542
|
+
|
|
8543
|
+
id: string,
|
|
8544
|
+
|
|
8545
|
+
|
|
8546
|
+
},
|
|
8547
|
+
|
|
8548
|
+
|
|
8549
|
+
|
|
8550
|
+
|
|
8532
8551
|
):
|
|
8533
8552
|
Promise<HomeyAPIV3Cloud.ManagerApps.App>;
|
|
8534
8553
|
|
|
@@ -8640,6 +8659,29 @@
|
|
|
8640
8659
|
|
|
8641
8660
|
|
|
8642
8661
|
|
|
8662
|
+
):
|
|
8663
|
+
Promise<any>;
|
|
8664
|
+
|
|
8665
|
+
unsetAppSetting(
|
|
8666
|
+
|
|
8667
|
+
|
|
8668
|
+
|
|
8669
|
+
|
|
8670
|
+
opts: {
|
|
8671
|
+
|
|
8672
|
+
|
|
8673
|
+
name: string,
|
|
8674
|
+
|
|
8675
|
+
|
|
8676
|
+
|
|
8677
|
+
id: string,
|
|
8678
|
+
|
|
8679
|
+
|
|
8680
|
+
},
|
|
8681
|
+
|
|
8682
|
+
|
|
8683
|
+
|
|
8684
|
+
|
|
8643
8685
|
):
|
|
8644
8686
|
Promise<any>;
|
|
8645
8687
|
|
|
@@ -8853,6 +8895,11 @@
|
|
|
8853
8895
|
|
|
8854
8896
|
getBridges(
|
|
8855
8897
|
|
|
8898
|
+
):
|
|
8899
|
+
Promise<any>;
|
|
8900
|
+
|
|
8901
|
+
getLog(
|
|
8902
|
+
|
|
8856
8903
|
):
|
|
8857
8904
|
Promise<any>;
|
|
8858
8905
|
|
|
@@ -9200,6 +9247,10 @@
|
|
|
9200
9247
|
virtualClass: string,
|
|
9201
9248
|
|
|
9202
9249
|
|
|
9250
|
+
|
|
9251
|
+
uiIndicator: string,
|
|
9252
|
+
|
|
9253
|
+
|
|
9203
9254
|
},
|
|
9204
9255
|
|
|
9205
9256
|
|
|
@@ -10057,6 +10108,10 @@
|
|
|
10057
10108
|
|
|
10058
10109
|
|
|
10059
10110
|
|
|
10111
|
+
state: object,
|
|
10112
|
+
|
|
10113
|
+
|
|
10114
|
+
|
|
10060
10115
|
droptoken: string,
|
|
10061
10116
|
|
|
10062
10117
|
|
|
@@ -10097,6 +10152,10 @@
|
|
|
10097
10152
|
|
|
10098
10153
|
|
|
10099
10154
|
|
|
10155
|
+
state: object,
|
|
10156
|
+
|
|
10157
|
+
|
|
10158
|
+
|
|
10100
10159
|
droptoken: string,
|
|
10101
10160
|
|
|
10102
10161
|
|
|
@@ -10222,6 +10281,25 @@
|
|
|
10222
10281
|
|
|
10223
10282
|
|
|
10224
10283
|
|
|
10284
|
+
opts: {
|
|
10285
|
+
|
|
10286
|
+
|
|
10287
|
+
id: string,
|
|
10288
|
+
|
|
10289
|
+
|
|
10290
|
+
},
|
|
10291
|
+
|
|
10292
|
+
|
|
10293
|
+
|
|
10294
|
+
|
|
10295
|
+
):
|
|
10296
|
+
Promise<any>;
|
|
10297
|
+
|
|
10298
|
+
triggerAdvancedFlow(
|
|
10299
|
+
|
|
10300
|
+
|
|
10301
|
+
|
|
10302
|
+
|
|
10225
10303
|
opts: {
|
|
10226
10304
|
|
|
10227
10305
|
|
|
@@ -10292,12 +10370,12 @@
|
|
|
10292
10370
|
|
|
10293
10371
|
|
|
10294
10372
|
|
|
10295
|
-
|
|
10373
|
+
getOptionAddress(
|
|
10296
10374
|
|
|
10297
10375
|
):
|
|
10298
10376
|
Promise<any>;
|
|
10299
10377
|
|
|
10300
|
-
|
|
10378
|
+
setOptionAddress(
|
|
10301
10379
|
|
|
10302
10380
|
|
|
10303
10381
|
|
|
@@ -10316,7 +10394,7 @@
|
|
|
10316
10394
|
):
|
|
10317
10395
|
Promise<any>;
|
|
10318
10396
|
|
|
10319
|
-
|
|
10397
|
+
unsetOptionAddress(
|
|
10320
10398
|
|
|
10321
10399
|
):
|
|
10322
10400
|
Promise<any>;
|
|
@@ -10347,6 +10425,35 @@
|
|
|
10347
10425
|
|
|
10348
10426
|
unsetOptionLocation(
|
|
10349
10427
|
|
|
10428
|
+
):
|
|
10429
|
+
Promise<any>;
|
|
10430
|
+
|
|
10431
|
+
getOptionMode(
|
|
10432
|
+
|
|
10433
|
+
):
|
|
10434
|
+
Promise<any>;
|
|
10435
|
+
|
|
10436
|
+
setOptionMode(
|
|
10437
|
+
|
|
10438
|
+
|
|
10439
|
+
|
|
10440
|
+
|
|
10441
|
+
opts: {
|
|
10442
|
+
|
|
10443
|
+
|
|
10444
|
+
value: *,
|
|
10445
|
+
|
|
10446
|
+
|
|
10447
|
+
},
|
|
10448
|
+
|
|
10449
|
+
|
|
10450
|
+
|
|
10451
|
+
|
|
10452
|
+
):
|
|
10453
|
+
Promise<any>;
|
|
10454
|
+
|
|
10455
|
+
unsetOptionMode(
|
|
10456
|
+
|
|
10350
10457
|
):
|
|
10351
10458
|
Promise<any>;
|
|
10352
10459
|
|
|
@@ -11137,6 +11244,29 @@
|
|
|
11137
11244
|
|
|
11138
11245
|
|
|
11139
11246
|
|
|
11247
|
+
):
|
|
11248
|
+
Promise<any>;
|
|
11249
|
+
|
|
11250
|
+
replay(
|
|
11251
|
+
|
|
11252
|
+
|
|
11253
|
+
|
|
11254
|
+
|
|
11255
|
+
opts: {
|
|
11256
|
+
|
|
11257
|
+
|
|
11258
|
+
frequency: string,
|
|
11259
|
+
|
|
11260
|
+
|
|
11261
|
+
|
|
11262
|
+
data: Array<any>,
|
|
11263
|
+
|
|
11264
|
+
|
|
11265
|
+
},
|
|
11266
|
+
|
|
11267
|
+
|
|
11268
|
+
|
|
11269
|
+
|
|
11140
11270
|
):
|
|
11141
11271
|
Promise<any>;
|
|
11142
11272
|
|
|
@@ -48,7 +48,11 @@ class Device extends Item {
|
|
|
48
48
|
this.__capabilityInstances[capabilityId] = this.__capabilityInstances[capabilityId] || [];
|
|
49
49
|
this.__capabilityInstances[capabilityId] = this.__capabilityInstances[capabilityId].filter(i => i !== instance);
|
|
50
50
|
|
|
51
|
-
if (
|
|
51
|
+
if (this.__capabilityInstances[capabilityId].length === 0) {
|
|
52
|
+
delete this.__capabilityInstances[capabilityId];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (Object.keys(this.__capabilityInstances).length === 0) {
|
|
52
56
|
this.__debug('No more Capability instances, disconnecting...');
|
|
53
57
|
this.disconnect().catch(err => this.__debug(err));
|
|
54
58
|
}
|
|
@@ -104,6 +104,13 @@ class DeviceCapability extends EventEmitter {
|
|
|
104
104
|
this.__value = value;
|
|
105
105
|
this.__lastChanged = new Date(transactionTime);
|
|
106
106
|
|
|
107
|
+
// Mutate the current device capabilitiesObj so it always reflects the last value.
|
|
108
|
+
const capabilityReference = this.device.capabilitiesObj && this.device.capabilitiesObj[this.id];
|
|
109
|
+
if (capabilityReference) {
|
|
110
|
+
capabilityReference.value = value;
|
|
111
|
+
capabilityReference.lastUpdated = this.__lastChanged.toISOString();
|
|
112
|
+
}
|
|
113
|
+
|
|
107
114
|
this.__listener(value);
|
|
108
115
|
}
|
|
109
116
|
|
|
@@ -152,6 +159,13 @@ class DeviceCapability extends EventEmitter {
|
|
|
152
159
|
|
|
153
160
|
this.__value = value;
|
|
154
161
|
this.__lastChanged = new Date();
|
|
162
|
+
|
|
163
|
+
// Mutate the current device capabilitiesObj so it always reflects the last value.
|
|
164
|
+
const capabilityReference = this.device.capabilitiesObj && this.device.capabilitiesObj[this.id];
|
|
165
|
+
if (capabilityReference) {
|
|
166
|
+
capabilityReference.value = value;
|
|
167
|
+
capabilityReference.lastUpdated = this.__lastChanged.toISOString();
|
|
168
|
+
}
|
|
155
169
|
}
|
|
156
170
|
|
|
157
171
|
}
|
|
@@ -74,6 +74,10 @@ class Item extends EventEmitter {
|
|
|
74
74
|
|
|
75
75
|
// If disconnecting, await that first
|
|
76
76
|
try {
|
|
77
|
+
// Ensure all microtasks are done first. E.g. if disconnect is called in the same tick as
|
|
78
|
+
// connect. This way the disconnect is always started first so we can await the disconnect
|
|
79
|
+
// promise before we try to connect again.
|
|
80
|
+
await Promise.resolve();
|
|
77
81
|
await this.__disconnectPromise;
|
|
78
82
|
} catch (err) { }
|
|
79
83
|
|
|
@@ -141,6 +145,8 @@ class Item extends EventEmitter {
|
|
|
141
145
|
.catch(() => { })
|
|
142
146
|
.finally(() => {
|
|
143
147
|
delete this.__disconnectPromise;
|
|
148
|
+
// Delete this.io so connect can start new connections.
|
|
149
|
+
delete this.io;
|
|
144
150
|
});
|
|
145
151
|
|
|
146
152
|
await this.__disconnectPromise;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const Manager = require('./Manager');
|
|
4
|
+
|
|
5
|
+
class ManagerFlow extends Manager {
|
|
6
|
+
|
|
7
|
+
async getFlowCardTrigger(args = {}, ...rest) {
|
|
8
|
+
args.uri = '';
|
|
9
|
+
return this.__super__getFlowCardTrigger(args, ...rest);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async getFlowCardCondition(args = {}, ...rest) {
|
|
13
|
+
args.uri = '';
|
|
14
|
+
return this.__super__getFlowCardCondition(args, ...rest);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async runFlowCardCondition(args = {}, ...rest) {
|
|
18
|
+
args.uri = '';
|
|
19
|
+
return this.__super__runFlowCardCondition(args, ...rest);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async getFlowCardAction(args = {}, ...rest) {
|
|
23
|
+
args.uri = '';
|
|
24
|
+
return this.__super__getFlowCardAction(args, ...rest);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async runFlowCardAction(args = {}, ...rest) {
|
|
28
|
+
args.uri = '';
|
|
29
|
+
return this.__super__runFlowCardAction(args, ...rest);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
module.exports = ManagerFlow;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const HomeyAPIV2 = require('./HomeyAPIV2');
|
|
4
4
|
|
|
5
|
+
const ManagerFlow = require('./HomeyAPIV3/ManagerFlow');
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* @class
|
|
7
9
|
* @hideconstructor
|
|
@@ -9,6 +11,11 @@ const HomeyAPIV2 = require('./HomeyAPIV2');
|
|
|
9
11
|
*/
|
|
10
12
|
class HomeyAPIV3 extends HomeyAPIV2 {
|
|
11
13
|
|
|
14
|
+
static MANAGERS = {
|
|
15
|
+
...HomeyAPIV2.MANAGERS,
|
|
16
|
+
ManagerFlow,
|
|
17
|
+
};
|
|
18
|
+
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
module.exports = HomeyAPIV3;
|