homebridge-lgwebos-tv 4.2.2-beta.8 → 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.8",
4
+ "version": "4.2.2",
5
5
  "description": "Homebridge plugin to control LG webOS TV.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -367,19 +367,15 @@ class LgWebOsSocket extends EventEmitter {
367
367
  this.emit('success', 'Pairing key saved');
368
368
  }
369
369
 
370
- //initial power state
371
- this.emit('powerState', true, 'Active');
372
-
373
- //Request system info data
374
- this.systemInfoId = await this.getCid();
375
- await this.send('request', ApiUrls.GetSystemInfo, undefined, this.systemInfoId);
376
-
377
- //Request software info data
378
- this.softwareInfoId = await this.getCid();
379
- await this.send('request', ApiUrls.GetSoftwareInfo, undefined, this.softwareInfoId);
380
-
381
- //Subscribe tv status
382
- await this.subscribeTvStatus();
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
+ }
383
379
  break;
384
380
  case 'error':
385
381
  if (this.logError) this.emit('error', `Register to TV error: ${stringifyMessage}, trying again`);
@@ -442,6 +438,10 @@ class LgWebOsSocket extends EventEmitter {
442
438
  if (this.logDebug) this.emit('debug', `System info: ${stringifyMessage}`);
443
439
  this.tvInfo.modelName = messageData.modelName ?? 'LG TV';
444
440
 
441
+ //Request software info data
442
+ this.softwareInfoId = await this.getCid();
443
+ await this.send('request', ApiUrls.GetSoftwareInfo, undefined, this.softwareInfoId);
444
+
445
445
  //restFul
446
446
  if (this.restFulEnabled) this.emit('restFul', 'systeminfo', messageData);
447
447
 
@@ -471,6 +471,9 @@ class LgWebOsSocket extends EventEmitter {
471
471
  //emit device info
472
472
  this.emit('deviceInfo', this.tvInfo);
473
473
 
474
+ //Subscribe tv status
475
+ await this.subscribeTvStatus();
476
+
474
477
  //restFul
475
478
  if (this.restFulEnabled) this.emit('restFul', 'softwareinfo', messageData);
476
479