homebridge-eosstb 2.2.1 → 2.2.3

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 +10 -0
  2. package/index.js +11 -3
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -9,6 +9,16 @@ Please restart Homebridge after every plugin update.
9
9
  * Add ability to log and read current program name
10
10
  * Implement refreshToken capabilities
11
11
 
12
+
13
+ ## 2.2.3 (2023-03-01)
14
+ * Bumped dependency "axios": "^1.3.4",
15
+
16
+
17
+ ## 2.2.2 (2023-02-18)
18
+ * Fixed bug causing 401 unauthorized when refreshing the master channel list
19
+ * Bumped dependency "axios": "^1.3.3"
20
+
21
+
12
22
  ## 2.2.1 (2023-02-11)
13
23
  * Fixed issue #96 with failled mqtt session not reconnecting automatically
14
24
  * Cleaned up and optimized some code
package/index.js CHANGED
@@ -123,7 +123,7 @@ const NO_CHANNEL_ID = 'ID_UNKNOWN'; // id for a channel not in the channel list,
123
123
  const NO_CHANNEL_NAME = 'UNKNOWN'; // name for a channel not in the channel list
124
124
  const MAX_INPUT_SOURCES = 95; // max input services. Default = 95. Cannot be more than 96 (100 - all other services)
125
125
  const SESSION_WATCHDOG_INTERVAL_MS = 15000; // session watchdog interval in millisec. Default = 15000 (15s)
126
- const MASTER_CHANNEL_LIST_VALID_FOR_S = 86400; // master channel list starts valid for 24 hours from last refresh = 86400 seconds
126
+ const MASTER_CHANNEL_LIST_VALID_FOR_S = 86400; // master channel list stays valid for 24 hours from last refresh. 24hr = 86400 seconds
127
127
  const MASTER_CHANNEL_LIST_REFRESH_CHECK_INTERVAL_S = 3600; // master channel list refresh check interval, in seconds. Default = 3600 (1hr) (increased from 600)
128
128
  const SETTOPBOX_NAME_MINLEN = 3; // min len of the set-top box name
129
129
  const SETTOPBOX_NAME_MAXLEN = 14; // max len of the set-top box name
@@ -1328,12 +1328,14 @@ class stbPlatform {
1328
1328
  if (currentSessionState != sessionState.CONNECTED) {
1329
1329
  if (this.config.debugLevel > 1) { this.log.warn('refreshMasterChannelList: Session does not exist, exiting'); }
1330
1330
  resolve(true);
1331
+ return
1331
1332
  }
1332
1333
 
1333
1334
  // exit immediately if channel list has not expired
1334
1335
  if (this.masterChannelListExpiryDate > Date.now()) {
1335
1336
  if (this.config.debugLevel > 1) { this.log.warn('refreshMasterChannelList: Master channel list has not expired yet. Next refresh will occur after %s', this.masterChannelListExpiryDate.toLocaleString()); }
1336
1337
  resolve(true);
1338
+ return
1337
1339
  }
1338
1340
 
1339
1341
  this.log('Refreshing master channel list');
@@ -1362,7 +1364,11 @@ class stbPlatform {
1362
1364
  // call the webservice to get all available channels
1363
1365
  const axiosConfig = {
1364
1366
  method: 'GET',
1365
- url: url
1367
+ url: url,
1368
+ headers: {
1369
+ accept: '*/*',
1370
+ 'x-oesp-username': this.session.username
1371
+ }
1366
1372
  };
1367
1373
  axiosWS(axiosConfig)
1368
1374
  .then(response => {
@@ -1433,11 +1439,13 @@ class stbPlatform {
1433
1439
  this.log.debug('refreshRecordings: ++++++ step 2: calling getRecordingBookings with householdId %s ', householdId)
1434
1440
  this.getRecordingBookings(householdId) // returns customer object, with devices and profiles, stores object in this.customer
1435
1441
  resolve(true); // resolve the promise
1442
+ return;
1436
1443
  })
1437
1444
  .catch(errorReason => {
1438
1445
  // log any errors and set the currentSessionState
1439
1446
  this.log.warn(errorTitle + ' - %s', errorReason);
1440
1447
  reject(errorReason);
1448
+ return;
1441
1449
  });
1442
1450
  } else {
1443
1451
  this.log.debug('refreshRecordings: no recordings entitlement found');
@@ -1889,7 +1897,7 @@ class stbPlatform {
1889
1897
  this.log.warn(error)
1890
1898
  }
1891
1899
  reject(errReason);
1892
- });
1900
+ });
1893
1901
  })
1894
1902
  }
1895
1903
 
package/package.json CHANGED
@@ -3,11 +3,11 @@
3
3
  "displayName": "Homebridge EOSSTB",
4
4
  "description": "homebridge-plugin - Add your set-top box to Homekit (for Magenta AT, Telenet BE, Sunrise CH, Virgin Media GB & IE, Ziggo NL)",
5
5
  "author": "Jochen Siegenthaler (https://github.com/jsiegenthaler/)",
6
- "version": "2.2.1",
6
+ "version": "2.2.3",
7
7
  "platformname": "eosstb",
8
8
  "dependencies": {
9
9
  "axios-cookiejar-support": "^4.0.6",
10
- "axios": "^1.3.2",
10
+ "axios": "^1.3.4",
11
11
  "debug": "^4.3.4",
12
12
  "mqtt": "^4.3.7",
13
13
  "qs": "^6.11.0",