homebridge-lg-thinq-2 2.0.10 → 2.0.12
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 +0 -10
- 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.12
|
|
4
|
+
|
|
5
|
+
### Homebridge UI
|
|
6
|
+
|
|
7
|
+
* The settings of each device type are now shown open instead of in a collapsed section. They were collapsed when every device showed the settings of all device types; now each device shows only its own, so collapsing them only added a click.
|
|
8
|
+
|
|
9
|
+
## v2.0.11
|
|
10
|
+
|
|
11
|
+
### Login
|
|
12
|
+
|
|
13
|
+
* 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.
|
|
14
|
+
* The tests now use made-up account data only.
|
|
15
|
+
|
|
3
16
|
## v2.0.10
|
|
4
17
|
|
|
5
18
|
### Homebridge UI
|
package/config.schema.json
CHANGED
|
@@ -288,8 +288,6 @@
|
|
|
288
288
|
"type": "fieldset",
|
|
289
289
|
"title": "Air purifier specific settings",
|
|
290
290
|
"description": "Configure air purifier device settings.",
|
|
291
|
-
"expandable": true,
|
|
292
|
-
"expanded": false,
|
|
293
291
|
"items": [
|
|
294
292
|
"devices[].air_fast_mode"
|
|
295
293
|
],
|
|
@@ -301,8 +299,6 @@
|
|
|
301
299
|
"type": "fieldset",
|
|
302
300
|
"title": "Washer / Dryer specific settings",
|
|
303
301
|
"description": "Configure washer/dryer device settings.",
|
|
304
|
-
"expandable": true,
|
|
305
|
-
"expanded": false,
|
|
306
302
|
"items": [
|
|
307
303
|
"devices[].washer_trigger",
|
|
308
304
|
"devices[].washer_tub_clean",
|
|
@@ -316,8 +312,6 @@
|
|
|
316
312
|
"type": "fieldset",
|
|
317
313
|
"title": "Air conditioner specific settings",
|
|
318
314
|
"description": "Configure AC device settings.",
|
|
319
|
-
"expandable": true,
|
|
320
|
-
"expanded": false,
|
|
321
315
|
"items": [
|
|
322
316
|
"devices[].ac_air_quality",
|
|
323
317
|
"devices[].ac_mode",
|
|
@@ -349,8 +343,6 @@
|
|
|
349
343
|
"type": "fieldset",
|
|
350
344
|
"title": "Refrigerator specific settings",
|
|
351
345
|
"description": "Configure refrigerator device settings.",
|
|
352
|
-
"expandable": true,
|
|
353
|
-
"expanded": false,
|
|
354
346
|
"items": [
|
|
355
347
|
"devices[].ref_express_freezer",
|
|
356
348
|
"devices[].ref_express_fridge",
|
|
@@ -364,8 +356,6 @@
|
|
|
364
356
|
"type": "fieldset",
|
|
365
357
|
"title": "Dishwasher specific settings",
|
|
366
358
|
"description": "Configure dishwasher device settings.",
|
|
367
|
-
"expandable": true,
|
|
368
|
-
"expanded": false,
|
|
369
359
|
"items": [
|
|
370
360
|
"devices[].dishwasher_trigger"
|
|
371
361
|
],
|
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.12",
|
|
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",
|