homebridge-cmd4 6.0.4 → 6.1.0
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 +4 -73
- package/Cmd4Accessory.js +2 -2
- package/Cmd4PriorityPollingQueue.js +18 -7
- package/RUNNING_CHANGELOG.md +14 -0
- package/cmd4Constants.js +1 -0
- package/lib/CMD4_ACC_TYPE_ENUM.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,82 +1,13 @@
|
|
|
1
1
|
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
##### Bug Fixes
|
|
5
|
-
|
|
6
|
-
* Constants were not getting passed down to linked types ([b7252bf9](https://github.com/ztalbot2000/homebridge-cmd4/commit/b7252bf934e26535047008f343f4d6b627dd6ddb))
|
|
7
|
-
|
|
8
|
-
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
9
|
-
### 6.0.3 (2021-11-11)
|
|
10
|
-
|
|
11
|
-
##### Bug Fix
|
|
12
|
-
|
|
13
|
-
* Schema Prep for Homebridge-UI integration ([2c5df2c1](https://github.com/ztalbot2000/homebridge-cmd4/commit/2c5df2c1279ebe88fdaedbaa22ae0124e2841b6d))
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
17
|
-
### 6.0.2 (2021-11-10)
|
|
18
|
-
|
|
19
|
-
##### Bug Fix
|
|
20
|
-
|
|
21
|
-
* Schema Prep - For Homebridge-ui schema must have defined keys ([3053780b](https://github.com/ztalbot2000/homebridge-cmd4/commit/3053780b40eb3d4505dc407411257109977688a1))
|
|
22
|
-
|
|
23
|
-
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
24
|
-
#### 6.0.1 (2021-11-07)
|
|
25
|
-
|
|
26
|
-
##### Bug Fixes
|
|
27
|
-
|
|
28
|
-
* For bug[#116](https://github.com/ztalbot2000/homebridge-cmd4/pull/116) remove stateCmd validation and for AirCon add global const parsing ([e7bc4963](https://github.com/ztalbot2000/homebridge-cmd4/commit/e7bc49630c47d16d296ff9751df7c7666cf2ecd3))
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
32
|
-
## 6.0.0 (2021-10-01)
|
|
2
|
+
### 6.1.0 (2022-01-30)
|
|
33
3
|
|
|
34
4
|
##### New Features
|
|
35
5
|
|
|
36
|
-
|
|
37
|
-
- To this end; Cmd4 Version 6 will be the version that prepares you for the change by *Warning* you that your config.json needs to be corrected. The duration of this preparatory stage will be pretty generous as I am still working on the config-schema.json integration with Homebridge-ui. I had to stop when it became evident what changes were required for Homebridge-ui integration.
|
|
38
|
-
|
|
39
|
-
Here are the rules / changes:
|
|
40
|
-
1. No script changes are required. Cmd4 still sends: Get/Set <DeviceName> <Upper Case Characteristic Type > < value >
|
|
41
|
-
2. Constants are still fully capitalized. i.e. "statusFault": "NO_FAULT" or "category": "TELEVISION"
|
|
42
|
-
3. As before Device Types start with an upper case. i.e. "type": "Television"
|
|
43
|
-
4. Cmd4 directives and characteristics start with lower case: i.e. "polling": [ { "characteristic": "volume", "interval": 10 }]
|
|
44
|
-
5. For advanced devices like the AirCon, Queue types remain the same:
|
|
45
|
-
i.e. queueTypes: [ { "queueName": "MyQueue", "queueType": "WoRm" }]
|
|
46
|
-
|
|
47
|
-
Finally
|
|
48
|
-
I tried to make the warnings very explict for what the correction should be and believe me; I am more sorry to have
|
|
49
|
-
to do this than you may think.
|
|
50
|
-
|
|
51
|
-
Thank you,
|
|
52
|
-
John Talbot
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
* Schema Prep - Found in Beta Check case of type ([9a394de0](https://github.com/ztalbot2000/homebridge-cmd4/commit/9a394de020b2ccf67a9c30194163807ea3a226a9))
|
|
56
|
-
* Schema Prep - More documentation changes ([c6d68f1f](https://github.com/ztalbot2000/homebridge-cmd4/commit/c6d68f1f8a7c24e786a54dbf1660dba98a5d1b6a))
|
|
57
|
-
* Schema Prep - Documentation changes for feat ([5be7393d](https://github.com/ztalbot2000/homebridge-cmd4/commit/5be7393d4b722c602862a382b1bd710556ff196a))
|
|
58
|
-
* Schema Prep. More fakegato testing, Make cmd4Dbg not be file global scope ([50355797](https://github.com/ztalbot2000/homebridge-cmd4/commit/503557973758fd4103ab13f34680a4f08eaed3c2))
|
|
59
|
-
* Schema Prep - for fakegato and others, correct key/value pair the first time it is found ([335ca7e5](https://github.com/ztalbot2000/homebridge-cmd4/commit/335ca7e50958a089c21bfac61ee1982756b7965b))
|
|
60
|
-
* Schema Prep - Make sure fakegato characteristics are correct ([a8274c7a](https://github.com/ztalbot2000/homebridge-cmd4/commit/a8274c7adb9ffdc2c34d048057f8334d6da9ef8a))
|
|
61
|
-
* Schema Prep - Should save by index, like others ([20872e2b](https://github.com/ztalbot2000/homebridge-cmd4/commit/20872e2b0f8a5c52131bb9247ba6e6ae11b20fb4))
|
|
62
|
-
* Schema-Prep This works with all lower case, still sends Get/Set upper case ([d3764584](https://github.com/ztalbot2000/homebridge-cmd4/commit/d3764584f5e0faf369490ad85ed16ba3f19e41c8))
|
|
63
|
-
* Schema Prep - constants are now lower case and the input is lowered instead ([03b232a1](https://github.com/ztalbot2000/homebridge-cmd4/commit/03b232a152a622025ccfe7c6dc32ab3fa59d6df2))
|
|
64
|
-
* New tset tool to check where constant is defined ([4fc3668a](https://github.com/ztalbot2000/homebridge-cmd4/commit/4fc3668ad0e1fe51dde4a32ef83f3c78584f4e91))
|
|
65
|
-
* Schema Prep - Change variables to lower case, still check for Upper case ([2b8f4bf7](https://github.com/ztalbot2000/homebridge-cmd4/commit/2b8f4bf768d1c7aebb3c45f6b019de8201c1656e))
|
|
66
|
-
* Schema prep- Change constants to an object ([f0dd0de9](https://github.com/ztalbot2000/homebridge-cmd4/commit/f0dd0de923c12fe6dd52cf5469ff87b2d762ee37))
|
|
67
|
-
* Continue Schema Prep. Cmd4Storage is now referenced accordingly ([79d85b01](https://github.com/ztalbot2000/homebridge-cmd4/commit/79d85b01bac8d1d3a79a407bcbec0163f19f4e4d))
|
|
68
|
-
* Schema Prep. FakeGato simplification ([fd26104b](https://github.com/ztalbot2000/homebridge-cmd4/commit/fd26104b0d9c35a53209e91b3efb9ccf820c0333))
|
|
69
|
-
* Prep for Schema. Stored data now version controlled and assoc array class ([59d7a229](https://github.com/ztalbot2000/homebridge-cmd4/commit/59d7a22903fbb95b4e1b55a7fca4629960c89bfe))
|
|
70
|
-
* Prep for schema. Warn keys must be lower case ([fe3c155c](https://github.com/ztalbot2000/homebridge-cmd4/commit/fe3c155c5b00574ca3b03baf6d3a32f942756988))
|
|
71
|
-
* "Prep for Schema. Unclutter namespace" ([12a63fb5](https://github.com/ztalbot2000/homebridge-cmd4/commit/12a63fb5339f346b31702bc2f52aa60f299c0de4))
|
|
6
|
+
* See if WoRm2 Queue can resolve large scale AirCon accessories ([61b164ae](https://github.com/ztalbot2000/homebridge-cmd4/commit/61b164ae11ffb4731da0ac60bba51d7fbeefff94))
|
|
72
7
|
|
|
73
8
|
##### Bug Fixes
|
|
74
9
|
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* The warning should read Capitalized, not Upper case ([9b7f7957](https://github.com/ztalbot2000/homebridge-cmd4/commit/9b7f7957613c2c36cb61c86d1f66b3bfa34d49fc))
|
|
78
|
-
* Found in demo mode, polling for default characteristics was attempted ([01960b73](https://github.com/ztalbot2000/homebridge-cmd4/commit/01960b73c696d788ea06469c5749da2272662e55))
|
|
79
|
-
* For Demo mode, Target states must be defined so warning is not shown ([a1e00e3f](https://github.com/ztalbot2000/homebridge-cmd4/commit/a1e00e3f84e80300c190b50473ee44026bfe42bc))
|
|
80
|
-
* Testing Prep Schema fix. Added unit test so will not happen again ([85ab69f7](https://github.com/ztalbot2000/homebridge-cmd4/commit/85ab69f7c366d2ab37ffe76c9eda7ba0d480e3d1))
|
|
10
|
+
* bug [#124](https://github.com/ztalbot2000/homebridge-cmd4/pull/124), Eve graph not being displayed ([929da3e3](https://github.com/ztalbot2000/homebridge-cmd4/commit/929da3e39548df645d316365ab1273d6b5ed250d))
|
|
11
|
+
* PROGRAM_SCHEDULED_MANUAL_MODE_ constant remove trailing underscore ([52e1fd3f](https://github.com/ztalbot2000/homebridge-cmd4/commit/52e1fd3f100e18588a171c96b8ef9f511180c1bd))
|
|
81
12
|
|
|
82
13
|
|
package/Cmd4Accessory.js
CHANGED
|
@@ -1206,7 +1206,7 @@ class Cmd4Accessory
|
|
|
1206
1206
|
this.loggingService = new FakeGatoHistoryService
|
|
1207
1207
|
(
|
|
1208
1208
|
this.eve,
|
|
1209
|
-
this,
|
|
1209
|
+
this.platform,
|
|
1210
1210
|
{ [ constants.STORAGE ] : constants.FS,
|
|
1211
1211
|
[ constants.PATH ] : this.storagePath
|
|
1212
1212
|
}
|
|
@@ -1218,7 +1218,7 @@ class Cmd4Accessory
|
|
|
1218
1218
|
this.loggingService = new FakeGatoHistoryService
|
|
1219
1219
|
(
|
|
1220
1220
|
this.eve,
|
|
1221
|
-
this,
|
|
1221
|
+
this.platform,
|
|
1222
1222
|
{ [ constants.STORAGE ] : constants.GOOGLE_DRIVE,
|
|
1223
1223
|
[ constants.FOLDER ] : this.folder,
|
|
1224
1224
|
[ constants.KEYPATH ] : this.keyPath }
|
|
@@ -122,10 +122,13 @@ class Cmd4PriorityPollingQueue
|
|
|
122
122
|
let storedValue = self.cmd4Storage.getStoredValueForIndex( accTypeEnumIndex );
|
|
123
123
|
callback( 0, storedValue );
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
if ( self.queue.queueType != constants.QUEUETYPE_WORM2 )
|
|
126
|
+
{
|
|
127
|
+
// When the value is returned, it will update homebridge
|
|
128
|
+
self.queue.highPriorityQueue.push( { [ constants.IS_SET_lv ]: false, [ constants.QUEUE_GET_IS_UPDATE_lv ]: true, [ constants.ACCESSORY_lv ]: self, [ constants.ACC_TYPE_ENUM_INDEX_lv ]: accTypeEnumIndex, [ constants.CHARACTERISTIC_STRING_lv ]: characteristicString, [ constants.TIMEOUT_lv ]: timeout, [ constants.STATE_CHANGE_RESPONSE_TIME_lv ]: null, [ constants.VALUE_lv ]: null, [ constants.CALLBACK_lv ]: callback } );
|
|
127
129
|
|
|
128
|
-
|
|
130
|
+
self.queue.processQueueFunc( HIGH_PRIORITY_GET, self.queue );
|
|
131
|
+
}
|
|
129
132
|
}
|
|
130
133
|
|
|
131
134
|
addLowPriorityGetPolledQueueEntry( accessory, accTypeEnumIndex, characteristicString, interval, timeout )
|
|
@@ -232,7 +235,9 @@ class Cmd4PriorityPollingQueue
|
|
|
232
235
|
} else // getValue failed
|
|
233
236
|
{
|
|
234
237
|
// High Priority Get failed. We need to keep trying (WoRm queue only )
|
|
235
|
-
if ( queue.queueType == constants.QUEUETYPE_WORM
|
|
238
|
+
if ( queue.queueType == constants.QUEUETYPE_WORM ||
|
|
239
|
+
queue.queueType == constants.QUEUETYPE_WORM2
|
|
240
|
+
)
|
|
236
241
|
queue.highPriorityQueue.push( entry );
|
|
237
242
|
|
|
238
243
|
queue.errorCountSinceLastGoodTransaction++;
|
|
@@ -798,7 +803,9 @@ class Cmd4PriorityPollingQueue
|
|
|
798
803
|
setTimeout( ( ) =>
|
|
799
804
|
{
|
|
800
805
|
if ( entryIndex == 0 && settings.cmd4Dbg )
|
|
801
|
-
if ( queue.queueType == constants.QUEUETYPE_WORM
|
|
806
|
+
if ( queue.queueType == constants.QUEUETYPE_WORM ||
|
|
807
|
+
queue.queueType == constants.QUEUETYPE_WORM2
|
|
808
|
+
)
|
|
802
809
|
entry.accessory.log.debug( `Started staggered kick off of ${ queue.lowPriorityQueue.length } polled characteristics for queue: "${ entry.accessory.queue.queueName }"` );
|
|
803
810
|
else
|
|
804
811
|
entry.accessory.log.debug( `Started staggered kick off of ${ queue.lowPriorityQueue.length } polled characteristics for "${ entry.accessory.displayName }"` );
|
|
@@ -810,7 +817,9 @@ class Cmd4PriorityPollingQueue
|
|
|
810
817
|
if ( entryIndex == queue.lowPriorityQueue.length -1 )
|
|
811
818
|
{
|
|
812
819
|
if ( settings.cmd4Dbg )
|
|
813
|
-
if ( queue.queueType == constants.QUEUETYPE_WORM
|
|
820
|
+
if ( queue.queueType == constants.QUEUETYPE_WORM ||
|
|
821
|
+
queue.queueType == constants.QUEUETYPE_WORM2
|
|
822
|
+
)
|
|
814
823
|
entry.accessory.log.debug( `All characteristics are now being polled for queue: "${ queue.queueName }"` );
|
|
815
824
|
else
|
|
816
825
|
entry.accessory.log.debug( `All characteristics are now being polled for "${ entry.accessory.displayName }"` );
|
|
@@ -853,6 +862,7 @@ class Cmd4PriorityPollingQueue
|
|
|
853
862
|
this.processQueueFunc = this.processSequentialQueue;
|
|
854
863
|
break;
|
|
855
864
|
case constants.QUEUETYPE_WORM:
|
|
865
|
+
case constants.QUEUETYPE_WORM2:
|
|
856
866
|
this.processQueueFunc = this.processWormQueue;
|
|
857
867
|
// When not in debug mode, do not echo errors for the WoRm queue
|
|
858
868
|
// as errors are handled through retries.
|
|
@@ -941,9 +951,10 @@ var parseAddQueueTypes = function ( log, entrys )
|
|
|
941
951
|
break;
|
|
942
952
|
case constants.QUEUETYPE:
|
|
943
953
|
if ( value != constants.QUEUETYPE_WORM &&
|
|
954
|
+
value != constants.QUEUETYPE_WORM2 &&
|
|
944
955
|
value != constants.QUEUETYPE_SEQUENTIAL )
|
|
945
956
|
{
|
|
946
|
-
throw new Error( `QueueType: ${ entry.queueType } is not valid at index: ${ entryIndex }. Expected: ${ constants.QUEUETYPE_WORM } or ${ constants.QUEUETYPE_SEQUENTIAL }` );
|
|
957
|
+
throw new Error( `QueueType: ${ entry.queueType } is not valid at index: ${ entryIndex }. Expected: ${ constants.QUEUETYPE_WORM }, ${ constants.QUEUETYPE_WORM2 } or ${ constants.QUEUETYPE_SEQUENTIAL }` );
|
|
947
958
|
}
|
|
948
959
|
|
|
949
960
|
queueType = value;
|
package/RUNNING_CHANGELOG.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
## Homebridge UI User. Do not click on any inline links. Homebridge UI does not supprt them. Bug#1098
|
|
4
4
|
|
|
5
5
|
## ChangeLog
|
|
6
|
+
* <a href="#Whats-new-in-6-1-0">**Whats new in 6.1.0**</a>
|
|
6
7
|
* <a href="#Whats-new-in-6-0-4">**Whats new in 6.0.4**</a>
|
|
7
8
|
* <a href="#Whats-new-in-6-0-3">**Whats new in 6.0.3**</a>
|
|
8
9
|
* <a href="#Whats-new-in-6-0-2">**Whats new in 6.0.2**</a>
|
|
@@ -79,6 +80,19 @@
|
|
|
79
80
|
* <a href="#Whats-new-in-2-1">**Whats new in 2.1**</a>
|
|
80
81
|
* <a href="#Whats-new-in-2-0">**Whats new in 2.0**</a>
|
|
81
82
|
|
|
83
|
+
<a name="Whats-new-in-6-1-0">## Whats new in 6.1.0</a>
|
|
84
|
+
### 6.1.0 (2022-01-30)
|
|
85
|
+
|
|
86
|
+
##### New Features
|
|
87
|
+
|
|
88
|
+
* See if WoRm2 Queue can resolve large scale AirCon accessories ([61b164ae](https://github.com/ztalbot2000/homebridge-cmd4/commit/61b164ae11ffb4731da0ac60bba51d7fbeefff94))
|
|
89
|
+
|
|
90
|
+
##### Bug Fixes
|
|
91
|
+
|
|
92
|
+
* bug [#124](https://github.com/ztalbot2000/homebridge-cmd4/pull/124), Eve graph not being displayed ([929da3e3](https://github.com/ztalbot2000/homebridge-cmd4/commit/929da3e39548df645d316365ab1273d6b5ed250d))
|
|
93
|
+
* PROGRAM_SCHEDULED_MANUAL_MODE_ constant remove trailing underscore ([52e1fd3f](https://github.com/ztalbot2000/homebridge-cmd4/commit/52e1fd3f100e18588a171c96b8ef9f511180c1bd))
|
|
94
|
+
|
|
95
|
+
|
|
82
96
|
<a name="Whats-new-in-6-0-4">## Whats new in 6.0.4</a>
|
|
83
97
|
#### 6.0.4 (2021-12-31)
|
|
84
98
|
|
package/cmd4Constants.js
CHANGED
|
@@ -81,6 +81,7 @@ var cmd4Constants = {
|
|
|
81
81
|
// Queue Types
|
|
82
82
|
QUEUETYPE_SEQUENTIAL: "Sequential",
|
|
83
83
|
QUEUETYPE_WORM: "WoRm",
|
|
84
|
+
QUEUETYPE_WORM2: "WoRm2",
|
|
84
85
|
// Used internally to mean only polled entries go straight through the queue
|
|
85
86
|
QUEUETYPE_STANDARD: "StandarD",
|
|
86
87
|
// Used internally to mean entries go straight through the queue
|
|
@@ -2860,7 +2860,7 @@ module.exports =
|
|
|
2860
2860
|
Characteristic.ProgramMode.NO_PROGRAM_SCHEDULED,
|
|
2861
2861
|
"PROGRAM_SCHEDULED":
|
|
2862
2862
|
Characteristic.ProgramMode.PROGRAM_SCHEDULED,
|
|
2863
|
-
"
|
|
2863
|
+
"PROGRAM_SCHEDULED_MANUAL_MODE":
|
|
2864
2864
|
Characteristic.ProgramMode.PROGRAM_SCHEDULED_MANUAL_MODE_
|
|
2865
2865
|
}
|
|
2866
2866
|
},
|