@switchbot/homebridge-switchbot 3.2.0 → 3.3.0-beta.1
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/.github/npm-version-script.cjs +81 -0
- package/CHANGELOG.md +8 -0
- package/config.schema.json +41 -0
- package/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +36 -0
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +36 -0
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +36 -0
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +43 -6
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +36 -0
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +36 -0
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +36 -0
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +36 -0
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +36 -0
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +36 -0
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +36 -0
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +36 -0
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +36 -0
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +36 -0
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +36 -0
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +36 -0
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts +4 -0
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +76 -4
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +36 -0
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +36 -0
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +36 -0
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +36 -0
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +36 -0
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +36 -0
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +36 -0
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +36 -0
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +35 -0
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +4 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +36 -0
- package/src/device/bot.ts +36 -0
- package/src/device/ceilinglight.ts +36 -0
- package/src/device/colorbulb.ts +43 -6
- package/src/device/contact.ts +36 -0
- package/src/device/curtain.ts +36 -0
- package/src/device/hub.ts +36 -0
- package/src/device/humidifier.ts +36 -0
- package/src/device/iosensor.ts +36 -0
- package/src/device/lightstrip.ts +36 -0
- package/src/device/lock.ts +36 -0
- package/src/device/meter.ts +36 -0
- package/src/device/meterplus.ts +36 -0
- package/src/device/motion.ts +36 -0
- package/src/device/plug.ts +36 -0
- package/src/device/robotvacuumcleaner.ts +36 -0
- package/src/irdevice/airconditioner.ts +74 -4
- package/src/irdevice/airpurifier.ts +36 -0
- package/src/irdevice/camera.ts +36 -0
- package/src/irdevice/fan.ts +36 -0
- package/src/irdevice/light.ts +36 -0
- package/src/irdevice/other.ts +36 -0
- package/src/irdevice/tv.ts +36 -0
- package/src/irdevice/vacuumcleaner.ts +36 -0
- package/src/irdevice/waterheater.ts +36 -0
- package/src/platform.ts +35 -0
- package/src/settings.ts +7 -3
package/src/device/lock.ts
CHANGED
|
@@ -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: ` +
|
package/src/device/meter.ts
CHANGED
|
@@ -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: ` +
|
package/src/device/meterplus.ts
CHANGED
|
@@ -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: ` +
|
package/src/device/motion.ts
CHANGED
|
@@ -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: ` +
|
package/src/device/plug.ts
CHANGED
|
@@ -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: ` +
|
|
@@ -747,6 +747,42 @@ export class RobotVacuumCleaner {
|
|
|
747
747
|
case 200:
|
|
748
748
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
|
|
749
749
|
break;
|
|
750
|
+
case 400:
|
|
751
|
+
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
|
|
752
|
+
+ `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
|
|
753
|
+
break;
|
|
754
|
+
case 401:
|
|
755
|
+
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
|
|
756
|
+
+ `but the request has not been authenticated, statusCode: ${statusCode}`);
|
|
757
|
+
break;
|
|
758
|
+
case 403:
|
|
759
|
+
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
|
|
760
|
+
+ `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
|
|
761
|
+
break;
|
|
762
|
+
case 404:
|
|
763
|
+
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
|
|
764
|
+
+ `statusCode: ${statusCode}`);
|
|
765
|
+
break;
|
|
766
|
+
case 406:
|
|
767
|
+
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
|
|
768
|
+
+ `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
|
|
769
|
+
break;
|
|
770
|
+
case 415:
|
|
771
|
+
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
|
|
772
|
+
+ `header that is not supported by the server, statusCode: ${statusCode}`);
|
|
773
|
+
break;
|
|
774
|
+
case 422:
|
|
775
|
+
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, `
|
|
776
|
+
+ `but the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
|
|
777
|
+
break;
|
|
778
|
+
case 429:
|
|
779
|
+
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
|
|
780
|
+
+ `requests allowed for a given time window, statusCode: ${statusCode}`);
|
|
781
|
+
break;
|
|
782
|
+
case 500:
|
|
783
|
+
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
|
|
784
|
+
+ `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
|
|
785
|
+
break;
|
|
750
786
|
default:
|
|
751
787
|
this.infoLog(
|
|
752
788
|
`${this.device.deviceType}: ${this.accessory.displayName} Unknown statusCode: ` +
|
|
@@ -40,6 +40,10 @@ export class AirConditioner {
|
|
|
40
40
|
// Config
|
|
41
41
|
deviceLogging!: string;
|
|
42
42
|
hide_automode?: boolean;
|
|
43
|
+
set_max_heat?: number;
|
|
44
|
+
set_min_heat?: number;
|
|
45
|
+
set_max_cool?: number;
|
|
46
|
+
set_min_cool?: number;
|
|
43
47
|
disablePushOn?: boolean;
|
|
44
48
|
disablePushOff?: boolean;
|
|
45
49
|
meter?: PlatformAccessory;
|
|
@@ -113,8 +117,8 @@ export class AirConditioner {
|
|
|
113
117
|
this.coolerService
|
|
114
118
|
.getCharacteristic(this.hap.Characteristic.HeatingThresholdTemperature)
|
|
115
119
|
.setProps({
|
|
116
|
-
minValue:
|
|
117
|
-
maxValue:
|
|
120
|
+
minValue: this.set_min_heat,
|
|
121
|
+
maxValue: this.set_max_heat,
|
|
118
122
|
minStep: 0.5,
|
|
119
123
|
})
|
|
120
124
|
.onGet(this.ThresholdTemperatureGet.bind(this))
|
|
@@ -123,8 +127,8 @@ export class AirConditioner {
|
|
|
123
127
|
this.coolerService
|
|
124
128
|
.getCharacteristic(this.hap.Characteristic.CoolingThresholdTemperature)
|
|
125
129
|
.setProps({
|
|
126
|
-
minValue:
|
|
127
|
-
maxValue:
|
|
130
|
+
minValue: this.set_min_cool,
|
|
131
|
+
maxValue: this.set_max_cool,
|
|
128
132
|
minStep: 0.5,
|
|
129
133
|
})
|
|
130
134
|
.onGet(this.ThresholdTemperatureGet.bind(this))
|
|
@@ -606,6 +610,42 @@ export class AirConditioner {
|
|
|
606
610
|
case 200:
|
|
607
611
|
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
|
|
608
612
|
break;
|
|
613
|
+
case 400:
|
|
614
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
|
|
615
|
+
+ `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
|
|
616
|
+
break;
|
|
617
|
+
case 401:
|
|
618
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
|
|
619
|
+
+ `but the request has not been authenticated, statusCode: ${statusCode}`);
|
|
620
|
+
break;
|
|
621
|
+
case 403:
|
|
622
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
|
|
623
|
+
+ `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
|
|
624
|
+
break;
|
|
625
|
+
case 404:
|
|
626
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
|
|
627
|
+
+ `statusCode: ${statusCode}`);
|
|
628
|
+
break;
|
|
629
|
+
case 406:
|
|
630
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
|
|
631
|
+
+ `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
|
|
632
|
+
break;
|
|
633
|
+
case 415:
|
|
634
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
|
|
635
|
+
+ `header that is not supported by the server, statusCode: ${statusCode}`);
|
|
636
|
+
break;
|
|
637
|
+
case 422:
|
|
638
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, but `
|
|
639
|
+
+ `the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
|
|
640
|
+
break;
|
|
641
|
+
case 429:
|
|
642
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
|
|
643
|
+
+ `requests allowed for a given time window, statusCode: ${statusCode}`);
|
|
644
|
+
break;
|
|
645
|
+
case 500:
|
|
646
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
|
|
647
|
+
+ `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
|
|
648
|
+
break;
|
|
609
649
|
default:
|
|
610
650
|
this.infoLog(
|
|
611
651
|
`${this.device.remoteType}: ${this.accessory.displayName} Unknown statusCode: ` +
|
|
@@ -660,6 +700,36 @@ export class AirConditioner {
|
|
|
660
700
|
this.accessory.context.hide_automode = this.hide_automode;
|
|
661
701
|
}
|
|
662
702
|
|
|
703
|
+
if (this.device.irair?.set_max_heat) {
|
|
704
|
+
this.set_max_heat = this.device.irair?.set_max_heat;
|
|
705
|
+
this.accessory.context.set_max_heat = this.set_max_heat;
|
|
706
|
+
} else {
|
|
707
|
+
this.set_max_heat = 35;
|
|
708
|
+
this.accessory.context.set_max_heat = this.set_max_heat;
|
|
709
|
+
}
|
|
710
|
+
if (this.device.irair?.set_min_heat) {
|
|
711
|
+
this.set_min_heat = this.device.irair?.set_min_heat;
|
|
712
|
+
this.accessory.context.set_min_heat = this.set_min_heat;
|
|
713
|
+
} else {
|
|
714
|
+
this.set_min_heat = 0;
|
|
715
|
+
this.accessory.context.set_min_heat = this.set_min_heat;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
if (this.device.irair?.set_max_cool) {
|
|
719
|
+
this.set_max_cool = this.device.irair?.set_max_cool;
|
|
720
|
+
this.accessory.context.set_max_cool = this.set_max_cool;
|
|
721
|
+
} else {
|
|
722
|
+
this.set_max_cool = 35;
|
|
723
|
+
this.accessory.context.set_max_cool = this.set_max_cool;
|
|
724
|
+
}
|
|
725
|
+
if (this.device.irair?.set_min_cool) {
|
|
726
|
+
this.set_min_cool = this.device.irair?.set_min_cool;
|
|
727
|
+
this.accessory.context.set_min_cool = this.set_min_cool;
|
|
728
|
+
} else {
|
|
729
|
+
this.set_min_cool = 0;
|
|
730
|
+
this.accessory.context.set_min_cool = this.set_min_cool;
|
|
731
|
+
}
|
|
732
|
+
|
|
663
733
|
if (this.meter) {
|
|
664
734
|
if (this.CurrentRelativeHumidity === undefined && this.accessory.context.CurrentRelativeHumidity === undefined) {
|
|
665
735
|
this.CurrentRelativeHumidity = 0;
|
|
@@ -357,6 +357,42 @@ export class AirPurifier {
|
|
|
357
357
|
case 200:
|
|
358
358
|
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
|
|
359
359
|
break;
|
|
360
|
+
case 400:
|
|
361
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
|
|
362
|
+
+ `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
|
|
363
|
+
break;
|
|
364
|
+
case 401:
|
|
365
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
|
|
366
|
+
+ `but the request has not been authenticated, statusCode: ${statusCode}`);
|
|
367
|
+
break;
|
|
368
|
+
case 403:
|
|
369
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
|
|
370
|
+
+ `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
|
|
371
|
+
break;
|
|
372
|
+
case 404:
|
|
373
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
|
|
374
|
+
+ `statusCode: ${statusCode}`);
|
|
375
|
+
break;
|
|
376
|
+
case 406:
|
|
377
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
|
|
378
|
+
+ `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
|
|
379
|
+
break;
|
|
380
|
+
case 415:
|
|
381
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
|
|
382
|
+
+ `header that is not supported by the server, statusCode: ${statusCode}`);
|
|
383
|
+
break;
|
|
384
|
+
case 422:
|
|
385
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, but `
|
|
386
|
+
+ `the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
|
|
387
|
+
break;
|
|
388
|
+
case 429:
|
|
389
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
|
|
390
|
+
+ `requests allowed for a given time window, statusCode: ${statusCode}`);
|
|
391
|
+
break;
|
|
392
|
+
case 500:
|
|
393
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
|
|
394
|
+
+ `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
|
|
395
|
+
break;
|
|
360
396
|
default:
|
|
361
397
|
this.infoLog(
|
|
362
398
|
`${this.device.remoteType}: ${this.accessory.displayName} Unknown statusCode: ` +
|
package/src/irdevice/camera.ts
CHANGED
|
@@ -241,6 +241,42 @@ export class Camera {
|
|
|
241
241
|
case 200:
|
|
242
242
|
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
|
|
243
243
|
break;
|
|
244
|
+
case 400:
|
|
245
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
|
|
246
|
+
+ `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
|
|
247
|
+
break;
|
|
248
|
+
case 401:
|
|
249
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
|
|
250
|
+
+ `but the request has not been authenticated, statusCode: ${statusCode}`);
|
|
251
|
+
break;
|
|
252
|
+
case 403:
|
|
253
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
|
|
254
|
+
+ `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
|
|
255
|
+
break;
|
|
256
|
+
case 404:
|
|
257
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
|
|
258
|
+
+ `statusCode: ${statusCode}`);
|
|
259
|
+
break;
|
|
260
|
+
case 406:
|
|
261
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
|
|
262
|
+
+ `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
|
|
263
|
+
break;
|
|
264
|
+
case 415:
|
|
265
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
|
|
266
|
+
+ `header that is not supported by the server, statusCode: ${statusCode}`);
|
|
267
|
+
break;
|
|
268
|
+
case 422:
|
|
269
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, but `
|
|
270
|
+
+ `the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
|
|
271
|
+
break;
|
|
272
|
+
case 429:
|
|
273
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
|
|
274
|
+
+ `requests allowed for a given time window, statusCode: ${statusCode}`);
|
|
275
|
+
break;
|
|
276
|
+
case 500:
|
|
277
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
|
|
278
|
+
+ `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
|
|
279
|
+
break;
|
|
244
280
|
default:
|
|
245
281
|
this.infoLog(
|
|
246
282
|
`${this.device.remoteType}: ${this.accessory.displayName} Unknown statusCode: ` +
|
package/src/irdevice/fan.ts
CHANGED
|
@@ -371,6 +371,42 @@ export class Fan {
|
|
|
371
371
|
case 200:
|
|
372
372
|
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
|
|
373
373
|
break;
|
|
374
|
+
case 400:
|
|
375
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
|
|
376
|
+
+ `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
|
|
377
|
+
break;
|
|
378
|
+
case 401:
|
|
379
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
|
|
380
|
+
+ `but the request has not been authenticated, statusCode: ${statusCode}`);
|
|
381
|
+
break;
|
|
382
|
+
case 403:
|
|
383
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
|
|
384
|
+
+ `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
|
|
385
|
+
break;
|
|
386
|
+
case 404:
|
|
387
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
|
|
388
|
+
+ `statusCode: ${statusCode}`);
|
|
389
|
+
break;
|
|
390
|
+
case 406:
|
|
391
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
|
|
392
|
+
+ `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
|
|
393
|
+
break;
|
|
394
|
+
case 415:
|
|
395
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
|
|
396
|
+
+ `header that is not supported by the server, statusCode: ${statusCode}`);
|
|
397
|
+
break;
|
|
398
|
+
case 422:
|
|
399
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, but `
|
|
400
|
+
+ `the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
|
|
401
|
+
break;
|
|
402
|
+
case 429:
|
|
403
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
|
|
404
|
+
+ `requests allowed for a given time window, statusCode: ${statusCode}`);
|
|
405
|
+
break;
|
|
406
|
+
case 500:
|
|
407
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
|
|
408
|
+
+ `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
|
|
409
|
+
break;
|
|
374
410
|
default:
|
|
375
411
|
this.infoLog(
|
|
376
412
|
`${this.device.remoteType}: ${this.accessory.displayName} Unknown statusCode: ` +
|
package/src/irdevice/light.ts
CHANGED
|
@@ -382,6 +382,42 @@ export class Light {
|
|
|
382
382
|
case 200:
|
|
383
383
|
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
|
|
384
384
|
break;
|
|
385
|
+
case 400:
|
|
386
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
|
|
387
|
+
+ `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
|
|
388
|
+
break;
|
|
389
|
+
case 401:
|
|
390
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
|
|
391
|
+
+ `but the request has not been authenticated, statusCode: ${statusCode}`);
|
|
392
|
+
break;
|
|
393
|
+
case 403:
|
|
394
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
|
|
395
|
+
+ `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
|
|
396
|
+
break;
|
|
397
|
+
case 404:
|
|
398
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
|
|
399
|
+
+ `statusCode: ${statusCode}`);
|
|
400
|
+
break;
|
|
401
|
+
case 406:
|
|
402
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
|
|
403
|
+
+ `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
|
|
404
|
+
break;
|
|
405
|
+
case 415:
|
|
406
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
|
|
407
|
+
+ `header that is not supported by the server, statusCode: ${statusCode}`);
|
|
408
|
+
break;
|
|
409
|
+
case 422:
|
|
410
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, but `
|
|
411
|
+
+ `the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
|
|
412
|
+
break;
|
|
413
|
+
case 429:
|
|
414
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
|
|
415
|
+
+ `requests allowed for a given time window, statusCode: ${statusCode}`);
|
|
416
|
+
break;
|
|
417
|
+
case 500:
|
|
418
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
|
|
419
|
+
+ `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
|
|
420
|
+
break;
|
|
385
421
|
default:
|
|
386
422
|
this.infoLog(
|
|
387
423
|
`${this.device.remoteType}: ${this.accessory.displayName} Unknown statusCode: ` +
|
package/src/irdevice/other.ts
CHANGED
|
@@ -727,6 +727,42 @@ export class Others {
|
|
|
727
727
|
case 200:
|
|
728
728
|
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
|
|
729
729
|
break;
|
|
730
|
+
case 400:
|
|
731
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
|
|
732
|
+
+ `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
|
|
733
|
+
break;
|
|
734
|
+
case 401:
|
|
735
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
|
|
736
|
+
+ `but the request has not been authenticated, statusCode: ${statusCode}`);
|
|
737
|
+
break;
|
|
738
|
+
case 403:
|
|
739
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
|
|
740
|
+
+ `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
|
|
741
|
+
break;
|
|
742
|
+
case 404:
|
|
743
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
|
|
744
|
+
+ `statusCode: ${statusCode}`);
|
|
745
|
+
break;
|
|
746
|
+
case 406:
|
|
747
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
|
|
748
|
+
+ `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
|
|
749
|
+
break;
|
|
750
|
+
case 415:
|
|
751
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
|
|
752
|
+
+ `header that is not supported by the server, statusCode: ${statusCode}`);
|
|
753
|
+
break;
|
|
754
|
+
case 422:
|
|
755
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, but `
|
|
756
|
+
+ `the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
|
|
757
|
+
break;
|
|
758
|
+
case 429:
|
|
759
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
|
|
760
|
+
+ `requests allowed for a given time window, statusCode: ${statusCode}`);
|
|
761
|
+
break;
|
|
762
|
+
case 500:
|
|
763
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
|
|
764
|
+
+ `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
|
|
765
|
+
break;
|
|
730
766
|
default:
|
|
731
767
|
this.infoLog(
|
|
732
768
|
`${this.device.remoteType}: ${this.accessory.displayName} Unknown statusCode: ` +
|
package/src/irdevice/tv.ts
CHANGED
|
@@ -506,6 +506,42 @@ export class TV {
|
|
|
506
506
|
case 200:
|
|
507
507
|
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
|
|
508
508
|
break;
|
|
509
|
+
case 400:
|
|
510
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
|
|
511
|
+
+ `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
|
|
512
|
+
break;
|
|
513
|
+
case 401:
|
|
514
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
|
|
515
|
+
+ `but the request has not been authenticated, statusCode: ${statusCode}`);
|
|
516
|
+
break;
|
|
517
|
+
case 403:
|
|
518
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
|
|
519
|
+
+ `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
|
|
520
|
+
break;
|
|
521
|
+
case 404:
|
|
522
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
|
|
523
|
+
+ `statusCode: ${statusCode}`);
|
|
524
|
+
break;
|
|
525
|
+
case 406:
|
|
526
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
|
|
527
|
+
+ `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
|
|
528
|
+
break;
|
|
529
|
+
case 415:
|
|
530
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
|
|
531
|
+
+ `header that is not supported by the server, statusCode: ${statusCode}`);
|
|
532
|
+
break;
|
|
533
|
+
case 422:
|
|
534
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, but `
|
|
535
|
+
+ `the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
|
|
536
|
+
break;
|
|
537
|
+
case 429:
|
|
538
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
|
|
539
|
+
+ `requests allowed for a given time window, statusCode: ${statusCode}`);
|
|
540
|
+
break;
|
|
541
|
+
case 500:
|
|
542
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
|
|
543
|
+
+ `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
|
|
544
|
+
break;
|
|
509
545
|
default:
|
|
510
546
|
this.infoLog(
|
|
511
547
|
`${this.device.remoteType}: ${this.accessory.displayName} Unknown statusCode: ` +
|