homebridge-cmd4 7.0.0 → 7.0.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/CHANGELOG.md +17 -1
- package/Cmd4PriorityPollingQueue.js +21 -16
- package/Extras/config.json +110 -110
- package/Extras/config.min.json +111 -111
- package/RUNNING_CHANGELOG.md +27 -2
- package/docs/Developers.md +21 -23
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
2
|
-
#### 7.0.
|
|
2
|
+
#### 7.0.1 (2023-06-11)
|
|
3
3
|
|
|
4
4
|
* The reason for the major version numbering update was to for deprecation warnings to throw an error.
|
|
5
5
|
These warnings were there for many major versions and are finally removed.
|
|
@@ -15,12 +15,28 @@
|
|
|
15
15
|
"queueTypes" - Obsolete inside accessory definition.
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
##### Chores
|
|
19
|
+
|
|
20
|
+
* Correct version to 7.0.1 ([62504e68](https://github.com/ztalbot2000/homebridge-cmd4/commit/62504e689a9483a9512a414d994514b04cbadcd5))
|
|
21
|
+
|
|
18
22
|
##### New Features
|
|
19
23
|
|
|
20
24
|
* add retries. Also formatting issues ([b8ddf9ce](https://github.com/ztalbot2000/homebridge-cmd4/commit/b8ddf9ceda8ace3a6e820bfad0c4a03c656cf419))
|
|
21
25
|
|
|
26
|
+
##### Documentation Changes
|
|
27
|
+
|
|
28
|
+
Beta2
|
|
29
|
+
* Update documentation for v7.0.0 ([12b6482a](https://github.com/ztalbot2000/homebridge-cmd4/commit/12b6482ac8e6d431e011f6f92c2d6f03a2ebe2ed))
|
|
30
|
+
|
|
22
31
|
##### Bug Fixes
|
|
23
32
|
|
|
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
|
|
24
40
|
* retry logging starts from zero, but for user count starts from 1 ([38cdf417](https://github.com/ztalbot2000/homebridge-cmd4/commit/38cdf417feebeef2b75dcfec247e6bdfd4739604))
|
|
25
41
|
* By nature retryCount should start from zero ([b8e82ffe](https://github.com/ztalbot2000/homebridge-cmd4/commit/b8e82ffe262c092a301636993544be828a7a34a4))
|
|
26
42
|
* log message in wrong quotes ([6fc555b0](https://github.com/ztalbot2000/homebridge-cmd4/commit/6fc555b0d7bdc20bfc3a38310e3d4f66b968d55d))
|
|
@@ -208,23 +208,23 @@ class Cmd4PriorityPollingQueue
|
|
|
208
208
|
// Since the "Set" passed, do the stateChangeResponseTime
|
|
209
209
|
setTimeout( ( ) =>
|
|
210
210
|
{
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
// A set with no error means the queue is sane to do reading
|
|
212
|
+
queue.lastGoodTransactionTime = Date.now( );
|
|
213
|
+
queue.errorCountSinceLastGoodTransaction = 0;
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
// After the stateChangeResponseTime, do the related characteristic ( if any )
|
|
216
|
+
let relatedCurrentAccTypeEnumIndex = entry.accessory.getDevicesRelatedCurrentAccTypeEnumIndex( entry.accTypeEnumIndex );
|
|
217
217
|
|
|
218
218
|
if ( relatedCurrentAccTypeEnumIndex != null )
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
219
|
+
{
|
|
220
|
+
let relatedCurrentCharacteristicString = CMD4_ACC_TYPE_ENUM.properties[ relatedCurrentAccTypeEnumIndex ].type;
|
|
221
|
+
// Change the entry to a get and set queueGetIsUpdate to true
|
|
222
|
+
// Use unshift to make it next in line
|
|
223
|
+
entry.isSet = false;
|
|
224
|
+
entry.accTypeEnumIndex = relatedCurrentAccTypeEnumIndex;
|
|
225
|
+
entry.characteristicString = relatedCurrentCharacteristicString;
|
|
226
|
+
entry.queueGetIsUpdate = true;
|
|
227
|
+
queue.highPriorityQueue.unshift( entry );
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
// The "Set" is now complete after its stateChangeResponseTime.
|
|
@@ -232,7 +232,7 @@ class Cmd4PriorityPollingQueue
|
|
|
232
232
|
|
|
233
233
|
setTimeout( ( ) => { queue.processQueueFunc( HIGH_PRIORITY_GET, queue ); }, 0 );
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
return;
|
|
236
236
|
|
|
237
237
|
}, entry.stateChangeResponseTime );
|
|
238
238
|
|
|
@@ -374,8 +374,9 @@ class Cmd4PriorityPollingQueue
|
|
|
374
374
|
// Save the new value
|
|
375
375
|
entry.accessory.cmd4Storage.setStoredValueForIndex( entry.accTypeEnumIndex, properValue );
|
|
376
376
|
|
|
377
|
+
if ( settings.cmd4Dbg ) entry.accessory.log.debug( `processEntryFromLowPriorityQueue calling updateValue properValue: ${ properValue }`);
|
|
378
|
+
|
|
377
379
|
// Update the new value in homebridge
|
|
378
|
-
entry.accessory.log.warn( `processEntryFromLowPriorityQueue calling updateValue properValue: ${ properValue }`);
|
|
379
380
|
entry.accessory.service.getCharacteristic( CMD4_ACC_TYPE_ENUM.properties[ entry.accTypeEnumIndex ].characteristic ).updateValue( properValue );
|
|
380
381
|
|
|
381
382
|
// A good anything, updates the lastGoodTransactionTime
|
|
@@ -832,10 +833,14 @@ class Cmd4PriorityPollingQueue
|
|
|
832
833
|
let nextEntry = queue.highPriorityQueue[ 0 ];
|
|
833
834
|
|
|
834
835
|
if ( nextEntry.isSet == true )
|
|
836
|
+
{
|
|
835
837
|
|
|
836
838
|
queue.processHighPrioritySetQueue( queue.highPriorityQueue.shift( ) );
|
|
839
|
+
}
|
|
837
840
|
else
|
|
841
|
+
{
|
|
838
842
|
queue.processHighPriorityGetQueue( queue.highPriorityQueue.shift( ) );
|
|
843
|
+
}
|
|
839
844
|
}
|
|
840
845
|
}
|
|
841
846
|
|