homebridge-cmd4 7.0.1 → 7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,53 +1,8 @@
1
1
  # Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
2
- #### 7.0.1 (2023-06-11)
3
-
4
- * The reason for the major version numbering update was to for deprecation warnings to throw an error.
5
- These warnings were there for many major versions and are finally removed.
6
-
7
- "queueInterval" - Never put into production and will now throw an error.
8
- "queueMsg" - Never put into production and will now throw an error.
9
- "queueStatMsgInterval" - Never put into production and will now throw an error.
10
- "cmd4_Mode" - Obsolete for many versions and will now throw an error.
11
- "storage" - Obsolete outside of fakegato definition.
12
- "storagePath" - Obsolete outside of fakegato definition.
13
- "folder" - Obsolete outside of fakegato definition.
14
- "keyPath" - Obsolete outside of fakegato definition.
15
- "queueTypes" - Obsolete inside accessory definition.
16
-
17
-
18
- ##### Chores
19
-
20
- * Correct version to 7.0.1 ([62504e68](https://github.com/ztalbot2000/homebridge-cmd4/commit/62504e689a9483a9512a414d994514b04cbadcd5))
21
-
22
- ##### New Features
23
-
24
- * add retries. Also formatting issues ([b8ddf9ce](https://github.com/ztalbot2000/homebridge-cmd4/commit/b8ddf9ceda8ace3a6e820bfad0c4a03c656cf419))
25
-
26
- ##### Documentation Changes
27
-
28
- Beta2
29
- * Update documentation for v7.0.0 ([12b6482a](https://github.com/ztalbot2000/homebridge-cmd4/commit/12b6482ac8e6d431e011f6f92c2d6f03a2ebe2ed))
2
+ #### 7.0.3 (2024-01-27)
30
3
 
31
4
  ##### Bug Fixes
32
5
 
33
- * bug[#139](https://github.com/ztalbot2000/homebridge-cmd4/pull/139), add in link checkers to documentation ([f4a1ae79](https://github.com/ztalbot2000/homebridge-cmd4/commit/f4a1ae79fd8da2e0dc80181ab98dbc4817da6e78))
34
-
35
- Beta2
36
- * remove unwanted debug message and test so that it cannot reoccur ([97b6b318](https://github.com/ztalbot2000/homebridge-cmd4/commit/97b6b31861ab34d04b798ec409b1f2e8c56244c2))
37
- * Homebridge does not like underscores of accessory names. Remove from default config.json ([15f2170b](https://github.com/ztalbot2000/homebridge-cmd4/commit/15f2170be492b6dfb56e4eed5d76da0cd4d74419))
38
-
39
- Beta1
40
- * retry logging starts from zero, but for user count starts from 1 ([38cdf417](https://github.com/ztalbot2000/homebridge-cmd4/commit/38cdf417feebeef2b75dcfec247e6bdfd4739604))
41
- * By nature retryCount should start from zero ([b8e82ffe](https://github.com/ztalbot2000/homebridge-cmd4/commit/b8e82ffe262c092a301636993544be828a7a34a4))
42
- * log message in wrong quotes ([6fc555b0](https://github.com/ztalbot2000/homebridge-cmd4/commit/6fc555b0d7bdc20bfc3a38310e3d4f66b968d55d))
43
- * retries for WoRm should be zero. Can be overriden ([11351633](https://github.com/ztalbot2000/homebridge-cmd4/commit/1135163319c8d16e3886dbf0a0443ba5ed6c4b99))
44
- * Accessory needs to go unresponsive via updateValue with error object ([cdfee1b2](https://github.com/ztalbot2000/homebridge-cmd4/commit/cdfee1b22ea21dc56edc320768ec6ebea1156cb8))
45
-
46
- ##### Tests
47
-
48
- * put back skipped tests ([0b0781fa](https://github.com/ztalbot2000/homebridge-cmd4/commit/0b0781faec7f94e43d67068e15e9505cc7c96414))
49
- * Remove excess debug messages for commit with verify to work ([ea108470](https://github.com/ztalbot2000/homebridge-cmd4/commit/ea108470631f4abe3377f6d582c962dab141be0f))
50
- * Don't know why HomeKit does not cause Cmd4 to generate a log that it is trying to reconnect after unavailable ([d45d7c09](https://github.com/ztalbot2000/homebridge-cmd4/commit/d45d7c095d0989c05b88c161a418402711e26677))
51
- * Add unit testing to prove fix of bug[#130](https://github.com/ztalbot2000/homebridge-cmd4/pull/130) ([e9a902fc](https://github.com/ztalbot2000/homebridge-cmd4/commit/e9a902fcb01fb2ee7c7cb9f2b60e036d0fd5c0d6))
6
+ * props is already an object. Also test setProps is called for more than one characteristic. Affects only those who change a characteristics property range ([276d0c0d](https://github.com/ztalbot2000/homebridge-cmd4/commit/276d0c0d58b435c59fb3c1fdfd322f55f6b24434))
52
7
 
53
8
 
package/Cmd4Accessory.js CHANGED
@@ -811,17 +811,13 @@ class Cmd4Accessory
811
811
  let props = accessory.configHasCharacteristicProps( accTypeEnumIndex );
812
812
  if ( props )
813
813
  {
814
- //if ( settings.cmd4Dbg ) accessory.log.debug( "Overriding characteristic %s props for: %s ", CMD4_ACC_TYPE_ENUM.properties[ accTypeEnumIndex ].type, this.displayName );
815
- if ( settings.cmd4Dbg ) accessory.log.debug( "Overriding characteristic %s props for: %s ", uCCharacteristicString, this.displayName );
814
+ if ( settings.cmd4Dbg ) accessory.log.debug( "Overriding characteristic %s props for: %s ", CMD4_ACC_TYPE_ENUM.properties[ accTypeEnumIndex ].type, this.displayName );
816
815
  accessory.service.getCharacteristic( CMD4_ACC_TYPE_ENUM.properties[ accTypeEnumIndex ].
817
816
  characteristic )
818
817
  .setProps(
819
- {
820
- // minValue: 18,
821
- // maxValue: 30,
822
- // minStep: 1
823
- props
824
- });
818
+ // props is an object of name value pairs (characteristics)
819
+ props
820
+ );
825
821
  }
826
822
 
827
823
  // Get the permissions of characteristic ( Read/Write ... )
@@ -426,7 +426,14 @@ class Cmd4PriorityPollingQueue
426
426
  let self = accessory;
427
427
  let queue = accessory.queue;
428
428
 
429
- let cmd = self.state_cmd_prefix + self.state_cmd + " Get '" + self.displayName + "' '" + characteristicString + "'" + self.state_cmd_suffix;
429
+ let cmd = self.state_cmd_prefix + self.state_cmd + " Get '" + self.displayName + "' '" + characteristicString + "'" + self.state_cmd_suffix;
430
+
431
+ // My AdvAir friends want to allow single quotes in accessory names, which
432
+ // may have consequences with globbing for others.
433
+ if ( self.state_cmd.match( /AdvAir.sh/ ) )
434
+ {
435
+ cmd = self.state_cmd_prefix + self.state_cmd + ' Get "' + self.displayName + '" ' + "'" + characteristicString + "'" + self.state_cmd_suffix;
436
+ }
430
437
 
431
438
  if ( settings.cmd4Dbg ) self.log.debug( `getValue: accTypeEnumIndex:( ${ accTypeEnumIndex } )-"${ characteristicString }" function for: ${ self.displayName } cmd: ${ cmd } timeout: ${ timeout }` );
432
439
 
@@ -608,7 +615,14 @@ class Cmd4PriorityPollingQueue
608
615
  value = transposeBoolToValue( value );
609
616
  }
610
617
 
611
- let cmd = accessory.state_cmd_prefix + accessory.state_cmd + " Set '" + accessory.displayName + "' '" + characteristicString + "' '" + value + "'" + accessory.state_cmd_suffix;
618
+ let cmd = accessory.state_cmd_prefix + accessory.state_cmd + " Set '" + accessory.displayName + "' '" + characteristicString + "' '" + value + "'" + accessory.state_cmd_suffix;
619
+
620
+ // My AdvAir friends want to allow single quotes in accessory names, which
621
+ // may have consequences with globbing for others.
622
+ if ( accessory.state_cmd.match( /AdvAir.sh/ ) )
623
+ {
624
+ cmd = accessory.state_cmd_prefix + accessory.state_cmd + ' Set "' + accessory.displayName + '" ' + "'" + characteristicString + "' '" + value + "'" + accessory.state_cmd_suffix;
625
+ }
612
626
 
613
627
  if ( accessory.hV.statusMsg == "TRUE" )
614
628
  self.log.info( chalk.blue( `Setting ${ self.displayName } ${ characteristicString }` ) + ` ${ value }` );
@@ -4,6 +4,8 @@
4
4
 
5
5
 
6
6
  ## ChangeLog
7
+ * <a href="#Whats-new-in-7-0-3">**Whats new in 7.0.3**</a>
8
+ * <a href="#Whats-new-in-7-0-2">**Whats new in 7.0.2**</a>
7
9
  <a name="Whats-new-in-7-0-1">## Whats new in 7.0.0</a>
8
10
  #### 7.0.0 (2023-06-11)
9
11
  * <a href="#Whats-new-in-7.0.0">**Whats new in 7.0.0**</a>
@@ -88,6 +90,22 @@
88
90
  * <a href="#Whats-new-in-2-1">**Whats new in 2.1**</a>
89
91
  * <a href="#Whats-new-in-2-0">**Whats new in 2.0**</a>
90
92
 
93
+ <a name="Whats-new-in-7-0-3">## Whats new in 7.0.3</a>
94
+ #### 7.0.3 (2024-01-27)
95
+
96
+ ##### Bug Fixes
97
+
98
+ * props is already an object. Also test setProps is called for more than one characteristic. Affects only those who change a characteristics property range ([276d0c0d](https://github.com/ztalbot2000/homebridge-cmd4/commit/276d0c0d58b435c59fb3c1fdfd322f55f6b24434))
99
+
100
+
101
+ <a name="Whats-new-in-7-1-0">## Whats new in 7.0.2</a>
102
+ ### 7.0.2 (2023-12-24)
103
+
104
+ ##### Change affectng AdvAir by their request
105
+
106
+ * For AdvAir.sh put accessory name in double quotes so it can contain a single quote ([023e91c0](https://github.com/ztalbot2000/homebridge-cmd4/commit/023e91c0bf1794a64bf0e18dec7d31b178ecb6d1))
107
+
108
+
91
109
  ## ChangeLog
92
110
  * <a href="#Whats-new-in-7-0-1">**Whats new in 7.0.1**</a>
93
111
 
@@ -382,6 +382,43 @@ Example 2:
382
382
  ### Step 4. Sending constants to your script.
383
383
  &nbsp;&nbsp;&nbsp; By placing in your config.json file the tag "outputConstants": true, instead of values, your script will receive constants instead of values (Where Applicable). Homebridge-Cmd4 will except constants or values as input. See the config.min.json file for the defined constants.
384
384
 
385
+ ### Step 5. Changing characteristic properties.
386
+ &nbsp;&nbsp;&nbsp; Cmd4 will allow you to change a characteristics property range, However the HomeKit GUI will most likely ignore it. The change is for those who create their own GUI's. For Example:
387
+ ```json
388
+ "platforms": [
389
+ {
390
+ "platform": "Cmd4",
391
+ "debug": false,
392
+ "outputConstants": false,
393
+ "timeout": 4000,
394
+ "stateChangeResponseTime": 3,
395
+ "accessories": [
396
+ {
397
+ "type": "Thermostat",
398
+ "displayName": "MyThermostat",
399
+ "name": "MyThermostat",
400
+ "currentTemperature": 25,
401
+ "targetTemperature": 25,
402
+ "props": {
403
+ "currentTemperature": {
404
+ "maxValue": 32,
405
+ "minValue": 16,
406
+ "minStep": 1
407
+ },
408
+ "targetTemperature": {
409
+ "maxValue": 32,
410
+ "minValue": 16,
411
+ "minStep": 1
412
+ }
413
+ }
414
+ }
415
+ ]
416
+ }
417
+ ]
418
+ }
419
+ ```
420
+
421
+
385
422
  ***Important***
386
423
  &nbsp;&nbsp;&nbsp; Homebridge-cmd4 just outputs the value to be set. For whatever reason the lower layers of homebridge set on/off to be "true" and "false" instead of 0 & 1, which is incorrect, but changing it would break others scripts.
387
424
  &nbsp;&nbsp;&nbsp; Homebridge-cmd4 has always recognized either 0/1 or true/false when receiving the devices value.
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": "7.0.1",
4
+ "version": "7.0.3",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "John Talbot"
@@ -114,4 +114,4 @@
114
114
  "release:minor": "tools/generateChangeLog --type minor --cleanup",
115
115
  "release:major": "tools/generateChangeLog --type major --cleanup"
116
116
  }
117
- }
117
+ }