homebridge-eosstb 2.4.0-alpha.46 → 2.4.0-alpha.47

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/index.js +20 -0
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -51,6 +51,9 @@ Channel name: overwrite not allowed - can we disable in HomeKit. Yes, but preven
51
51
  CHALLENGE
52
52
  The mostWatchedChannelList is not working
53
53
 
54
+ ## 2.4.0-alpha.47 (2026-05-09)
55
+ - Improved the startup default setting of media state when a power-on transition is detected
56
+
54
57
  ## 2.4.0-alpha.46 (2026-05-09)
55
58
  - Fixed the issue with volume commands
56
59
 
package/index.js CHANGED
@@ -4440,6 +4440,13 @@ class StbPlatform {
4440
4440
  deviceId = mqttMessage.source;
4441
4441
  stbState = mqttMessage.state;
4442
4442
 
4443
+ // Look up the per-device instance so we can read device-specific state
4444
+ // (e.g. previousPowerState) before the switch runs
4445
+ const deviceIndex = this.devices.findIndex(
4446
+ (device) => device.deviceId === deviceId,
4447
+ );
4448
+ const stbDevice = deviceIndex > -1 ? this.stbDevices[deviceIndex] : null;
4449
+
4443
4450
  // Box setting: StandbyPowerConsumption = FastStart / ActiveStart / EcoSlowstart
4444
4451
  // "Fast start": when turned off, goes to ONLINE_STANDBY and stays there. Box can be turned on via mqtt
4445
4452
  // "Active start": when turned off, stays at ONLINE_STANDBY for 5min, then goes to OFFLINE_NETWORK_STANDBY. box can be turned on via ??
@@ -4448,6 +4455,18 @@ class StbPlatform {
4448
4455
  case "ONLINE_RUNNING": // ONLINE_RUNNING: power is on
4449
4456
  currStatusActive = Characteristic.Active.ACTIVE; // bool, 0 = not active, 1 = active
4450
4457
  currPowerState = Characteristic.Active.ACTIVE;
4458
+ // Detect power-off → power-on transition per device.
4459
+ // Set PLAY immediately; CPE.uiStatus will overwrite with the
4460
+ // accurate speed-derived state shortly after.
4461
+ if (stbDevice?.previousPowerState === Characteristic.Active.INACTIVE) {
4462
+ currMediaState = Characteristic.CurrentMediaState.PLAY;
4463
+ if (this.debugLevel > 0) {
4464
+ this.log.warn(
4465
+ "mqttClient: STB status: power-on transition for %s, setting mediaState to PLAY",
4466
+ deviceId,
4467
+ );
4468
+ }
4469
+ }
4451
4470
  break;
4452
4471
  case "ONLINE_STANDBY": // ONLINE_STANDBY: power is off, device is on standby, still reachable over the network, can be turned on via mqtt.
4453
4472
  currStatusActive = Characteristic.Active.ACTIVE; // bool, 0 = not active, 1 = active
@@ -5610,6 +5629,7 @@ class StbDevice {
5610
5629
  this.currentStatusFault = Characteristic.StatusFault.NO_FAULT;
5611
5630
  this.currentInUse = Characteristic.InUse.NOT_IN_USE;
5612
5631
  this.currentPowerState = Characteristic.Active.INACTIVE;
5632
+ this.previousPowerState = Characteristic.Active.INACTIVE;
5613
5633
  this.currentStatusActive = Characteristic.Active.INACTIVE;
5614
5634
 
5615
5635
  this.currentChannelId = NO_CHANNEL_ID; // string eg SV09038
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "Homebridge EOSSTB",
4
4
  "description": "Add your set-top box to Homekit (for Telenet BE, Sunrise CH, UPC SK, Virgin Media GB & IE, Ziggo NL)",
5
5
  "author": "Jochen Siegenthaler (https://github.com/jsiegenthaler/)",
6
- "version": "2.4.0-alpha.46",
6
+ "version": "2.4.0-alpha.47",
7
7
  "platformname": "eosstb",
8
8
  "dependencies": {
9
9
  "axios": "^1.16.0",