homebridge-eosstb 2.4.0-alpha.45 → 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.
- package/CHANGELOG.md +6 -0
- package/index.js +32 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -51,6 +51,12 @@ 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
|
+
|
|
57
|
+
## 2.4.0-alpha.46 (2026-05-09)
|
|
58
|
+
- Fixed the issue with volume commands
|
|
59
|
+
|
|
54
60
|
## 2.4.0-alpha.45 (2026-05-09)
|
|
55
61
|
- Added some debugging to the volume commands to trace an issue
|
|
56
62
|
|
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
|
|
@@ -7775,6 +7795,8 @@ class StbDevice {
|
|
|
7775
7795
|
: "Up",
|
|
7776
7796
|
);
|
|
7777
7797
|
|
|
7798
|
+
let tripleVolDownPress = Infinity; // default prevents false triple-press detection
|
|
7799
|
+
|
|
7778
7800
|
// triple rapid VolDown presses triggers setMute
|
|
7779
7801
|
if (volumeSelectorValue === Characteristic.VolumeSelector.DECREMENT) {
|
|
7780
7802
|
// Guard: ensure array is properly initialised
|
|
@@ -7782,9 +7804,18 @@ class StbDevice {
|
|
|
7782
7804
|
this.lastVolDownKeyPress = [0, 0, 0];
|
|
7783
7805
|
}
|
|
7784
7806
|
|
|
7785
|
-
//
|
|
7807
|
+
// Self-limiting shift of array values
|
|
7786
7808
|
this.lastVolDownKeyPress.unshift(Date.now());
|
|
7787
7809
|
this.lastVolDownKeyPress = this.lastVolDownKeyPress.slice(0, 3); // keep only last 3
|
|
7810
|
+
|
|
7811
|
+
// Now assign the calculated value to the outer variable
|
|
7812
|
+
tripleVolDownPress = this.lastVolDownKeyPress[0] - this.lastVolDownKeyPress[2];
|
|
7813
|
+
|
|
7814
|
+
this.log.debug(
|
|
7815
|
+
"%s: setVolume: Timediff between volDownKeyPress[0] and volDownKeyPress[2]: %s ms",
|
|
7816
|
+
this.name,
|
|
7817
|
+
tripleVolDownPress,
|
|
7818
|
+
);
|
|
7788
7819
|
|
|
7789
7820
|
}
|
|
7790
7821
|
|
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.
|
|
6
|
+
"version": "2.4.0-alpha.47",
|
|
7
7
|
"platformname": "eosstb",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"axios": "^1.16.0",
|