node-red-contrib-homebridge-automation 0.1.12-beta.37 → 0.1.12-beta.38
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
|
@@ -179,6 +179,10 @@ With a plugin, you can see if it supports Real Time events, by opening the Home
|
|
|
179
179
|
|
|
180
180
|
- Workaround for #111
|
|
181
181
|
|
|
182
|
+
### Dec 15, 2024 - Version 0.2.0
|
|
183
|
+
|
|
184
|
+
- Major code base refresh, and migration from hap-node-client to hap-client ( Potential fix for #120 )
|
|
185
|
+
|
|
182
186
|
# Backlog / Roadmap
|
|
183
187
|
|
|
184
188
|
* [x] - Update Node Information with Homebridge Accessory Details ( hapEndpoint, deviceType, description )
|
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-homebridge-automation",
|
|
3
|
-
"version": "0.1.12-beta.
|
|
3
|
+
"version": "0.1.12-beta.38",
|
|
4
4
|
"description": "NodeRED Automation for HomeBridge",
|
|
5
5
|
"main": "src/HAP-NodeRed.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"document": "./gh-md-toc --insert --no-backup --hide-footer README.md",
|
|
8
8
|
"watch": "nodemon",
|
|
9
|
-
"coverage": "nyc npm t",
|
|
10
|
-
"format": "prettier --write {.,test}/*.js *.html *.md",
|
|
11
9
|
"lint": "eslint --max-warnings=10 .",
|
|
12
10
|
"lint:fix": "eslint --fix --max-warnings=0 .",
|
|
13
11
|
"test": "jest --detectOpenHandles",
|
|
@@ -46,7 +44,7 @@
|
|
|
46
44
|
"dependencies": {
|
|
47
45
|
"better-queue": ">=3.8.12",
|
|
48
46
|
"debug": "^4.3.5",
|
|
49
|
-
"@homebridge/hap-client": "2.0.5-beta.
|
|
47
|
+
"@homebridge/hap-client": "2.0.5-beta.20"
|
|
50
48
|
},
|
|
51
49
|
"author": "NorthernMan54",
|
|
52
50
|
"license": "ISC",
|
package/src/HAP-NodeRed.html
CHANGED
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
$('#node-input-device').val(node.device);
|
|
191
191
|
}
|
|
192
192
|
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
193
|
-
console.log("problem getting evDevices");
|
|
193
|
+
console.log("[hb-config] problem getting evDevices");
|
|
194
194
|
console.log(textStatus);
|
|
195
195
|
});
|
|
196
196
|
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
$('#node-input-device').val(node.device);
|
|
343
343
|
}
|
|
344
344
|
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
345
|
-
console.log("problem getting evDevices");
|
|
345
|
+
console.log("[hb-config] problem getting evDevices");
|
|
346
346
|
console.log(textStatus);
|
|
347
347
|
});
|
|
348
348
|
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
$('#node-input-device').val(node.device);
|
|
493
493
|
}
|
|
494
494
|
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
495
|
-
console.log("problem getting ctDevices");
|
|
495
|
+
console.log("[hb-config] problem getting ctDevices");
|
|
496
496
|
console.log(textStatus);
|
|
497
497
|
});
|
|
498
498
|
|
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
$('#node-input-device').val(node.device);
|
|
646
646
|
}
|
|
647
647
|
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
648
|
-
console.log("problem getting ctDevices");
|
|
648
|
+
console.log("[hb-config] problem getting ctDevices");
|
|
649
649
|
console.log(textStatus);
|
|
650
650
|
});
|
|
651
651
|
|
package/src/hbConfigNode.js
CHANGED
|
@@ -21,12 +21,13 @@ class HBConfigNode {
|
|
|
21
21
|
|
|
22
22
|
// Initialize HAP client
|
|
23
23
|
this.hapClient = new HapClient({
|
|
24
|
-
config: { debug:
|
|
24
|
+
config: { debug: false },
|
|
25
25
|
pin: config.username,
|
|
26
26
|
logger: this.log,
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
this.hapClient.on('instance-discovered', this.waitForNoMoreDiscoveries);
|
|
30
|
+
this.hapClient.on('discovery-ended', this.hapClient.refreshInstances);
|
|
30
31
|
this.waitForNoMoreDiscoveries();
|
|
31
32
|
this.on('close', this.close.bind(this));
|
|
32
33
|
this.refreshInProcess = true; // Prevents multiple refreshes, hapClient kicks of a discovery on start
|
|
@@ -41,7 +42,7 @@ class HBConfigNode {
|
|
|
41
42
|
if (!this.refreshInProcess) {
|
|
42
43
|
|
|
43
44
|
this.monitor.finish();
|
|
44
|
-
this.log.debug('Monitor reported homebridge stability issues, refreshing devices');
|
|
45
|
+
this.log.debug('[hb-config] Monitor reported homebridge stability issues, refreshing devices');
|
|
45
46
|
this.hapClient.on('instance-discovered', this.waitForNoMoreDiscoveries);
|
|
46
47
|
this.hapClient.resetInstancePool();
|
|
47
48
|
this.waitForNoMoreDiscoveries();
|
|
@@ -55,7 +56,7 @@ class HBConfigNode {
|
|
|
55
56
|
if (!this.discoveryTimeout) {
|
|
56
57
|
clearTimeout(this.discoveryTimeout);
|
|
57
58
|
this.discoveryTimeout = setTimeout(() => {
|
|
58
|
-
this.log.debug('No more instances discovered, publishing services');
|
|
59
|
+
this.log.debug('[hb-config] No more instances discovered, publishing services');
|
|
59
60
|
this.hapClient.removeListener('instance-discovered', this.waitForNoMoreDiscoveries);
|
|
60
61
|
this.handleReady();
|
|
61
62
|
this.discoveryTimeout = null;
|
|
@@ -80,7 +81,7 @@ class HBConfigNode {
|
|
|
80
81
|
|
|
81
82
|
this.evDevices = this.toList({ perms: 'ev' });
|
|
82
83
|
this.ctDevices = this.toList({ perms: 'pw' });
|
|
83
|
-
this.log.info(`Devices initialized: evDevices: ${this.evDevices.length}, ctDevices: ${this.ctDevices.length}`);
|
|
84
|
+
this.log.info(`[hb-config] Devices initialized: evDevices: ${this.evDevices.length}, ctDevices: ${this.ctDevices.length}`);
|
|
84
85
|
this.handleDuplicates(this.evDevices);
|
|
85
86
|
this.connectClientNodes();
|
|
86
87
|
}
|
|
@@ -116,10 +117,10 @@ class HBConfigNode {
|
|
|
116
117
|
const { fullName, uniqueId } = endpoint;
|
|
117
118
|
|
|
118
119
|
if (seen.has(fullName)) {
|
|
119
|
-
this.log.warn(`Duplicate device name detected: ${fullName}`);
|
|
120
|
+
this.log.warn(`[hb-config] Duplicate device name detected: ${fullName}`);
|
|
120
121
|
}
|
|
121
122
|
if (seen.has(uniqueId)) {
|
|
122
|
-
this.log.error(`Duplicate uniqueId detected: ${uniqueId}`);
|
|
123
|
+
this.log.error(`[hb-config] Duplicate uniqueId detected: ${uniqueId}`);
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
seen.set(fullName, true);
|
|
@@ -429,8 +429,8 @@
|
|
|
429
429
|
},
|
|
430
430
|
"node-red-contrib-homebridge-automation": {
|
|
431
431
|
"name": "node-red-contrib-homebridge-automation",
|
|
432
|
-
"version": "0.
|
|
433
|
-
"local":
|
|
432
|
+
"version": "0.2.0",
|
|
433
|
+
"local": false,
|
|
434
434
|
"user": false,
|
|
435
435
|
"nodes": {
|
|
436
436
|
"HAP-NodeRed": {
|
|
@@ -443,10 +443,10 @@
|
|
|
443
443
|
"hb-control"
|
|
444
444
|
],
|
|
445
445
|
"enabled": true,
|
|
446
|
-
"local":
|
|
446
|
+
"local": false,
|
|
447
447
|
"user": false,
|
|
448
448
|
"module": "node-red-contrib-homebridge-automation",
|
|
449
|
-
"file": "/Users/sgracey/
|
|
449
|
+
"file": "/Users/sgracey/npm/lib/node_modules/node-red-contrib-homebridge-automation/src/HAP-NodeRed.js"
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
}
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
"node-red-contrib-homebridge-automation": {
|
|
431
431
|
"name": "node-red-contrib-homebridge-automation",
|
|
432
432
|
"version": "0.1.12",
|
|
433
|
-
"local":
|
|
433
|
+
"local": false,
|
|
434
434
|
"user": false,
|
|
435
435
|
"nodes": {
|
|
436
436
|
"HAP-NodeRed": {
|
|
@@ -440,14 +440,13 @@
|
|
|
440
440
|
"hb-event",
|
|
441
441
|
"hb-resume",
|
|
442
442
|
"hb-status",
|
|
443
|
-
"hb-control"
|
|
444
|
-
"hb-configNode"
|
|
443
|
+
"hb-control"
|
|
445
444
|
],
|
|
446
445
|
"enabled": true,
|
|
447
|
-
"local":
|
|
446
|
+
"local": false,
|
|
448
447
|
"user": false,
|
|
449
448
|
"module": "node-red-contrib-homebridge-automation",
|
|
450
|
-
"file": "/Users/sgracey/
|
|
449
|
+
"file": "/Users/sgracey/npm/lib/node_modules/node-red-contrib-homebridge-automation/src/HAP-NodeRed.js"
|
|
451
450
|
}
|
|
452
451
|
}
|
|
453
452
|
}
|