homebridge-cmd4 6.0.3 → 6.1.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 +2 -69
- package/Cmd4Accessory.js +28 -2
- package/Cmd4PriorityPollingQueue.js +18 -7
- package/README.md +9 -2
- package/RUNNING_CHANGELOG.md +41 -0
- package/cmd4Constants.js +6 -0
- package/docs/Developers.md +3 -3
- package/index.js +14 -3
- package/lib/CMD4_ACC_TYPE_ENUM.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,75 +1,8 @@
|
|
|
1
1
|
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
##### Bug Fix
|
|
5
|
-
|
|
6
|
-
* Schema Prep for Homebridge-UI integration ([2c5df2c1](https://github.com/ztalbot2000/homebridge-cmd4/commit/2c5df2c1279ebe88fdaedbaa22ae0124e2841b6d))
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
10
|
-
### 6.0.2 (2021-11-10)
|
|
11
|
-
|
|
12
|
-
##### Bug Fix
|
|
13
|
-
|
|
14
|
-
* Schema Prep - For Homebridge-ui schema must have defined keys ([3053780b](https://github.com/ztalbot2000/homebridge-cmd4/commit/3053780b40eb3d4505dc407411257109977688a1))
|
|
15
|
-
|
|
16
|
-
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
17
|
-
#### 6.0.1 (2021-11-07)
|
|
18
|
-
|
|
19
|
-
##### Bug Fixes
|
|
20
|
-
|
|
21
|
-
* 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))
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
25
|
-
## 6.0.0 (2021-10-01)
|
|
26
|
-
|
|
27
|
-
##### New Features
|
|
28
|
-
|
|
29
|
-
- When Cmd4 was first implemented, I tried to be considerate in allowing either lower or upper case key/value pairs. Unfortunately as Homebridge has evolved and to use homebridge-ui you require a config-schema.json which accurately describes the Cmd4 Schema. This is impossible to achieve when the key/value pairs can be either lower or upper case; Especially when Cmd4 supports so many characteristics and devices.
|
|
30
|
-
- 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.
|
|
31
|
-
|
|
32
|
-
Here are the rules / changes:
|
|
33
|
-
1. No script changes are required. Cmd4 still sends: Get/Set <DeviceName> <Upper Case Characteristic Type > < value >
|
|
34
|
-
2. Constants are still fully capitalized. i.e. "statusFault": "NO_FAULT" or "category": "TELEVISION"
|
|
35
|
-
3. As before Device Types start with an upper case. i.e. "type": "Television"
|
|
36
|
-
4. Cmd4 directives and characteristics start with lower case: i.e. "polling": [ { "characteristic": "volume", "interval": 10 }]
|
|
37
|
-
5. For advanced devices like the AirCon, Queue types remain the same:
|
|
38
|
-
i.e. queueTypes: [ { "queueName": "MyQueue", "queueType": "WoRm" }]
|
|
39
|
-
|
|
40
|
-
Finally
|
|
41
|
-
I tried to make the warnings very explict for what the correction should be and believe me; I am more sorry to have
|
|
42
|
-
to do this than you may think.
|
|
43
|
-
|
|
44
|
-
Thank you,
|
|
45
|
-
John Talbot
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* Schema Prep - Found in Beta Check case of type ([9a394de0](https://github.com/ztalbot2000/homebridge-cmd4/commit/9a394de020b2ccf67a9c30194163807ea3a226a9))
|
|
49
|
-
* Schema Prep - More documentation changes ([c6d68f1f](https://github.com/ztalbot2000/homebridge-cmd4/commit/c6d68f1f8a7c24e786a54dbf1660dba98a5d1b6a))
|
|
50
|
-
* Schema Prep - Documentation changes for feat ([5be7393d](https://github.com/ztalbot2000/homebridge-cmd4/commit/5be7393d4b722c602862a382b1bd710556ff196a))
|
|
51
|
-
* Schema Prep. More fakegato testing, Make cmd4Dbg not be file global scope ([50355797](https://github.com/ztalbot2000/homebridge-cmd4/commit/503557973758fd4103ab13f34680a4f08eaed3c2))
|
|
52
|
-
* 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))
|
|
53
|
-
* Schema Prep - Make sure fakegato characteristics are correct ([a8274c7a](https://github.com/ztalbot2000/homebridge-cmd4/commit/a8274c7adb9ffdc2c34d048057f8334d6da9ef8a))
|
|
54
|
-
* Schema Prep - Should save by index, like others ([20872e2b](https://github.com/ztalbot2000/homebridge-cmd4/commit/20872e2b0f8a5c52131bb9247ba6e6ae11b20fb4))
|
|
55
|
-
* Schema-Prep This works with all lower case, still sends Get/Set upper case ([d3764584](https://github.com/ztalbot2000/homebridge-cmd4/commit/d3764584f5e0faf369490ad85ed16ba3f19e41c8))
|
|
56
|
-
* Schema Prep - constants are now lower case and the input is lowered instead ([03b232a1](https://github.com/ztalbot2000/homebridge-cmd4/commit/03b232a152a622025ccfe7c6dc32ab3fa59d6df2))
|
|
57
|
-
* New tset tool to check where constant is defined ([4fc3668a](https://github.com/ztalbot2000/homebridge-cmd4/commit/4fc3668ad0e1fe51dde4a32ef83f3c78584f4e91))
|
|
58
|
-
* Schema Prep - Change variables to lower case, still check for Upper case ([2b8f4bf7](https://github.com/ztalbot2000/homebridge-cmd4/commit/2b8f4bf768d1c7aebb3c45f6b019de8201c1656e))
|
|
59
|
-
* Schema prep- Change constants to an object ([f0dd0de9](https://github.com/ztalbot2000/homebridge-cmd4/commit/f0dd0de923c12fe6dd52cf5469ff87b2d762ee37))
|
|
60
|
-
* Continue Schema Prep. Cmd4Storage is now referenced accordingly ([79d85b01](https://github.com/ztalbot2000/homebridge-cmd4/commit/79d85b01bac8d1d3a79a407bcbec0163f19f4e4d))
|
|
61
|
-
* Schema Prep. FakeGato simplification ([fd26104b](https://github.com/ztalbot2000/homebridge-cmd4/commit/fd26104b0d9c35a53209e91b3efb9ccf820c0333))
|
|
62
|
-
* Prep for Schema. Stored data now version controlled and assoc array class ([59d7a229](https://github.com/ztalbot2000/homebridge-cmd4/commit/59d7a22903fbb95b4e1b55a7fca4629960c89bfe))
|
|
63
|
-
* Prep for schema. Warn keys must be lower case ([fe3c155c](https://github.com/ztalbot2000/homebridge-cmd4/commit/fe3c155c5b00574ca3b03baf6d3a32f942756988))
|
|
64
|
-
* "Prep for Schema. Unclutter namespace" ([12a63fb5](https://github.com/ztalbot2000/homebridge-cmd4/commit/12a63fb5339f346b31702bc2f52aa60f299c0de4))
|
|
2
|
+
#### 6.1.2 (2022-02-12)
|
|
65
3
|
|
|
66
4
|
##### Bug Fixes
|
|
67
5
|
|
|
68
|
-
*
|
|
69
|
-
* missed with last update ([2282996c](https://github.com/ztalbot2000/homebridge-cmd4/commit/2282996c5056a1b37edc998766e29c90a74f2cfb))
|
|
70
|
-
* The warning should read Capitalized, not Upper case ([9b7f7957](https://github.com/ztalbot2000/homebridge-cmd4/commit/9b7f7957613c2c36cb61c86d1f66b3bfa34d49fc))
|
|
71
|
-
* Found in demo mode, polling for default characteristics was attempted ([01960b73](https://github.com/ztalbot2000/homebridge-cmd4/commit/01960b73c696d788ea06469c5749da2272662e55))
|
|
72
|
-
* For Demo mode, Target states must be defined so warning is not shown ([a1e00e3f](https://github.com/ztalbot2000/homebridge-cmd4/commit/a1e00e3f84e80300c190b50473ee44026bfe42bc))
|
|
73
|
-
* Testing Prep Schema fix. Added unit test so will not happen again ([85ab69f7](https://github.com/ztalbot2000/homebridge-cmd4/commit/85ab69f7c366d2ab37ffe76c9eda7ba0d480e3d1))
|
|
6
|
+
* bug [#127](https://github.com/ztalbot2000/homebridge-cmd4/pull/127") Resolve crash when no internet connection
|
|
74
7
|
|
|
75
8
|
|
package/Cmd4Accessory.js
CHANGED
|
@@ -239,7 +239,13 @@ class Cmd4Accessory
|
|
|
239
239
|
|
|
240
240
|
// Add the global constants to the listOfConstants
|
|
241
241
|
if ( this.parentInfo && this.parentInfo.globalConstants != null )
|
|
242
|
+
{
|
|
242
243
|
this.processConstants( this.parentInfo.globalConstants );
|
|
244
|
+
// Since linked accessories get processed first, The parentInfo they
|
|
245
|
+
// get is actually "this" and we need for the linked accessory to
|
|
246
|
+
// process the constants first in order to see them. i.e. ${IP}
|
|
247
|
+
this.globalConstants = this.parentInfo.globalConstants;
|
|
248
|
+
}
|
|
243
249
|
|
|
244
250
|
// Direct if polling should be set or false.
|
|
245
251
|
// You cannot copy polling from the parent because you would be copying the array
|
|
@@ -1200,7 +1206,7 @@ class Cmd4Accessory
|
|
|
1200
1206
|
this.loggingService = new FakeGatoHistoryService
|
|
1201
1207
|
(
|
|
1202
1208
|
this.eve,
|
|
1203
|
-
this,
|
|
1209
|
+
this.platform,
|
|
1204
1210
|
{ [ constants.STORAGE ] : constants.FS,
|
|
1205
1211
|
[ constants.PATH ] : this.storagePath
|
|
1206
1212
|
}
|
|
@@ -1212,7 +1218,7 @@ class Cmd4Accessory
|
|
|
1212
1218
|
this.loggingService = new FakeGatoHistoryService
|
|
1213
1219
|
(
|
|
1214
1220
|
this.eve,
|
|
1215
|
-
this,
|
|
1221
|
+
this.platform,
|
|
1216
1222
|
{ [ constants.STORAGE ] : constants.GOOGLE_DRIVE,
|
|
1217
1223
|
[ constants.FOLDER ] : this.folder,
|
|
1218
1224
|
[ constants.KEYPATH ] : this.keyPath }
|
|
@@ -1342,6 +1348,8 @@ class Cmd4Accessory
|
|
|
1342
1348
|
valueToAdd.replace(/^'/, "")
|
|
1343
1349
|
valueToAdd.replace(/'$/, "")
|
|
1344
1350
|
|
|
1351
|
+
// Do not check for duplicates. Linked accessories add the same
|
|
1352
|
+
// ${IP} for example
|
|
1345
1353
|
this.listOfConstants[ keyToAdd ] = valueToAdd;
|
|
1346
1354
|
}
|
|
1347
1355
|
}
|
|
@@ -1475,6 +1483,24 @@ class Cmd4Accessory
|
|
|
1475
1483
|
case constants.SUBTYPE:
|
|
1476
1484
|
this.subType = value;
|
|
1477
1485
|
|
|
1486
|
+
break;
|
|
1487
|
+
case constants.MODEL:
|
|
1488
|
+
// createAccessorysInformationService uses these
|
|
1489
|
+
// to add to existing information service, when defined
|
|
1490
|
+
this.model = value;
|
|
1491
|
+
|
|
1492
|
+
break;
|
|
1493
|
+
case constants.MANUFACTURER:
|
|
1494
|
+
// createAccessorysInformationService uses these
|
|
1495
|
+
// to add to existing information service, when defined
|
|
1496
|
+
this.manufacturer = value;
|
|
1497
|
+
|
|
1498
|
+
break;
|
|
1499
|
+
case constants.SERIALNUMBER:
|
|
1500
|
+
// createAccessorysInformationService uses these
|
|
1501
|
+
// to add to existing information service, when defined
|
|
1502
|
+
this.serialNumber = value;
|
|
1503
|
+
|
|
1478
1504
|
break;
|
|
1479
1505
|
case constants.DISPLAYNAME:
|
|
1480
1506
|
// DisplayName is not a characteristic but used as a parm when
|
|
@@ -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/README.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
<span align="center">
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/homebridge-cmd4)
|
|
4
|
+
[](https://www.npmjs.com/package/homebridge-cmd4)
|
|
5
|
+
|
|
6
|
+
</span>
|
|
7
|
+
|
|
1
8
|
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics, Custom Characteristics and Priority Queued Polling too!!
|
|
2
9
|
<base _target="_self">
|
|
3
10
|
|
|
@@ -183,8 +190,8 @@ Based on the best of:
|
|
|
183
190
|
* [homebridge-cmdswitch2]https://github.com/luisiam/homebridge-cmdswitch2.git
|
|
184
191
|
* [homebridge-real-fake-garage-doors]https://github.com/plasticrake/homebridge-real-fake-garage-doors.git
|
|
185
192
|
* [homebridge-homeseer]https://github.com/jrhubott/homebridge-homeseer.git
|
|
186
|
-
* Thanks to TimofeyK for all his help with fakegato and for suggesting it.
|
|
187
|
-
* Thanks to Mitch Williams for his endless encouragement.
|
|
193
|
+
* Thanks to [TimofeyK](https://github.com/TimofeyK) for all his help with fakegato and for suggesting it.
|
|
194
|
+
* Thanks to [Mitch Williams](https://github.com/mitch7391) for his endless encouragement.
|
|
188
195
|
* Thanks especially to those who continue to work on Homebridge and those who make it better.
|
|
189
196
|
* And most importantly my Wife.
|
|
190
197
|
|
package/RUNNING_CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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-2">**Whats new in 6.1.2**</a>
|
|
7
|
+
* <a href="#Whats-new-in-6-1-1">**Whats new in 6.1.1**</a>
|
|
8
|
+
* <a href="#Whats-new-in-6-1-0">**Whats new in 6.1.0**</a>
|
|
9
|
+
* <a href="#Whats-new-in-6-0-4">**Whats new in 6.0.4**</a>
|
|
6
10
|
* <a href="#Whats-new-in-6-0-3">**Whats new in 6.0.3**</a>
|
|
7
11
|
* <a href="#Whats-new-in-6-0-2">**Whats new in 6.0.2**</a>
|
|
8
12
|
* <a href="#Whats-new-in-6-0-1">**Whats new in 6.0.1**</a>
|
|
@@ -78,6 +82,43 @@
|
|
|
78
82
|
* <a href="#Whats-new-in-2-1">**Whats new in 2.1**</a>
|
|
79
83
|
* <a href="#Whats-new-in-2-0">**Whats new in 2.0**</a>
|
|
80
84
|
|
|
85
|
+
<a name="Whats-new-in-6-1-2">## Whats new in 6.1.2</a>
|
|
86
|
+
#### 6.1.2 (2022-02-12)
|
|
87
|
+
|
|
88
|
+
##### Bug Fixes
|
|
89
|
+
|
|
90
|
+
* bug [#127](https://github.com/ztalbot2000/homebridge-cmd4/pull/127") Resolve crash when no internet connection
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
<a name="Whats-new-in-6-1-1">## Whats new in 6.1.1</a>
|
|
94
|
+
#### 6.1.1 (2022-01-31)
|
|
95
|
+
|
|
96
|
+
##### Bug Fixes
|
|
97
|
+
|
|
98
|
+
* bug [#125](https://github.com/ztalbot2000/homebridge-cmd4/pull/125) Manufacturer, serialNumber and Model not displaying in Home ([715a2127](https://github.com/ztalbot2000/homebridge-cmd4/commit/715a21275229ffb395b98a2e7c4f9f3d3fd785dd))
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<a name="Whats-new-in-6-1-0">## Whats new in 6.1.0</a>
|
|
102
|
+
### 6.1.0 (2022-01-30)
|
|
103
|
+
|
|
104
|
+
##### New Features
|
|
105
|
+
|
|
106
|
+
* See if WoRm2 Queue can resolve large scale AirCon accessories ([61b164ae](https://github.com/ztalbot2000/homebridge-cmd4/commit/61b164ae11ffb4731da0ac60bba51d7fbeefff94))
|
|
107
|
+
|
|
108
|
+
##### Bug Fixes
|
|
109
|
+
|
|
110
|
+
* bug [#124](https://github.com/ztalbot2000/homebridge-cmd4/pull/124), Eve graph not being displayed ([929da3e3](https://github.com/ztalbot2000/homebridge-cmd4/commit/929da3e39548df645d316365ab1273d6b5ed250d))
|
|
111
|
+
* PROGRAM_SCHEDULED_MANUAL_MODE_ constant remove trailing underscore ([52e1fd3f](https://github.com/ztalbot2000/homebridge-cmd4/commit/52e1fd3f100e18588a171c96b8ef9f511180c1bd))
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
<a name="Whats-new-in-6-0-4">## Whats new in 6.0.4</a>
|
|
115
|
+
#### 6.0.4 (2021-12-31)
|
|
116
|
+
|
|
117
|
+
##### Bug Fixes
|
|
118
|
+
|
|
119
|
+
* Constants were not getting passed down to linked types ([b7252bf9](https://github.com/ztalbot2000/homebridge-cmd4/commit/b7252bf934e26535047008f343f4d6b627dd6ddb))
|
|
120
|
+
|
|
121
|
+
|
|
81
122
|
<a name="Whats-new-in-6-0-3">## Whats new in 6.0.3</a>
|
|
82
123
|
### 6.0.3 (2021-11-11)
|
|
83
124
|
|
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
|
|
@@ -116,6 +117,11 @@ var cmd4Constants = {
|
|
|
116
117
|
DEFINITIONS: "definitions",
|
|
117
118
|
PROPS: "props",
|
|
118
119
|
|
|
120
|
+
// While also characteristics, they are also used by
|
|
121
|
+
// the infomation service
|
|
122
|
+
MANUFACTURER: "manufacturer",
|
|
123
|
+
SERIALNUMBER: "serialNumber",
|
|
124
|
+
MODEL: "model",
|
|
119
125
|
|
|
120
126
|
// Internal list variables
|
|
121
127
|
ACCESSORY_lv: "accessory",
|
package/docs/Developers.md
CHANGED
|
@@ -7,12 +7,11 @@
|
|
|
7
7
|
* [**Where to Begin**](#where-to-begin)
|
|
8
8
|
* [**Homebridge API**](#homebridge-api)
|
|
9
9
|
* [**Platform Accessories**](#platform-accessories)
|
|
10
|
-
* [
|
|
10
|
+
* [**Television Accessories**](#television-accessories)
|
|
11
11
|
* [**Standard Accessories**](#standard-accessories)
|
|
12
12
|
* [**Cmd4 Directives**](#cmd4-directives)
|
|
13
13
|
* [**Cmd4 Devices and Characteristics**](#cmd4-devices-and-characteristics)
|
|
14
14
|
* [**Priority Queued Polling**](#priority-queued-polling)
|
|
15
|
-
* [**Migrating from Homebridge-cmdswitch2**](#migrating-from-homebridge-cmdswitch2)
|
|
16
15
|
* [**Developer Notes**](#developer-notes)
|
|
17
16
|
* [**Adding in Fakegato history**](#adding-in-fakegato-history)
|
|
18
17
|
* [**Unit Testing**](#unit-testing)
|
|
@@ -28,7 +27,8 @@
|
|
|
28
27
|
* [**basic_ping.sh**](https://github.com/ztalbot2000/homebridge-cmd4/blob/master/Extras/Cmd4Scripts/Examples/basic_ping.sh)
|
|
29
28
|
* [**advanced_ping.sh**](https://github.com/ztalbot2000/homebridge-cmd4/blob/master/Extras/Cmd4Scripts/Examples/advanced_ping.sh)
|
|
30
29
|
* [**wakeonlan.sh**](https://github.com/ztalbot2000/homebridge-cmd4/blob/master/Extras/Cmd4Scripts/Examples/wakeonlan.sh)
|
|
31
|
-
* [**cmd4-
|
|
30
|
+
* [**homebridge-cmd4-AdvantageAir**](https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/blob/master/AdvAir.sh)
|
|
31
|
+
* [**cmd4-HisenseTV**](https://github.com/mitch7391/cmd4-HisenseTV/blob/main/HisenseTV.sh)
|
|
32
32
|
|
|
33
33
|
## Homebridge API
|
|
34
34
|
Cmd4 is not possible without Homebridge. Prior to Cmd4 Version 3, Cmd4 just created Standard Plugin Accessories. With Version 3 of Cmd4, Cmd4 follows the Hombridge API as defined on [Homebridge API](https://developers.homebridge.io/#/) to be followed exactly. Both Platform and Accessory Plugins can be created. In fact the examples can be recreated exactly.<BR>
|
package/index.js
CHANGED
|
@@ -74,11 +74,22 @@ function checkForUpdates( )
|
|
|
74
74
|
|
|
75
75
|
( async( ) =>
|
|
76
76
|
{
|
|
77
|
-
|
|
77
|
+
// Fix for #127, constant crash loops when no internet connection
|
|
78
|
+
// trying to get latest Cmd4 version.
|
|
79
|
+
// thx nano9g
|
|
80
|
+
try
|
|
81
|
+
{
|
|
82
|
+
let lv = await getLatestVersion( );
|
|
83
|
+
|
|
84
|
+
if ( isVersionNewerThanPackagedVersion( lv ) )
|
|
85
|
+
{
|
|
86
|
+
console.log( chalk.green( `[UPDATE AVAILABLE] ` ) + `Version ${lv} of ${myPkg.name} is available. Any release notes can be found here: ` + chalk.underline( `${myPkg.changelog}` ) );
|
|
87
|
+
}
|
|
78
88
|
|
|
79
|
-
|
|
89
|
+
}
|
|
90
|
+
catch( error )
|
|
80
91
|
{
|
|
81
|
-
console.log( chalk.
|
|
92
|
+
console.log( chalk.yellow( `[UPDATE CHECK FAILED] ` ) + `Could not check for newer versions of ${myPkg.name} due to error ${error.name}: ${error.message}`)
|
|
82
93
|
}
|
|
83
94
|
})( );
|
|
84
95
|
}
|
|
@@ -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
|
},
|
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": "6.
|
|
4
|
+
"version": "6.1.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "John Talbot"
|
|
@@ -112,4 +112,4 @@
|
|
|
112
112
|
"release:minor": "tools/generateChangeLog --type minor --cleanup",
|
|
113
113
|
"release:major": "tools/generateChangeLog --type major --cleanup"
|
|
114
114
|
}
|
|
115
|
-
}
|
|
115
|
+
}
|