homey-api 3.5.1 → 3.5.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.
|
@@ -767,6 +767,7 @@
|
|
|
767
767
|
"id": "dashboard",
|
|
768
768
|
"schema": {
|
|
769
769
|
"type": "object",
|
|
770
|
+
"additionalProperties": false,
|
|
770
771
|
"properties": {
|
|
771
772
|
"id": {
|
|
772
773
|
"type": "string",
|
|
@@ -775,56 +776,28 @@
|
|
|
775
776
|
"name": {
|
|
776
777
|
"type": "string"
|
|
777
778
|
},
|
|
778
|
-
"
|
|
779
|
-
"type": "
|
|
780
|
-
"
|
|
781
|
-
|
|
782
|
-
"
|
|
783
|
-
"
|
|
784
|
-
|
|
785
|
-
"
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
"
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
"settings": {
|
|
801
|
-
"type": "object"
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
},
|
|
807
|
-
"lines": {
|
|
808
|
-
"type": "object",
|
|
809
|
-
"additionalProperties": false,
|
|
810
|
-
"patternProperties": {
|
|
811
|
-
"^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$": {
|
|
812
|
-
"type": "object",
|
|
813
|
-
"properties": {
|
|
814
|
-
"x1": {
|
|
815
|
-
"type": "number"
|
|
816
|
-
},
|
|
817
|
-
"x2": {
|
|
818
|
-
"type": "number"
|
|
819
|
-
},
|
|
820
|
-
"y1": {
|
|
821
|
-
"type": "number"
|
|
822
|
-
},
|
|
823
|
-
"y2": {
|
|
824
|
-
"type": "number"
|
|
825
|
-
},
|
|
826
|
-
"settings": {
|
|
827
|
-
"type": "object"
|
|
779
|
+
"columns": {
|
|
780
|
+
"type": "array",
|
|
781
|
+
"items": {
|
|
782
|
+
"type": "object",
|
|
783
|
+
"properties": {
|
|
784
|
+
"id": {
|
|
785
|
+
"type": "string",
|
|
786
|
+
"format": "uuid"
|
|
787
|
+
},
|
|
788
|
+
"widgets": {
|
|
789
|
+
"type": "array",
|
|
790
|
+
"items": {
|
|
791
|
+
"type": "object",
|
|
792
|
+
"required": [
|
|
793
|
+
"id"
|
|
794
|
+
],
|
|
795
|
+
"properties": {
|
|
796
|
+
"id": {
|
|
797
|
+
"type": "string",
|
|
798
|
+
"format": "uuid"
|
|
799
|
+
}
|
|
800
|
+
}
|
|
828
801
|
}
|
|
829
802
|
}
|
|
830
803
|
}
|
|
@@ -832,6 +805,17 @@
|
|
|
832
805
|
}
|
|
833
806
|
}
|
|
834
807
|
}
|
|
808
|
+
},
|
|
809
|
+
"AppWidget": {
|
|
810
|
+
"id": "appwidget",
|
|
811
|
+
"schema": {
|
|
812
|
+
"type": "object",
|
|
813
|
+
"properties": {
|
|
814
|
+
"id": {
|
|
815
|
+
"type": "string"
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
835
819
|
}
|
|
836
820
|
},
|
|
837
821
|
"operations": {
|
|
@@ -898,12 +882,8 @@
|
|
|
898
882
|
"type": "string",
|
|
899
883
|
"required": true
|
|
900
884
|
},
|
|
901
|
-
"
|
|
902
|
-
"type": "
|
|
903
|
-
"required": true
|
|
904
|
-
},
|
|
905
|
-
"lines": {
|
|
906
|
-
"type": "object",
|
|
885
|
+
"columns": {
|
|
886
|
+
"type": "array",
|
|
907
887
|
"required": true
|
|
908
888
|
}
|
|
909
889
|
}
|
|
@@ -936,11 +916,8 @@
|
|
|
936
916
|
"name": {
|
|
937
917
|
"type": "string"
|
|
938
918
|
},
|
|
939
|
-
"
|
|
940
|
-
"type": "
|
|
941
|
-
},
|
|
942
|
-
"lines": {
|
|
943
|
-
"type": "object"
|
|
919
|
+
"columns": {
|
|
920
|
+
"type": "array"
|
|
944
921
|
}
|
|
945
922
|
}
|
|
946
923
|
}
|
|
@@ -964,6 +941,46 @@
|
|
|
964
941
|
"required": true
|
|
965
942
|
}
|
|
966
943
|
}
|
|
944
|
+
},
|
|
945
|
+
"getAppWidgets": {
|
|
946
|
+
"method": "get",
|
|
947
|
+
"path": "/appwidget",
|
|
948
|
+
"private": false,
|
|
949
|
+
"scopes": [
|
|
950
|
+
"homey.dashboard.readonly"
|
|
951
|
+
],
|
|
952
|
+
"crud": {
|
|
953
|
+
"type": "getAll",
|
|
954
|
+
"item": "AppWidget"
|
|
955
|
+
},
|
|
956
|
+
"parameters": {}
|
|
957
|
+
},
|
|
958
|
+
"getAppWidgetAutocomplete": {
|
|
959
|
+
"method": "get",
|
|
960
|
+
"path": "/appwidget/:id/autocomplete",
|
|
961
|
+
"private": false,
|
|
962
|
+
"scopes": [],
|
|
963
|
+
"parameters": {
|
|
964
|
+
"id": {
|
|
965
|
+
"in": "path",
|
|
966
|
+
"type": "string",
|
|
967
|
+
"required": true
|
|
968
|
+
},
|
|
969
|
+
"settingId": {
|
|
970
|
+
"in": "query",
|
|
971
|
+
"type": "string",
|
|
972
|
+
"required": true
|
|
973
|
+
},
|
|
974
|
+
"query": {
|
|
975
|
+
"in": "query",
|
|
976
|
+
"type": "string",
|
|
977
|
+
"required": true
|
|
978
|
+
},
|
|
979
|
+
"settings": {
|
|
980
|
+
"in": "query",
|
|
981
|
+
"type": "object"
|
|
982
|
+
}
|
|
983
|
+
}
|
|
967
984
|
}
|
|
968
985
|
}
|
|
969
986
|
},
|
|
@@ -3296,6 +3313,15 @@
|
|
|
3296
3313
|
"name": {
|
|
3297
3314
|
"type": "string"
|
|
3298
3315
|
},
|
|
3316
|
+
"preset": {
|
|
3317
|
+
"type": [
|
|
3318
|
+
"string",
|
|
3319
|
+
"null"
|
|
3320
|
+
]
|
|
3321
|
+
},
|
|
3322
|
+
"zone": {
|
|
3323
|
+
"type": "string"
|
|
3324
|
+
},
|
|
3299
3325
|
"devices": {
|
|
3300
3326
|
"type": "object",
|
|
3301
3327
|
"additionalProperties": false,
|
|
@@ -3399,6 +3425,9 @@
|
|
|
3399
3425
|
"devices": {
|
|
3400
3426
|
"type": "object",
|
|
3401
3427
|
"required": true
|
|
3428
|
+
},
|
|
3429
|
+
"preset": {
|
|
3430
|
+
"type": "string"
|
|
3402
3431
|
}
|
|
3403
3432
|
}
|
|
3404
3433
|
}
|
|
@@ -3432,6 +3461,9 @@
|
|
|
3432
3461
|
},
|
|
3433
3462
|
"devices": {
|
|
3434
3463
|
"type": "object"
|
|
3464
|
+
},
|
|
3465
|
+
"preset": {
|
|
3466
|
+
"type": "string"
|
|
3435
3467
|
}
|
|
3436
3468
|
}
|
|
3437
3469
|
}
|
|
@@ -3442,7 +3474,7 @@
|
|
|
3442
3474
|
"path": "/mood/:id/set",
|
|
3443
3475
|
"private": false,
|
|
3444
3476
|
"scopes": [
|
|
3445
|
-
"homey.mood.
|
|
3477
|
+
"homey.mood.set"
|
|
3446
3478
|
],
|
|
3447
3479
|
"parameters": {
|
|
3448
3480
|
"id": {
|
|
@@ -3470,15 +3502,6 @@
|
|
|
3470
3502
|
"required": true
|
|
3471
3503
|
}
|
|
3472
3504
|
}
|
|
3473
|
-
},
|
|
3474
|
-
"debug": {
|
|
3475
|
-
"method": "get",
|
|
3476
|
-
"path": "/debug",
|
|
3477
|
-
"private": true,
|
|
3478
|
-
"scopes": [
|
|
3479
|
-
"homey.mood"
|
|
3480
|
-
],
|
|
3481
|
-
"parameters": {}
|
|
3482
3505
|
}
|
|
3483
3506
|
}
|
|
3484
3507
|
},
|
|
@@ -4043,7 +4066,12 @@
|
|
|
4043
4066
|
"path": "/ping",
|
|
4044
4067
|
"private": false,
|
|
4045
4068
|
"scopes": [],
|
|
4046
|
-
"parameters": {
|
|
4069
|
+
"parameters": {
|
|
4070
|
+
"id": {
|
|
4071
|
+
"in": "query",
|
|
4072
|
+
"type": "string"
|
|
4073
|
+
}
|
|
4074
|
+
}
|
|
4047
4075
|
},
|
|
4048
4076
|
"getInfo": {
|
|
4049
4077
|
"method": "get",
|
|
@@ -4160,6 +4188,29 @@
|
|
|
4160
4188
|
"homey.system"
|
|
4161
4189
|
],
|
|
4162
4190
|
"parameters": {}
|
|
4191
|
+
},
|
|
4192
|
+
"startProfile": {
|
|
4193
|
+
"method": "post",
|
|
4194
|
+
"path": "/profile/start",
|
|
4195
|
+
"private": true,
|
|
4196
|
+
"scopes": [
|
|
4197
|
+
"homey.system"
|
|
4198
|
+
],
|
|
4199
|
+
"parameters": {
|
|
4200
|
+
"duration": {
|
|
4201
|
+
"in": "body",
|
|
4202
|
+
"type": "number"
|
|
4203
|
+
}
|
|
4204
|
+
}
|
|
4205
|
+
},
|
|
4206
|
+
"stopProfile": {
|
|
4207
|
+
"method": "post",
|
|
4208
|
+
"path": "/profile/stop",
|
|
4209
|
+
"private": true,
|
|
4210
|
+
"scopes": [
|
|
4211
|
+
"homey.system"
|
|
4212
|
+
],
|
|
4213
|
+
"parameters": {}
|
|
4163
4214
|
}
|
|
4164
4215
|
}
|
|
4165
4216
|
},
|
|
@@ -4214,6 +4265,24 @@
|
|
|
4214
4265
|
"required": true
|
|
4215
4266
|
}
|
|
4216
4267
|
}
|
|
4268
|
+
},
|
|
4269
|
+
"apiDisable": {
|
|
4270
|
+
"method": "get",
|
|
4271
|
+
"path": "/disable",
|
|
4272
|
+
"private": true,
|
|
4273
|
+
"scopes": [
|
|
4274
|
+
"homey.system"
|
|
4275
|
+
],
|
|
4276
|
+
"parameters": {}
|
|
4277
|
+
},
|
|
4278
|
+
"apiEnable": {
|
|
4279
|
+
"method": "get",
|
|
4280
|
+
"path": "/enable",
|
|
4281
|
+
"private": true,
|
|
4282
|
+
"scopes": [
|
|
4283
|
+
"homey.system"
|
|
4284
|
+
],
|
|
4285
|
+
"parameters": {}
|
|
4217
4286
|
}
|
|
4218
4287
|
}
|
|
4219
4288
|
},
|
|
@@ -5106,7 +5175,12 @@
|
|
|
5106
5175
|
"scopes": [
|
|
5107
5176
|
"homey.system"
|
|
5108
5177
|
],
|
|
5109
|
-
"parameters": {
|
|
5178
|
+
"parameters": {
|
|
5179
|
+
"erase": {
|
|
5180
|
+
"in": "query",
|
|
5181
|
+
"type": "string"
|
|
5182
|
+
}
|
|
5183
|
+
}
|
|
5110
5184
|
},
|
|
5111
5185
|
"getLog": {
|
|
5112
5186
|
"method": "get",
|
|
@@ -137,10 +137,6 @@ export namespace HomeyAPIV2.ManagerDashboards {
|
|
|
137
137
|
name: string;
|
|
138
138
|
|
|
139
139
|
columns: Array<any>;
|
|
140
|
-
|
|
141
|
-
widgets: object;
|
|
142
|
-
|
|
143
|
-
lines: object;
|
|
144
140
|
}
|
|
145
141
|
}
|
|
146
142
|
|
|
@@ -1100,14 +1096,16 @@ export namespace HomeyAPIV3Local.ManagerCron {
|
|
|
1100
1096
|
}
|
|
1101
1097
|
|
|
1102
1098
|
export namespace HomeyAPIV3Local.ManagerDashboards {
|
|
1099
|
+
export class AppWidget {
|
|
1100
|
+
id: string;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
1103
|
export class Dashboard {
|
|
1104
1104
|
id: string;
|
|
1105
1105
|
|
|
1106
1106
|
name: string;
|
|
1107
1107
|
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
lines: object;
|
|
1108
|
+
columns: Array<any>;
|
|
1111
1109
|
}
|
|
1112
1110
|
}
|
|
1113
1111
|
|
|
@@ -1382,6 +1380,10 @@ export namespace HomeyAPIV3Local.ManagerMoods {
|
|
|
1382
1380
|
|
|
1383
1381
|
name: string;
|
|
1384
1382
|
|
|
1383
|
+
preset: string | null;
|
|
1384
|
+
|
|
1385
|
+
zone: string;
|
|
1386
|
+
|
|
1385
1387
|
devices: object;
|
|
1386
1388
|
}
|
|
1387
1389
|
}
|
|
@@ -9680,9 +9682,7 @@ export namespace HomeyAPIV3Local {
|
|
|
9680
9682
|
dashboard: {
|
|
9681
9683
|
name: string;
|
|
9682
9684
|
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
lines: object;
|
|
9685
|
+
columns: Array<any>;
|
|
9686
9686
|
};
|
|
9687
9687
|
}): Promise<HomeyAPIV3Local.ManagerDashboards.Dashboard>;
|
|
9688
9688
|
|
|
@@ -9692,13 +9692,25 @@ export namespace HomeyAPIV3Local {
|
|
|
9692
9692
|
dashboard: {
|
|
9693
9693
|
name?: string;
|
|
9694
9694
|
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
lines?: object;
|
|
9695
|
+
columns?: Array<any>;
|
|
9698
9696
|
};
|
|
9699
9697
|
}): Promise<HomeyAPIV3Local.ManagerDashboards.Dashboard>;
|
|
9700
9698
|
|
|
9701
9699
|
deleteDashboard(opts: { id: string }): Promise<any>;
|
|
9700
|
+
|
|
9701
|
+
getAppWidgets(): Promise<{
|
|
9702
|
+
[key: string]: HomeyAPIV3Local.ManagerDashboards.AppWidget;
|
|
9703
|
+
}>;
|
|
9704
|
+
|
|
9705
|
+
getAppWidgetAutocomplete(opts: {
|
|
9706
|
+
id: string;
|
|
9707
|
+
|
|
9708
|
+
settingId: string;
|
|
9709
|
+
|
|
9710
|
+
query: string;
|
|
9711
|
+
|
|
9712
|
+
settings?: object;
|
|
9713
|
+
}): Promise<any>;
|
|
9702
9714
|
}
|
|
9703
9715
|
|
|
9704
9716
|
export class ManagerDatabase extends HomeyAPIV3.ManagerDatabase {
|
|
@@ -10297,6 +10309,8 @@ export namespace HomeyAPIV3Local {
|
|
|
10297
10309
|
name: string;
|
|
10298
10310
|
|
|
10299
10311
|
devices: object;
|
|
10312
|
+
|
|
10313
|
+
preset?: string;
|
|
10300
10314
|
};
|
|
10301
10315
|
}): Promise<HomeyAPIV3Local.ManagerMoods.Mood>;
|
|
10302
10316
|
|
|
@@ -10307,14 +10321,14 @@ export namespace HomeyAPIV3Local {
|
|
|
10307
10321
|
name?: string;
|
|
10308
10322
|
|
|
10309
10323
|
devices?: object;
|
|
10324
|
+
|
|
10325
|
+
preset?: string;
|
|
10310
10326
|
};
|
|
10311
10327
|
}): Promise<HomeyAPIV3Local.ManagerMoods.Mood>;
|
|
10312
10328
|
|
|
10313
10329
|
setMood(opts: { id: string }): Promise<any>;
|
|
10314
10330
|
|
|
10315
10331
|
deleteMood(opts: { id: string }): Promise<any>;
|
|
10316
|
-
|
|
10317
|
-
debug(): Promise<any>;
|
|
10318
10332
|
}
|
|
10319
10333
|
|
|
10320
10334
|
export class ManagerNotifications extends HomeyAPIV3.ManagerNotifications {
|
|
@@ -10450,7 +10464,7 @@ export namespace HomeyAPIV3Local {
|
|
|
10450
10464
|
|
|
10451
10465
|
getState(): Promise<any>;
|
|
10452
10466
|
|
|
10453
|
-
ping(): Promise<any>;
|
|
10467
|
+
ping(opts: { id?: string }): Promise<any>;
|
|
10454
10468
|
|
|
10455
10469
|
getInfo(): Promise<any>;
|
|
10456
10470
|
|
|
@@ -10473,6 +10487,10 @@ export namespace HomeyAPIV3Local {
|
|
|
10473
10487
|
enableWifi(): Promise<any>;
|
|
10474
10488
|
|
|
10475
10489
|
disableWifi(): Promise<any>;
|
|
10490
|
+
|
|
10491
|
+
startProfile(opts: { duration?: number }): Promise<any>;
|
|
10492
|
+
|
|
10493
|
+
stopProfile(): Promise<any>;
|
|
10476
10494
|
}
|
|
10477
10495
|
|
|
10478
10496
|
export class ManagerThread extends HomeyAPIV3.ManagerThread {
|
|
@@ -10483,6 +10501,10 @@ export namespace HomeyAPIV3Local {
|
|
|
10483
10501
|
reset(opts: { target?: string }): Promise<any>;
|
|
10484
10502
|
|
|
10485
10503
|
executeCommand(opts: { command: string }): Promise<any>;
|
|
10504
|
+
|
|
10505
|
+
apiDisable(): Promise<any>;
|
|
10506
|
+
|
|
10507
|
+
apiEnable(): Promise<any>;
|
|
10486
10508
|
}
|
|
10487
10509
|
|
|
10488
10510
|
export class ManagerUpdates extends HomeyAPIV3.ManagerUpdates {
|
|
@@ -10638,7 +10660,7 @@ export namespace HomeyAPIV3Local {
|
|
|
10638
10660
|
opts?: object;
|
|
10639
10661
|
}): Promise<any>;
|
|
10640
10662
|
|
|
10641
|
-
flashFirmware(): Promise<any>;
|
|
10663
|
+
flashFirmware(opts: { erase?: string }): Promise<any>;
|
|
10642
10664
|
|
|
10643
10665
|
getLog(): Promise<any>;
|
|
10644
10666
|
|
package/lib/AthomCloudAPI.js
CHANGED
|
@@ -125,6 +125,8 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
|
|
|
125
125
|
* @returns {Promise<boolean>}
|
|
126
126
|
*/
|
|
127
127
|
async isLoggedIn() {
|
|
128
|
+
if (this.__token && this.__token.access_token) return true;
|
|
129
|
+
|
|
128
130
|
const store = await this.__getStore();
|
|
129
131
|
|
|
130
132
|
if (!store.token || !store.token.access_token) return false;
|
|
@@ -152,7 +154,7 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
|
|
|
152
154
|
api: this,
|
|
153
155
|
properties: properties,
|
|
154
156
|
});
|
|
155
|
-
|
|
157
|
+
|
|
156
158
|
return this.__user;
|
|
157
159
|
}
|
|
158
160
|
|
|
@@ -296,7 +298,7 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
|
|
|
296
298
|
/*
|
|
297
299
|
* API overloads
|
|
298
300
|
*/
|
|
299
|
-
|
|
301
|
+
|
|
300
302
|
// eslint-disable-next-line no-unused-vars
|
|
301
303
|
async onCallRequestHeaders({ request }) {
|
|
302
304
|
// Try to set the Token from the StorageAdapter
|