homebridge-mynest 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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project are documented here. From the first release onward, [release-please](https://github.com/googleapis/release-please) owns this file — do not hand-edit version headings after `0.1.0` ships.
4
4
 
5
+ ## [2.0.2](https://github.com/tbaur/homebridge-mynest/compare/v2.0.1...v2.0.2) (2026-10-05)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * log one diagnostics health warning ([ede8013](https://github.com/tbaur/homebridge-mynest/commit/ede8013cccdf0cf31396755e03a04a2ce7b96966))
11
+
5
12
  ## [2.0.1](https://github.com/tbaur/homebridge-mynest/compare/v2.0.0...v2.0.1) (2026-09-05)
6
13
 
7
14
 
package/README.md CHANGED
@@ -23,7 +23,7 @@ Expose Nest thermostats, Nest Protect smoke/CO alarms, and Nest Temperature Sens
23
23
  ### Reliability
24
24
  - **No accessory churn** on a cloud blip or expired token. Devices leave HomeKit only after Nest-confirmed drops
25
25
  - **Circuit breakers** on REST and Observe so a dead Nest edge fails fast
26
- - **Diagnostics** *(optional):* health heartbeats and healthy/degraded transitions in the Homebridge log
26
+ - **Diagnostics** *(optional):* health heartbeats in the Homebridge log, with one warning when health becomes degraded
27
27
 
28
28
  ### Quality
29
29
  <!-- Canonical test count lives here only; keep other docs number-free to avoid multi-place updates. -->
@@ -18,10 +18,6 @@ function diagnosticLabel(msg) {
18
18
  return 'Diagnostics start';
19
19
  case 'diagnostics.stop':
20
20
  return 'Diagnostics stop';
21
- case 'health.degraded':
22
- return 'Health degraded';
23
- case 'health.recovered':
24
- return 'Health recovered';
25
21
  default:
26
22
  return msg;
27
23
  }
package/dist/platform.js CHANGED
@@ -884,22 +884,20 @@ class MyNestPlatform {
884
884
  this.#diagnosticsTimer = setInterval(() => this.#diagnosticsHeartbeat(), interval);
885
885
  this.#diagnosticsTimer.unref?.();
886
886
  }
887
+ /**
888
+ * Emits one heartbeat. The line is a warning on the interval where health
889
+ * flips from healthy to degraded, and info otherwise. A reader failure stays
890
+ * inside the timer so it cannot crash Homebridge.
891
+ */
887
892
  #diagnosticsHeartbeat() {
888
893
  if (!this.#diagnostics) {
889
894
  return;
890
895
  }
891
896
  try {
892
897
  const report = this.#diagnostics.buildHeartbeat(this.#buildDiagnosticsReaders());
893
- this.#emitDiagnostic('info', report);
894
898
  const health = report.lifecycle.health;
895
- if (this.#lastDiagnosticsHealth !== null && health !== this.#lastDiagnosticsHealth) {
896
- const isDegraded = health === 'degraded';
897
- const transition = {
898
- ...report,
899
- msg: isDegraded ? 'health.degraded' : 'health.recovered',
900
- };
901
- this.#emitDiagnostic(isDegraded ? 'warn' : 'info', transition);
902
- }
899
+ const becameDegraded = this.#lastDiagnosticsHealth === 'healthy' && health === 'degraded';
900
+ this.#emitDiagnostic(becameDegraded ? 'warn' : 'info', report);
903
901
  this.#lastDiagnosticsHealth = health;
904
902
  }
905
903
  catch (error) {
@@ -102,7 +102,7 @@ Architecture and the Homebridge 2 update path: [DEVELOPMENT.md](../DEVELOPMENT.m
102
102
 
103
103
  ## Diagnostics
104
104
 
105
- Set `diagnosticsInterval` to `30`–`86400` to log periodic health heartbeats, plus boot/shutdown snapshots and healthy/degraded transitions. `0` (default) leaves diagnostics off.
105
+ Set `diagnosticsInterval` to `30`–`86400` to log periodic health heartbeats and boot/shutdown snapshots. The heartbeat where health flips from healthy to degraded is a warning; later degraded heartbeats stay at info until it recovers. `0` (default) leaves diagnostics off.
106
106
 
107
107
  `structuredLogs` adds a JSON line next to each human summary. Reports cover REST and Observe transport gauges, breaker state, device inventory, and API latency.
108
108
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-mynest",
3
3
  "displayName": "Homebridge My Nest",
4
- "version": "2.0.1",
4
+ "version": "2.0.2",
5
5
  "description": "Homebridge plugin for Nest thermostats (with Eco Mode), Nest Protect, and Nest Temperature Sensors using a Nest Account access token",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -30,10 +30,10 @@
30
30
  },
31
31
  "homepage": "https://github.com/tbaur/homebridge-mynest#readme",
32
32
  "dependencies": {
33
- "protobufjs": "7.6.5"
33
+ "protobufjs": "7.6.6"
34
34
  },
35
35
  "overrides": {
36
- "js-yaml": "3.15.1",
36
+ "js-yaml": "^3.15.2",
37
37
  "@homebridge/hap-nodejs": "$@homebridge/hap-nodejs"
38
38
  },
39
39
  "devDependencies": {
@@ -47,7 +47,7 @@
47
47
  "homebridge": "^2.1.0",
48
48
  "jest": "^30.4.2",
49
49
  "nock": "^14.0.16",
50
- "ts-jest": "29.4.12",
50
+ "ts-jest": "29.4.14",
51
51
  "typescript": "6.0.3"
52
52
  },
53
53
  "engines": {