node-red-contrib-homebridge-automation 0.1.12-beta.40 → 0.1.12-beta.41

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
@@ -183,6 +183,7 @@ With a plugin, you can see if it supports Real Time events, by opening the Home
183
183
  ### Dec 15, 2024 - Version 0.2.0
184
184
 
185
185
  - Major code base refresh, and migration from hap-node-client to hap-client ( Potential fix for #120 )
186
+ - With the change in connectivity to homebridge, please validate all your nodes are connected after the update. And pay particular attention to `Camera` nodes, as for some devices the name has changed.
186
187
  - Testing and Development was completed on Node-RED version: v4.0.2 and Node.js version: v20.18.1
187
188
 
188
189
  # Backlog / Roadmap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-homebridge-automation",
3
- "version": "0.1.12-beta.40",
3
+ "version": "0.1.12-beta.41",
4
4
  "description": "NodeRED Automation for HomeBridge",
5
5
  "main": "src/HAP-NodeRed.js",
6
6
  "scripts": {
@@ -76,7 +76,6 @@ class HBConfigNode {
76
76
  this.hbDevices.push(updatedService);
77
77
  }
78
78
  });
79
-
80
79
  this.evDevices = this.toList({ perms: 'ev' });
81
80
  this.ctDevices = this.toList({ perms: 'pw' });
82
81
  this.log(`Devices initialized: evDevices: ${this.evDevices.length}, ctDevices: ${this.ctDevices.length}`);
@@ -92,7 +91,6 @@ class HBConfigNode {
92
91
  'Outlet', 'Smoke Sensor', 'Speaker', 'Stateless Programmable Switch', 'Switch',
93
92
  'Television', 'Temperature Sensor', 'Thermostat', 'Contact Sensor',
94
93
  ]);
95
-
96
94
  return filterUnique(this.hbDevices)
97
95
  .filter(service => supportedTypes.has(service.humanType))
98
96
  .map(service => ({
@@ -158,7 +156,7 @@ class HBConfigNode {
158
156
  const uniqueDevices = new Set();
159
157
 
160
158
  const monitorNodes = Object.values(this.clientNodes)
161
- .filter(node => ['hb-status', 'hb-control'].includes(node.type)) // Filter by type
159
+ .filter(node => ['hb-status', 'hb-control', 'hb-event', 'hb-resume'].includes(node.type)) // Filter by type
162
160
  .filter(node => {
163
161
  if (uniqueDevices.has(node.device)) {
164
162
  return false; // Exclude duplicates
@@ -230,7 +228,7 @@ class HBConfigNode {
230
228
  const filterUnique = (data) => {
231
229
  const seen = new Set();
232
230
  return data.filter(item => {
233
- const uniqueKey = `${item.aid}-${item.serviceName}-${item.instance.username}-${item.instance.port}`;
231
+ const uniqueKey = `${item.aid}-${item.serviceName}-${item.humanType}-${item.instance.username}-${item.instance.port}`;
234
232
  if (seen.has(uniqueKey)) return false;
235
233
  seen.add(uniqueKey);
236
234
  return true;