homebridge-cmd4 6.0.2 → 6.1.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 +2 -61
- package/Cmd4Accessory.js +63 -7
- package/Cmd4Platform.js +14 -2
- package/Cmd4PriorityPollingQueue.js +18 -7
- package/RUNNING_CHANGELOG.md +41 -0
- package/cmd4Constants.js +6 -0
- package/docs/Developers.md +1 -1
- package/lib/CMD4_ACC_TYPE_ENUM.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,67 +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 schema must have defined keys ([3053780b](https://github.com/ztalbot2000/homebridge-cmd4/commit/3053780b40eb3d4505dc407411257109977688a1))
|
|
7
|
-
|
|
8
|
-
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
9
|
-
#### 6.0.1 (2021-11-07)
|
|
10
|
-
|
|
11
|
-
##### Bug Fixes
|
|
12
|
-
|
|
13
|
-
* 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))
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
|
|
17
|
-
## 6.0.0 (2021-10-01)
|
|
18
|
-
|
|
19
|
-
##### New Features
|
|
20
|
-
|
|
21
|
-
- 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.
|
|
22
|
-
- 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.
|
|
23
|
-
|
|
24
|
-
Here are the rules / changes:
|
|
25
|
-
1. No script changes are required. Cmd4 still sends: Get/Set <DeviceName> <Upper Case Characteristic Type > < value >
|
|
26
|
-
2. Constants are still fully capitalized. i.e. "statusFault": "NO_FAULT" or "category": "TELEVISION"
|
|
27
|
-
3. As before Device Types start with an upper case. i.e. "type": "Television"
|
|
28
|
-
4. Cmd4 directives and characteristics start with lower case: i.e. "polling": [ { "characteristic": "volume", "interval": 10 }]
|
|
29
|
-
5. For advanced devices like the AirCon, Queue types remain the same:
|
|
30
|
-
i.e. queueTypes: [ { "queueName": "MyQueue", "queueType": "WoRm" }]
|
|
31
|
-
|
|
32
|
-
Finally
|
|
33
|
-
I tried to make the warnings very explict for what the correction should be and believe me; I am more sorry to have
|
|
34
|
-
to do this than you may think.
|
|
35
|
-
|
|
36
|
-
Thank you,
|
|
37
|
-
John Talbot
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* Schema Prep - Found in Beta Check case of type ([9a394de0](https://github.com/ztalbot2000/homebridge-cmd4/commit/9a394de020b2ccf67a9c30194163807ea3a226a9))
|
|
41
|
-
* Schema Prep - More documentation changes ([c6d68f1f](https://github.com/ztalbot2000/homebridge-cmd4/commit/c6d68f1f8a7c24e786a54dbf1660dba98a5d1b6a))
|
|
42
|
-
* Schema Prep - Documentation changes for feat ([5be7393d](https://github.com/ztalbot2000/homebridge-cmd4/commit/5be7393d4b722c602862a382b1bd710556ff196a))
|
|
43
|
-
* Schema Prep. More fakegato testing, Make cmd4Dbg not be file global scope ([50355797](https://github.com/ztalbot2000/homebridge-cmd4/commit/503557973758fd4103ab13f34680a4f08eaed3c2))
|
|
44
|
-
* 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))
|
|
45
|
-
* Schema Prep - Make sure fakegato characteristics are correct ([a8274c7a](https://github.com/ztalbot2000/homebridge-cmd4/commit/a8274c7adb9ffdc2c34d048057f8334d6da9ef8a))
|
|
46
|
-
* Schema Prep - Should save by index, like others ([20872e2b](https://github.com/ztalbot2000/homebridge-cmd4/commit/20872e2b0f8a5c52131bb9247ba6e6ae11b20fb4))
|
|
47
|
-
* Schema-Prep This works with all lower case, still sends Get/Set upper case ([d3764584](https://github.com/ztalbot2000/homebridge-cmd4/commit/d3764584f5e0faf369490ad85ed16ba3f19e41c8))
|
|
48
|
-
* Schema Prep - constants are now lower case and the input is lowered instead ([03b232a1](https://github.com/ztalbot2000/homebridge-cmd4/commit/03b232a152a622025ccfe7c6dc32ab3fa59d6df2))
|
|
49
|
-
* New tset tool to check where constant is defined ([4fc3668a](https://github.com/ztalbot2000/homebridge-cmd4/commit/4fc3668ad0e1fe51dde4a32ef83f3c78584f4e91))
|
|
50
|
-
* Schema Prep - Change variables to lower case, still check for Upper case ([2b8f4bf7](https://github.com/ztalbot2000/homebridge-cmd4/commit/2b8f4bf768d1c7aebb3c45f6b019de8201c1656e))
|
|
51
|
-
* Schema prep- Change constants to an object ([f0dd0de9](https://github.com/ztalbot2000/homebridge-cmd4/commit/f0dd0de923c12fe6dd52cf5469ff87b2d762ee37))
|
|
52
|
-
* Continue Schema Prep. Cmd4Storage is now referenced accordingly ([79d85b01](https://github.com/ztalbot2000/homebridge-cmd4/commit/79d85b01bac8d1d3a79a407bcbec0163f19f4e4d))
|
|
53
|
-
* Schema Prep. FakeGato simplification ([fd26104b](https://github.com/ztalbot2000/homebridge-cmd4/commit/fd26104b0d9c35a53209e91b3efb9ccf820c0333))
|
|
54
|
-
* Prep for Schema. Stored data now version controlled and assoc array class ([59d7a229](https://github.com/ztalbot2000/homebridge-cmd4/commit/59d7a22903fbb95b4e1b55a7fca4629960c89bfe))
|
|
55
|
-
* Prep for schema. Warn keys must be lower case ([fe3c155c](https://github.com/ztalbot2000/homebridge-cmd4/commit/fe3c155c5b00574ca3b03baf6d3a32f942756988))
|
|
56
|
-
* "Prep for Schema. Unclutter namespace" ([12a63fb5](https://github.com/ztalbot2000/homebridge-cmd4/commit/12a63fb5339f346b31702bc2f52aa60f299c0de4))
|
|
2
|
+
#### 6.1.1 (2022-01-31)
|
|
57
3
|
|
|
58
4
|
##### Bug Fixes
|
|
59
5
|
|
|
60
|
-
*
|
|
61
|
-
* missed with last update ([2282996c](https://github.com/ztalbot2000/homebridge-cmd4/commit/2282996c5056a1b37edc998766e29c90a74f2cfb))
|
|
62
|
-
* The warning should read Capitalized, not Upper case ([9b7f7957](https://github.com/ztalbot2000/homebridge-cmd4/commit/9b7f7957613c2c36cb61c86d1f66b3bfa34d49fc))
|
|
63
|
-
* Found in demo mode, polling for default characteristics was attempted ([01960b73](https://github.com/ztalbot2000/homebridge-cmd4/commit/01960b73c696d788ea06469c5749da2272662e55))
|
|
64
|
-
* For Demo mode, Target states must be defined so warning is not shown ([a1e00e3f](https://github.com/ztalbot2000/homebridge-cmd4/commit/a1e00e3f84e80300c190b50473ee44026bfe42bc))
|
|
65
|
-
* Testing Prep Schema fix. Added unit test so will not happen again ([85ab69f7](https://github.com/ztalbot2000/homebridge-cmd4/commit/85ab69f7c366d2ab37ffe76c9eda7ba0d480e3d1))
|
|
6
|
+
* 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))
|
|
66
7
|
|
|
67
8
|
|
package/Cmd4Accessory.js
CHANGED
|
@@ -237,6 +237,16 @@ class Cmd4Accessory
|
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
// Add the global constants to the listOfConstants
|
|
241
|
+
if ( this.parentInfo && this.parentInfo.globalConstants != null )
|
|
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
|
+
}
|
|
249
|
+
|
|
240
250
|
// Direct if polling should be set or false.
|
|
241
251
|
// You cannot copy polling from the parent because you would be copying the array
|
|
242
252
|
// of polled characteristics that the child does not have, or turning on polling
|
|
@@ -1196,7 +1206,7 @@ class Cmd4Accessory
|
|
|
1196
1206
|
this.loggingService = new FakeGatoHistoryService
|
|
1197
1207
|
(
|
|
1198
1208
|
this.eve,
|
|
1199
|
-
this,
|
|
1209
|
+
this.platform,
|
|
1200
1210
|
{ [ constants.STORAGE ] : constants.FS,
|
|
1201
1211
|
[ constants.PATH ] : this.storagePath
|
|
1202
1212
|
}
|
|
@@ -1208,7 +1218,7 @@ class Cmd4Accessory
|
|
|
1208
1218
|
this.loggingService = new FakeGatoHistoryService
|
|
1209
1219
|
(
|
|
1210
1220
|
this.eve,
|
|
1211
|
-
this,
|
|
1221
|
+
this.platform,
|
|
1212
1222
|
{ [ constants.STORAGE ] : constants.GOOGLE_DRIVE,
|
|
1213
1223
|
[ constants.FOLDER ] : this.folder,
|
|
1214
1224
|
[ constants.KEYPATH ] : this.keyPath }
|
|
@@ -1338,6 +1348,8 @@ class Cmd4Accessory
|
|
|
1338
1348
|
valueToAdd.replace(/^'/, "")
|
|
1339
1349
|
valueToAdd.replace(/'$/, "")
|
|
1340
1350
|
|
|
1351
|
+
// Do not check for duplicates. Linked accessories add the same
|
|
1352
|
+
// ${IP} for example
|
|
1341
1353
|
this.listOfConstants[ keyToAdd ] = valueToAdd;
|
|
1342
1354
|
}
|
|
1343
1355
|
}
|
|
@@ -1460,7 +1472,7 @@ class Cmd4Accessory
|
|
|
1460
1472
|
throw new Error( `Unknown device type: "${ value }" given in: "${ this.displayName }".` );
|
|
1461
1473
|
|
|
1462
1474
|
// warn now
|
|
1463
|
-
this.log.warn( `The config.json Cmd4 device type: ${ value } is lowerCase. It should be: ${ rcValue.deviceName }. In the near future this will be an error for homebridge-
|
|
1475
|
+
this.log.warn( `The config.json Cmd4 device type: ${ value } is lowerCase. It should be: ${ rcValue.deviceName }. In the near future this will be an error for homebridge-UI integration.\nTo remove this Warning, Please fix your config.json.` );
|
|
1464
1476
|
|
|
1465
1477
|
this.type = rcValue.deviceName;
|
|
1466
1478
|
}
|
|
@@ -1471,6 +1483,24 @@ class Cmd4Accessory
|
|
|
1471
1483
|
case constants.SUBTYPE:
|
|
1472
1484
|
this.subType = value;
|
|
1473
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
|
+
|
|
1474
1504
|
break;
|
|
1475
1505
|
case constants.DISPLAYNAME:
|
|
1476
1506
|
// DisplayName is not a characteristic but used as a parm when
|
|
@@ -1529,6 +1559,9 @@ class Cmd4Accessory
|
|
|
1529
1559
|
|
|
1530
1560
|
break;
|
|
1531
1561
|
case constants.QUEUETYPES:
|
|
1562
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the accessory level. Please move it to where "Platform: "Cmd4" is located in your config.json.` );
|
|
1563
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
1564
|
+
|
|
1532
1565
|
parseAddQueueTypes( this.log, value );
|
|
1533
1566
|
|
|
1534
1567
|
break;
|
|
@@ -1554,6 +1587,7 @@ class Cmd4Accessory
|
|
|
1554
1587
|
case constants.POLLING:
|
|
1555
1588
|
// Do not parse it yet as characteristics must be set first.
|
|
1556
1589
|
this.polling = value;
|
|
1590
|
+
|
|
1557
1591
|
break;
|
|
1558
1592
|
case "Cmd4_Mode":
|
|
1559
1593
|
case "cmd4_Mode":
|
|
@@ -1589,18 +1623,30 @@ class Cmd4Accessory
|
|
|
1589
1623
|
|
|
1590
1624
|
break;
|
|
1591
1625
|
case constants.STORAGE:
|
|
1626
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Platform level. It was always meant to just be a fakegato config option only.` );
|
|
1627
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
1628
|
+
|
|
1592
1629
|
this.storage = value;
|
|
1593
1630
|
|
|
1594
1631
|
break;
|
|
1595
1632
|
case constants.STORAGEPATH:
|
|
1633
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Platform level. It was always meant to just be a fakegato config option only.` );
|
|
1634
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
1635
|
+
|
|
1596
1636
|
this.storagePath = value
|
|
1597
1637
|
|
|
1598
1638
|
break;
|
|
1599
1639
|
case constants.FOLDER:
|
|
1640
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Platform level. It was always meant to just be a fakegato config option only.` );
|
|
1641
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
1642
|
+
|
|
1600
1643
|
this.folder = value
|
|
1601
1644
|
|
|
1602
1645
|
break;
|
|
1603
1646
|
case constants.KEYPATH:
|
|
1647
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Platform level. It was always meant to just be a fakegato config option only.` );
|
|
1648
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
1649
|
+
|
|
1604
1650
|
this.keyPath = value
|
|
1605
1651
|
|
|
1606
1652
|
break;
|
|
@@ -1614,6 +1660,9 @@ class Cmd4Accessory
|
|
|
1614
1660
|
|
|
1615
1661
|
break;
|
|
1616
1662
|
case constants.CONSTANTS:
|
|
1663
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Accessory level. Please move it to where "Platform: "Cmd4" is located in your config.json.` );
|
|
1664
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
1665
|
+
|
|
1617
1666
|
this.processConstants( value );
|
|
1618
1667
|
|
|
1619
1668
|
break;
|
|
@@ -1636,6 +1685,9 @@ class Cmd4Accessory
|
|
|
1636
1685
|
|
|
1637
1686
|
break;
|
|
1638
1687
|
case constants.ALLOWTLV8:
|
|
1688
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Accessory level. Please move it to where "Platform: "Cmd4" is located.` );
|
|
1689
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
1690
|
+
|
|
1639
1691
|
this.allowTLV8 = value;
|
|
1640
1692
|
break;
|
|
1641
1693
|
default:
|
|
@@ -1682,10 +1734,6 @@ class Cmd4Accessory
|
|
|
1682
1734
|
this.log.info( chalk.blue( `Cmd4 is running in Demo Mode for ${ this.displayName }` ) );
|
|
1683
1735
|
}
|
|
1684
1736
|
|
|
1685
|
-
// Add the global constants to the listOfConstants
|
|
1686
|
-
if ( this.parentInfo && this.parentInfo.globalConstants != null )
|
|
1687
|
-
this.processConstants( this.parentInfo.globalConstants );
|
|
1688
|
-
|
|
1689
1737
|
// Handle seperation of strings of state_cmd for a prefix
|
|
1690
1738
|
if ( this.state_cmd_prefix )
|
|
1691
1739
|
this.state_cmd_prefix = this.state_cmd_prefix + " ";
|
|
@@ -1905,6 +1953,9 @@ class Cmd4Accessory
|
|
|
1905
1953
|
if ( this.queue && this.queue.queueName != value )
|
|
1906
1954
|
throw new Error( chalk.red( `Already defined Priority Polling Queue "${ this.queue.queueName }" for ${ this.displayName } cannot be redefined.` ) );
|
|
1907
1955
|
|
|
1956
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the polling level. Please define it for the accessory: ${ this.displayName } as "queue": "${ value }"` );
|
|
1957
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
1958
|
+
|
|
1908
1959
|
this.queue = addQueue( this.log, value, constants.QUEUETYPE_WORM );
|
|
1909
1960
|
|
|
1910
1961
|
break;
|
|
@@ -1930,6 +1981,11 @@ class Cmd4Accessory
|
|
|
1930
1981
|
}
|
|
1931
1982
|
case constants.QUEUETYPES:
|
|
1932
1983
|
{
|
|
1984
|
+
// WHY IS THIS HERE AT ALL ??????????
|
|
1985
|
+
|
|
1986
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the accessory level. Please move it to where "Platform: "Cmd4" is located in your config.json.` );
|
|
1987
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
1988
|
+
|
|
1933
1989
|
parseAddQueueTypes( this.log, value );
|
|
1934
1990
|
// This whole record is not a characteristic polling entry
|
|
1935
1991
|
// continue to next ( via return )
|
package/Cmd4Platform.js
CHANGED
|
@@ -89,7 +89,7 @@ class Cmd4Platform
|
|
|
89
89
|
this.toBeRestoredPlatforms = [ ];
|
|
90
90
|
this.createdCmd4Accessories = [ ];
|
|
91
91
|
this.createdCmd4Platforms = [ ];
|
|
92
|
-
this.
|
|
92
|
+
this.globalConstants = null;
|
|
93
93
|
|
|
94
94
|
this.services = [ ];
|
|
95
95
|
|
|
@@ -272,6 +272,9 @@ class Cmd4Platform
|
|
|
272
272
|
this.log.warn( `To remove this message, just remove "${ key }" from your config.json` );
|
|
273
273
|
break;
|
|
274
274
|
case constants.STORAGE:
|
|
275
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Platform level. It was always meant to just be a fakegato config option only.` );
|
|
276
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
277
|
+
|
|
275
278
|
if ( value == constants.FS || value == constants.GOOGLEDRIVEl )
|
|
276
279
|
this.storage = value;
|
|
277
280
|
else
|
|
@@ -279,14 +282,23 @@ class Cmd4Platform
|
|
|
279
282
|
|
|
280
283
|
break;
|
|
281
284
|
case constants.STORAGEPATH:
|
|
285
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Platform level. It was always meant to just be a fakegato config option only.` );
|
|
286
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
287
|
+
|
|
282
288
|
this.storagePath = value;
|
|
283
289
|
|
|
284
290
|
break;
|
|
285
291
|
case constants.FOLDER:
|
|
292
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Platform level. It was always meant to just be a fakegato config option only.` );
|
|
293
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
294
|
+
|
|
286
295
|
this.folder = value;
|
|
287
296
|
|
|
288
297
|
break;
|
|
289
298
|
case constants.KEYPATH:
|
|
299
|
+
this.log.warn( `Warning: ${ key } will soon been deprecated at the Platform level. It was always meant to just be a fakegato config option only.` );
|
|
300
|
+
this.log.warn( `This message will disappear when you have done so.` );
|
|
301
|
+
|
|
290
302
|
this.keyPath = value;
|
|
291
303
|
|
|
292
304
|
break;
|
|
@@ -297,7 +309,7 @@ class Cmd4Platform
|
|
|
297
309
|
case constants.CONSTANTS:
|
|
298
310
|
// Save the constants defined globally so the accessory
|
|
299
311
|
// can parse it.
|
|
300
|
-
this.
|
|
312
|
+
this.globalConstants = value;
|
|
301
313
|
|
|
302
314
|
break
|
|
303
315
|
case constants.PLATFORM:
|
|
@@ -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,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-1">**Whats new in 6.1.1**</a>
|
|
7
|
+
* <a href="#Whats-new-in-6-1-0">**Whats new in 6.1.0**</a>
|
|
8
|
+
* <a href="#Whats-new-in-6-0-4">**Whats new in 6.0.4**</a>
|
|
9
|
+
* <a href="#Whats-new-in-6-0-3">**Whats new in 6.0.3**</a>
|
|
6
10
|
* <a href="#Whats-new-in-6-0-2">**Whats new in 6.0.2**</a>
|
|
7
11
|
* <a href="#Whats-new-in-6-0-1">**Whats new in 6.0.1**</a>
|
|
8
12
|
* <a href="#Whats-new-in-6-0-0">**Whats new in 6.0.0**</a>
|
|
@@ -77,6 +81,43 @@
|
|
|
77
81
|
* <a href="#Whats-new-in-2-1">**Whats new in 2.1**</a>
|
|
78
82
|
* <a href="#Whats-new-in-2-0">**Whats new in 2.0**</a>
|
|
79
83
|
|
|
84
|
+
<a name="Whats-new-in-6-1-1">## Whats new in 6.1.1</a>
|
|
85
|
+
#### 6.1.1 (2022-01-31)
|
|
86
|
+
|
|
87
|
+
##### Bug Fixes
|
|
88
|
+
|
|
89
|
+
* 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))
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
<a name="Whats-new-in-6-1-0">## Whats new in 6.1.0</a>
|
|
93
|
+
### 6.1.0 (2022-01-30)
|
|
94
|
+
|
|
95
|
+
##### New Features
|
|
96
|
+
|
|
97
|
+
* See if WoRm2 Queue can resolve large scale AirCon accessories ([61b164ae](https://github.com/ztalbot2000/homebridge-cmd4/commit/61b164ae11ffb4731da0ac60bba51d7fbeefff94))
|
|
98
|
+
|
|
99
|
+
##### Bug Fixes
|
|
100
|
+
|
|
101
|
+
* bug [#124](https://github.com/ztalbot2000/homebridge-cmd4/pull/124), Eve graph not being displayed ([929da3e3](https://github.com/ztalbot2000/homebridge-cmd4/commit/929da3e39548df645d316365ab1273d6b5ed250d))
|
|
102
|
+
* PROGRAM_SCHEDULED_MANUAL_MODE_ constant remove trailing underscore ([52e1fd3f](https://github.com/ztalbot2000/homebridge-cmd4/commit/52e1fd3f100e18588a171c96b8ef9f511180c1bd))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
<a name="Whats-new-in-6-0-4">## Whats new in 6.0.4</a>
|
|
106
|
+
#### 6.0.4 (2021-12-31)
|
|
107
|
+
|
|
108
|
+
##### Bug Fixes
|
|
109
|
+
|
|
110
|
+
* Constants were not getting passed down to linked types ([b7252bf9](https://github.com/ztalbot2000/homebridge-cmd4/commit/b7252bf934e26535047008f343f4d6b627dd6ddb))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
<a name="Whats-new-in-6-0-3">## Whats new in 6.0.3</a>
|
|
114
|
+
### 6.0.3 (2021-11-11)
|
|
115
|
+
|
|
116
|
+
##### Bug Fix
|
|
117
|
+
|
|
118
|
+
* Schema Prep for Homebridge-UI integration ([2c5df2c1](https://github.com/ztalbot2000/homebridge-cmd4/commit/2c5df2c1279ebe88fdaedbaa22ae0124e2841b6d))
|
|
119
|
+
|
|
120
|
+
|
|
80
121
|
<a name="Whats-new-in-6-0-2">## Whats new in 6.0.2</a>
|
|
81
122
|
### 6.0.2 (2021-11-10)
|
|
82
123
|
|
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
|
@@ -453,7 +453,7 @@ The value "0" should be used for any characteristics value which is not possible
|
|
|
453
453
|
### Step 3. Install homebridge-cmd4 development dependencies
|
|
454
454
|
|
|
455
455
|
```bash
|
|
456
|
-
*SHELL*> npm install --
|
|
456
|
+
*SHELL*> npm install --dev
|
|
457
457
|
```
|
|
458
458
|
|
|
459
459
|
### Step 4. Run the provided test cases
|
|
@@ -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.1",
|
|
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
|
+
}
|