homebridge-cmd4 8.0.1 → 8.0.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.
package/CHANGELOG.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
2
- #### 8.0.1 (2024-08-16)
2
+ #### 8.0.2 (2024-10-20)
3
3
 
4
4
  ##### Bug Fixes
5
5
 
6
- * Bug [#147](https://github.com/ztalbot2000/homebridge-cmd4/pull/147) Accesories removed from home app after upgrade to 8.0 ([de25e94f](https://github.com/ztalbot2000/homebridge-cmd4/commit/de25e94fac8cf331142ea4523218db0f8cf447b0))
6
+ * github-version-checker is an unused dependency and is also obsolete, so remove it ([ad220e82](https://github.com/ztalbot2000/homebridge-cmd4/commit/ad220e82b66accf630021dc8c4c136948b720acd))
7
+ * Also for 146, put back reachable as per Wongs fix ([0e131097](https://github.com/ztalbot2000/homebridge-cmd4/commit/0e131097087899cad530c132b699639e384b3ce0))
7
8
 
8
9
 
package/Cmd4Platform.js CHANGED
@@ -120,18 +120,12 @@ class Cmd4Platform
120
120
 
121
121
  this.discoverDevices( this.log );
122
122
 
123
- // @deprecated homebridge v2
124
- // Since we iterate over only the config.json accessories during
125
- // the discovery, any devices read from cache that were not in
126
- // the config.json would never be reallocated or created for the
127
- // first time and thus disappear.
128
- //
129
123
  // Any accessory not reachable must have been removed, find them
130
- //this.toBeRestoredPlatforms.forEach( ( accessory ) =>
131
- //{
132
- // if ( ! accessory.reachable )
133
- // this.removeAccessory( accessory );
134
- //});
124
+ this.toBeRestoredPlatforms.forEach( ( accessory ) =>
125
+ {
126
+ if ( ! accessory.reachable )
127
+ this.removeAccessory( accessory );
128
+ });
135
129
 
136
130
  // Let the Polling Begin
137
131
  this.startPolling();
@@ -478,13 +472,14 @@ class Cmd4Platform
478
472
  // true = from existing.
479
473
  this.createServicesForAccessoriesChildren( accessory, true )
480
474
 
475
+ // Since 'updateReachability()' function and the key 'reachable' are deprecated in
476
+ // Homebridge_v2, We will define the key 'reachable' and set the locally read in copy
477
+ // of the value to 'true' explicitly to flag that this accessory is restored from cache.
478
+ existingAccessory.reachable = true;
481
479
 
482
480
  } else
483
481
  {
484
- //
485
- // the accessory is in the config.json but does not yet exist,
486
- // so we need to create it
487
- //
482
+ // The accessory does not yet exist, so we need to create it.
488
483
  this.log.info('Adding new platformAccessory:', displayName);
489
484
 
490
485
  // Create the new PlatformAccessory
@@ -4,6 +4,7 @@
4
4
 
5
5
 
6
6
  ## ChangeLog
7
+ * <a href="#Whats-new-in-8-0-2">**Whats new in 8.0.2**</a>
7
8
  * <a href="#Whats-new-in-8-0-1">**Whats new in 8.0.1**</a>
8
9
  * <a href="#Whats-new-in-8-0-0">**Whats new in 8.0.0**</a>
9
10
  * <a href="#Whats-new-in-7-1-0">**Whats new in 7.1.0**</a>
@@ -93,6 +94,15 @@
93
94
  * <a href="#Whats-new-in-2-1">**Whats new in 2.1**</a>
94
95
  * <a href="#Whats-new-in-2-0">**Whats new in 2.0**</a>
95
96
 
97
+ <a name="Whats-new-in-8-0-2">## Whats new in 8.0.2</a>
98
+ #### 8.0.2 (2024-10-20)
99
+
100
+ ##### Bug Fixes
101
+
102
+ * github-version-checker is an unused dependency and is also obsolete, so remove it ([ad220e82](https://github.com/ztalbot2000/homebridge-cmd4/commit/ad220e82b66accf630021dc8c4c136948b720acd))
103
+ * Also for 146, put back reachable as per Wongs fix ([0e131097](https://github.com/ztalbot2000/homebridge-cmd4/commit/0e131097087899cad530c132b699639e384b3ce0))
104
+
105
+
96
106
  <a name="Whats-new-in-8-0-1">## Whats new in 8.0.1</a>
97
107
  #### 8.0.1 (2024-08-16)
98
108
 
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.1",
4
+ "version": "8.0.2",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "John Talbot"
@@ -20,7 +20,6 @@
20
20
  "chalk": "^4.1.0",
21
21
  "command-exists": "^1.2.9",
22
22
  "fakegato-history": ">=0.6.5",
23
- "github-version-checker": ">=2.2.0",
24
23
  "latest-version": "^5.1.0",
25
24
  "moment": "*"
26
25
  },
@@ -114,4 +113,4 @@
114
113
  "release:minor": "tools/generateChangeLog --type minor --cleanup",
115
114
  "release:major": "tools/generateChangeLog --type major --cleanup"
116
115
  }
117
- }
116
+ }