homebridge-nuheat2 1.2.23 → 1.2.24
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 +8 -0
- package/README.md +3 -2
- package/lib/NuHeatListener.js +8 -4
- package/lib/settings.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to this project should be documented in this file
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.2.24] - 2026-07-08
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Restore Nuheat SignalR notifications on the Conductor/NAM API by using the documented v2 notification hub
|
|
12
|
+
- Subscribe with Nuheat's numeric v2 notification IDs and direct WebSocket transport to avoid flaky negotiated connections behind the new backend
|
|
13
|
+
- Document the v2 notification host and `NUHEAT_NOTIFICATION_HUB_URL` emergency override
|
|
14
|
+
|
|
7
15
|
## [1.2.23] - 2026-07-08
|
|
8
16
|
|
|
9
17
|
### 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 `
|
|
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
|
-
-
|
|
155
|
+
- Monitor Nuheat Conductor v2 notification behavior across more accounts and keep polling as the reliability fallback.
|
package/lib/NuHeatListener.js
CHANGED
|
@@ -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 = [
|
|
17
|
+
this.notificationTypes = [1, 2];
|
|
17
18
|
this.recentNotifications = new Map();
|
|
18
|
-
this.
|
|
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 =
|
|
22
|
+
exports.NUHEAT_NOTIFICATION_HUB_URL = normalizeBaseUrl(process.env.NUHEAT_NOTIFICATION_HUB_URL ||
|
|
23
|
+
buildNuHeatApiUrl(DEFAULT_NUHEAT_NOTIFICATION_HUB_PATH));
|