homebridge-nuheat2 1.2.20 → 1.2.22

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,23 @@ All notable changes to this project should be documented in this file
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.2.22] - 2026-07-07
8
+
9
+ ### Fixed
10
+
11
+ - Switch Nuheat OAuth, REST, and notification defaults to the Conductor North America hosts after the July 2026 Signature thermostat migration
12
+ - Centralize Nuheat endpoint construction and add environment-variable host overrides for emergency troubleshooting
13
+
14
+ ### Changed
15
+
16
+ - Document the Conductor/NAM API host migration in the README
17
+
18
+ ## [1.2.21] - 2026-06-25
19
+
20
+ ### Changed
21
+
22
+ - Add explicit package author metadata so npm identifies Joshua Appleman as the package author
23
+
7
24
  ## [1.2.20] - 2026-04-30
8
25
 
9
26
  ### Changed
package/README.md CHANGED
@@ -106,9 +106,14 @@ If `exposeScheduleSwitches` is enabled, the plugin will also create one switch p
106
106
 
107
107
  This plugin uses Nuheat's PKCE-based public client for normal authentication. The built-in public `clientId` is `homebridge-nuheat2_260421`; there is no distributable client secret and no user API key setup is required.
108
108
 
109
+ Nuheat migrated Signature thermostats to the Conductor server architecture in July 2026. Current plugin releases use the North America Conductor API hosts by default:
110
+
111
+ - Identity: `https://identity.nam.mynuheat.com`
112
+ - OpenAPI: `https://api.nam.mynuheat.com`
113
+
109
114
  References:
110
115
 
111
- - [Nuheat OpenAPI docs](https://api.mynuheat.com/)
116
+ - [Nuheat OpenAPI docs](https://api.nam.mynuheat.com/)
112
117
  - [Nuheat API access request page](https://www.nuheat.com/openapi)
113
118
 
114
119
  ## Troubleshooting
@@ -116,6 +121,7 @@ References:
116
121
  - Enable debug logging from the custom UI only while troubleshooting. Debug logs include detailed Nuheat API, notification, and accessory activity.
117
122
  - If accessories do not appear after changing allow-lists, save the settings and restart the Nuheat child bridge.
118
123
  - 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`.
119
125
  - If Homebridge shows stale UI fields after an update, close and reopen the plugin settings page.
120
126
 
121
127
  ## Development
package/lib/NuHeatAPI.js CHANGED
@@ -108,7 +108,7 @@ class NuHeatAPI {
108
108
  return requestBody;
109
109
  }
110
110
  async setAwayMode(groupId, awayMode) {
111
- const callURL = "https://api.mynuheat.com/api/v1/Group";
111
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Group");
112
112
  const callOptions = {
113
113
  body: JSON.stringify({
114
114
  groupId,
@@ -135,7 +135,7 @@ class NuHeatAPI {
135
135
  else {
136
136
  scheduleMode = NuHeatModels_1.SCHEDULE_MODE.AUTO;
137
137
  }
138
- const callURL = "https://api.mynuheat.com/api/v1/Thermostat";
138
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Thermostat");
139
139
  const callBody = {
140
140
  serialNumber,
141
141
  setPointTemp,
@@ -158,7 +158,7 @@ class NuHeatAPI {
158
158
  });
159
159
  }
160
160
  async updateThermostat(thermostatUpdate) {
161
- const callURL = "https://api.mynuheat.com/api/v1/Thermostat";
161
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Thermostat");
162
162
  const callOptions = {
163
163
  body: JSON.stringify(thermostatUpdate),
164
164
  method: "PUT",
@@ -168,48 +168,48 @@ class NuHeatAPI {
168
168
  });
169
169
  }
170
170
  async refreshGroup(groupId) {
171
- const callURL = "https://api.mynuheat.com/api/v1/Group/" + groupId;
171
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Group/" + groupId);
172
172
  return await this.makeAPICall(callURL, {}, { normalize: NuHeatModels_1.normalizeGroup });
173
173
  }
174
174
  async refreshGroups() {
175
- const callURL = "https://api.mynuheat.com/api/v1/Group";
175
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Group");
176
176
  return await this.makeAPICall(callURL, {}, {
177
177
  normalize: NuHeatModels_1.normalizeGroup,
178
178
  normalizeArray: true,
179
179
  });
180
180
  }
181
181
  async refreshThermostat(serialNumber) {
182
- const callURL = "https://api.mynuheat.com/api/v1/Thermostat/" + serialNumber;
182
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Thermostat/" + serialNumber);
183
183
  return await this.makeAPICall(callURL, {}, {
184
184
  normalize: NuHeatModels_1.normalizeThermostat,
185
185
  });
186
186
  }
187
187
  async refreshThermostats() {
188
- const callURL = "https://api.mynuheat.com/api/v1/Thermostat";
188
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Thermostat");
189
189
  return await this.makeAPICall(callURL, {}, {
190
190
  normalize: NuHeatModels_1.normalizeThermostat,
191
191
  normalizeArray: true,
192
192
  });
193
193
  }
194
194
  async getAccount() {
195
- const callURL = "https://api.mynuheat.com/api/v1/Account";
195
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Account");
196
196
  return await this.makeAPICall(callURL, {}, { normalize: NuHeatModels_1.normalizeAccount });
197
197
  }
198
198
  async refreshSchedule(serialNumber) {
199
- const callURL = "https://api.mynuheat.com/api/v1/Schedule/" + serialNumber;
199
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Schedule/" + serialNumber);
200
200
  return await this.makeAPICall(callURL, {}, {
201
201
  normalize: NuHeatModels_1.normalizeSchedule,
202
202
  });
203
203
  }
204
204
  async refreshSchedules() {
205
- const callURL = "https://api.mynuheat.com/api/v1/Schedule";
205
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Schedule");
206
206
  return await this.makeAPICall(callURL, {}, {
207
207
  normalize: NuHeatModels_1.normalizeSchedule,
208
208
  normalizeArray: true,
209
209
  });
210
210
  }
211
211
  async updateSchedule(scheduleModel) {
212
- const callURL = "https://api.mynuheat.com/api/v1/Schedule";
212
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/Schedule");
213
213
  return await this.makeAPICall(callURL, {
214
214
  body: JSON.stringify(scheduleModel),
215
215
  method: "PUT",
@@ -218,28 +218,19 @@ class NuHeatAPI {
218
218
  });
219
219
  }
220
220
  async refreshEnergyLogDay(serialNumber, date) {
221
- const callURL = "https://api.mynuheat.com/api/v1/EnergyLog/Day/" +
222
- serialNumber +
223
- "/" +
224
- date;
221
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/EnergyLog/Day/" + serialNumber + "/" + date);
225
222
  return await this.makeAPICall(callURL, {}, {
226
223
  normalize: NuHeatModels_1.normalizeEnergyUsage,
227
224
  });
228
225
  }
229
226
  async refreshEnergyLogWeek(serialNumber, date) {
230
- const callURL = "https://api.mynuheat.com/api/v1/EnergyLog/Week/" +
231
- serialNumber +
232
- "/" +
233
- date;
227
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/EnergyLog/Week/" + serialNumber + "/" + date);
234
228
  return await this.makeAPICall(callURL, {}, {
235
229
  normalize: NuHeatModels_1.normalizeEnergyUsage,
236
230
  });
237
231
  }
238
232
  async refreshEnergyLogMonth(serialNumber, year) {
239
- const callURL = "https://api.mynuheat.com/api/v1/EnergyLog/Month/" +
240
- serialNumber +
241
- "/" +
242
- year;
233
+ const callURL = (0, settings_1.buildNuHeatApiUrl)("/api/v1/EnergyLog/Month/" + serialNumber + "/" + year);
243
234
  return await this.makeAPICall(callURL, {}, {
244
235
  normalize: NuHeatModels_1.normalizeEnergyUsage,
245
236
  });
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  const signalR = require("@microsoft/signalr");
3
+ const settings_1 = require("./settings");
3
4
  const NOTIFICATION_DEDUPE_WINDOW_MS = 2000;
4
5
  class NuHeatListener {
5
6
  nuHeatAPI;
@@ -15,7 +16,7 @@ class NuHeatListener {
15
16
  this.notificationTypes = ["2", "3", "4"];
16
17
  this.recentNotifications = new Map();
17
18
  this.connection = new signalR.HubConnectionBuilder()
18
- .withUrl("https://api.mynuheat.com/notificationsHost", {
19
+ .withUrl(settings_1.NUHEAT_NOTIFICATION_HUB_URL, {
19
20
  accessTokenFactory: async () => {
20
21
  return (await this.nuHeatAPI.returnAccessToken()) || "";
21
22
  },
package/lib/settings.js CHANGED
@@ -1,9 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NUHEAT_API_CONSENT_URI = exports.NUHEAT_API_TOKEN_URI = exports.NUHEAT_API_AUTHORIZE_URI = exports.NUHEAT_API_REDIRECT_URI = exports.NUHEAT_API_CLIENT_SECRET = exports.NUHEAT_API_CLIENT_ID = void 0;
3
+ exports.NUHEAT_NOTIFICATION_HUB_URL = exports.NUHEAT_API_CONSENT_URI = exports.NUHEAT_API_TOKEN_URI = exports.NUHEAT_API_AUTHORIZE_URI = exports.NUHEAT_IDENTITY_BASE_URL = exports.NUHEAT_API_BASE_URL = exports.NUHEAT_API_REDIRECT_URI = exports.NUHEAT_API_CLIENT_SECRET = exports.NUHEAT_API_CLIENT_ID = void 0;
4
+ exports.buildNuHeatApiUrl = buildNuHeatApiUrl;
4
5
  exports.NUHEAT_API_CLIENT_ID = "homebridge-nuheat2_260421";
5
6
  exports.NUHEAT_API_CLIENT_SECRET = "";
6
7
  exports.NUHEAT_API_REDIRECT_URI = "http://localhost";
7
- exports.NUHEAT_API_AUTHORIZE_URI = "https://identity.mynuheat.com/connect/authorize";
8
- exports.NUHEAT_API_TOKEN_URI = "https://identity.mynuheat.com/connect/token";
9
- exports.NUHEAT_API_CONSENT_URI = "https://identity.mynuheat.com/consent";
8
+ const DEFAULT_NUHEAT_API_BASE_URL = "https://api.nam.mynuheat.com";
9
+ const DEFAULT_NUHEAT_IDENTITY_BASE_URL = "https://identity.nam.mynuheat.com";
10
+ function normalizeBaseUrl(url) {
11
+ return url.replace(/\/+$/, "");
12
+ }
13
+ exports.NUHEAT_API_BASE_URL = normalizeBaseUrl(process.env.NUHEAT_API_BASE_URL || DEFAULT_NUHEAT_API_BASE_URL);
14
+ exports.NUHEAT_IDENTITY_BASE_URL = normalizeBaseUrl(process.env.NUHEAT_IDENTITY_BASE_URL || DEFAULT_NUHEAT_IDENTITY_BASE_URL);
15
+ function buildNuHeatApiUrl(path) {
16
+ return exports.NUHEAT_API_BASE_URL + (path.startsWith("/") ? path : "/" + path);
17
+ }
18
+ exports.NUHEAT_API_AUTHORIZE_URI = exports.NUHEAT_IDENTITY_BASE_URL + "/connect/authorize";
19
+ exports.NUHEAT_API_TOKEN_URI = exports.NUHEAT_IDENTITY_BASE_URL + "/connect/token";
20
+ exports.NUHEAT_API_CONSENT_URI = exports.NUHEAT_IDENTITY_BASE_URL + "/consent";
21
+ exports.NUHEAT_NOTIFICATION_HUB_URL = exports.NUHEAT_API_BASE_URL + "/notificationsHost";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-nuheat2",
3
- "version": "1.2.20",
3
+ "version": "1.2.22",
4
4
  "description": "Homebridge Platform for NuHeat Signature Thermostats",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,7 +24,11 @@
24
24
  "bugs": {
25
25
  "url": "https://github.com/applemanj/homebridge-nuheat2/issues"
26
26
  },
27
- "author": "applemanj",
27
+ "author": {
28
+ "name": "Joshua Appleman",
29
+ "email": "joshua@appleman.us",
30
+ "url": "https://github.com/applemanj"
31
+ },
28
32
  "contributors": [
29
33
  "SenorShaun (original plugin author)"
30
34
  ],