homebridge-lg-thinq-2 2.0.14 → 2.0.16

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,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## v2.0.16
4
+
5
+ ### Dependencies
6
+
7
+ * Updated `commander` to 15.1.0 (used by the `thinq` command) and `@homebridge/plugin-ui-utils` to 2.3.0 (used by the settings screen). Both were checked: the `thinq` command behaves the same on Node.js 22, 24, and 26, and the settings screen works in Homebridge UI 5.30.1.
8
+ * Updated the build and test tools (jest, ts-jest, rimraf, type definitions) and the GitHub Actions (`actions/checkout` 7.0.1, `actions/setup-node` 7.1.0). jest 30.5 brought a `minimatch` version with a moderate advisory through `test-exclude`; it is overridden to a fixed version, so `npm audit` still reports 0 vulnerabilities.
9
+ * The Node.js type definitions now follow Node.js 22, the oldest supported version, so the code cannot use newer Node.js APIs by mistake. Dependabot no longer proposes major updates of them, nor TypeScript 7, which the test and lint tools do not support yet.
10
+
11
+ ## v2.0.15
12
+
13
+ ### Homebridge UI
14
+
15
+ * Fixed the **Plugin Logs** window of the Homebridge UI always being empty. It shows the log lines whose prefix is the platform `name` in the config, and without a `name` it looked for `homebridge-lg-thinq-2`, while Homebridge prefixes this plugin's lines with `LGThinQ`. The config now has `"name": "LGThinQ"` by default: the settings screen adds it to existing configs (click **Save** once), and the README examples include it. Verified in Homebridge UI 5.30.1.
16
+
3
17
  ## v2.0.14
4
18
 
5
19
  ### Reliability
package/README.md CHANGED
@@ -117,6 +117,7 @@ Add the platform to the `platforms` section of your Homebridge `config.json`:
117
117
  ```json
118
118
  {
119
119
  "platform": "LGThinQ",
120
+ "name": "LGThinQ",
120
121
  "auth_mode": "token",
121
122
  "refresh_token": "refresh-token-from-lg-login",
122
123
  "country": "US",
@@ -130,6 +131,7 @@ To add only some devices, or to set device options, list the devices by id:
130
131
  ```json
131
132
  {
132
133
  "platform": "LGThinQ",
134
+ "name": "LGThinQ",
133
135
  "auth_mode": "token",
134
136
  "refresh_token": "refresh-token-from-lg-login",
135
137
  "country": "US",
@@ -151,6 +153,7 @@ Device ids are shown in the Homebridge log when the plugin discovers devices.
151
153
  | Option | Required | Default | Description |
152
154
  | --- | --- | --- | --- |
153
155
  | `platform` | Yes | | Must be `LGThinQ`. |
156
+ | `name` | No | `LGThinQ` | Prefix of this plugin in the Homebridge log. The **Plugin Logs** window of the Homebridge UI shows the log lines with this prefix, so it stays empty without a name. The settings screen adds it. |
154
157
  | `auth_mode` | Yes | `account` | `token` to sign in with a refresh token, or `account` to sign in with username and password. |
155
158
  | `refresh_token` | With `token` | | Refresh token from the LG login (Homebridge UI or `thinq` command). |
156
159
  | `username` | With `account` | | LG ThinQ account username. |
@@ -5,6 +5,12 @@
5
5
  "customUi": true,
6
6
  "strictValidation": false,
7
7
  "schema": {
8
+ "name": {
9
+ "title": "Name",
10
+ "type": "string",
11
+ "default": "LGThinQ",
12
+ "description": "Prefix of this plugin in the Homebridge log. The Plugin Logs window shows the log lines with this prefix."
13
+ },
8
14
  "auth_mode": {
9
15
  "title": "Auth Mode",
10
16
  "type": "string",
@@ -303,6 +303,7 @@
303
303
 
304
304
  <script>
305
305
  const homebridge = window.homebridge;
306
+ const DEFAULT_PLATFORM_NAME = 'LGThinQ';
306
307
  let configForm;
307
308
 
308
309
  const byId = (id) => document.getElementById(id);
@@ -653,6 +654,14 @@
653
654
  }
654
655
  configuration = pluginConfig[0];
655
656
 
657
+ // Homebridge prefixes this plugin's log lines with the config "name", and the
658
+ // Plugin Logs window only shows the lines with that prefix. Without a name the
659
+ // window looks for the package name and shows nothing, so add the default one.
660
+ if (!configuration.name) {
661
+ configuration.name = DEFAULT_PLATFORM_NAME;
662
+ await homebridge.updatePluginConfig([configuration]);
663
+ }
664
+
656
665
  let optionSelected = findCountryLanguageOption(configuration.country, configuration.language);
657
666
  if (!optionSelected) {
658
667
  optionSelected = findCountryLanguageOption('US', 'en-US');
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.14",
4
+ "version": "2.0.16",
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",
@@ -51,19 +51,19 @@
51
51
  ],
52
52
  "devDependencies": {
53
53
  "@eslint/js": "^10.0.1",
54
- "@jest/globals": "^30.3.0",
54
+ "@jest/globals": "^30.5.2",
55
55
  "@types/aws-iot-device-sdk": "^2.2.9",
56
- "@types/luxon": "^3.7.1",
57
- "@types/node": "^25.6.0",
56
+ "@types/luxon": "^3.7.6",
57
+ "@types/node": "^22.20.5",
58
58
  "@types/node-forge": "^1.3.14",
59
59
  "@types/node-persist": "^3.1.8",
60
- "@types/qs": "^6.15.0",
60
+ "@types/qs": "^6.15.1",
61
61
  "eslint": "^10.3.0",
62
62
  "homebridge": "^2.5.0",
63
- "jest": "^30.3.0",
63
+ "jest": "^30.5.2",
64
64
  "nodemon": "^3.1.14",
65
- "rimraf": "^6.1.3",
66
- "ts-jest": "^29.4.9",
65
+ "rimraf": "^6.1.4",
66
+ "ts-jest": "^29.4.15",
67
67
  "ts-node": "^10.9.2",
68
68
  "typescript": "^6.0.3",
69
69
  "typescript-eslint": "^8.59.2"
@@ -74,11 +74,11 @@
74
74
  "nVuln (original author, https://github.com/nVuln/homebridge-lg-thinq)"
75
75
  ],
76
76
  "dependencies": {
77
- "@homebridge/plugin-ui-utils": "^2.2.3",
77
+ "@homebridge/plugin-ui-utils": "^2.3.0",
78
78
  "aws-iot-device-sdk": "^2.2.16",
79
79
  "axios": "^1.21.1",
80
80
  "axios-retry": "^4.5.0",
81
- "commander": "^14.0.3",
81
+ "commander": "^15.1.0",
82
82
  "luxon": "^3.7.2",
83
83
  "node-forge": "^1.4.3",
84
84
  "node-persist": "^4.0.4",
@@ -94,6 +94,9 @@
94
94
  "ws": "^8.23.0",
95
95
  "nodemon": {
96
96
  "minimatch": "^11.0.9"
97
+ },
98
+ "test-exclude": {
99
+ "minimatch": "^11.0.9"
97
100
  }
98
101
  }
99
102
  }