homebridge-nuheat2 1.2.23 → 1.2.25

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
@@ -4,6 +4,22 @@ All notable changes to this project should be documented in this file
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.2.25] - 2026-07-09
8
+
9
+ ### Fixed
10
+
11
+ - Make “Expose away-mode switches for all groups” override the optional group allow-list so every Nuheat group appears in HomeKit
12
+ - Support the string group identifiers returned by Nuheat's current Conductor/NAM API
13
+ - Update the `ws` dependency override to 7.5.11 to resolve a memory-exhaustion denial-of-service advisory
14
+
15
+ ## [1.2.24] - 2026-07-08
16
+
17
+ ### Fixed
18
+
19
+ - Restore Nuheat SignalR notifications on the Conductor/NAM API by using the documented v2 notification hub
20
+ - Subscribe with Nuheat's numeric v2 notification IDs and direct WebSocket transport to avoid flaky negotiated connections behind the new backend
21
+ - Document the v2 notification host and `NUHEAT_NOTIFICATION_HUB_URL` emergency override
22
+
7
23
  ## [1.2.23] - 2026-07-08
8
24
 
9
25
  ### Fixed
package/README.md CHANGED
@@ -110,6 +110,7 @@ Nuheat migrated Signature thermostats to the Conductor server architecture in Ju
110
110
 
111
111
  - Identity: `https://identity.nam.mynuheat.com`
112
112
  - OpenAPI: `https://api.nam.mynuheat.com`
113
+ - Notifications: `https://api.nam.mynuheat.com/v2/notificationsHost`
113
114
 
114
115
  References:
115
116
 
@@ -121,7 +122,7 @@ References:
121
122
  - Enable debug logging from the custom UI only while troubleshooting. Debug logs include detailed Nuheat API, notification, and accessory activity.
122
123
  - If accessories do not appear after changing allow-lists, save the settings and restart the Nuheat child bridge.
123
124
  - If login fails, confirm the same email and password work in the Nuheat app or web portal.
124
- - If Nuheat changes regional API routing again, advanced users can temporarily override the runtime hosts with `NUHEAT_API_BASE_URL` and `NUHEAT_IDENTITY_BASE_URL`.
125
+ - If Nuheat changes regional API routing again, advanced users can temporarily override the runtime hosts with `NUHEAT_API_BASE_URL`, `NUHEAT_IDENTITY_BASE_URL`, and `NUHEAT_NOTIFICATION_HUB_URL`.
125
126
  - If Homebridge shows stale UI fields after an update, close and reopen the plugin settings page.
126
127
 
127
128
  ## Development
@@ -151,4 +152,4 @@ This project is maintained by `applemanj` and retains attribution to SenorShaun
151
152
 
152
153
  - Validate the PKCE public-client flow against more real-world Nuheat accounts.
153
154
  - Verify group and away-mode behavior against current live API responses.
154
- - Evaluate whether SignalR notifications can reduce polling further in real-world deployments.
155
+ - Monitor Nuheat Conductor v2 notification behavior across more accounts and keep polling as the reliability fallback.
package/index.js CHANGED
@@ -130,12 +130,13 @@ class NuHeatPlatform {
130
130
  this.log.error("Error getting data from NuHeatAPI");
131
131
  return;
132
132
  }
133
- if (groupArray.length === 0) {
134
- this.log.info("No groups defined in config. Auto populating away mode switches by pulling all groups from the account.");
133
+ const exposeAllGroups = !!this.config.autoPopulateAwayModeSwitches;
134
+ if (exposeAllGroups) {
135
+ this.log.info("Auto populating away mode switches by pulling all groups from the account.");
135
136
  }
136
137
  await Promise.all(response.map(async (deviceData) => {
137
- if (!(groupArray.length === 0 ||
138
- groupArray.find((device) => device.groupName == deviceData.groupName && !device.disabled))) {
138
+ const configuredGroup = groupArray.find((device) => device.groupName == deviceData.groupName && !device.disabled);
139
+ if (!exposeAllGroups && !configuredGroup) {
139
140
  return;
140
141
  }
141
142
  const uuid = UUIDGen.generate(String(deviceData.groupId));
@@ -28,7 +28,7 @@ class NuHeatGroup {
28
28
  }
29
29
  async setAwayMode(value, callback) {
30
30
  this.log.debug("Setting group away mode to " + value, this.deviceData.groupName);
31
- const response = await this.NuHeatAPI.setAwayMode(this.deviceData.groupId ?? 0, value);
31
+ const response = await this.NuHeatAPI.setAwayMode(this.deviceData.groupId ?? "", value);
32
32
  if (!response) {
33
33
  this.log.error("Error setting away mode", this.deviceData.groupName);
34
34
  callback(new Error("Error: setAwayMode"));
@@ -39,7 +39,7 @@ class NuHeatGroup {
39
39
  }
40
40
  }
41
41
  async updateAccessory() {
42
- const response = await this.NuHeatAPI.refreshGroup(this.deviceData.groupId ?? 0);
42
+ const response = await this.NuHeatAPI.refreshGroup(this.deviceData.groupId ?? "");
43
43
  if (!response) {
44
44
  this.log.error("Error getting updated data", this.deviceData.groupName);
45
45
  }
@@ -8,19 +8,23 @@ class NuHeatListener {
8
8
  log;
9
9
  notificationTypes;
10
10
  connection;
11
+ connectionOptions;
11
12
  recentNotifications;
12
13
  constructor(nuHeatAPI, nuheatPlatform) {
13
14
  this.nuHeatAPI = nuHeatAPI;
14
15
  this.nuHeatPlatform = nuheatPlatform;
15
16
  this.log = nuheatPlatform.log;
16
- this.notificationTypes = ["2", "3", "4"];
17
+ this.notificationTypes = [1, 2];
17
18
  this.recentNotifications = new Map();
18
- this.connection = new signalR.HubConnectionBuilder()
19
- .withUrl(settings_1.NUHEAT_NOTIFICATION_HUB_URL, {
19
+ this.connectionOptions = {
20
20
  accessTokenFactory: async () => {
21
21
  return (await this.nuHeatAPI.returnAccessToken()) || "";
22
22
  },
23
- })
23
+ skipNegotiation: true,
24
+ transport: signalR.HttpTransportType.WebSockets,
25
+ };
26
+ this.connection = new signalR.HubConnectionBuilder()
27
+ .withUrl(settings_1.NUHEAT_NOTIFICATION_HUB_URL, this.connectionOptions)
24
28
  .withAutomaticReconnect()
25
29
  .build();
26
30
  }
package/lib/settings.js CHANGED
@@ -7,6 +7,7 @@ exports.NUHEAT_API_CLIENT_SECRET = "";
7
7
  exports.NUHEAT_API_REDIRECT_URI = "http://localhost";
8
8
  const DEFAULT_NUHEAT_API_BASE_URL = "https://api.nam.mynuheat.com";
9
9
  const DEFAULT_NUHEAT_IDENTITY_BASE_URL = "https://identity.nam.mynuheat.com";
10
+ const DEFAULT_NUHEAT_NOTIFICATION_HUB_PATH = "/v2/notificationsHost";
10
11
  function normalizeBaseUrl(url) {
11
12
  return url.replace(/\/+$/, "");
12
13
  }
@@ -18,4 +19,5 @@ function buildNuHeatApiUrl(path) {
18
19
  exports.NUHEAT_API_AUTHORIZE_URI = exports.NUHEAT_IDENTITY_BASE_URL + "/connect/authorize";
19
20
  exports.NUHEAT_API_TOKEN_URI = exports.NUHEAT_IDENTITY_BASE_URL + "/connect/token";
20
21
  exports.NUHEAT_API_CONSENT_URI = exports.NUHEAT_IDENTITY_BASE_URL + "/consent";
21
- exports.NUHEAT_NOTIFICATION_HUB_URL = exports.NUHEAT_API_BASE_URL + "/notificationsHost";
22
+ exports.NUHEAT_NOTIFICATION_HUB_URL = normalizeBaseUrl(process.env.NUHEAT_NOTIFICATION_HUB_URL ||
23
+ buildNuHeatApiUrl(DEFAULT_NUHEAT_NOTIFICATION_HUB_PATH));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-nuheat2",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
4
4
  "description": "Homebridge Platform for NuHeat Signature Thermostats",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -42,7 +42,7 @@
42
42
  "node-html-parser": "^5.2.0"
43
43
  },
44
44
  "overrides": {
45
- "ws": "^7.5.10",
45
+ "ws": "^7.5.11",
46
46
  "tough-cookie": "^4.1.3"
47
47
  },
48
48
  "engines": {