homebridge-lgwebos-tv 4.2.2-beta.9 → 4.2.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 CHANGED
@@ -15,6 +15,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
15
15
  - For plugin < v4.1.0 use Homebridge UI <= v5.5.0
16
16
  - For plugin >= v4.1.0 use Homebridge UI >= v5.13.0
17
17
 
18
+ ## [4.2.2] - (20.01.2026)
19
+
20
+ ## Changes
21
+
22
+ - stability and performance improvements [#298](https://github.com/grzegorz914/homebridge-lgwebos-tv/issues/298)
23
+ - cleanup
24
+
18
25
  ## [4.2.1] - (14.01.2026)
19
26
 
20
27
  ## Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "LG webOS TV",
3
3
  "name": "homebridge-lgwebos-tv",
4
- "version": "4.2.2-beta.9",
4
+ "version": "4.2.2",
5
5
  "description": "Homebridge plugin to control LG webOS TV.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -367,13 +367,15 @@ class LgWebOsSocket extends EventEmitter {
367
367
  this.emit('success', 'Pairing key saved');
368
368
  }
369
369
 
370
- //Request system info data
371
- this.systemInfoId = await this.getCid();
372
- await this.send('request', ApiUrls.GetSystemInfo, undefined, this.systemInfoId);
373
-
374
- //Request software info data
375
- this.softwareInfoId = await this.getCid();
376
- await this.send('request', ApiUrls.GetSoftwareInfo, undefined, this.softwareInfoId);
370
+ //Send initial power state
371
+ if (!this.power) {
372
+ this.emit('powerState', true, 'Active');
373
+
374
+ //Request system info data
375
+ this.systemInfoId = await this.getCid();
376
+ await this.send('request', ApiUrls.GetSystemInfo, undefined, this.systemInfoId);
377
+ this.power = true;
378
+ }
377
379
  break;
378
380
  case 'error':
379
381
  if (this.logError) this.emit('error', `Register to TV error: ${stringifyMessage}, trying again`);
@@ -436,6 +438,10 @@ class LgWebOsSocket extends EventEmitter {
436
438
  if (this.logDebug) this.emit('debug', `System info: ${stringifyMessage}`);
437
439
  this.tvInfo.modelName = messageData.modelName ?? 'LG TV';
438
440
 
441
+ //Request software info data
442
+ this.softwareInfoId = await this.getCid();
443
+ await this.send('request', ApiUrls.GetSoftwareInfo, undefined, this.softwareInfoId);
444
+
439
445
  //restFul
440
446
  if (this.restFulEnabled) this.emit('restFul', 'systeminfo', messageData);
441
447
 
@@ -465,9 +471,6 @@ class LgWebOsSocket extends EventEmitter {
465
471
  //emit device info
466
472
  this.emit('deviceInfo', this.tvInfo);
467
473
 
468
- //initial power state
469
- this.emit('powerState', true, 'Active');
470
-
471
474
  //Subscribe tv status
472
475
  await this.subscribeTvStatus();
473
476