homebridge-cmd4 6.1.1 → 6.3.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/README.md CHANGED
@@ -1,3 +1,10 @@
1
+ <span align="center">
2
+
3
+ [![npm](https://badgen.net/npm/v/homebridge-cmd4/latest?icon=npm&label)](https://www.npmjs.com/package/homebridge-cmd4)
4
+ [![npm](https://badgen.net/npm/dt/homebridge-cmd4?label=downloads)](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
 
@@ -3,6 +3,9 @@
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-3-0">**Whats new in 6.3.0**</a>
7
+ * <a href="#Whats-new-in-6-2-0">**Whats new in 6.2.0**</a>
8
+ * <a href="#Whats-new-in-6-1-2">**Whats new in 6.1.2**</a>
6
9
  * <a href="#Whats-new-in-6-1-1">**Whats new in 6.1.1**</a>
7
10
  * <a href="#Whats-new-in-6-1-0">**Whats new in 6.1.0**</a>
8
11
  * <a href="#Whats-new-in-6-0-4">**Whats new in 6.0.4**</a>
@@ -81,6 +84,59 @@
81
84
  * <a href="#Whats-new-in-2-1">**Whats new in 2.1**</a>
82
85
  * <a href="#Whats-new-in-2-0">**Whats new in 2.0**</a>
83
86
 
87
+ <a name="Whats-new-in-6-3-0">## Whats new in 6.3.0</a>
88
+ ### 6.3.0 (2022-04-12)
89
+
90
+ ##### Bug Fixes
91
+
92
+ * Bug [#130](https://github.com/ztalbot2000/homebridge-cmd4/pull/130), linked accessories not accesible after restart ([aeab5a40](https://github.com/ztalbot2000/homebridge-cmd4/commit/aeab5a40340631910ae6ac19f9af8453f46faa55))
93
+
94
+
95
+ <a name="Whats-new-in-6-2-0">## Whats new in 6.2.0</a>
96
+ ## 6.2.0 (2022-02-18)
97
+
98
+ ##### New Features
99
+
100
+ * Add new characteristics and device types ([c3560130](https://github.com/ztalbot2000/homebridge-cmd4/commit/c3560130e7092b698d0d750924c548a99c4e20f4))
101
+
102
+ Characteristics
103
+ ---------------
104
+ AssetUpdateReadiness
105
+ SupportedAssetTypes
106
+ ConfigurationState
107
+ NFCAccessControlPoint
108
+ NFCAccessSupportedConfiguration
109
+ SiriEndpointSessionStatus
110
+ ThreadControlPoint
111
+ ThreadNodeCapabilities
112
+ ThreadStatus
113
+ ThreadOpenThreadVersion
114
+
115
+ Device Types
116
+ ------------
117
+ AccessoryMetrics
118
+ AssetUpdate
119
+ Assistant
120
+ AudioStreamManagement
121
+ Battery
122
+ CameraRecordingManagement
123
+ CloudRelay
124
+ DataStreamTransportManagement
125
+ NFCAccess
126
+ SiriEndpoint
127
+ ThreadTransport
128
+
129
+ Note: While these are now available to use. Some may not be suitable for Cmd4 depending on their complexity.
130
+
131
+
132
+ <a name="Whats-new-in-6-1-2">## Whats new in 6.1.2</a>
133
+ #### 6.1.2 (2022-02-12)
134
+
135
+ ##### Bug Fixes
136
+
137
+ * bug [#127](https://github.com/ztalbot2000/homebridge-cmd4/pull/127") Resolve crash when no internet connection
138
+
139
+
84
140
  <a name="Whats-new-in-6-1-1">## Whats new in 6.1.1</a>
85
141
  #### 6.1.1 (2022-01-31)
86
142
 
@@ -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
- * [***Television Accessories***](#television-accessories)
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-E-Zone-MyAir**](https://github.com/mitch7391/cmd4-E-Zone-MyAir/blob/master/Temperature%20Sensors/One%20Constant%20Zone/ezone.sh)
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
  &nbsp;&nbsp;&nbsp; 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
- let lv = await getLatestVersion( );
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
- if ( isVersionNewerThanPackagedVersion( lv ) )
89
+ }
90
+ catch( error )
80
91
  {
81
- console.log( chalk.green( `[UPDATE AVAILABLE] ` ) + `Version ${lv} of ${myPkg.name} is available. Any release notes can be found here: ` + chalk.underline( `${myPkg.changelog}` ) );
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
  }
@@ -284,7 +284,7 @@ var CMD4_ACC_TYPE_ENUM =
284
284
  ThirdPartyCameraActive: 201,
285
285
  TimeUpdate: 202,
286
286
  TransmitPower: 203,
287
- TransmitPowerMaximum: 204,
287
+ MaximumTransmitPower: 204,
288
288
  TunnelConnectionTimeout: 205,
289
289
  TunneledAccessoryAdvertising: 206,
290
290
  TunneledAccessoryConnected: 207,
@@ -303,7 +303,20 @@ var CMD4_ACC_TYPE_ENUM =
303
303
  WiFiCapabilities: 220,
304
304
  WiFiConfigurationControl: 221,
305
305
  WiFiSatelliteStatus: 222,
306
- EOL: 223,
306
+
307
+ AssetUpdateReadiness: 223,
308
+ SupportedAssetTypes: 224,
309
+ ConfigurationState: 225,
310
+ NFCAccessControlPoint: 226,
311
+ NFCAccessSupportedConfiguration: 227,
312
+ SiriEndpointSessionStatus: 228,
313
+ ThreadControlPoint: 229,
314
+ ThreadNodeCapabilities: 230,
315
+ ThreadStatus: 231,
316
+ ThreadOpenThreadVersion: 232,
317
+
318
+
319
+ EOL: 233,
307
320
 
308
321
  properties: { },
309
322
 
@@ -4419,11 +4432,11 @@ module.exports =
4419
4432
  },
4420
4433
  validValues: {}
4421
4434
  },
4422
- 204: { type: "TransmitPowerMaximum", // HomeKitTypes
4423
- sche: "transmitPowerMaximum", // HomeKitTypes
4424
- characteristic: Characteristic.TransmitPowerMaximum,
4425
- UUID: "0000021E-0000-1000-8000-00000243",
4426
- description: "The Devices Maximum Power Output",
4435
+ 204: { type: "MaximumTransmitPower",
4436
+ sche: "MaximumTransmitPower",
4437
+ characteristic: Characteristic.MaximumTransmitPower,
4438
+ UUID: "00000243-0000-1000-8000-0026BB765291",
4439
+ description: "The Devices Maximum Transmit Power",
4427
4440
  relatedCurrentAccTypeEnumIndex: null,
4428
4441
  relatedTargetAccTypeEnumIndex: null,
4429
4442
  stringConversionFunction: function ( str ){ return stringToInt( str ); },
@@ -4774,6 +4787,179 @@ module.exports =
4774
4787
  "CONNECTED" : Characteristic.WiFiSatelliteStatus.CONNECTED, // 1,
4775
4788
  "NOT_CONNECTED": Characteristic.WiFiSatelliteStatus.NOT_CONNECTED // 2
4776
4789
  }
4790
+ },
4791
+
4792
+ 223: { type: "AssetUpdateReadiness",
4793
+ sche: "assetUpdateReadiness",
4794
+ characteristic: Characteristic.AssetUpdateReadiness,
4795
+ UUID: "00000269-0000-1000-8000-0026BB765291",
4796
+ description: "The Devices Asset Update Readiness",
4797
+ relatedCurrentAccTypeEnumIndex: null,
4798
+ relatedTargetAccTypeEnumIndex: null,
4799
+ stringConversionFunction: function ( str ){ return stringToInt( str ); },
4800
+ props: {format: Characteristic.Formats.UINT32,
4801
+ allowedWordCount: 1,
4802
+ perms: [Characteristic.Perms.PAIRED_READ,
4803
+ Characteristic.Perms.NOTIFY
4804
+ ]
4805
+ },
4806
+ validValues:
4807
+ { }
4808
+ },
4809
+ 224: { type: "SupportedAssetTypes",
4810
+ sche: "supportedAssetTypes",
4811
+ characteristic: Characteristic.SupportedAssetTypes,
4812
+ UUID: "00000268-0000-1000-8000-0026BB765291",
4813
+ description: "The Devices Supported Asset types",
4814
+ relatedCurrentAccTypeEnumIndex: null,
4815
+ relatedTargetAccTypeEnumIndex: null,
4816
+ stringConversionFunction: function ( str ){ return stringToInt( str ); },
4817
+ props: {format: Characteristic.Formats.UINT32,
4818
+ allowedWordCount: 1,
4819
+ perms: [Characteristic.Perms.PAIRED_READ
4820
+ ]
4821
+ },
4822
+ validValues:
4823
+ { }
4824
+ },
4825
+ 225: { type: "ConfigurationState",
4826
+ sche: "configurationState",
4827
+ characteristic: Characteristic.ConfigurationState,
4828
+ UUID: "00000263-0000-1000-8000-0026BB765291",
4829
+ description: "The Devices Configuration State",
4830
+ relatedCurrentAccTypeEnumIndex: null,
4831
+ relatedTargetAccTypeEnumIndex: null,
4832
+ stringConversionFunction: function ( str ){ return stringToInt( str ); },
4833
+ props: {format: Characteristic.Formats.UINT16,
4834
+ allowedWordCount: 1,
4835
+ perms: [Characteristic.Perms.PAIRED_READ,
4836
+ Characteristic.Perms.NOTIFY
4837
+ ]
4838
+ },
4839
+ validValues:
4840
+ { }
4841
+ },
4842
+ 226: { type: "NFCAccessControlPoint",
4843
+ sche: "NFCAccessControlPoint",
4844
+ characteristic: Characteristic.NFCAccessControlPoint,
4845
+ UUID: "00000264-0000-1000-8000-0026BB765291",
4846
+ description: "The NFC Access Point",
4847
+ relatedCurrentAccTypeEnumIndex: null,
4848
+ relatedTargetAccTypeEnumIndex: null,
4849
+ stringConversionFunction: function ( str ){ return stringToTLV8( str ); },
4850
+ props: {format: Characteristic.Formats.TLV8,
4851
+ allowedWordCount: 0,
4852
+ perms: [Characteristic.Perms.PAIRED_READ,
4853
+ Characteristic.Perms.PAIRED_WRITE,
4854
+ Characteristic.Perms.WRITE_RESPONSE
4855
+ ]
4856
+ },
4857
+ validValues:
4858
+ { }
4859
+ },
4860
+ 227: { type: "NFCAccessSupportedConfiguration",
4861
+ sche: "NFCAccessSupportedConfiguration",
4862
+ characteristic: Characteristic.NFCAccessSupportedConfiguration,
4863
+ UUID: "00000265-0000-1000-8000-0026BB765291",
4864
+ description: "The Devices NFC Access Support Configuration",
4865
+ relatedCurrentAccTypeEnumIndex: null,
4866
+ relatedTargetAccTypeEnumIndex: null,
4867
+ stringConversionFunction: function ( str ){ return stringToTLV8( str ); },
4868
+ props: {format: Characteristic.Formats.TLV8,
4869
+ allowedWordCount: 0,
4870
+ perms: [Characteristic.Perms.PAIRED_READ
4871
+ ]
4872
+ },
4873
+ validValues:
4874
+ { }
4875
+ },
4876
+ 228: { type: "SiriEndpointSessionStatus",
4877
+ sche: "SiriEndpointSessionStatus",
4878
+ characteristic: Characteristic.SiriEndpointSessionStatus,
4879
+ UUID: "00000254-0000-1000-8000-0026BB765291",
4880
+ description: "The Devices Siri endpoint",
4881
+ relatedCurrentAccTypeEnumIndex: null,
4882
+ relatedTargetAccTypeEnumIndex: null,
4883
+ stringConversionFunction: function ( str ){ return stringToTLV8( str ); },
4884
+ props: {format: Characteristic.Formats.TLV8,
4885
+ allowedWordCount: 0,
4886
+ perms: [Characteristic.Perms.PAIRED_READ,
4887
+ Characteristic.Perms.NOTIFY
4888
+ ]
4889
+ },
4890
+ validValues:
4891
+ { }
4892
+ },
4893
+ 229: { type: "ThreadControlPoint",
4894
+ sche: "threadControlPoint",
4895
+ characteristic: Characteristic.ThreadControlPoint,
4896
+ UUID: "00000704-0000-1000-8000-0026BB765291",
4897
+ description: "The Devices thread control point",
4898
+ relatedCurrentAccTypeEnumIndex: null,
4899
+ relatedTargetAccTypeEnumIndex: null,
4900
+ stringConversionFunction: function ( str ){ return stringToTLV8( str ); },
4901
+ props: {format: Characteristic.Formats.TLV8,
4902
+ allowedWordCount: 0,
4903
+ perms: [Characteristic.Perms.PAIRED_WRITE
4904
+ ]
4905
+ },
4906
+ validValues:
4907
+ { }
4908
+ },
4909
+ 230: { type: "ThreadNodeCapabilities",
4910
+ sche: "threadNodeCapabilities",
4911
+ characteristic: Characteristic.ThreadNodeCapabilities,
4912
+ UUID: "00000702-0000-1000-8000-0026BB765291",
4913
+ description: "The Devices thread node capabilities",
4914
+ relatedCurrentAccTypeEnumIndex: null,
4915
+ relatedTargetAccTypeEnumIndex: null,
4916
+ stringConversionFunction: function ( str ){ return stringToInt( str ); },
4917
+ props: {format: Characteristic.Formats.UINT16,
4918
+ allowedWordCount: 1,
4919
+ maxValue: 31,
4920
+ minValue: 0,
4921
+ minStep: 1,
4922
+ perms: [Characteristic.Perms.PAIRED_READ
4923
+ ]
4924
+ },
4925
+ validValues:
4926
+ { }
4927
+ },
4928
+ 231: { type: "ThreadStatus",
4929
+ sche: "threadStatus",
4930
+ characteristic: Characteristic.ThreadStatus,
4931
+ UUID: "00000703-0000-1000-8000-0026BB765291",
4932
+ description: "The Devices thread status",
4933
+ relatedCurrentAccTypeEnumIndex: null,
4934
+ relatedTargetAccTypeEnumIndex: null,
4935
+ stringConversionFunction: function ( str ){ return stringToInt( str ); },
4936
+ props: {format: Characteristic.Formats.UINT16,
4937
+ allowedWordCount: 1,
4938
+ maxValue: 6,
4939
+ minValue: 0,
4940
+ minStep: 1,
4941
+ perms: [Characteristic.Perms.PAIRED_READ,
4942
+ Characteristic.Perms.NOTIFY
4943
+ ]
4944
+ },
4945
+ validValues:
4946
+ { }
4947
+ },
4948
+ 232: { type: "ThreadOpenThreadVersion",
4949
+ sche: "threadOpenThreadVersion",
4950
+ characteristic: Characteristic.ThreadOpenThreadVersion,
4951
+ UUID: "00000706-0000-1000-8000-0026BB765291",
4952
+ description: "The Devices thread version",
4953
+ relatedCurrentAccTypeEnumIndex: null,
4954
+ relatedTargetAccTypeEnumIndex: null,
4955
+ stringConversionFunction: function ( str ){ return stringToString( str ); },
4956
+ props: {format: Characteristic.Formats.STRING,
4957
+ allowedWordCount: 0,
4958
+ perms: [Characteristic.Perms.PAIRED_READ
4959
+ ]
4960
+ },
4961
+ validValues:
4962
+ { }
4777
4963
  }
4778
4964
  };
4779
4965