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

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/CHANGELOG.md CHANGED
@@ -3,13 +3,16 @@
3
3
 
4
4
  ##### Documentation Changes
5
5
  * Document changes for homebridge v2 where TargetAirQuality and TargetSlatState are deprecated ([80ef143](https://github.com/ztalbot2000/homebridge-cmd4/commit/80ef143fa68ff7abedd6bcf4b715d2dab3ae8451))
6
+ * Update documentation for deprecated characteristics ([15b4821](https://github.com/ztalbot2000/homebridge-cmd4/commit/15b482135fbd97e0d379ea2602fd1566bab8a952))
6
7
 
7
8
  ##### Bug Fixes
8
9
  * fix for homebridge v2 where TargetSlateStte and TargetAirQuality are deprecated ([6acfbb2](https://github.com/ztalbot2000/homebridge-cmd4/commit/6acfbb26bf56a355d76f3f96dafabdfefd26bbb6))
9
10
  * Fix for homebridge v2 Formats&Perms&Units only available directly from HAP ([2a9d6e9](https://github.com/ztalbot2000/homebridge-cmd4/commit/2a9d6e976647f1fa7e1a3ee34e5080a3c28eae73))
10
11
  * Fix lint error ([286dc68](https://github.com/ztalbot2000/homebridge-cmd4/commit/286dc68441c776a93f0f0d913db326fa9ccafeec))
11
-
12
12
  * Fix for homebridge v2 Formats&Perms&Units only available directly from HAP ([999f226](https://github.com/ztalbot2000/homebridge-cmd4/commit/999f226855de026b3bb0e9ecdd237fc7d0976f22))
13
+ * Fix add beta tag ([9b36408](https://github.com/ztalbot2000/homebridge-cmd4/commit/9b364087ec489c5dfda503ceaf1429b626a929c0))
14
+ * Fix for homebridge v2 where some device types are deprecated ([e483326](https://github.com/ztalbot2000/homebridge-cmd4/commit/e483326d93d447f81be5978f337ce80834798145))
15
+ * stop committing npm package ([630f4fb](https://github.com/ztalbot2000/homebridge-cmd4/commit/630f4fb6f6cbd876b3fe21ee4689eb40a6adeacc))
13
16
 
14
17
 
15
18
  ##### New Features
package/Cmd4Accessory.js CHANGED
@@ -1267,6 +1267,12 @@ class Cmd4Accessory
1267
1267
  let characteristicString = rcDirective.type;
1268
1268
  let accTypeEnumIndex = rcDirective.accTypeEnumIndex;
1269
1269
 
1270
+ if ( CMD4_ACC_TYPE_ENUM.properties[ accTypeEnumIndex ].deprecated == true )
1271
+ {
1272
+ this.log.warn( `The config.json characteristic: ${ characteristicString } is deprecated. It will be ignored.\nTo remove this Warning, Please fix your config.json.` );
1273
+ return;
1274
+ }
1275
+
1270
1276
  // Do not update the stored values as it is being restored from cache
1271
1277
  if ( parseConfigShouldUseCharacteristicValues == false )
1272
1278
  return;
@@ -1478,6 +1484,9 @@ class Cmd4Accessory
1478
1484
  }
1479
1485
  this.typeIndex = rcValue.devEnumIndex;
1480
1486
 
1487
+ if ( CMD4_DEVICE_TYPE_ENUM.properties[ this.typeIndex ].deprecated == true )
1488
+ throw new Error( `Error: device type: "${ this.type }" is now deprecated in Homebridge.` );
1489
+
1481
1490
  break;
1482
1491
  }
1483
1492
  case constants.SUBTYPE:
package/Extras/a.out ADDED
Binary file
@@ -400,8 +400,8 @@
400
400
  "stateChangeResponseTime": 3
401
401
  },
402
402
  {
403
- "type": "BatteryService",
404
- "displayName": "MyBatteryService",
403
+ "type": "Battery",
404
+ "displayName": "MyBattery",
405
405
  "batteryLevel": 50,
406
406
  "chargingState": "NOT_CHARGING",
407
407
  "statusLowBattery": "BATTERY_LEVEL_NORMAL",
@@ -670,24 +670,12 @@
670
670
  "stateChangeResponseTime": 3
671
671
  },
672
672
  {
673
- "type": "Relay",
674
- "displayName": "MyRelay",
673
+ "type": "CloudRelay",
674
+ "displayName": "MyCloudRelay",
675
675
  "relayEnabled": "FALSE",
676
676
  "relayState": 0,
677
677
  "stateChangeResponseTime": 10
678
678
  },
679
- {
680
- "type": "TimeInformation",
681
- "displayName": "MyTimeInformation",
682
- "currentTime": "11:15",
683
- "dayoftheWeek": 1,
684
- "timeUpdate": "TRUE",
685
- "name": "MyTimeInformation",
686
- "manufacturer": "Somebody",
687
- "model": "Anything",
688
- "serialNumber": "12345",
689
- "stateChangeResponseTime": 3
690
- },
691
679
  {
692
680
  "type": "Valve",
693
681
  "displayName": "MyValve",
@@ -1110,8 +1110,8 @@
1110
1110
  //"state_cmd": "node .homebridge/< yourScriptHere >"
1111
1111
  },
1112
1112
  {
1113
- "type": "BatteryService",
1114
- "displayName": "MyBatteryService", // Not a characteristic, but a function parameter
1113
+ "type": "Battery", // Was BatteryService
1114
+ "displayName": "MyBattery", // Not a characteristic, but a function parameter
1115
1115
 
1116
1116
  // Required Characteristics
1117
1117
  "batteryLevel": 50, // Range: 0 - 100, Step 1
@@ -1854,8 +1854,8 @@
1854
1854
  //"state_cmd": "node .homebridge/< yourScriptHere >"
1855
1855
  },
1856
1856
  {
1857
- "type": "Relay",
1858
- "displayName": "MyRelay", // Not a characteristic, but a function parameter
1857
+ "type": "CloudRelay", // Was Relay
1858
+ "displayName": "MyCloudRelay", // Not a characteristic, but a function parameter
1859
1859
 
1860
1860
  // Required characteristics
1861
1861
  "relayEnabled": "FALSE",
@@ -1879,31 +1879,6 @@
1879
1879
  "stateChangeResponseTime": 10 // Default (Seconds)
1880
1880
  //"state_cmd": "node .homebridge/< yourScriptHere >"
1881
1881
  },
1882
- {
1883
- "type": "TimeInformation",
1884
- "displayName": "MyTimeInformation", // Not a characteristic, but a function parameter
1885
-
1886
- // Required characteristics
1887
- "currentTime": "11:15", // Format: string
1888
-
1889
- "dayoftheWeek": 1, // Range: 1-7
1890
-
1891
- "timeUpdate": "TRUE", // 0 - "FALSE"
1892
- // 1 - "TRUE"
1893
-
1894
- // Optional Characteristics
1895
- "name": "MyTimeInformation",
1896
-
1897
- "manufacturer": "Somebody", // Available for all accessories
1898
-
1899
- "model": "Anything", // Available for all accessories
1900
-
1901
- "serialNumber": "12345", // Available for all accessories
1902
-
1903
- // Cmd4 Specific
1904
- "stateChangeResponseTime": 3 // Default (Seconds)
1905
- //"state_cmd": "node .homebridge/< yourScriptHere >"
1906
- },
1907
1882
  {
1908
1883
  "type": "Valve",
1909
1884
  "displayName": "MyValve", // Not a characteristic, but a function parameter
@@ -101,9 +101,12 @@
101
101
 
102
102
  ##### Bug Fixes
103
103
  * fix for homebridge v2 where TargetSlateStte and TargetAirQuality are deprecated ([6acfbb2](https://github.com/ztalbot2000/homebridge-cmd4/commit/6acfbb26bf56a355d76f3f96dafabdfefd26bbb6))
104
- * Fix for homebridge 2 Formats&Perms&Units only available directly from HAP ([2a9d6e9](https://github.com/ztalbot2000/homebridge-cmd4/commit/2a9d6e976647f1fa7e1a3ee34e5080a3c28eae73))
105
-
104
+ * Fix for homebridge v2 Formats&Perms&Units only available directly from HAP ([2a9d6e9](https://github.com/ztalbot2000/homebridge-cmd4/commit/2a9d6e976647f1fa7e1a3ee34e5080a3c28eae73))
106
105
  * Fix lint error ([286dc68](https://github.com/ztalbot2000/homebridge-cmd4/commit/286dc68441c776a93f0f0d913db326fa9ccafeec))
106
+ * Fix add beta tag ([9b36408](https://github.com/ztalbot2000/homebridge-cmd4/commit/9b364087ec489c5dfda503ceaf1429b626a929c0))
107
+ * Fix for homebridge v2 where some device types are deprecated ([e483326](https://github.com/ztalbot2000/homebridge-cmd4/commit/e483326d93d447f81be5978f337ce80834798145))
108
+ * stop committing npm package ([630f4fb](https://github.com/ztalbot2000/homebridge-cmd4/commit/630f4fb6f6cbd876b3fe21ee4689eb40a6adeacc))
109
+
107
110
 
108
111
 
109
112
  ##### New Features
Binary file