@o-lukas/homebridge-smartthings-tv 1.7.0 → 1.8.1

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/README.md CHANGED
@@ -47,6 +47,10 @@ The following snippets shows all available properties you can use for the plugin
47
47
  "registerPictureModes": true,
48
48
  "registerSoundModes": true,
49
49
  "registerVolumeSlider": true,
50
+ "deviceBlacklist": [
51
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
52
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
53
+ ],
50
54
  "deviceMappings": [
51
55
  {
52
56
  "deviceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
@@ -100,6 +104,10 @@ Registers all available sound modes as separate switches that can be toggled to
100
104
 
101
105
  Registers a separate volume slider accessorry that will be exposed as a light bulb accessory (because there is currently no option to change a speaker volume directly using Home).
102
106
 
107
+ ### deviceBlacklist
108
+
109
+ Devices not to be registered.
110
+
103
111
  ### deviceMappings
104
112
 
105
113
  Use the device mappings when e.g. turning on the accessory does not work as expected. When a device mapping is available the wake-on-lan functionality is used to turn on the device instead of the SmartThings API. To make use of the functionality you must enter the mapping using the SmartThings device ID and the mac address of the device. If status does not show up properly you can use the ping functionality to determine the device status. To make use of it you must enter the SmartThings device ID and the ip address of the device.
@@ -41,13 +41,23 @@
41
41
  "required": false,
42
42
  "description": "Registers a separate volume slider accessorry that will be exposed as a light bulb accessory (because there is currently no option to change a speaker volume directly using Home)."
43
43
  },
44
+ "deviceBlacklist": {
45
+ "description": "Devices not to be registered.",
46
+ "type": "array",
47
+ "items": {
48
+ "title": "Device Id",
49
+ "type": "string",
50
+ "description": "The SmartThings device id. Check the log or go to https://account.smartthings.com/ and get the device id."
51
+ }
52
+ },
44
53
  "deviceMappings": {
54
+ "description": "Use the device mappings when e.g. turning on the accessory does not work as expected. When a device mapping is available the wake-on-lan functionality is used to turn on the device instead of the SmartThings API. To make use of the functionality you must enter the mapping using the SmartThings device ID and the mac address of the device. If status does not show up properly you can use the ping functionality to determine the device status. To make use of it you must enter the SmartThings device ID and the ip address of the device.",
45
55
  "type": "array",
46
56
  "items": {
47
57
  "type": "object",
48
- "description": "Use the device mappings when e.g. turning on the accessory does not work as expected. When a device mapping is available the wake-on-lan functionality is used to turn on the device instead of the SmartThings API. To make use of the functionality you must enter the mapping using the SmartThings device ID and the mac address of the device. If status does not show up properly you can use the ping functionality to determine the device status. To make use of it you must enter the SmartThings device ID and the ip address of the device.",
49
58
  "properties": {
50
59
  "deviceId": {
60
+ "title": "Device Id",
51
61
  "type": "string",
52
62
  "description": "The SmartThings device id. Check the log or go to https://account.smartthings.com/ and get the device id."
53
63
  },
@@ -28,9 +28,10 @@ export declare class SmartThingsPlatform implements DynamicPlatformPlugin {
28
28
  * Uses the SmartThings API to discover and register the available devices.
29
29
  *
30
30
  * @param token the SmartThings API token
31
+ * @param deviceBlacklist the device ids to be ignored
31
32
  * @param deviceMappings the array of configured DeviceMapping
32
33
  */
33
- discoverDevices(token: string, deviceMappings: [DeviceMapping]): Promise<void>;
34
+ discoverDevices(token: string, deviceBlacklist: [string], deviceMappings: [DeviceMapping]): Promise<void>;
34
35
  /**
35
36
  * Registers a SmartThings Device for Homebridge.
36
37
  *
@@ -1 +1 @@
1
- {"version":3,"file":"smartThingsPlatform.d.ts","sourceRoot":"","sources":["../src/smartThingsPlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,qBAAqB,EACrB,MAAM,EACN,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,cAAc,EAEf,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,iBAAiB,EAA4B,MAAM,EAAE,SAAS,EAAoB,MAAM,uBAAuB,CAAC;AAIzH;;GAEG;AACH,cAAM,aAAa;aACW,QAAQ,EAAE,MAAM;aAAkB,UAAU,EAAE,MAAM;aAAkB,SAAS,EAAE,MAAM;gBAAvF,QAAQ,EAAE,MAA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G;IACH,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAClF,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC5F;IAwBH;;;;;;;OAOG;IACH,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS;CAiCrF"}
@@ -34,8 +34,9 @@ class SmartThingsPlatform {
34
34
  return;
35
35
  }
36
36
  this.api.on('didFinishLaunching', () => {
37
+ var _a, _b;
37
38
  this.log.debug('Executed didFinishLaunching callback');
38
- void this.discoverDevices(config.token, config.deviceMappings);
39
+ void this.discoverDevices(config.token, (_a = config.deviceBlacklist) !== null && _a !== void 0 ? _a : [], (_b = config.deviceMappings) !== null && _b !== void 0 ? _b : []);
39
40
  });
40
41
  }
41
42
  /**
@@ -51,13 +52,19 @@ class SmartThingsPlatform {
51
52
  * Uses the SmartThings API to discover and register the available devices.
52
53
  *
53
54
  * @param token the SmartThings API token
55
+ * @param deviceBlacklist the device ids to be ignored
54
56
  * @param deviceMappings the array of configured DeviceMapping
55
57
  */
56
- async discoverDevices(token, deviceMappings) {
58
+ async discoverDevices(token, deviceBlacklist, deviceMappings) {
57
59
  const client = new core_sdk_1.SmartThingsClient(new core_sdk_1.BearerTokenAuthenticator(token));
58
60
  try {
59
61
  for (const device of await client.devices.list()) {
60
- await this.registerDevice(client, device, deviceMappings);
62
+ if (deviceBlacklist.includes(device.deviceId)) {
63
+ this.log.debug('Ignoring SmartThings device %s because it is on the blacklist', device.name ? device.name + ' (' + device.deviceId + ')' : device.deviceId);
64
+ }
65
+ else {
66
+ await this.registerDevice(client, device, deviceMappings);
67
+ }
61
68
  }
62
69
  }
63
70
  catch (error) {
@@ -80,10 +87,10 @@ class SmartThingsPlatform {
80
87
  switch ((_a = device.ocf) === null || _a === void 0 ? void 0 : _a.ocfDeviceType) {
81
88
  case 'oic.d.tv':
82
89
  case 'x.com.st.d.monitor':
83
- await this.registerTvDevice(client, device, deviceMappings === null || deviceMappings === void 0 ? void 0 : deviceMappings.find(mapping => mapping.deviceId === device.deviceId));
90
+ await this.registerTvDevice(client, device, deviceMappings.find(mapping => mapping.deviceId === device.deviceId));
84
91
  break;
85
92
  default:
86
- this.log.debug('Ignoring SmartThingsDevice %s because device type %s is not implemented: %s', device.name ? device.name + ' (' + device.deviceId + ')' : device.deviceId, (_b = device.ocf) === null || _b === void 0 ? void 0 : _b.ocfDeviceType, JSON.stringify(device, null, 2));
93
+ this.log.debug('Ignoring SmartThings device %s because device type %s is not implemented: %s', device.name ? device.name + ' (' + device.deviceId + ')' : device.deviceId, (_b = device.ocf) === null || _b === void 0 ? void 0 : _b.ocfDeviceType, JSON.stringify(device, null, 2));
87
94
  break;
88
95
  }
89
96
  }
@@ -1 +1 @@
1
- {"version":3,"file":"smartThingsPlatform.js","sourceRoot":"","sources":["../src/smartThingsPlatform.ts"],"names":[],"mappings":";;;AAWA,yCAAwD;AACxD,+CAA4C;AAC5C,oDAAyH;AACzH,uDAAoD;AACpD,uDAAoD;AAEpD;;GAEG;AACH,MAAM,aAAa;IACjB,YAA4B,QAAgB,EAAkB,UAAkB,EAAkB,SAAiB;QAAvF,aAAQ,GAAR,QAAQ,CAAQ;QAAkB,eAAU,GAAV,UAAU,CAAQ;QAAkB,cAAS,GAAT,SAAS,CAAQ;IACnH,CAAC;CACF;AAED;;GAEG;AACH,MAAa,mBAAmB;IAO9B,YACkB,GAAW,EACX,MAAsB,EACtB,GAAQ;QAFR,QAAG,GAAH,GAAG,CAAQ;QACX,WAAM,GAAN,MAAM,CAAgB;QACtB,QAAG,GAAH,GAAG,CAAK;QATV,YAAO,GAAmB,IAAI,C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,sBAAW,EAAE,wBAAa,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;SAC/E;IACH,CAAC;CACF;AAvND,kDAuNC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Homebridge SmartThings TV",
3
3
  "name": "@o-lukas/homebridge-smartthings-tv",
4
- "version": "1.7.0",
4
+ "version": "1.8.1",
5
5
  "description": "This is a plugin for Homebridge. It offers some basic functions to control Samsung TVs using the SmartThings API.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -35,31 +35,27 @@
35
35
  "tizen"
36
36
  ],
37
37
  "dependencies": {
38
- "@smartthings/core-sdk": "^7.1.1",
38
+ "@smartthings/core-sdk": "^8.0.0",
39
39
  "ping": "^0.4.4",
40
40
  "wol": "^1.0.7"
41
41
  },
42
42
  "devDependencies": {
43
- "@types/node": "^20.5.6",
44
- "@types/ping": "^0.4.1",
45
- "@types/wol": "^1.0.1",
46
- "@typescript-eslint/eslint-plugin": "^6.4.1",
47
- "@typescript-eslint/parser": "^6.4.1",
48
- "eslint": "^8.47.0",
43
+ "@types/node": "^20.7.1",
44
+ "@types/ping": "^0.4.2",
45
+ "@types/wol": "^1.0.2",
46
+ "@typescript-eslint/eslint-plugin": "^6.7.3",
47
+ "@typescript-eslint/parser": "^6.7.3",
48
+ "eslint": "^8.50.0",
49
49
  "homebridge": "^1.6.1",
50
50
  "nodemon": "^3.0.1",
51
- "rimraf": "^5.0.1",
52
- "semantic-release": "^21.1.1",
51
+ "rimraf": "^5.0.5",
52
+ "semantic-release": "^22.0.5",
53
53
  "ts-node": "^10.9.1",
54
54
  "typescript": "^5.2.2"
55
55
  },
56
56
  "release": {
57
57
  "branches": [
58
- "main",
59
- {
60
- "name": "next",
61
- "prerelease": true
62
- }
58
+ "main"
63
59
  ]
64
60
  }
65
61
  }