homebridge-eosstb 2.4.0-alpha.35 → 2.4.0-alpha.37

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 +8 -0
  2. package/index.js +16 -9
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -42,6 +42,14 @@ Channel name: overwrite not allowed - can we disable in HomeKit. Yes, but preven
42
42
  CHALLENGE
43
43
  The mostWatchedChannelList is not working
44
44
 
45
+ ## 2.4.0-alpha.37 (2026-03-07)
46
+
47
+ - changes to settargetmediastate
48
+
49
+ ## 2.4.0-alpha.36 (2026-03-07)
50
+
51
+ - changes to settargetmediastate
52
+
45
53
  ## 2.4.0-alpha.35 (2026-03-07)
46
54
 
47
55
  - changes to settargetmediastate
package/index.js CHANGED
@@ -5137,14 +5137,14 @@ class StbPlatform {
5137
5137
  }
5138
5138
 
5139
5139
  // set the media state of the settopbox via mqtt
5140
- // controlled by speed
5141
- // speed can be one of: -64 -30 -6 -2 0 2 6 30 64. 0=Paused, 1=Play, >1=FastForward, <0=Rewind
5142
- setMediaState(deviceId, deviceName, channelId, speed) {
5140
+ // controlled by speedRate
5141
+ // speedRate can be one of: -64 -30 -6 -2 0 2 6 30 64. 0=Paused, 1=Play, >1=FastForward, <0=Rewind
5142
+ setMediaState(deviceId, deviceName, channelId, speedRate) {
5143
5143
  try {
5144
5144
  if (this.debugLevel > 0) {
5145
5145
  this.log.warn(
5146
5146
  "setMediaState: set state to %s for channelId %s on %s %s",
5147
- speed,
5147
+ speedRate,
5148
5148
  channelId,
5149
5149
  deviceId,
5150
5150
  deviceName,
@@ -5162,7 +5162,7 @@ class StbPlatform {
5162
5162
  sourceType: "linear",
5163
5163
  source: { channelId },
5164
5164
  relativePosition: 0,
5165
- speed: 1,
5165
+ speed: speedRate,
5166
5166
  },
5167
5167
  });
5168
5168
  this.mqttPublishMessage(`${this.mqttUsername}/${deviceId}`, payload, {
@@ -8185,12 +8185,13 @@ class StbDevice {
8185
8185
  // cannot be controlled by Apple Home app, but could be controlled by other HomeKit apps
8186
8186
  // can be controlled by the Apple TV Remote Control, and is called when changing Play / Pause / Stop
8187
8187
  // logChangeOnly = TRUE: only the changes are logged, no media state change occurs. Needed when sending remote keypresses to prevent double commands
8188
+ // CHAR_NAMES: TargetMediaState: [ 'UUID', 'PLAY', 'PAUSE', 'STOP' ]
8188
8189
  //if (this.debugLevel > 1) {
8189
- this.log.warn(
8190
+ this.log.info(
8190
8191
  "%s: setTargetMediaState to %s [%s]",
8191
8192
  this.name,
8192
8193
  targetMediaState,
8193
- CHAR_NAMES.TargetMediaState[targetMediaState],
8194
+ CHAR_NAMES.TargetMediaState[targetMediaState + 1],
8194
8195
  );
8195
8196
 
8196
8197
  this.log(CHAR_NAMES)
@@ -8202,15 +8203,20 @@ class StbDevice {
8202
8203
  // the box media state is controlled by speed
8203
8204
  // speed can be one of: -64 -30 -6 -2 0 2 6 30 64. 0=Paused, 1=Play, >1=FastForward, <0=Rewind
8204
8205
 
8205
- // Box only knows Play (1) or Pause/Stop (0). HomeKit's Pause and Stop both map to 0.
8206
+ // Box only knows Play (1) or Pause/Stop (0). HomeKit's 0-Play maps to 1-Play, and 1-Pause and 2-Stop both map to 0-Pause/Stop.
8207
+ // HomeKit SettopBox
8208
+ // PLAY 0 - 1 Play
8209
+ // PAUSE 1 - 0 Paused
8210
+ // STOP 2 - 0 Paused
8206
8211
  const newBoxMediaState = targetMediaState === Characteristic.TargetMediaState.PLAY ? 1 : 0;
8212
+ const newBoxMediaStateName = newBoxMediaState === 1 ? "Play" : "Pauseb";
8207
8213
 
8208
8214
  //if (this.debugLevel >= 0) {
8209
8215
  this.log(
8210
8216
  "%s: setTargetMediaState: Calling setMediaState with newBoxMediaState %s [%s]",
8211
8217
  this.name,
8212
8218
  newBoxMediaState,
8213
- CHAR_NAMES.TargetMediaState[targetMediaState],
8219
+ newBoxMediaStateName,
8214
8220
  );
8215
8221
  //}
8216
8222
  /*
@@ -8228,6 +8234,7 @@ class StbDevice {
8228
8234
  }
8229
8235
  */
8230
8236
  // send the requested media state to the box
8237
+ // setMediaState 0 will start playing if paused (1)
8231
8238
  this.platform.setMediaState(
8232
8239
  this.deviceId,
8233
8240
  this.name,
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.35",
6
+ "version": "2.4.0-alpha.37",
7
7
  "platformname": "eosstb",
8
8
  "dependencies": {
9
9
  "axios": "^1.13.6",