homebridge-lib 6.0.1 → 6.0.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.
|
@@ -103,6 +103,7 @@ class History extends ServiceDelegate {
|
|
|
103
103
|
* _History_ HomeKit service.
|
|
104
104
|
* @param {integer} [params.memorySize=2304] - The memory size, in number of
|
|
105
105
|
* history entries. The default is 4 weeks of 6 entries per hour.
|
|
106
|
+
* @param {?boolean} params.config - Expose config.
|
|
106
107
|
*/
|
|
107
108
|
constructor (accessoryDelegate, params = {}) {
|
|
108
109
|
params.name = accessoryDelegate.name + ' History'
|
|
@@ -175,19 +176,21 @@ class History extends ServiceDelegate {
|
|
|
175
176
|
silent: true
|
|
176
177
|
})
|
|
177
178
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
if (params.config) {
|
|
180
|
+
this.addCharacteristicDelegate({
|
|
181
|
+
key: 'configCommand',
|
|
182
|
+
Characteristic: this.Characteristics.eve.ConfigCommand,
|
|
183
|
+
setter: this._onSetConfig.bind(this)
|
|
184
|
+
// silent: true
|
|
185
|
+
})
|
|
184
186
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
this.addCharacteristicDelegate({
|
|
188
|
+
key: 'configData',
|
|
189
|
+
Characteristic: this.Characteristics.eve.ConfigData,
|
|
190
|
+
getter: this._onGetConfig.bind(this)
|
|
191
|
+
// silent: true
|
|
192
|
+
})
|
|
193
|
+
}
|
|
191
194
|
|
|
192
195
|
accessoryDelegate.propertyDelegate('name')
|
|
193
196
|
.on('didSet', (value) => {
|
|
@@ -343,12 +346,14 @@ class History extends ServiceDelegate {
|
|
|
343
346
|
return hexToBase64(dataStream)
|
|
344
347
|
}
|
|
345
348
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
+
async _onSetConfig (value) {
|
|
350
|
+
// const buffer = Buffer.from(value, 'base64')
|
|
351
|
+
this.debug('Config Request changed to %j', base64ToHex(value))
|
|
352
|
+
}
|
|
349
353
|
|
|
350
|
-
|
|
351
|
-
|
|
354
|
+
async _onGetConfig () {
|
|
355
|
+
return hexToBase64('D200')
|
|
356
|
+
}
|
|
352
357
|
}
|
|
353
358
|
|
|
354
359
|
module.exports = History
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Library for homebridge plugins",
|
|
4
4
|
"author": "Erik Baauw",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"version": "6.0.
|
|
6
|
+
"version": "6.0.2",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"homekit",
|
|
9
9
|
"homebridge"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"upnp": "cli/upnp.js"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
|
-
"homebridge": "^1.
|
|
24
|
+
"homebridge": "^1.6.0",
|
|
25
25
|
"node": "^18.12.1"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|