homebridge-withings-environment-data 1.1.1 → 1.1.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 +16 -0
- package/README.md +1 -1
- package/index.js +10 -4
- package/lib/login.js +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## [1.1.2] - 2026-07-28
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- A log entry after every successful full login stating whether a new
|
|
13
|
+
session token was cached, was unchanged, or wasn't issued at all
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- `login()`'s fallback full login now requires actually landing on
|
|
17
|
+
`/new_workflow/exit` to be considered successful (matching
|
|
18
|
+
`resumeSession()`'s existing check), instead of only checking for the
|
|
19
|
+
`confirm_totp` 2FA-trust failure case. Previously, any other silent
|
|
20
|
+
login failure (e.g. rate limiting) was treated as success, only
|
|
21
|
+
surfacing later as a confusing "Invalid Session" error from the
|
|
22
|
+
measure endpoint instead of a clear, correctly-classified
|
|
23
|
+
authentication failure
|
|
24
|
+
|
|
9
25
|
## [1.1.1] - 2026-07-27
|
|
10
26
|
|
|
11
27
|
### Fixed
|
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -144,10 +144,16 @@ class WithingsEnvironmentDataPlatform {
|
|
|
144
144
|
this.config.trustCookieValue
|
|
145
145
|
);
|
|
146
146
|
|
|
147
|
-
if (result.sessionKey
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
if (result.sessionKey) {
|
|
148
|
+
if (result.sessionKey !== this.sessionKey) {
|
|
149
|
+
this.sessionKey = result.sessionKey;
|
|
150
|
+
this.saveSessionKey(result.sessionKey);
|
|
151
|
+
this.log.info('Withings full login succeeded; cached the new session for future polls.');
|
|
152
|
+
} else {
|
|
153
|
+
this.log.info('Withings full login succeeded; session token unchanged.');
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
this.log.warn('Withings full login succeeded but no new session token was issued; will retry full login next poll.');
|
|
151
157
|
}
|
|
152
158
|
|
|
153
159
|
return result;
|
package/lib/login.js
CHANGED
|
@@ -169,6 +169,13 @@ async function login(email, password, trustCookieName, trustCookieValue) {
|
|
|
169
169
|
);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
if (!finalUrl.includes('/new_workflow/exit')) {
|
|
173
|
+
throw new Error(
|
|
174
|
+
`Withings login did not complete (landed on ${finalUrl} instead of /new_workflow/exit) — ` +
|
|
175
|
+
'this can happen if Withings is rate-limiting login attempts, or if the login flow changed.'
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
172
179
|
return buildResult(jar);
|
|
173
180
|
}
|
|
174
181
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-withings-environment-data",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Homebridge plugin exposing ambient CO2/air-quality and room temperature readings from a Withings WS-50 scale as HomeKit sensors",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|