homebridge-nuheat2 1.2.4 → 1.2.6

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
@@ -1,97 +1,121 @@
1
- # Changelog
2
-
3
- All notable changes to this project should be documented in this file
4
-
1
+ # Changelog
2
+
3
+ All notable changes to this project should be documented in this file
4
+
5
5
  ## [Unreleased]
6
6
 
7
- ## [1.2.4] - 2026-04-11
7
+ ## [1.2.6] - 2026-04-11
8
8
 
9
9
  ### Added
10
10
 
11
- - Swagger-aligned internal model helpers for account, thermostat, schedule, group, and energy responses
12
- - Optional per-thermostat schedule switches that can resume schedule mode from HomeKit
13
- - Account, schedule, and energy log API helpers for future UI and automation features
14
-
15
- ### Changed
16
-
17
- - Delay platform startup until Homebridge finishes restoring cached accessories
18
- - Allow overriding Nuheat OAuth client settings through config or environment variables
19
- - Improve SignalR reconnection handling and token refresh behavior
20
- - Add regression tests and modernize package metadata for current Homebridge releases
21
- - Publish the maintained fork under the npm package identity `homebridge-nuheat2`
22
- - Simplify thermostat operating-mode handling to match the documented Nuheat Swagger model
23
- - Refresh thermostats when Nuheat sends schedule notifications
24
-
25
- ### Fixed
26
-
27
- - Correct manual-mode thermostat mapping so HomeKit no longer snaps back to off
28
- - Fix thermostat online-state handling so status updates no longer rely on an assignment bug
29
- - Pin transitive websocket and cookie dependencies away from known vulnerable versions
30
-
31
- ## [1.2.3] - 2024-11-04
32
-
33
- ### Fixed
34
-
35
- - Bug when using away mode switches
36
- - Variable handling in some debug logging
37
-
38
- ## [1.2.2] - 2023-06-13
39
-
40
- ### Fixed
41
-
42
- - variable typo
43
-
44
- ## [1.2.1] - 2023-06-01
45
-
46
- ### Fixed
47
-
48
- - hold length bug
49
-
50
- ## [1.2.0] - 2023-05-26
11
+ - Add an `enableNotifications` config option so SignalR can be disabled during troubleshooting
51
12
 
52
13
  ### Changed
53
14
 
54
- - client secret for api auth
15
+ - Skip group setup and refresh calls unless away-mode groups are actually configured
16
+ - Improve Nuheat API error logging with request method, endpoint, status code, and response snippets
55
17
 
56
- ### Fixed
57
-
58
- - async updates from the api to reduce cookie creation
59
-
60
- ## [1.1.4] - 2023-05-12
61
-
62
- ### Changed
63
-
64
- - error handling when unable to get access token, as to not crash homebridge
65
-
66
- ## [1.1.3] - 2023-04-17
67
-
68
- ### Fixed
69
-
70
- - typo in away mode
71
-
72
- ## [1.1.2] - 2022-12-24
73
-
74
- ### Fixed
75
-
76
- - some unhandled api auth error
18
+ ## [1.2.5] - 2026-04-11
77
19
 
78
20
  ### Changed
79
21
 
80
- - some debug logging code
81
-
82
- ## [1.1.1] - 2022-11-17
22
+ - Refactor platform accessory setup paths to reduce repeated lookups and simplify accessory updates
23
+ - Consolidate shared Homebridge test stubs into reusable helpers
24
+ - Restrict the test script to `*.test.js` files for cleaner local and CI output
83
25
 
84
26
  ### Fixed
85
27
 
86
- - changed the 'homebridge-nuheat' name to be lower case so HOOBS handles properly
87
-
88
- ## [1.1.0] - 2022-11-15
28
+ - Improve SignalR notification tracing readability
29
+ - Correct setpoint debug log spacing in thermostat updates
89
30
 
90
- ### Added
91
-
92
- - Added `homebridge-ui` support with auto detection
93
- - Added Away Mode switches for groups
94
-
95
- ### Changed
96
-
97
- - Changed the underlying API to use nuheats new api system
31
+ ## [1.2.4] - 2026-04-11
32
+
33
+ ### Added
34
+
35
+ - Swagger-aligned internal model helpers for account, thermostat, schedule, group, and energy responses
36
+ - Optional per-thermostat schedule switches that can resume schedule mode from HomeKit
37
+ - Account, schedule, and energy log API helpers for future UI and automation features
38
+
39
+ ### Changed
40
+
41
+ - Delay platform startup until Homebridge finishes restoring cached accessories
42
+ - Allow overriding Nuheat OAuth client settings through config or environment variables
43
+ - Improve SignalR reconnection handling and token refresh behavior
44
+ - Add regression tests and modernize package metadata for current Homebridge releases
45
+ - Publish the maintained fork under the npm package identity `homebridge-nuheat2`
46
+ - Simplify thermostat operating-mode handling to match the documented Nuheat Swagger model
47
+ - Refresh thermostats when Nuheat sends schedule notifications
48
+
49
+ ### Fixed
50
+
51
+ - Correct manual-mode thermostat mapping so HomeKit no longer snaps back to off
52
+ - Fix thermostat online-state handling so status updates no longer rely on an assignment bug
53
+ - Pin transitive websocket and cookie dependencies away from known vulnerable versions
54
+
55
+ ## [1.2.3] - 2024-11-04
56
+
57
+ ### Fixed
58
+
59
+ - Bug when using away mode switches
60
+ - Variable handling in some debug logging
61
+
62
+ ## [1.2.2] - 2023-06-13
63
+
64
+ ### Fixed
65
+
66
+ - variable typo
67
+
68
+ ## [1.2.1] - 2023-06-01
69
+
70
+ ### Fixed
71
+
72
+ - hold length bug
73
+
74
+ ## [1.2.0] - 2023-05-26
75
+
76
+ ### Changed
77
+
78
+ - client secret for api auth
79
+
80
+ ### Fixed
81
+
82
+ - async updates from the api to reduce cookie creation
83
+
84
+ ## [1.1.4] - 2023-05-12
85
+
86
+ ### Changed
87
+
88
+ - error handling when unable to get access token, as to not crash homebridge
89
+
90
+ ## [1.1.3] - 2023-04-17
91
+
92
+ ### Fixed
93
+
94
+ - typo in away mode
95
+
96
+ ## [1.1.2] - 2022-12-24
97
+
98
+ ### Fixed
99
+
100
+ - some unhandled api auth error
101
+
102
+ ### Changed
103
+
104
+ - some debug logging code
105
+
106
+ ## [1.1.1] - 2022-11-17
107
+
108
+ ### Fixed
109
+
110
+ - changed the 'homebridge-nuheat' name to be lower case so HOOBS handles properly
111
+
112
+ ## [1.1.0] - 2022-11-15
113
+
114
+ ### Added
115
+
116
+ - Added `homebridge-ui` support with auto detection
117
+ - Added Away Mode switches for groups
118
+
119
+ ### Changed
120
+
121
+ - Changed the underlying API to use nuheats new api system
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Joshua Appleman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,127 +1,129 @@
1
- # homebridge-nuheat2
2
-
3
- [![npm version](https://img.shields.io/npm/v/homebridge-nuheat2.svg)](https://www.npmjs.com/package/homebridge-nuheat2)
4
- [![npm downloads](https://img.shields.io/npm/dm/homebridge-nuheat2.svg)](https://www.npmjs.com/package/homebridge-nuheat2)
5
-
1
+ # homebridge-nuheat2
2
+
3
+ [![npm version](https://img.shields.io/npm/v/homebridge-nuheat2.svg)](https://www.npmjs.com/package/homebridge-nuheat2)
4
+ [![npm downloads](https://img.shields.io/npm/dm/homebridge-nuheat2.svg)](https://www.npmjs.com/package/homebridge-nuheat2)
5
+
6
6
  Homebridge platform plugin for Nuheat Signature floor-heating thermostats.
7
7
 
8
8
  This fork focuses on modernizing the plugin for current Homebridge releases, improving runtime stability, and preparing for Homebridge 2.0 while keeping the existing `NuHeat` platform configuration intact.
9
9
 
10
- ## Highlights
11
-
12
- - Automatically discovers thermostats on the authenticated Nuheat account
13
- - Optionally creates HomeKit switches for Nuheat group away mode
14
- - Supports permanent, scheduled, and timed holds
15
- - Uses Nuheat's OAuth-based API instead of legacy site scraping
16
- - Includes compatibility improvements for Homebridge 1.8+ and 2.0 betas
17
- - Can optionally expose a schedule switch for each thermostat
18
- - Allows advanced OAuth overrides for long-term API stability
19
-
20
- ## Compatibility
21
-
22
- - Homebridge: `^1.8.0 || ^2.0.0-beta.0`
23
- - Node.js: `^18.20.4 || ^20.18.0 || ^22 || ^24`
24
-
25
- For current Homebridge 2.0 betas, use Node 22 or 24.
26
-
27
- ## Installation
28
-
29
- Install Homebridge first:
30
-
31
- ```bash
32
- npm install -g homebridge
33
- ```
34
-
35
- Then install the plugin:
36
-
37
- ```bash
38
- npm install -g homebridge-nuheat2
39
- ```
40
-
41
- The published package name for this maintained fork is `homebridge-nuheat2`. The Homebridge platform name in config remains `NuHeat`.
42
-
43
- ## Configuration
44
-
45
- Most users should configure the plugin through Homebridge Config UI X, but the equivalent JSON looks like this:
46
-
47
- ```json
48
- {
49
- "platform": "NuHeat",
50
- "name": "NuHeat",
51
- "email": "email@address.com",
52
- "password": "password123",
53
- "devices": [{ "serialNumber": "1111111" }, { "serialNumber": "2222222" }],
54
- "autoPopulateAwayModeSwitches": true,
55
- "exposeScheduleSwitches": false,
56
- "holdLength": 1440,
57
- "refresh": 60
58
- }
59
- ```
60
-
61
- ### Options
62
-
63
- - `platform`: Must be `NuHeat`
64
- - `name`: Display name used in Homebridge logs
65
- - `email`: MyNuheat account email address
66
- - `Email`: Legacy alias still accepted for backward compatibility, but `email` is the preferred documented field
67
- - `password`: MyNuheat account password
68
- - `devices`: Optional list of thermostats to expose. If omitted or empty, every thermostat on the account will be discovered automatically
69
- - `serialNumber`: Thermostat serial number from MyNuheat
70
- - `autoPopulateAwayModeSwitches`: Automatically expose away-mode switches for all groups on the account
71
- - `exposeScheduleSwitches`: Optionally expose a switch per thermostat that reflects whether the thermostat is following its schedule and can be turned on to resume the schedule
72
- - `groups`: Optional allow-list of groups to expose as away-mode switches. This only affects group/away-mode accessories
73
- - `groupName`: Group name as shown in MyNuheat
74
- - `holdLength`: Hold duration in minutes
75
- - `refresh`: Poll interval in seconds, default `60`
76
- - `debug`: Enables verbose logging
77
- - `clientId`: Optional advanced override for the Nuheat OAuth client ID. This is recommended once you have official Nuheat API credentials
78
- - `clientSecret`: Optional advanced override for the Nuheat OAuth client secret
79
- - `redirectUri`: Optional advanced override for the Nuheat OAuth redirect URI, default `http://localhost`
80
-
81
- ### Hold Length Behavior
82
-
83
- - `0`: hold until the next scheduled event
84
- - `1-1439`: timed hold for the configured number of minutes
85
- - `1440`: permanent hold
86
-
87
- ### Device Discovery
88
-
89
- If `devices` is omitted or empty, the plugin will automatically expose every thermostat on the authenticated account.
90
-
91
- If `groups` is omitted and `autoPopulateAwayModeSwitches` is enabled, the plugin will automatically expose away-mode switches for all groups on the account.
92
-
93
- If `exposeScheduleSwitches` is enabled, the plugin will also create one switch per thermostat that turns on when the thermostat is following its Nuheat schedule and can be used to resume that schedule from HomeKit.
94
-
95
- ## Nuheat API Access
96
-
97
- Nuheat's public OpenAPI documentation indicates that third-party developers should request their own API credentials:
98
-
99
- - [Nuheat OpenAPI docs](https://api.mynuheat.com/)
100
- - [Nuheat API access request page](https://www.nuheat.com/openapi)
101
-
102
- This fork still supports the legacy built-in OAuth client settings as a fallback, but using your own `clientId` and `clientSecret` is the recommended long-term path once Nuheat issues them for your integration.
103
-
104
- ## What's New In This Fork
105
-
106
- - Fixed the manual-mode thermostat issue where HomeKit could immediately snap back to `Off`
107
- - Hardened online-state parsing and general accessory refresh behavior
108
- - Delayed platform startup until Homebridge finishes restoring cached accessories
109
- - Improved SignalR reconnect handling
110
- - Added regression tests for the key thermostat behavior fixes
111
- - Updated package metadata and dependency overrides for a cleaner modern release
112
- - Published under the maintainer-owned package identity `homebridge-nuheat2`
113
- - Added Swagger-aligned account, schedule, and energy API helpers for future enhancements
114
-
115
- ## Development
116
-
117
- Run the test suite with:
118
-
119
- ```bash
120
- npm test
121
- ```
122
-
123
- ## Roadmap
124
-
125
- - Validate the plugin against an official Nuheat API client registration
126
- - Verify group and away-mode behavior against current live API responses
127
- - Revisit whether SignalR notifications can reduce polling further in real-world deployments
10
+ This project builds on the original [`senorshaun/homebridge-nuheat`](https://github.com/senorshaun/homebridge-nuheat) plugin and retains attribution for Shaun's original work.
11
+
12
+ ## Highlights
13
+
14
+ - Automatically discovers thermostats on the authenticated Nuheat account
15
+ - Optionally creates HomeKit switches for Nuheat group away mode
16
+ - Supports permanent, scheduled, and timed holds
17
+ - Uses Nuheat's OAuth-based API instead of legacy site scraping
18
+ - Includes compatibility improvements for Homebridge 1.8+ and 2.0 betas
19
+ - Can optionally expose a schedule switch for each thermostat
20
+ - Allows advanced OAuth overrides for long-term API stability
21
+
22
+ ## Compatibility
23
+
24
+ - Homebridge: `^1.8.0 || ^2.0.0-beta.0`
25
+ - Node.js: `^18.20.4 || ^20.18.0 || ^22 || ^24`
26
+
27
+ For current Homebridge 2.0 betas, use Node 22 or 24.
28
+
29
+ ## Installation
30
+
31
+ Install Homebridge first:
32
+
33
+ ```bash
34
+ npm install -g homebridge
35
+ ```
36
+
37
+ Then install the plugin:
38
+
39
+ ```bash
40
+ npm install -g homebridge-nuheat2
41
+ ```
42
+
43
+ The published package name for this maintained fork is `homebridge-nuheat2`. The Homebridge platform name in config remains `NuHeat`.
44
+
45
+ ## Configuration
46
+
47
+ Most users should configure the plugin through Homebridge Config UI X, but the equivalent JSON looks like this:
48
+
49
+ ```json
50
+ {
51
+ "platform": "NuHeat",
52
+ "name": "NuHeat",
53
+ "email": "email@address.com",
54
+ "password": "password123",
55
+ "devices": [{ "serialNumber": "1111111" }, { "serialNumber": "2222222" }],
56
+ "autoPopulateAwayModeSwitches": true,
57
+ "exposeScheduleSwitches": false,
58
+ "holdLength": 1440,
59
+ "refresh": 60
60
+ }
61
+ ```
62
+
63
+ ### Options
64
+
65
+ - `platform`: Must be `NuHeat`
66
+ - `name`: Display name used in Homebridge logs
67
+ - `email`: MyNuheat account email address
68
+ - `Email`: Legacy alias still accepted for backward compatibility, but `email` is the preferred documented field
69
+ - `password`: MyNuheat account password
70
+ - `devices`: Optional list of thermostats to expose. If omitted or empty, every thermostat on the account will be discovered automatically
71
+ - `serialNumber`: Thermostat serial number from MyNuheat
72
+ - `autoPopulateAwayModeSwitches`: Automatically expose away-mode switches for all groups on the account
73
+ - `exposeScheduleSwitches`: Optionally expose a switch per thermostat that reflects whether the thermostat is following its schedule and can be turned on to resume the schedule
74
+ - `groups`: Optional allow-list of groups to expose as away-mode switches. This only affects group/away-mode accessories
75
+ - `groupName`: Group name as shown in MyNuheat
76
+ - `holdLength`: Hold duration in minutes
77
+ - `refresh`: Poll interval in seconds, default `60`
78
+ - `debug`: Enables verbose logging
79
+ - `clientId`: Optional advanced override for the Nuheat OAuth client ID. This is recommended once you have official Nuheat API credentials
80
+ - `clientSecret`: Optional advanced override for the Nuheat OAuth client secret
81
+ - `redirectUri`: Optional advanced override for the Nuheat OAuth redirect URI, default `http://localhost`
82
+
83
+ ### Hold Length Behavior
84
+
85
+ - `0`: hold until the next scheduled event
86
+ - `1-1439`: timed hold for the configured number of minutes
87
+ - `1440`: permanent hold
88
+
89
+ ### Device Discovery
90
+
91
+ If `devices` is omitted or empty, the plugin will automatically expose every thermostat on the authenticated account.
92
+
93
+ If `groups` is omitted and `autoPopulateAwayModeSwitches` is enabled, the plugin will automatically expose away-mode switches for all groups on the account.
94
+
95
+ If `exposeScheduleSwitches` is enabled, the plugin will also create one switch per thermostat that turns on when the thermostat is following its Nuheat schedule and can be used to resume that schedule from HomeKit.
96
+
97
+ ## Nuheat API Access
98
+
99
+ Nuheat's public OpenAPI documentation indicates that third-party developers should request their own API credentials:
100
+
101
+ - [Nuheat OpenAPI docs](https://api.mynuheat.com/)
102
+ - [Nuheat API access request page](https://www.nuheat.com/openapi)
103
+
104
+ This fork still supports the legacy built-in OAuth client settings as a fallback, but using your own `clientId` and `clientSecret` is the recommended long-term path once Nuheat issues them for your integration.
105
+
106
+ ## What's New In This Fork
107
+
108
+ - Fixed the manual-mode thermostat issue where HomeKit could immediately snap back to `Off`
109
+ - Hardened online-state parsing and general accessory refresh behavior
110
+ - Delayed platform startup until Homebridge finishes restoring cached accessories
111
+ - Improved SignalR reconnect handling
112
+ - Added regression tests for the key thermostat behavior fixes
113
+ - Updated package metadata and dependency overrides for a cleaner modern release
114
+ - Published under the maintainer-owned package identity `homebridge-nuheat2`
115
+ - Added Swagger-aligned account, schedule, and energy API helpers for future enhancements
116
+
117
+ ## Development
118
+
119
+ Run the test suite with:
120
+
121
+ ```bash
122
+ npm test
123
+ ```
124
+
125
+ ## Future Work
126
+
127
+ - Validate the plugin against the official Nuheat API credentials requested for this integration.
128
+ - Verify group and away-mode behavior against current live API responses.
129
+ - Evaluate whether SignalR notifications can reduce polling further in real-world deployments.