homebridge-zwave-usb 2.0.1 → 2.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.
@@ -303,6 +303,11 @@ class ControllerAccessory {
303
303
  }
304
304
  this.exclusionService.updateCharacteristic(this.platform.Characteristic.On, false);
305
305
  },
306
+ 'heal network progress': (progress) => {
307
+ const done = Array.from(progress.values()).filter((v) => v !== 0).length;
308
+ const total = progress.size;
309
+ this.statusChar.updateValue(`Heal: ${done}/${total}`);
310
+ },
306
311
  'heal network done': () => {
307
312
  this.platform.log.info('Controller event: Heal Network Done');
308
313
  this.isHealActive = false;
@@ -70,10 +70,15 @@ class ZWaveController extends events_1.EventEmitter {
70
70
  },
71
71
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
72
72
  'rebuild routes progress': (progress) => {
73
+ const done = Array.from(progress.values()).filter((v) => v !== 0).length;
74
+ const total = progress.size;
75
+ this.log.info(`Heal Network Progress: ${done}/${total} nodes completed`);
76
+ this.emit('status updated', `Heal: ${done}/${total}`);
73
77
  this.emit('heal network progress', progress);
74
78
  },
75
79
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
80
  'rebuild routes done': (result) => {
81
+ this.log.info('Heal Network Complete');
77
82
  this.emit('status updated', 'Heal Network Done');
78
83
  setTimeout(() => this.emit('status updated', 'Driver Ready'), 5000);
79
84
  this.emit('heal network done', result);
@@ -583,8 +588,11 @@ class ZWaveController extends events_1.EventEmitter {
583
588
  if (!this.driver) {
584
589
  return false;
585
590
  }
591
+ this.log.info('Z-Wave Controller: Requesting rebuild of all routes (Network Heal)...');
586
592
  try {
587
- return await this.driver.controller.beginRebuildingRoutes();
593
+ const started = await this.driver.controller.beginRebuildingRoutes();
594
+ this.log.info(`Z-Wave Controller: Heal started: ${started}`);
595
+ return started;
588
596
  }
589
597
  catch (err) {
590
598
  this.log.error('Failed to start network heal:', err);
@@ -595,8 +603,11 @@ class ZWaveController extends events_1.EventEmitter {
595
603
  if (!this.driver) {
596
604
  return false;
597
605
  }
606
+ this.log.info('Z-Wave Controller: Requesting to stop network heal...');
598
607
  try {
599
- return await this.driver.controller.stopRebuildingRoutes();
608
+ const stopped = await this.driver.controller.stopRebuildingRoutes();
609
+ this.log.info(`Z-Wave Controller: Heal stopped: ${stopped}`);
610
+ return stopped;
600
611
  }
601
612
  catch (err) {
602
613
  this.log.error('Failed to stop network heal:', err);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-zwave-usb",
3
3
  "displayName": "Homebridge Z-Wave USB",
4
- "version": "2.0.1",
4
+ "version": "2.0.2",
5
5
  "description": "A Homebridge dynamic platform plugin for Z-Wave USB controllers using zwave-js.",
6
6
  "license": "Polyform-Noncommercial-1.0.0",
7
7
  "funding": {