homebridge-cmd4 8.0.0-beta.4 → 8.0.0-beta.5

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/Cmd4Accessory.js CHANGED
@@ -843,13 +843,14 @@ class Cmd4Accessory
843
843
  // - CurrentTemperature
844
844
  // - CurrentHeatingCoolingState
845
845
  // - StatusFault
846
- if ( perms.indexOf( this.api.hap.Perms.READ ) >= 0 &&
847
- perms.indexOf( this.api.hap.Perms.WRITE ) == -1 ||
846
+ // Homebridge V2 removes Perms.READ && Perms.WRITE
847
+ if ( //perms.indexOf( this.api.hap.Perms.READ ) >= 0 &&
848
+ //perms.indexOf( this.api.hap.Perms.WRITE ) == -1 ||
848
849
  perms.indexOf( this.api.hap.Perms.PAIRED_READ ) >= 0 &&
849
850
  perms.indexOf( this.api.hap.Perms.PAIRED_WRITE ) == -1 )
850
851
  {
851
- accessory.service.setCharacteristic(
852
- CMD4_ACC_TYPE_ENUM.properties[ accTypeEnumIndex ].characteristic,
852
+ accessory.service.setCharacteristic(
853
+ CMD4_ACC_TYPE_ENUM.properties[ accTypeEnumIndex ].characteristic,
853
854
  this.cmd4Storage.getStoredValueForIndex( accTypeEnumIndex ) );
854
855
  }
855
856
 
@@ -860,7 +861,9 @@ class Cmd4Accessory
860
861
  .characteristic ).listeners( "get" ).length == 0 )
861
862
  {
862
863
  // Add Read services for characterisitcs, if possible
863
- if ( perms.indexOf( this.api.hap.Perms.READ ) != -1 )
864
+ // Homebridge v2 removed Perms.READ
865
+ if ( // perms.indexOf( this.api.hap.Perms.READ ) != -1 ||
866
+ perms.indexOf( this.api.hap.Perms.PAIRED_READ ) != -1 )
864
867
  {
865
868
 
866
869
  // getCachedValue or getValue
@@ -896,7 +899,9 @@ class Cmd4Accessory
896
899
  .characteristic ).listeners( "set" ).length == 0 )
897
900
  {
898
901
  // Add Write services for characterisitcs, if possible
899
- if ( perms.indexOf( this.api.hap.Perms.WRITE ) != -1 )
902
+ // Homebridge V2 removes Perms.WRITE
903
+ if ( // perms.indexOf( this.api.hap.Perms.WRITE ) != -1 ||
904
+ perms.indexOf( this.api.hap.Perms.PAIRED_WRITE ) != -1 )
900
905
  {
901
906
  // setCachedValue or setValue
902
907
  if ( ! accessory.polling ||
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-cmd4",
3
3
  "description": "Exec Plugin for Homebridge supporting all accessorys and characteristics",
4
- "version": "8.0.0-beta.4",
4
+ "version": "8.0.0-beta.5",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "John Talbot"
@@ -19,8 +19,9 @@
19
19
  "dependencies": {
20
20
  "chalk": "^4.1.0",
21
21
  "command-exists": "^1.2.9",
22
- "fakegato-history": ">=0.6.1",
22
+ "fakegato-history": ">=0.6.5",
23
23
  "github-version-checker": ">=2.2.0",
24
+ "homebridge-cmd4": "file:homebridge-cmd4-8.0.0-beta.5.tgz",
24
25
  "latest-version": "^5.1.0",
25
26
  "moment": "*"
26
27
  },
Binary file