node-red-contrib-homekit-bridged 1.7.0 → 1.7.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.
@@ -29,12 +29,12 @@ module.exports = function (node) {
29
29
  const subscribeAndGetSupported = function (service) {
30
30
  const supported = [];
31
31
  const allCharacteristics = service.characteristics.concat(service.optionalCharacteristics);
32
+ node.onCharacteristicGet = ServiceUtils.onCharacteristicGet;
33
+ node.onCharacteristicSet = ServiceUtils.onCharacteristicSet(service.characteristics);
34
+ node.onCharacteristicChange = ServiceUtils.onCharacteristicChange(service.characteristics);
32
35
  allCharacteristics.map((characteristic) => {
33
36
  const cKey = characteristic.constructor.name;
34
37
  supported.push(cKey);
35
- node.onCharacteristicGet = ServiceUtils.onCharacteristicGet;
36
- node.onCharacteristicSet = ServiceUtils.onCharacteristicSet(service.characteristics);
37
- node.onCharacteristicChange = ServiceUtils.onCharacteristicChange(service.characteristics);
38
38
  characteristic.on('get', node.onCharacteristicGet);
39
39
  characteristic.on('set', node.onCharacteristicSet);
40
40
  characteristic.on('change', node.onCharacteristicChange);
@@ -29,12 +29,12 @@ module.exports = function (node) {
29
29
  const subscribeAndGetSupported = function (service) {
30
30
  const supported = [];
31
31
  const allCharacteristics = service.characteristics.concat(service.optionalCharacteristics);
32
+ node.onCharacteristicGet = ServiceUtils.onCharacteristicGet(service.characteristics);
33
+ node.onCharacteristicSet = ServiceUtils.onCharacteristicSet(service.characteristics);
34
+ node.onCharacteristicChange = ServiceUtils.onCharacteristicChange(service.characteristics);
32
35
  allCharacteristics.map((characteristic) => {
33
36
  const cKey = characteristic.constructor.name;
34
37
  supported.push(cKey);
35
- node.onCharacteristicGet = ServiceUtils.onCharacteristicGet(service.characteristics);
36
- node.onCharacteristicSet = ServiceUtils.onCharacteristicSet(service.characteristics);
37
- node.onCharacteristicChange = ServiceUtils.onCharacteristicChange(service.characteristics);
38
38
  characteristic.on('get', node.onCharacteristicGet);
39
39
  characteristic.on('set', node.onCharacteristicSet);
40
40
  characteristic.on('change', node.onCharacteristicChange);
@@ -23,7 +23,7 @@
23
23
  dataType: 'json',
24
24
  async: false,
25
25
  success: function (data) {
26
- config = data
26
+ nrchkbConfig = data
27
27
  },
28
28
  })
29
29
 
@@ -279,8 +279,8 @@
279
279
  sortable: true
280
280
  })
281
281
 
282
- for (let i = 0; i < config.customCharacteristics.length; i++) {
283
- const customCharacteristic = config.customCharacteristics[i]
282
+ for (let i = 0; i < nrchkbConfig.customCharacteristics.length; i++) {
283
+ const customCharacteristic = nrchkbConfig.customCharacteristics[i]
284
284
  $('#node-input-customCharacteristics-container').editableList('addItem', customCharacteristic)
285
285
  }
286
286
  },
@@ -312,7 +312,7 @@
312
312
  let accessoryCategories
313
313
  let nrchkbVersion = '0.0.0'
314
314
  let nrchkbExperimental = false
315
- let config = []
315
+ let nrchkbConfig = {}
316
316
 
317
317
  //HomeKit Service Types
318
318
  $.getJSON('nrchkb/service/types', function (data) {
@@ -393,7 +393,7 @@
393
393
  })
394
394
  })
395
395
 
396
- config.customCharacteristics = customCharacteristics
396
+ nrchkbConfig.customCharacteristics = customCharacteristics
397
397
 
398
398
  $.ajax({
399
399
  type: 'POST',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-homekit-bridged",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Node-RED nodes to simulate Apple HomeKit devices.",
5
5
  "main": "build/nodes/nrchkb.js",
6
6
  "scripts": {