homebridge-lg-thinq-2 2.0.9 → 2.0.11
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 +13 -0
- package/config.schema.json +4 -0
- package/dist/lib/Auth.js +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## v2.0.11
|
|
4
|
+
|
|
5
|
+
### Login
|
|
6
|
+
|
|
7
|
+
* The LG sign-in lock message is now recognized only by the prefix LG uses (`Need Sign-In Unlock`, optionally followed by colon-separated fields), instead of anywhere in any message. The fields after the prefix, which identify the account, are never shown or logged.
|
|
8
|
+
* The tests now use made-up account data only.
|
|
9
|
+
|
|
10
|
+
## v2.0.10
|
|
11
|
+
|
|
12
|
+
### Homebridge UI
|
|
13
|
+
|
|
14
|
+
* Fixed the "Device Settings" section of each device showing only its title, with no options. The settings for each device type (washer and dryer, air conditioner, refrigerator, air purifier, dishwasher) are shown only when the device `type` matches, but `type` was not declared in `config.schema.json`, so the Homebridge UI dropped it and no settings ever showed. Verified in Homebridge UI 5.30.1 that each device shows its own settings and that changes are saved. Added a test that checks every device field used by the settings conditions is declared.
|
|
15
|
+
|
|
3
16
|
## v2.0.9
|
|
4
17
|
|
|
5
18
|
### Login
|
package/config.schema.json
CHANGED
package/dist/lib/Auth.js
CHANGED
|
@@ -51,10 +51,13 @@ export const SIGN_IN_UNLOCK_MESSAGE = 'LG has locked sign-in for this account an
|
|
|
51
51
|
+ 'from a new device. Sign in to the LG ThinQ app or to your LG account on the LG website and complete '
|
|
52
52
|
+ 'the verification LG asks for, then try again. You can also get a refresh token with the "thinq auth" '
|
|
53
53
|
+ 'command, which uses the LG sign-in page.';
|
|
54
|
-
// LG answers sign-
|
|
55
|
-
// "Need Sign-In Unlock:
|
|
54
|
+
// LG answers a sign-in to a locked account with an error message that starts with
|
|
55
|
+
// "Need Sign-In Unlock", followed by colon-separated fields:
|
|
56
|
+
// "Need Sign-In Unlock:<code>:<masked account id>:<flag>". Only the prefix is matched,
|
|
57
|
+
// and the fields are never shown, because one of them identifies the account.
|
|
58
|
+
const SIGN_IN_UNLOCK_PATTERN = /^\s*need\s+sign[\s-]?in\s+unlock\s*(?::|$)/i;
|
|
56
59
|
export function isSignInUnlockRequired(message) {
|
|
57
|
-
return typeof message === 'string' &&
|
|
60
|
+
return typeof message === 'string' && SIGN_IN_UNLOCK_PATTERN.test(message);
|
|
58
61
|
}
|
|
59
62
|
function authError(context, err) {
|
|
60
63
|
const message = authErrorMessage(err, 'Request failed.');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Homebridge LG ThinQ 2",
|
|
3
3
|
"name": "homebridge-lg-thinq-2",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.11",
|
|
5
5
|
"description": "Community-maintained continuation of homebridge-lg-thinq: a Homebridge plugin for controlling/monitoring LG ThinQ devices via the LG ThinQ platform.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"type": "module",
|