@switchbot/homebridge-switchbot 3.3.0-beta.0 → 3.3.0-beta.2

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.
Files changed (106) hide show
  1. package/dist/device/blindtilt.d.ts.map +1 -1
  2. package/dist/device/blindtilt.js +36 -0
  3. package/dist/device/blindtilt.js.map +1 -1
  4. package/dist/device/bot.d.ts.map +1 -1
  5. package/dist/device/bot.js +36 -0
  6. package/dist/device/bot.js.map +1 -1
  7. package/dist/device/ceilinglight.d.ts.map +1 -1
  8. package/dist/device/ceilinglight.js +36 -0
  9. package/dist/device/ceilinglight.js.map +1 -1
  10. package/dist/device/colorbulb.d.ts +1 -1
  11. package/dist/device/colorbulb.d.ts.map +1 -1
  12. package/dist/device/colorbulb.js +43 -6
  13. package/dist/device/colorbulb.js.map +1 -1
  14. package/dist/device/contact.d.ts.map +1 -1
  15. package/dist/device/contact.js +36 -0
  16. package/dist/device/contact.js.map +1 -1
  17. package/dist/device/curtain.d.ts.map +1 -1
  18. package/dist/device/curtain.js +36 -0
  19. package/dist/device/curtain.js.map +1 -1
  20. package/dist/device/hub.d.ts.map +1 -1
  21. package/dist/device/hub.js +36 -0
  22. package/dist/device/hub.js.map +1 -1
  23. package/dist/device/humidifier.d.ts.map +1 -1
  24. package/dist/device/humidifier.js +36 -0
  25. package/dist/device/humidifier.js.map +1 -1
  26. package/dist/device/iosensor.d.ts.map +1 -1
  27. package/dist/device/iosensor.js +36 -0
  28. package/dist/device/iosensor.js.map +1 -1
  29. package/dist/device/lightstrip.d.ts.map +1 -1
  30. package/dist/device/lightstrip.js +36 -0
  31. package/dist/device/lightstrip.js.map +1 -1
  32. package/dist/device/lock.d.ts.map +1 -1
  33. package/dist/device/lock.js +36 -0
  34. package/dist/device/lock.js.map +1 -1
  35. package/dist/device/meter.d.ts.map +1 -1
  36. package/dist/device/meter.js +36 -0
  37. package/dist/device/meter.js.map +1 -1
  38. package/dist/device/meterplus.d.ts.map +1 -1
  39. package/dist/device/meterplus.js +36 -0
  40. package/dist/device/meterplus.js.map +1 -1
  41. package/dist/device/motion.d.ts.map +1 -1
  42. package/dist/device/motion.js +36 -0
  43. package/dist/device/motion.js.map +1 -1
  44. package/dist/device/plug.d.ts.map +1 -1
  45. package/dist/device/plug.js +36 -0
  46. package/dist/device/plug.js.map +1 -1
  47. package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
  48. package/dist/device/robotvacuumcleaner.js +36 -0
  49. package/dist/device/robotvacuumcleaner.js.map +1 -1
  50. package/dist/irdevice/airconditioner.d.ts.map +1 -1
  51. package/dist/irdevice/airconditioner.js +36 -0
  52. package/dist/irdevice/airconditioner.js.map +1 -1
  53. package/dist/irdevice/airpurifier.d.ts.map +1 -1
  54. package/dist/irdevice/airpurifier.js +36 -0
  55. package/dist/irdevice/airpurifier.js.map +1 -1
  56. package/dist/irdevice/camera.d.ts.map +1 -1
  57. package/dist/irdevice/camera.js +36 -0
  58. package/dist/irdevice/camera.js.map +1 -1
  59. package/dist/irdevice/fan.d.ts.map +1 -1
  60. package/dist/irdevice/fan.js +36 -0
  61. package/dist/irdevice/fan.js.map +1 -1
  62. package/dist/irdevice/light.d.ts.map +1 -1
  63. package/dist/irdevice/light.js +36 -0
  64. package/dist/irdevice/light.js.map +1 -1
  65. package/dist/irdevice/other.d.ts.map +1 -1
  66. package/dist/irdevice/other.js +36 -0
  67. package/dist/irdevice/other.js.map +1 -1
  68. package/dist/irdevice/tv.d.ts.map +1 -1
  69. package/dist/irdevice/tv.js +36 -0
  70. package/dist/irdevice/tv.js.map +1 -1
  71. package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
  72. package/dist/irdevice/vacuumcleaner.js +36 -0
  73. package/dist/irdevice/vacuumcleaner.js.map +1 -1
  74. package/dist/irdevice/waterheater.d.ts.map +1 -1
  75. package/dist/irdevice/waterheater.js +36 -0
  76. package/dist/irdevice/waterheater.js.map +1 -1
  77. package/dist/platform.d.ts.map +1 -1
  78. package/dist/platform.js +37 -6
  79. package/dist/platform.js.map +1 -1
  80. package/package.json +1 -1
  81. package/src/device/blindtilt.ts +36 -0
  82. package/src/device/bot.ts +36 -0
  83. package/src/device/ceilinglight.ts +36 -0
  84. package/src/device/colorbulb.ts +43 -6
  85. package/src/device/contact.ts +36 -0
  86. package/src/device/curtain.ts +36 -0
  87. package/src/device/hub.ts +36 -0
  88. package/src/device/humidifier.ts +36 -0
  89. package/src/device/iosensor.ts +36 -0
  90. package/src/device/lightstrip.ts +36 -0
  91. package/src/device/lock.ts +36 -0
  92. package/src/device/meter.ts +36 -0
  93. package/src/device/meterplus.ts +36 -0
  94. package/src/device/motion.ts +36 -0
  95. package/src/device/plug.ts +36 -0
  96. package/src/device/robotvacuumcleaner.ts +36 -0
  97. package/src/irdevice/airconditioner.ts +36 -0
  98. package/src/irdevice/airpurifier.ts +36 -0
  99. package/src/irdevice/camera.ts +36 -0
  100. package/src/irdevice/fan.ts +36 -0
  101. package/src/irdevice/light.ts +36 -0
  102. package/src/irdevice/other.ts +36 -0
  103. package/src/irdevice/tv.ts +36 -0
  104. package/src/irdevice/vacuumcleaner.ts +36 -0
  105. package/src/irdevice/waterheater.ts +36 -0
  106. package/src/platform.ts +37 -6
@@ -1003,6 +1003,42 @@ export class CeilingLight {
1003
1003
  case 200:
1004
1004
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
1005
1005
  break;
1006
+ case 400:
1007
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
1008
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
1009
+ break;
1010
+ case 401:
1011
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
1012
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
1013
+ break;
1014
+ case 403:
1015
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
1016
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
1017
+ break;
1018
+ case 404:
1019
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
1020
+ + `statusCode: ${statusCode}`);
1021
+ break;
1022
+ case 406:
1023
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
1024
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
1025
+ break;
1026
+ case 415:
1027
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
1028
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
1029
+ break;
1030
+ case 422:
1031
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
1032
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
1033
+ break;
1034
+ case 429:
1035
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
1036
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
1037
+ break;
1038
+ case 500:
1039
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
1040
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
1041
+ break;
1006
1042
  default:
1007
1043
  this.infoLog(
1008
1044
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -90,7 +90,7 @@ export class ColorBulb {
90
90
  this.scan(device);
91
91
  this.refreshRate(device);
92
92
  this.adaptiveLighting(device);
93
- this.context();
93
+ this.deviceContext();
94
94
  this.deviceConfig(device);
95
95
 
96
96
  // this is subject we use to track when we need to POST changes to the SwitchBot API
@@ -240,6 +240,7 @@ export class ColorBulb {
240
240
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Saturation: ${this.Saturation}`);
241
241
 
242
242
  this.ColorTemperature = colorTemperature;
243
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} ColorTemperature: ${this.ColorTemperature}`);
243
244
  this.updateHomeKitCharacteristics();
244
245
  } catch (e: any) {
245
246
  this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
@@ -326,7 +327,7 @@ export class ColorBulb {
326
327
 
327
328
  // ColorTemperature
328
329
  if (this.BLE_ColorTemperature) {
329
- this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BLE ColorTemperature: ${this.BLE_ColorTemperature}`);
330
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} ColorTemperature: ${this.BLE_ColorTemperature}`);
330
331
  this.ColorTemperature = this.BLE_ColorTemperature!;
331
332
 
332
333
  this.ColorTemperature = Math.max(Math.min(this.ColorTemperature, 500), 140);
@@ -373,7 +374,7 @@ export class ColorBulb {
373
374
 
374
375
  // ColorTemperature
375
376
  if (!Number.isNaN(this.OpenAPI_ColorTemperature)) {
376
- this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} OpenAPI ColorTemperature: ${this.OpenAPI_ColorTemperature}`);
377
+ this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} ColorTemperature: ${this.OpenAPI_ColorTemperature}`);
377
378
  const mired = Math.round(1000000 / this.OpenAPI_ColorTemperature!);
378
379
 
379
380
  this.ColorTemperature = Number(mired);
@@ -1191,6 +1192,42 @@ export class ColorBulb {
1191
1192
  case 200:
1192
1193
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
1193
1194
  break;
1195
+ case 400:
1196
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
1197
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
1198
+ break;
1199
+ case 401:
1200
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
1201
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
1202
+ break;
1203
+ case 403:
1204
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
1205
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
1206
+ break;
1207
+ case 404:
1208
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
1209
+ + `statusCode: ${statusCode}`);
1210
+ break;
1211
+ case 406:
1212
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
1213
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
1214
+ break;
1215
+ case 415:
1216
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
1217
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
1218
+ break;
1219
+ case 422:
1220
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
1221
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
1222
+ break;
1223
+ case 429:
1224
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
1225
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
1226
+ break;
1227
+ case 500:
1228
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
1229
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
1230
+ break;
1194
1231
  default:
1195
1232
  this.infoLog(
1196
1233
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -1201,7 +1238,7 @@ export class ColorBulb {
1201
1238
 
1202
1239
  async offlineOff(): Promise<void> {
1203
1240
  if (this.device.offline) {
1204
- await this.context();
1241
+ await this.deviceContext();
1205
1242
  await this.updateHomeKitCharacteristics();
1206
1243
  }
1207
1244
  }
@@ -1214,7 +1251,7 @@ export class ColorBulb {
1214
1251
  this.lightBulbService.updateCharacteristic(this.hap.Characteristic.ColorTemperature, e);
1215
1252
  }
1216
1253
 
1217
- async context() {
1254
+ async deviceContext(): Promise<void> {
1218
1255
  if (this.On === undefined) {
1219
1256
  this.On = false;
1220
1257
  } else {
@@ -1230,7 +1267,7 @@ export class ColorBulb {
1230
1267
  } else {
1231
1268
  this.Brightness = this.accessory.context.Brightness;
1232
1269
  }
1233
- if (this.Brightness === undefined) {
1270
+ if (this.Saturation === undefined) {
1234
1271
  this.Saturation = 0;
1235
1272
  } else {
1236
1273
  this.Saturation = this.accessory.context.Saturation;
@@ -592,6 +592,42 @@ export class Contact {
592
592
  case 200:
593
593
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
594
594
  break;
595
+ case 400:
596
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
597
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
598
+ break;
599
+ case 401:
600
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
601
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
602
+ break;
603
+ case 403:
604
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
605
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
606
+ break;
607
+ case 404:
608
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
609
+ + `statusCode: ${statusCode}`);
610
+ break;
611
+ case 406:
612
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
613
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
614
+ break;
615
+ case 415:
616
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
617
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
618
+ break;
619
+ case 422:
620
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
621
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
622
+ break;
623
+ case 429:
624
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
625
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
626
+ break;
627
+ case 500:
628
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
629
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
630
+ break;
595
631
  default:
596
632
  this.infoLog(
597
633
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -1142,6 +1142,42 @@ export class Curtain {
1142
1142
  case 200:
1143
1143
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
1144
1144
  break;
1145
+ case 400:
1146
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
1147
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
1148
+ break;
1149
+ case 401:
1150
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
1151
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
1152
+ break;
1153
+ case 403:
1154
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
1155
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
1156
+ break;
1157
+ case 404:
1158
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
1159
+ + `statusCode: ${statusCode}`);
1160
+ break;
1161
+ case 406:
1162
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
1163
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
1164
+ break;
1165
+ case 415:
1166
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
1167
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
1168
+ break;
1169
+ case 422:
1170
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
1171
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
1172
+ break;
1173
+ case 429:
1174
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
1175
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
1176
+ break;
1177
+ case 500:
1178
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
1179
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
1180
+ break;
1145
1181
  default:
1146
1182
  this.infoLog(
1147
1183
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
package/src/device/hub.ts CHANGED
@@ -616,6 +616,42 @@ export class Hub {
616
616
  case 200:
617
617
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
618
618
  break;
619
+ case 400:
620
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
621
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
622
+ break;
623
+ case 401:
624
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
625
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
626
+ break;
627
+ case 403:
628
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
629
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
630
+ break;
631
+ case 404:
632
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
633
+ + `statusCode: ${statusCode}`);
634
+ break;
635
+ case 406:
636
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
637
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
638
+ break;
639
+ case 415:
640
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
641
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
642
+ break;
643
+ case 422:
644
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
645
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
646
+ break;
647
+ case 429:
648
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
649
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
650
+ break;
651
+ case 500:
652
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
653
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
654
+ break;
619
655
  default:
620
656
  this.infoLog(
621
657
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -863,6 +863,42 @@ export class Humidifier {
863
863
  case 200:
864
864
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
865
865
  break;
866
+ case 400:
867
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
868
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
869
+ break;
870
+ case 401:
871
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
872
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
873
+ break;
874
+ case 403:
875
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
876
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
877
+ break;
878
+ case 404:
879
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
880
+ + `statusCode: ${statusCode}`);
881
+ break;
882
+ case 406:
883
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
884
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
885
+ break;
886
+ case 415:
887
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
888
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
889
+ break;
890
+ case 422:
891
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
892
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
893
+ break;
894
+ case 429:
895
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
896
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
897
+ break;
898
+ case 500:
899
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
900
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
901
+ break;
866
902
  default:
867
903
  this.infoLog(
868
904
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -615,6 +615,42 @@ export class IOSensor {
615
615
  case 200:
616
616
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
617
617
  break;
618
+ case 400:
619
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
620
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
621
+ break;
622
+ case 401:
623
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
624
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
625
+ break;
626
+ case 403:
627
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
628
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
629
+ break;
630
+ case 404:
631
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
632
+ + `statusCode: ${statusCode}`);
633
+ break;
634
+ case 406:
635
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
636
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
637
+ break;
638
+ case 415:
639
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
640
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
641
+ break;
642
+ case 422:
643
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
644
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
645
+ break;
646
+ case 429:
647
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
648
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
649
+ break;
650
+ case 500:
651
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
652
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
653
+ break;
618
654
  default:
619
655
  this.infoLog(
620
656
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -1038,6 +1038,42 @@ export class StripLight {
1038
1038
  case 200:
1039
1039
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
1040
1040
  break;
1041
+ case 400:
1042
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
1043
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
1044
+ break;
1045
+ case 401:
1046
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
1047
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
1048
+ break;
1049
+ case 403:
1050
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
1051
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
1052
+ break;
1053
+ case 404:
1054
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
1055
+ + `statusCode: ${statusCode}`);
1056
+ break;
1057
+ case 406:
1058
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
1059
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
1060
+ break;
1061
+ case 415:
1062
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
1063
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
1064
+ break;
1065
+ case 422:
1066
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
1067
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
1068
+ break;
1069
+ case 429:
1070
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
1071
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
1072
+ break;
1073
+ case 500:
1074
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
1075
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
1076
+ break;
1041
1077
  default:
1042
1078
  this.infoLog(
1043
1079
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -734,6 +734,42 @@ export class Lock {
734
734
  case 200:
735
735
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
736
736
  break;
737
+ case 400:
738
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
739
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
740
+ break;
741
+ case 401:
742
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
743
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
744
+ break;
745
+ case 403:
746
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
747
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
748
+ break;
749
+ case 404:
750
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
751
+ + `statusCode: ${statusCode}`);
752
+ break;
753
+ case 406:
754
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
755
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
756
+ break;
757
+ case 415:
758
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
759
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
760
+ break;
761
+ case 422:
762
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
763
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
764
+ break;
765
+ case 429:
766
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
767
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
768
+ break;
769
+ case 500:
770
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
771
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
772
+ break;
737
773
  default:
738
774
  this.infoLog(
739
775
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -608,6 +608,42 @@ export class Meter {
608
608
  case 200:
609
609
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
610
610
  break;
611
+ case 400:
612
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
613
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
614
+ break;
615
+ case 401:
616
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
617
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
618
+ break;
619
+ case 403:
620
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
621
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
622
+ break;
623
+ case 404:
624
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
625
+ + `statusCode: ${statusCode}`);
626
+ break;
627
+ case 406:
628
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
629
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
630
+ break;
631
+ case 415:
632
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
633
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
634
+ break;
635
+ case 422:
636
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
637
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
638
+ break;
639
+ case 429:
640
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
641
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
642
+ break;
643
+ case 500:
644
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
645
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
646
+ break;
611
647
  default:
612
648
  this.infoLog(
613
649
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -623,6 +623,42 @@ export class MeterPlus {
623
623
  case 200:
624
624
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
625
625
  break;
626
+ case 400:
627
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
628
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
629
+ break;
630
+ case 401:
631
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
632
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
633
+ break;
634
+ case 403:
635
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
636
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
637
+ break;
638
+ case 404:
639
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
640
+ + `statusCode: ${statusCode}`);
641
+ break;
642
+ case 406:
643
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
644
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
645
+ break;
646
+ case 415:
647
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
648
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
649
+ break;
650
+ case 422:
651
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
652
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
653
+ break;
654
+ case 429:
655
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
656
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
657
+ break;
658
+ case 500:
659
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
660
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
661
+ break;
626
662
  default:
627
663
  this.infoLog(
628
664
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -556,6 +556,42 @@ export class Motion {
556
556
  case 200:
557
557
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
558
558
  break;
559
+ case 400:
560
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
561
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
562
+ break;
563
+ case 401:
564
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
565
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
566
+ break;
567
+ case 403:
568
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
569
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
570
+ break;
571
+ case 404:
572
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
573
+ + `statusCode: ${statusCode}`);
574
+ break;
575
+ case 406:
576
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
577
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
578
+ break;
579
+ case 415:
580
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
581
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
582
+ break;
583
+ case 422:
584
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
585
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
586
+ break;
587
+ case 429:
588
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
589
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
590
+ break;
591
+ case 500:
592
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
593
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
594
+ break;
559
595
  default:
560
596
  this.infoLog(
561
597
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
@@ -586,6 +586,42 @@ export class Plug {
586
586
  case 200:
587
587
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
588
588
  break;
589
+ case 400:
590
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
591
+ + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
592
+ break;
593
+ case 401:
594
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
595
+ + `but the request has not been authenticated, statusCode: ${statusCode}`);
596
+ break;
597
+ case 403:
598
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
599
+ + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
600
+ break;
601
+ case 404:
602
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
603
+ + `statusCode: ${statusCode}`);
604
+ break;
605
+ case 406:
606
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
607
+ + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
608
+ break;
609
+ case 415:
610
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
611
+ + `header that is not supported by the server, statusCode: ${statusCode}`);
612
+ break;
613
+ case 422:
614
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
615
+ + `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
616
+ break;
617
+ case 429:
618
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
619
+ + `requests allowed for a given time window, statusCode: ${statusCode}`);
620
+ break;
621
+ case 500:
622
+ this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
623
+ + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
624
+ break;
589
625
  default:
590
626
  this.infoLog(
591
627
  `${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +