homebridge-eosstb 2.2.4 → 2.2.6
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 +14 -0
- package/README.md +6 -6
- package/index.js +27 -21
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,20 @@ Please restart Homebridge after every plugin update.
|
|
|
10
10
|
* Implement refreshToken capabilities
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
## 2.2.6 (2023-05-19)
|
|
14
|
+
* Fixed some minor logging typos
|
|
15
|
+
* Added logging of version info
|
|
16
|
+
* Updated engine version references
|
|
17
|
+
* Bumped dependency "axios": "^1.4.0",
|
|
18
|
+
* Bumped dependency "qs": "^6.11.2",
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## 2.2.5 (2023-03-28)
|
|
22
|
+
* Improved robustness when no set-top boxes detected in the user profile
|
|
23
|
+
* Updated iOS version references
|
|
24
|
+
* Minor improvements to the Readme
|
|
25
|
+
|
|
26
|
+
|
|
13
27
|
## 2.2.4 (2023-03-11)
|
|
14
28
|
* Bumped dependency "qs": "^6.11.1",
|
|
15
29
|
* Bumped dependency "node": ">=16.19.1"
|
package/README.md
CHANGED
|
@@ -72,8 +72,8 @@ In January 2023, an ARRIS VIP5002W appeared, which identifies itself as an APLST
|
|
|
72
72
|
This plugin is not provided by Magenta or Telenet or Sunrise or Virgin Media or Ziggo any other affiliate of [UPC](https://en.wikipedia.org/wiki/UPC_Broadband). It is neither endorsed nor supported nor developed by [UPC](https://en.wikipedia.org/wiki/UPC_Broadband) or any affiliates. [UPC](https://en.wikipedia.org/wiki/UPC_Broadband) can change their systems at any time and that might break this plugin. But I hope not.
|
|
73
73
|
|
|
74
74
|
## Requirements
|
|
75
|
-
* An Apple iPhone or iPad with iOS/iPadOS 14.0 (or later). Developed on iOS 14.1...16.
|
|
76
|
-
* [Homebridge](https://homebridge.io/) v1.1.116 (or later). Developed on Homebridge 1.1.116....1.6.
|
|
75
|
+
* An Apple iPhone or iPad with iOS/iPadOS 14.0 (or later). Developed on iOS 14.1...16.4, earlier versions not tested.
|
|
76
|
+
* [Homebridge](https://homebridge.io/) v1.1.116 (or later). Developed on Homebridge 1.1.116....1.6.1, earlier versions not tested.
|
|
77
77
|
* A TV subscription from one of the supported countries and TV providers.
|
|
78
78
|
* An online account for viewing TV in the web app (often part of your TV package), see the table above.
|
|
79
79
|
* An ARRIS DCX960 or HUMAX EOS1008R / 2008C / VIP5002W set-top box, provided by your TV provider as part of your TV subscription, called by the system an "EOSSTB", "EOS2STB" or "APLSTB" and marketed under different names in different countries.
|
|
@@ -115,7 +115,7 @@ This plugin is not provided by Magenta or Telenet or Sunrise or Virgin Media or
|
|
|
115
115
|
|
|
116
116
|
* **Fully Configurable**: A large amount of configuration items exist to allow you to configure your plugin the way you want.
|
|
117
117
|
|
|
118
|
-
* **Future Feature Support**: The plugin also supports current and target media state as well as closed captions, even though the Home app accessory cannot currently display or control this data in the home app (as at iOS 16.
|
|
118
|
+
* **Future Feature Support**: The plugin also supports current and target media state as well as closed captions, even though the Home app accessory cannot currently display or control this data in the home app (as at iOS 16.4). Hopefully, Apple will add support for these features in the future. You can however use this data in Home Automations or the Shortcuts app.
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
|
|
@@ -204,13 +204,13 @@ Services used in this set-top box accessory are:
|
|
|
204
204
|
4. Input service. The input (TV channels) utilises one service per input. The maximum possible channels (inputs) are thus 100 - 3 = 97. I have limited the inputs to maximum 95, but you can override this in the config (helpful to reduce log entries when debugging). The inputs are hard limited to 95 inputs.
|
|
205
205
|
|
|
206
206
|
### Media State (Play/Pause) Limitations
|
|
207
|
-
The eosstb plugin can detect the target and current media state and shows STOP, PLAY, PAUSE or LOADING (loading is displayed only for current media state when fast-forwarding or rewinding) in the Homebridge logs. Unfortunately, the Apple Home app cannot do anything with the media state (as at iOS 16.
|
|
207
|
+
The eosstb plugin can detect the target and current media state and shows STOP, PLAY, PAUSE or LOADING (loading is displayed only for current media state when fast-forwarding or rewinding) in the Homebridge logs. Unfortunately, the Apple Home app cannot do anything with the media state (as at iOS 16.4) apart from allow you to read it in Shortcuts or Automations. Hopefully this will improve in the future.
|
|
208
208
|
|
|
209
209
|
### Recording State Limitations
|
|
210
210
|
The eosstb plugin can detect the current recording state of the set-top box, both for local HDD-based recording (for boxes that have a HDD fitted) and for network recording. The plugin shows IDLE, ONGOING_NDVR or ONGOING_LOCALDVR in the Homebridge logs. DVR means digital video recorder; N for network and LOCAL for local HDD based recording. The Apple Home app cannot natively do anything with the recording state but the eosstb plugin uses it to set the inUse charateristic if the set-top box is turned on or is recording to the local HDD. This is useful in Shortcuts or Automations.
|
|
211
211
|
|
|
212
212
|
### Closed Captions Limitations
|
|
213
|
-
The eosstb plugin can detect the closed captions state (**Subtitle options** in the set-top box menu) and shows ENABLED or DISABLED in the Homebridge logs. Unfortunately, the Apple Home app cannot do anything with the closed captions state (as at iOS 16.
|
|
213
|
+
The eosstb plugin can detect the closed captions state (**Subtitle options** in the set-top box menu) and shows ENABLED or DISABLED in the Homebridge logs. Unfortunately, the Apple Home app cannot do anything with the closed captions state (as at iOS 16.4) apart from allow you to read it in Shortcuts or Automations. Hopefully this will improve in the future.
|
|
214
214
|
|
|
215
215
|
## Configuration
|
|
216
216
|
Add a new platform to the platforms section of your homebridge `config.json`.
|
|
@@ -285,7 +285,7 @@ Mandatory config items must always exist. These are used to establish the sessio
|
|
|
285
285
|
|
|
286
286
|
+ **country**: Your country. Must be one of ch, nl, be-nl, be-fr, at or gb. Not case sensitive. This controls the country-specific logon sequence and the mqtt sessions. Mandatory.
|
|
287
287
|
|
|
288
|
-
* **username**: Your login username for your TV account.
|
|
288
|
+
* **username**: Your login username for your TV account, same as used in the TV app on your iOS device. Often an email address, but some providers use a mobile phone number. Mandatory.
|
|
289
289
|
|
|
290
290
|
* **password**: Your password associated with your TV account. Mandatory.
|
|
291
291
|
|
package/index.js
CHANGED
|
@@ -14,6 +14,7 @@ const fsPromises = require('fs').promises;
|
|
|
14
14
|
const path = require('path');
|
|
15
15
|
const debug = require('debug')('eosstb'); // https://github.com/debug-js/debug
|
|
16
16
|
// good example of debug usage https://github.com/mqttjs/MQTT.js/blob/main/lib/client.js
|
|
17
|
+
const semver = require('semver') // https://github.com/npm/node-semver
|
|
17
18
|
|
|
18
19
|
const mqtt = require('mqtt'); // https://github.com/mqttjs
|
|
19
20
|
const qs = require('qs'); // https://github.com/ljharb/qs
|
|
@@ -306,6 +307,9 @@ class stbPlatform {
|
|
|
306
307
|
this.api = api;
|
|
307
308
|
this.stbDevices = []; // store stbDevice in this.stbDevices
|
|
308
309
|
|
|
310
|
+
// show some useful version info
|
|
311
|
+
this.log.info('%s v%s, node %s, homebridge v%s', packagejson.name, packagejson.version, process.version, this.api.serverVersion)
|
|
312
|
+
|
|
309
313
|
// only load if configured and mandatory items exist. Homebridge checks for platform itself, and name is not critical
|
|
310
314
|
if (!this.config) { this.log.warn('%s config missing. Initialization aborted.', PLUGIN_NAME); return; }
|
|
311
315
|
const configWarningText = '%s config incomplete: "{configItemName}" missing. Initialization aborted.';
|
|
@@ -334,7 +338,6 @@ class stbPlatform {
|
|
|
334
338
|
//this.api.on('didFinishLaunching', () => {
|
|
335
339
|
this.api.on('didFinishLaunching', async () => {
|
|
336
340
|
if (this.config.debugLevel > 2) { this.log.warn('API event: didFinishLaunching'); }
|
|
337
|
-
this.log('%s v%s', PLUGIN_NAME, PLUGIN_VERSION);
|
|
338
341
|
debug('stbPlatform:apievent :: didFinishLaunching')
|
|
339
342
|
|
|
340
343
|
// call the session watchdog once to create the session initially
|
|
@@ -602,7 +605,6 @@ class stbPlatform {
|
|
|
602
605
|
if (!this.devices || !this.devices[0].settings) {
|
|
603
606
|
this.currentStatusFault = Characteristic.StatusFault.GENERAL_FAULT;
|
|
604
607
|
this.sessionWatchdogRunning = false;
|
|
605
|
-
if (this.config.debugLevel > 2) { this.log.warn('%s: session connected but no devices found. Exiting %s with sessionWatchdogRunning=%s', watchdogInstance, watchdogInstance, this.sessionWatchdogRunning); }
|
|
606
608
|
//this.log('Failed to find any devices. The backend systems may be down, or you have no supported devices on your customer account')
|
|
607
609
|
reject('No devices found. The backend systems may be down, or you have no supported devices on your customer account')
|
|
608
610
|
|
|
@@ -1000,7 +1002,7 @@ class stbPlatform {
|
|
|
1000
1002
|
.catch(error => {
|
|
1001
1003
|
//this.log.warn("Step 6 of 6: Unable to authorize with oauth code:", error.response.status, error.response.statusText);
|
|
1002
1004
|
this.log.debug("Step 6 of 6: Unable to authorize with oauth code:",error);
|
|
1003
|
-
reject("Step 6 of 6:
|
|
1005
|
+
reject("Step 6 of 6: Unable to authorize with oauth code: " + error.response.status + ' ' + error.response.statusText); // reject the promise and return the error
|
|
1004
1006
|
});
|
|
1005
1007
|
};
|
|
1006
1008
|
};
|
|
@@ -1009,7 +1011,8 @@ class stbPlatform {
|
|
|
1009
1011
|
.catch(error => {
|
|
1010
1012
|
//this.log.warn("Step 4 of 6: Unable to oauth authorize:", error.response.status, error.response.statusText);
|
|
1011
1013
|
this.log.debug("Step 4 of 6: Unable to oauth authorize:",error);
|
|
1012
|
-
reject("Step
|
|
1014
|
+
//reject("Step 4 of 6: Unable to oauth authorize: " + error.response.status + ' ' + error.response.statusText); // reject the promise and return the error
|
|
1015
|
+
reject("Step 4 of 6: Unable to oauth authorize: " + error); // reject the promise and return the error
|
|
1013
1016
|
});
|
|
1014
1017
|
};
|
|
1015
1018
|
})
|
|
@@ -1499,23 +1502,26 @@ class stbPlatform {
|
|
|
1499
1502
|
|
|
1500
1503
|
// update all the devices in the array. Don't trust the index order in the Personalization Data message
|
|
1501
1504
|
//this.log('getPersonalizationData: this.stbDevices.length:', this.stbDevices.length)
|
|
1502
|
-
this.
|
|
1503
|
-
|
|
1504
|
-
this.
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
this.stbDevices[deviceIndex]
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1505
|
+
if (this.stbDevices.length > 0) {
|
|
1506
|
+
this.devices.forEach((device) => {
|
|
1507
|
+
if (this.config.debugLevel > 2) { // DEBUG
|
|
1508
|
+
this.log.warn('getPersonalizationData: device settings for device %s:', device.deviceId);
|
|
1509
|
+
this.log.warn(device.settings);
|
|
1510
|
+
this.log.warn('getPersonalizationData: device capabilities for device %s:', device.deviceId);
|
|
1511
|
+
this.log.warn(device.capabilities);
|
|
1512
|
+
}
|
|
1513
|
+
const deviceId = device.deviceId;
|
|
1514
|
+
const deviceIndex = this.devices.findIndex(device => device.deviceId == deviceId)
|
|
1515
|
+
if (deviceIndex > -1 && this.stbDevices[deviceIndex]) {
|
|
1516
|
+
this.stbDevices[deviceIndex].device = device;
|
|
1517
|
+
this.stbDevices[deviceIndex].customer = this.customer; // store entire customer object
|
|
1518
|
+
|
|
1519
|
+
// mqttDeviceStateHandler(deviceId, powerState, mediaState, recordingState, channelId, eventId, sourceType, profileDataChanged, statusFault, programMode, statusActive, currInputDeviceType, currInputSourceType) {
|
|
1520
|
+
this.mqttDeviceStateHandler(device.deviceId, null, null, null, null, null, null, true, Characteristic.StatusFault.NO_FAULT ); // update this device
|
|
1521
|
+
}
|
|
1522
|
+
});
|
|
1523
|
+
|
|
1524
|
+
}
|
|
1519
1525
|
|
|
1520
1526
|
|
|
1521
1527
|
// profiles are an array named profiles, store entire array in this.profiles
|
package/package.json
CHANGED
|
@@ -3,20 +3,21 @@
|
|
|
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.
|
|
6
|
+
"version": "2.2.6",
|
|
7
7
|
"platformname": "eosstb",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"axios-cookiejar-support": "^4.0.6",
|
|
10
|
-
"axios": "^1.
|
|
10
|
+
"axios": "^1.4.0",
|
|
11
11
|
"debug": "^4.3.4",
|
|
12
12
|
"mqtt": "^4.3.7",
|
|
13
|
-
"qs": "^6.11.
|
|
13
|
+
"qs": "^6.11.2",
|
|
14
|
+
"semver": "^7.5.1",
|
|
14
15
|
"tough-cookie": "^4.1.2"
|
|
15
16
|
},
|
|
16
17
|
"deprecated": false,
|
|
17
18
|
"engines": {
|
|
18
|
-
"homebridge": "
|
|
19
|
-
"node": "
|
|
19
|
+
"homebridge": "^1.6.1",
|
|
20
|
+
"node": "^18.16.0"
|
|
20
21
|
},
|
|
21
22
|
"homepage": "https://github.com/jsiegenthaler/homebridge-eosstb#readme",
|
|
22
23
|
"keywords": [
|