@o-lukas/homebridge-smartthings-tv 2.1.3 → 2.2.0
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 +26 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/settings.d.ts +0 -1
- package/dist/settings.js +2 -5
- package/dist/settings.js.map +1 -1
- package/dist/sliderAccessory.d.ts +2 -3
- package/dist/sliderAccessory.js +14 -11
- package/dist/sliderAccessory.js.map +1 -1
- package/dist/smartThingsAccessory.d.ts +1 -2
- package/dist/smartThingsAccessory.js +15 -18
- package/dist/smartThingsAccessory.js.map +1 -1
- package/dist/smartThingsPlatform.d.ts +9 -1
- package/dist/smartThingsPlatform.js +75 -38
- package/dist/smartThingsPlatform.js.map +1 -1
- package/dist/soundbarAccessory.d.ts +127 -0
- package/dist/soundbarAccessory.js +353 -0
- package/dist/soundbarAccessory.js.map +1 -0
- package/dist/switchAccessory.d.ts +2 -3
- package/dist/switchAccessory.js +8 -8
- package/dist/switchAccessory.js.map +1 -1
- package/dist/tvAccessory.d.ts +2 -3
- package/dist/tvAccessory.js +47 -48
- package/dist/tvAccessory.js.map +1 -1
- package/eslint.config.js +35 -0
- package/package.json +30 -22
- package/dist/index.d.ts.map +0 -1
- package/dist/settings.d.ts.map +0 -1
- package/dist/sliderAccessory.d.ts.map +0 -1
- package/dist/smartThingsAccessory.d.ts.map +0 -1
- package/dist/smartThingsPlatform.d.ts.map +0 -1
- package/dist/switchAccessory.d.ts.map +0 -1
- package/dist/tvAccessory.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|

|
|
9
9
|
[](https://github.com/o-lukas/homebridge-smartthings-tv/actions/workflows/build.yml)
|
|
10
10
|
|
|
11
|
-
This is a plugin for [Homebridge](https://github.com/homebridge/homebridge). It offers some basic functions to control Samsung TVs using the SmartThings API.
|
|
11
|
+
This is a plugin for [Homebridge](https://github.com/homebridge/homebridge). It offers some basic functions to control Samsung TVs and SoundBars using the SmartThings API.
|
|
12
|
+
|
|
13
|
+
Both device types will be registered as TVs because this is the only device type that is able to control input sources at the moment.
|
|
12
14
|
|
|
13
15
|
## Configuration
|
|
14
16
|
|
|
@@ -113,14 +115,23 @@ Enable debug logging for cyclic calls (e.g. polling).
|
|
|
113
115
|
|
|
114
116
|
To use installed application as input sources, a [predefined list of applications](./src/res/apps.json) will be used. This list will be checked for availability at the TV(s) and eventually be registered as input sources. Make sure to have the TV(s) turned on when starting your instance as this functionality requires your TV(s) be turned on to determine whether an application is installed or not. On startup the applications will be opened to determine if they are available. Do not use your TV until the input source is being changed back to the first one (usually Live TV).
|
|
115
117
|
|
|
118
|
+
> [!NOTE]
|
|
119
|
+
> Not implemented for SoundBars.
|
|
120
|
+
|
|
116
121
|
### registerPictureModes
|
|
117
122
|
|
|
118
123
|
Registers all available picture modes as separate switches that can be toggled to enable/disable a picture mode. Uses the names as exposed from the SmartThings API.
|
|
119
124
|
|
|
125
|
+
> [!NOTE]
|
|
126
|
+
> Not implemented for SoundBars.
|
|
127
|
+
|
|
120
128
|
### registerSoundModes
|
|
121
129
|
|
|
122
130
|
Registers all available sound modes as separate switches that can be toggled to enable/disable a sound mode. Uses the names as exposed from the SmartThings API.
|
|
123
131
|
|
|
132
|
+
> [!NOTE]
|
|
133
|
+
> Not implemented for SoundBars.
|
|
134
|
+
|
|
124
135
|
### registerVolumeSlider
|
|
125
136
|
|
|
126
137
|
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).
|
|
@@ -137,6 +148,20 @@ Devices not to be registered.
|
|
|
137
148
|
|
|
138
149
|
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.
|
|
139
150
|
|
|
151
|
+
The following table gives an overview which properties do work for the device types:
|
|
152
|
+
|
|
153
|
+
| Configuration property | TV | SoundBar |
|
|
154
|
+
| ---------------------- | ------------------ | ------------------ |
|
|
155
|
+
| deviceId | :white_check_mark: | :white_check_mark: |
|
|
156
|
+
| nameOverride | :white_check_mark: | :white_check_mark: |
|
|
157
|
+
| wol | :white_check_mark: | :white_check_mark: |
|
|
158
|
+
| macAddress | :white_check_mark: | :white_check_mark: |
|
|
159
|
+
| ping | :white_check_mark: | :white_check_mark: |
|
|
160
|
+
| ipAddress | :white_check_mark: | :white_check_mark: |
|
|
161
|
+
| infoKey | :white_check_mark: | :x: |
|
|
162
|
+
| inputSources | :white_check_mark: | :white_check_mark: |
|
|
163
|
+
| applications | :white_check_mark: | :x: |
|
|
164
|
+
|
|
140
165
|
#### deviceId
|
|
141
166
|
|
|
142
167
|
The SmartThings device id. Check the log or go to <https://account.smartthings.com/> and get the device id.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { API } from 'homebridge';
|
|
1
|
+
import type { API } from 'homebridge';
|
|
2
2
|
/**
|
|
3
3
|
* This method registers the platform with Homebridge
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: (api: API) => void;
|
|
6
|
-
export
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
6
|
+
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { SmartThingsPlatform } from './smartThingsPlatform.js';
|
|
2
|
+
import { PLATFORM_NAME } from './settings.js';
|
|
3
|
+
/**
|
|
4
|
+
* This method registers the platform with Homebridge
|
|
5
|
+
*/
|
|
6
|
+
export default (api) => {
|
|
7
|
+
api.registerPlatform(PLATFORM_NAME, SmartThingsPlatform);
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C;;GAEG;AACH,eAAe,CAAC,GAAQ,EAAE,EAAE;IAC1B,GAAG,CAAC,gBAAgB,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC;AAC3D,CAAC,CAAC"}
|
package/dist/settings.d.ts
CHANGED
package/dist/settings.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PLUGIN_NAME = exports.PLATFORM_NAME = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* This is the name of the platform that users will use to register the plugin in the Homebridge config.json
|
|
6
3
|
*/
|
|
7
|
-
|
|
4
|
+
export const PLATFORM_NAME = 'smartthings-tv';
|
|
8
5
|
/**
|
|
9
6
|
* This must match the name of your plugin as defined the package.json
|
|
10
7
|
*/
|
|
11
|
-
|
|
8
|
+
export const PLUGIN_NAME = '@o-lukas/homebridge-smartthings-tv';
|
|
12
9
|
//# sourceMappingURL=settings.js.map
|
package/dist/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,oCAAoC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformAccessory, CharacteristicValue, Logger } from 'homebridge';
|
|
2
|
-
import { SmartThingsPlatform } from './smartThingsPlatform';
|
|
2
|
+
import { SmartThingsPlatform } from './smartThingsPlatform.js';
|
|
3
3
|
import { SmartThingsClient, Device, Component, CapabilityStatus } from '@smartthings/core-sdk';
|
|
4
|
-
import { SmartThingsAccessory } from './smartThingsAccessory';
|
|
4
|
+
import { SmartThingsAccessory } from './smartThingsAccessory.js';
|
|
5
5
|
/**
|
|
6
6
|
* Class implements a slider accessory to execute a capability commmand.
|
|
7
7
|
*/
|
|
@@ -20,4 +20,3 @@ export declare class SliderAccessory extends SmartThingsAccessory {
|
|
|
20
20
|
private handleGetBrightness;
|
|
21
21
|
private handleSetBrightness;
|
|
22
22
|
}
|
|
23
|
-
//# sourceMappingURL=sliderAccessory.d.ts.map
|
package/dist/sliderAccessory.js
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SliderAccessory = void 0;
|
|
4
|
-
const smartThingsAccessory_1 = require("./smartThingsAccessory");
|
|
1
|
+
import { SmartThingsAccessory } from './smartThingsAccessory.js';
|
|
5
2
|
/**
|
|
6
3
|
* Class implements a slider accessory to execute a capability commmand.
|
|
7
4
|
*/
|
|
8
|
-
class SliderAccessory extends
|
|
5
|
+
export class SliderAccessory extends SmartThingsAccessory {
|
|
6
|
+
capability;
|
|
7
|
+
command;
|
|
8
|
+
onGet;
|
|
9
|
+
onSet;
|
|
10
|
+
pollingInterval;
|
|
11
|
+
cyclicCallsLogging;
|
|
12
|
+
service;
|
|
13
|
+
// stores the last value before the off functionality has been used
|
|
14
|
+
// so this value can be restored when turning back on
|
|
15
|
+
lastValueBeforeOff = 0;
|
|
9
16
|
constructor(device, component, client, log, platform, accessory, capability, command, onGet, onSet, pollingInterval, cyclicCallsLogging) {
|
|
10
|
-
var _a;
|
|
11
17
|
super(device, component, client, platform, accessory, log);
|
|
12
18
|
this.capability = capability;
|
|
13
19
|
this.command = command;
|
|
@@ -15,10 +21,8 @@ class SliderAccessory extends smartThingsAccessory_1.SmartThingsAccessory {
|
|
|
15
21
|
this.onSet = onSet;
|
|
16
22
|
this.pollingInterval = pollingInterval;
|
|
17
23
|
this.cyclicCallsLogging = cyclicCallsLogging;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
this.lastValueBeforeOff = 0;
|
|
21
|
-
this.service = (_a = this.accessory.getService(this.platform.Service.Lightbulb)) !== null && _a !== void 0 ? _a : this.accessory.addService(this.platform.Service.Lightbulb);
|
|
24
|
+
this.service = this.accessory.getService(this.platform.Service.Lightbulb) ??
|
|
25
|
+
this.accessory.addService(this.platform.Service.Lightbulb);
|
|
22
26
|
this.service.getCharacteristic(this.platform.Characteristic.On)
|
|
23
27
|
.onGet(this.handleGetOn.bind(this))
|
|
24
28
|
.onSet(this.handleSetOn.bind(this));
|
|
@@ -55,5 +59,4 @@ class SliderAccessory extends smartThingsAccessory_1.SmartThingsAccessory {
|
|
|
55
59
|
await this.executeCommand(this.capability, this.command, apiValue);
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
|
-
exports.SliderAccessory = SliderAccessory;
|
|
59
62
|
//# sourceMappingURL=sliderAccessory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sliderAccessory.js","sourceRoot":"","sources":["../src/sliderAccessory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sliderAccessory.js","sourceRoot":"","sources":["../src/sliderAccessory.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,oBAAoB;IAapC;IACA;IACA;IACA;IACA;IACA;IAjBF,OAAO,CAAU;IAClC,mEAAmE;IACnE,qDAAqD;IAC7C,kBAAkB,GAAG,CAAC,CAAC;IAE/B,YACE,MAAc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AAK,CAAC,mBAAmB,CAAC,GAAG,GAAG,IAAI;QAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC;QAClF,IAAI,GAAG,EAAE,CAAC;YACR,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEO,KAAK,CAAC,mBAAmB,CAAC,KAA0B;QAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC1D,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Characteristic, CharacteristicValue, Logger, PlatformAccessory, Service, WithUUID } from 'homebridge';
|
|
2
|
-
import { SmartThingsPlatform } from './smartThingsPlatform';
|
|
2
|
+
import { SmartThingsPlatform } from './smartThingsPlatform.js';
|
|
3
3
|
import { SmartThingsClient, Device, Component, CapabilityStatus, Capability } from '@smartthings/core-sdk';
|
|
4
4
|
/**
|
|
5
5
|
* Class implements a base class for SmartThings accessories.
|
|
@@ -47,4 +47,3 @@ export declare abstract class SmartThingsAccessory {
|
|
|
47
47
|
protected logError(message: string, ...parameters: unknown[]): void;
|
|
48
48
|
protected logDebug(message: string, ...parameters: unknown[]): void;
|
|
49
49
|
}
|
|
50
|
-
//# sourceMappingURL=smartThingsAccessory.d.ts.map
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SmartThingsAccessory = void 0;
|
|
4
|
-
const core_sdk_1 = require("@smartthings/core-sdk");
|
|
1
|
+
import { CustomCapabilityStatus } from '@smartthings/core-sdk';
|
|
5
2
|
/**
|
|
6
3
|
* Class implements a base class for SmartThings accessories.
|
|
7
4
|
*/
|
|
8
|
-
class SmartThingsAccessory {
|
|
5
|
+
export class SmartThingsAccessory {
|
|
6
|
+
device;
|
|
7
|
+
component;
|
|
8
|
+
client;
|
|
9
|
+
platform;
|
|
10
|
+
accessory;
|
|
11
|
+
log;
|
|
9
12
|
constructor(device, component, client, platform, accessory, log) {
|
|
10
|
-
var _a, _b, _c, _d;
|
|
11
13
|
this.device = device;
|
|
12
14
|
this.component = component;
|
|
13
15
|
this.client = client;
|
|
@@ -15,9 +17,9 @@ class SmartThingsAccessory {
|
|
|
15
17
|
this.accessory = accessory;
|
|
16
18
|
this.log = log;
|
|
17
19
|
this.accessory.getService(this.platform.Service.AccessoryInformation)
|
|
18
|
-
.setCharacteristic(this.platform.Characteristic.FirmwareRevision,
|
|
20
|
+
.setCharacteristic(this.platform.Characteristic.FirmwareRevision, device.ocf?.firmwareVersion ?? 'Unknown')
|
|
19
21
|
.setCharacteristic(this.platform.Characteristic.Manufacturer, device.manufacturerName)
|
|
20
|
-
.setCharacteristic(this.platform.Characteristic.Model,
|
|
22
|
+
.setCharacteristic(this.platform.Characteristic.Model, device.ocf?.modelNumber ?? 'Unknown')
|
|
21
23
|
.setCharacteristic(this.platform.Characteristic.SerialNumber, device.deviceId);
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
@@ -98,26 +100,21 @@ class SmartThingsAccessory {
|
|
|
98
100
|
}
|
|
99
101
|
logCapabilityRegistration(capability) {
|
|
100
102
|
this.logInfo('Registering capability:', capability.name);
|
|
101
|
-
if (capability.status !==
|
|
103
|
+
if (capability.status !== CustomCapabilityStatus.LIVE) {
|
|
102
104
|
this.logWarn('Capability %s might not work as expected because it\'s status is: %s', capability.name, capability.status);
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
logInfo(message, ...parameters) {
|
|
106
|
-
|
|
107
|
-
this.log.info('[' + ((_a = this.device.name) !== null && _a !== void 0 ? _a : this.device.deviceId) + '] ' + message, ...parameters);
|
|
108
|
+
this.log.info('[' + (this.device.name ?? this.device.deviceId) + '] ' + message, ...parameters);
|
|
108
109
|
}
|
|
109
110
|
logWarn(message, ...parameters) {
|
|
110
|
-
|
|
111
|
-
this.log.warn('[' + ((_a = this.device.name) !== null && _a !== void 0 ? _a : this.device.deviceId) + '] ' + message, ...parameters);
|
|
111
|
+
this.log.warn('[' + (this.device.name ?? this.device.deviceId) + '] ' + message, ...parameters);
|
|
112
112
|
}
|
|
113
113
|
logError(message, ...parameters) {
|
|
114
|
-
|
|
115
|
-
this.log.error('[' + ((_a = this.device.name) !== null && _a !== void 0 ? _a : this.device.deviceId) + '] ' + message, ...parameters);
|
|
114
|
+
this.log.error('[' + (this.device.name ?? this.device.deviceId) + '] ' + message, ...parameters);
|
|
116
115
|
}
|
|
117
116
|
logDebug(message, ...parameters) {
|
|
118
|
-
|
|
119
|
-
this.log.debug('[' + ((_a = this.device.name) !== null && _a !== void 0 ? _a : this.device.deviceId) + '] ' + message, ...parameters);
|
|
117
|
+
this.log.debug('[' + (this.device.name ?? this.device.deviceId) + '] ' + message, ...parameters);
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
|
-
exports.SmartThingsAccessory = SmartThingsAccessory;
|
|
123
120
|
//# sourceMappingURL=smartThingsAccessory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartThingsAccessory.js","sourceRoot":"","sources":["../src/smartThingsAccessory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"smartThingsAccessory.js","sourceRoot":"","sources":["../src/smartThingsAccessory.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;GAEG;AACH,MAAM,OAAg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AAG,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC;IAClG,CAAC;IAES,QAAQ,CAAC,OAAe,EAAE,GAAG,UAAqB;QAC1D,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC;IACnG,CAAC;IAES,QAAQ,CAAC,OAAe,EAAE,GAAG,UAAqB;QAC1D,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC;IACnG,CAAC;CACF"}
|
|
@@ -65,6 +65,15 @@ export declare class SmartThingsPlatform implements DynamicPlatformPlugin {
|
|
|
65
65
|
* @param deviceMappings the array of configured DeviceMapping
|
|
66
66
|
*/
|
|
67
67
|
registerTvDevice(client: SmartThingsClient, device: Device, deviceMapping: DeviceMapping | undefined): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Registers a SmartThings Soundbar Device for Homebridge.
|
|
70
|
+
*
|
|
71
|
+
* @param client the SmartThingsClient used to send API calls
|
|
72
|
+
* @param device the SmartThings Device
|
|
73
|
+
* @param accessory the cached PlatformAccessory or undefined if no cached PlatformAccessory exists
|
|
74
|
+
* @param deviceMappings the array of configured DeviceMapping
|
|
75
|
+
*/
|
|
76
|
+
registerSoundbarDevice(client: SmartThingsClient, device: Device, deviceMapping: DeviceMapping | undefined): Promise<void>;
|
|
68
77
|
/**
|
|
69
78
|
* Register the modes of the device passed in as platform accessories.
|
|
70
79
|
* Handles caching of accessories as well.
|
|
@@ -94,4 +103,3 @@ export declare class SmartThingsPlatform implements DynamicPlatformPlugin {
|
|
|
94
103
|
registerVolumeSlider(client: SmartThingsClient, device: Device, component: Component): void;
|
|
95
104
|
}
|
|
96
105
|
export {};
|
|
97
|
-
//# sourceMappingURL=smartThingsPlatform.d.ts.map
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const switchAccessory_1 = require("./switchAccessory");
|
|
8
|
-
const sliderAccessory_1 = require("./sliderAccessory");
|
|
1
|
+
import { PLATFORM_NAME, PLUGIN_NAME } from './settings.js';
|
|
2
|
+
import { TvAccessory } from './tvAccessory.js';
|
|
3
|
+
import { SmartThingsClient, BearerTokenAuthenticator } from '@smartthings/core-sdk';
|
|
4
|
+
import { SwitchAccessory } from './switchAccessory.js';
|
|
5
|
+
import { SliderAccessory } from './sliderAccessory.js';
|
|
6
|
+
import { SoundbarAccessory } from './soundbarAccessory.js';
|
|
9
7
|
/**
|
|
10
8
|
* Class implements the configured Device to mac and ip address mappings.
|
|
11
9
|
*/
|
|
12
10
|
class DeviceMapping {
|
|
11
|
+
deviceId;
|
|
12
|
+
nameOverride;
|
|
13
|
+
macAddress;
|
|
14
|
+
ipAddress;
|
|
15
|
+
inputSources;
|
|
16
|
+
applications;
|
|
17
|
+
infoKey;
|
|
13
18
|
constructor(deviceId, nameOverride, macAddress, ipAddress, inputSources, applications, infoKey) {
|
|
14
19
|
this.deviceId = deviceId;
|
|
15
20
|
this.nameOverride = nameOverride;
|
|
@@ -23,22 +28,26 @@ class DeviceMapping {
|
|
|
23
28
|
/**
|
|
24
29
|
* Class implements the plugin platform.
|
|
25
30
|
*/
|
|
26
|
-
class SmartThingsPlatform {
|
|
31
|
+
export class SmartThingsPlatform {
|
|
32
|
+
log;
|
|
33
|
+
config;
|
|
34
|
+
api;
|
|
35
|
+
Service;
|
|
36
|
+
Characteristic;
|
|
37
|
+
// this is used to track restored cached accessories
|
|
38
|
+
accessories = [];
|
|
27
39
|
constructor(log, config, api) {
|
|
28
40
|
this.log = log;
|
|
29
41
|
this.config = config;
|
|
30
42
|
this.api = api;
|
|
43
|
+
this.log.debug('Finished initializing platform: %s', this.config.name);
|
|
31
44
|
this.Service = this.api.hap.Service;
|
|
32
45
|
this.Characteristic = this.api.hap.Characteristic;
|
|
33
|
-
// this is used to track restored cached accessories
|
|
34
|
-
this.accessories = [];
|
|
35
|
-
this.log.debug('Finished initializing platform: %s', this.config.name);
|
|
36
46
|
if (!config.token) {
|
|
37
47
|
this.log.error('SmartThings API token must be configured');
|
|
38
48
|
return;
|
|
39
49
|
}
|
|
40
50
|
this.api.on('didFinishLaunching', () => {
|
|
41
|
-
var _a;
|
|
42
51
|
this.log.debug('Executed didFinishLaunching callback');
|
|
43
52
|
let deviceBlocklist = config.deviceBlocklist;
|
|
44
53
|
if (this.config.deviceBlacklist) {
|
|
@@ -46,13 +55,12 @@ class SmartThingsPlatform {
|
|
|
46
55
|
this.log.warn('Config property deviceBlacklist has been renamed to deviceBlocklist \
|
|
47
56
|
- adjust your configuration because deviceBlacklist will be removed in future versions');
|
|
48
57
|
}
|
|
49
|
-
void this.discoverDevices(config.token, deviceBlocklist
|
|
58
|
+
void this.discoverDevices(config.token, deviceBlocklist ?? [], config.deviceMappings ?? []);
|
|
50
59
|
});
|
|
51
60
|
}
|
|
52
61
|
/**
|
|
53
62
|
* @inheritdoc
|
|
54
63
|
*/
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
56
64
|
configureAccessory(accessory) {
|
|
57
65
|
this.log.info('Loading accessory from cache: %s', accessory.displayName);
|
|
58
66
|
// add the restored accessory to the accessories cache so we can track if it has already been registered
|
|
@@ -66,7 +74,7 @@ class SmartThingsPlatform {
|
|
|
66
74
|
* @param deviceMappings the array of configured DeviceMapping
|
|
67
75
|
*/
|
|
68
76
|
async discoverDevices(token, deviceBlocklist, deviceMappings) {
|
|
69
|
-
const client = new
|
|
77
|
+
const client = new SmartThingsClient(new BearerTokenAuthenticator(token));
|
|
70
78
|
try {
|
|
71
79
|
for (const device of await client.devices.list()) {
|
|
72
80
|
if (deviceBlocklist.includes(device.deviceId)) {
|
|
@@ -93,14 +101,16 @@ class SmartThingsPlatform {
|
|
|
93
101
|
* @param deviceMappings the array of configured DeviceMapping
|
|
94
102
|
*/
|
|
95
103
|
async registerDevice(client, device, deviceMappings) {
|
|
96
|
-
|
|
97
|
-
switch ((_a = device.ocf) === null || _a === void 0 ? void 0 : _a.ocfDeviceType) {
|
|
104
|
+
switch (device.ocf?.ocfDeviceType) {
|
|
98
105
|
case 'oic.d.tv':
|
|
99
106
|
case 'x.com.st.d.monitor':
|
|
100
107
|
await this.registerTvDevice(client, device, deviceMappings.find(mapping => mapping.deviceId === device.deviceId));
|
|
101
108
|
break;
|
|
109
|
+
case 'oic.d.networkaudio':
|
|
110
|
+
await this.registerSoundbarDevice(client, device, deviceMappings.find(mapping => mapping.deviceId === device.deviceId));
|
|
111
|
+
break;
|
|
102
112
|
default:
|
|
103
|
-
this.log.debug('Ignoring SmartThings device %s because device type %s is not implemented: %s', device.name ? device.name + ' (' + device.deviceId + ')' : device.deviceId,
|
|
113
|
+
this.log.debug('Ignoring SmartThings device %s because device type %s is not implemented: %s', device.name ? device.name + ' (' + device.deviceId + ')' : device.deviceId, device.ocf?.ocfDeviceType, JSON.stringify(device, null, 2));
|
|
104
114
|
break;
|
|
105
115
|
}
|
|
106
116
|
}
|
|
@@ -113,23 +123,22 @@ class SmartThingsPlatform {
|
|
|
113
123
|
* @param deviceMappings the array of configured DeviceMapping
|
|
114
124
|
*/
|
|
115
125
|
async registerTvDevice(client, device, deviceMapping) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const component = (_a = device.components) === null || _a === void 0 ? void 0 : _a.at(0);
|
|
126
|
+
this.log.info('Adding new TV accessory: %s', device.name ? device.name + ' (' + device.deviceId + ')' : device.deviceId);
|
|
127
|
+
const component = device.components?.at(0);
|
|
119
128
|
if (!component) {
|
|
120
129
|
this.log.info('Can\'t register TV accessory because (main) component does not exist');
|
|
121
130
|
return;
|
|
122
131
|
}
|
|
123
|
-
let displayName =
|
|
124
|
-
if (deviceMapping
|
|
132
|
+
let displayName = device.name ?? device.deviceId;
|
|
133
|
+
if (deviceMapping?.nameOverride) {
|
|
125
134
|
this.log.info('Overriding device default name \'%s\' with configured display name \'%s\'', device.name, deviceMapping.nameOverride);
|
|
126
135
|
displayName = deviceMapping.nameOverride;
|
|
127
136
|
}
|
|
128
137
|
const accessory = new this.api.platformAccessory(displayName, device.deviceId);
|
|
129
138
|
accessory.context.device = device;
|
|
130
139
|
accessory.category = 31 /* this.api.hap.Categories.TELEVISION */;
|
|
131
|
-
this.api.publishExternalAccessories(
|
|
132
|
-
const tv = new
|
|
140
|
+
this.api.publishExternalAccessories(PLUGIN_NAME, [accessory]);
|
|
141
|
+
const tv = new TvAccessory(displayName, device, component, client, this.log, this, accessory, this.config.capabilityLogging ?? false, this.config.registerApplications ?? false, this.config.pollInterval ?? undefined, this.config.cyclicCallsLogging ?? false, deviceMapping?.macAddress, deviceMapping?.ipAddress, deviceMapping?.inputSources, deviceMapping?.applications, deviceMapping?.infoKey);
|
|
133
142
|
await tv.registerCapabilities();
|
|
134
143
|
if (this.config.registerPictureModes) {
|
|
135
144
|
const modes = await tv.getPictureModes();
|
|
@@ -152,6 +161,36 @@ class SmartThingsPlatform {
|
|
|
152
161
|
}
|
|
153
162
|
}
|
|
154
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Registers a SmartThings Soundbar Device for Homebridge.
|
|
166
|
+
*
|
|
167
|
+
* @param client the SmartThingsClient used to send API calls
|
|
168
|
+
* @param device the SmartThings Device
|
|
169
|
+
* @param accessory the cached PlatformAccessory or undefined if no cached PlatformAccessory exists
|
|
170
|
+
* @param deviceMappings the array of configured DeviceMapping
|
|
171
|
+
*/
|
|
172
|
+
async registerSoundbarDevice(client, device, deviceMapping) {
|
|
173
|
+
this.log.info('Adding new soundbar accessory: %s', device.name ? device.name + ' (' + device.deviceId + ')' : device.deviceId);
|
|
174
|
+
const component = device.components?.at(0);
|
|
175
|
+
if (!component) {
|
|
176
|
+
this.log.info('Can\'t register soundbar accessory because (main) component does not exist');
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
let displayName = device.name ?? device.deviceId;
|
|
180
|
+
if (deviceMapping?.nameOverride) {
|
|
181
|
+
this.log.info('Overriding device default name \'%s\' with configured display name \'%s\'', device.name, deviceMapping.nameOverride);
|
|
182
|
+
displayName = deviceMapping.nameOverride;
|
|
183
|
+
}
|
|
184
|
+
const accessory = new this.api.platformAccessory(displayName, device.deviceId);
|
|
185
|
+
accessory.context.device = device;
|
|
186
|
+
accessory.category = 31 /* this.api.hap.Categories.TELEVISION */;
|
|
187
|
+
this.api.publishExternalAccessories(PLUGIN_NAME, [accessory]);
|
|
188
|
+
const tv = new SoundbarAccessory(displayName, device, component, client, this.log, this, accessory, this.config.capabilityLogging ?? false, this.config.pollInterval ?? undefined, this.config.cyclicCallsLogging ?? false, deviceMapping?.macAddress, deviceMapping?.ipAddress, deviceMapping?.inputSources);
|
|
189
|
+
await tv.registerCapabilities();
|
|
190
|
+
if (this.config.registerVolumeSlider) {
|
|
191
|
+
this.registerVolumeSlider(client, device, component);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
155
194
|
/**
|
|
156
195
|
* Register the modes of the device passed in as platform accessories.
|
|
157
196
|
* Handles caching of accessories as well.
|
|
@@ -168,14 +207,14 @@ class SmartThingsPlatform {
|
|
|
168
207
|
const existingAccessory = this.accessories.find(accessory => accessory.UUID === id);
|
|
169
208
|
if (existingAccessory) {
|
|
170
209
|
this.log.info('Restoring existing accessory from cache: %s', existingAccessory.displayName);
|
|
171
|
-
new
|
|
210
|
+
new SwitchAccessory(device, component, client, this.log, this, existingAccessory, modes.capability, modes.command, mode.name);
|
|
172
211
|
}
|
|
173
212
|
else {
|
|
174
213
|
const accessory = new this.api.platformAccessory(name, id);
|
|
175
214
|
accessory.context.device = device;
|
|
176
215
|
accessory.category = 8 /* this.api.hap.Categories.SWITCH */;
|
|
177
|
-
new
|
|
178
|
-
this.api.registerPlatformAccessories(
|
|
216
|
+
new SwitchAccessory(device, component, client, this.log, this, accessory, modes.capability, modes.command, mode.name);
|
|
217
|
+
this.api.registerPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [accessory]);
|
|
179
218
|
}
|
|
180
219
|
}
|
|
181
220
|
}
|
|
@@ -188,30 +227,28 @@ class SmartThingsPlatform {
|
|
|
188
227
|
* @param component the SmartThings Device's Component
|
|
189
228
|
*/
|
|
190
229
|
registerVolumeSlider(client, device, component) {
|
|
191
|
-
var _a, _b, _c, _d;
|
|
192
230
|
const id = this.api.hap.uuid.generate(`${device.deviceId}volume`);
|
|
193
231
|
const name = 'Volume';
|
|
194
232
|
const existingAccessory = this.accessories.find(accessory => accessory.UUID === id);
|
|
195
233
|
if (existingAccessory) {
|
|
196
234
|
this.log.info('Restoring existing accessory from cache: %s', existingAccessory.displayName);
|
|
197
|
-
new
|
|
198
|
-
return value
|
|
235
|
+
new SliderAccessory(device, component, client, this.log, this, existingAccessory, 'audioVolume', 'setVolume', (value) => {
|
|
236
|
+
return value?.volume.value;
|
|
199
237
|
}, (value) => {
|
|
200
238
|
return [value];
|
|
201
|
-
},
|
|
239
|
+
}, this.config.pollInterval ?? undefined, this.config.cyclicCallsLogging ?? false);
|
|
202
240
|
}
|
|
203
241
|
else {
|
|
204
242
|
const accessory = new this.api.platformAccessory(name, id);
|
|
205
243
|
accessory.context.device = device;
|
|
206
244
|
accessory.category = 5 /* this.api.hap.Categories.LIGHTBULB */;
|
|
207
|
-
new
|
|
208
|
-
return value
|
|
245
|
+
new SliderAccessory(device, component, client, this.log, this, accessory, 'audioVolume', 'setVolume', (value) => {
|
|
246
|
+
return value?.volume.value;
|
|
209
247
|
}, (value) => {
|
|
210
248
|
return [value];
|
|
211
|
-
},
|
|
212
|
-
this.api.registerPlatformAccessories(
|
|
249
|
+
}, this.config.pollInterval ?? undefined, this.config.cyclicCallsLogging ?? false);
|
|
250
|
+
this.api.registerPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [accessory]);
|
|
213
251
|
}
|
|
214
252
|
}
|
|
215
253
|
}
|
|
216
|
-
exports.SmartThingsPlatform = SmartThingsPlatform;
|
|
217
254
|
//# sourceMappingURL=smartThingsPlatform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartThingsPlatform.js","sourceRoot":"","sources":["../src/smartThingsPlatform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"smartThingsPlatform.js","sourceRoot":"","sources":["../src/smartThingsPlatform.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAuC,MAAM,uBAAuB,CAAC;AACzH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;GAEG;AACH,MAAM,aAAa;IACW;IACV;IACA;IACA;IACA;IACA;IACA;IANlB,YAA4B,QAAgB,EAC1B,YAAoB,EACpB,UAAkB,EAClB,SAAiB,EACjB,YAA4C,EAC5C,YAA+C,EAC/C,OAAe;QANL,aAAQ,GAAR,QAAQ,CAAQ;QAC1B,iBAAY,GAAZ,YAAY,CAAQ;QACpB,eAAU,GAAV,UAAU,CAAQ;QAClB,cAAS,GAAT,SAAS,CAAQ;QACjB,iBAAY,GAAZ,YAAY,CAAgC;QAC5C,iBAAY,GAAZ,YAAY,CAAmC;QAC/C,YAAO,GAAP,OAAO,CAAQ;IACjC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAQZ;IACA;IACA;IATF,OAAO,CAAiB;IACxB,cAAc,CAAw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