homebridge-smartthings-oauth 1.0.28 → 1.0.30
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
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
|
+
## [1.0.30] - Complete Samsung TV Experience & Reference Implementation Alignment
|
|
4
|
+
### Fixed
|
|
5
|
+
- **🚨 CRITICAL: Volume Slider Component Targeting**: Fixed volume slider targeting wrong device components (was controlling light sensor instead of TV audio)
|
|
6
|
+
- **Volume Slider Tile Placement**: Volume slider now appears within the same TV tile in HomeKit (not as separate accessory)
|
|
7
|
+
- **Direct API Calls**: Volume slider now uses direct SmartThings API calls to main TV component, ensuring reliable volume control
|
|
8
|
+
- **Component Confusion**: Added strict `componentId === 'main'` check to prevent volume slider creation on sensor components
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Volume Slider Architecture**: Simplified to work as a service within the same TV accessory (same HomeKit tile)
|
|
12
|
+
- **TelevisionSpeaker Conflicts**: When volume slider is enabled, TelevisionSpeaker completely disables volume controls to prevent conflicts
|
|
13
|
+
- **API Communication**: Volume slider bypasses internal component status and uses direct API calls for immediate responsiveness
|
|
14
|
+
## [1.0.29] - Complete Samsung TV Experience & Reference Implementation Alignment
|
|
15
|
+
### Fixed
|
|
16
|
+
- **🚨 CRITICAL: Volume Slider Component Targeting**: Fixed volume slider targeting wrong device components (was controlling light sensor instead of TV audio)
|
|
17
|
+
- **Volume Slider Tile Placement**: Volume slider now appears within the same TV tile in HomeKit (not as separate accessory)
|
|
18
|
+
- **Direct API Calls**: Volume slider now uses direct SmartThings API calls to main TV component, ensuring reliable volume control
|
|
19
|
+
- **Component Confusion**: Added strict `componentId === 'main'` check to prevent volume slider creation on sensor components
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- **Volume Slider Architecture**: Simplified to work as a service within the same TV accessory (same HomeKit tile)
|
|
23
|
+
- **TelevisionSpeaker Conflicts**: When volume slider is enabled, TelevisionSpeaker completely disables volume controls to prevent conflicts
|
|
24
|
+
- **API Communication**: Volume slider bypasses internal component status and uses direct API calls for immediate responsiveness
|
|
3
25
|
## [1.0.28] - Complete Samsung TV Experience & Reference Implementation Alignment
|
|
4
26
|
### Fixed
|
|
5
27
|
- **🚨 CRITICAL: Volume Slider Component Targeting**: Fixed volume slider targeting wrong device components (was controlling light sensor instead of TV audio)
|
|
@@ -2,6 +2,7 @@ import { PlatformAccessory, Service } from 'homebridge';
|
|
|
2
2
|
import { BaseService } from './baseService';
|
|
3
3
|
import { MultiServiceAccessory } from '../multiServiceAccessory';
|
|
4
4
|
import { IKHomeBridgeHomebridgePlatform } from '../platform';
|
|
5
|
+
import { ShortEvent } from '../webhook/subscriptionHandler';
|
|
5
6
|
/**
|
|
6
7
|
* Volume Slider Service (Within Same TV Accessory)
|
|
7
8
|
* Creates a lightbulb service within the TV accessory for volume control.
|
|
@@ -42,6 +43,10 @@ export declare class VolumeSliderService extends BaseService {
|
|
|
42
43
|
* Check if the given capabilities support volume slider functionality
|
|
43
44
|
*/
|
|
44
45
|
static supportsVolumeSlider(capabilities: string[]): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Process webhook events for real-time updates
|
|
48
|
+
*/
|
|
49
|
+
processEvent(event: ShortEvent): void;
|
|
45
50
|
/**
|
|
46
51
|
* Cleanup method to stop polling when accessory is removed
|
|
47
52
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeSliderService.d.ts","sourceRoot":"","sources":["../../src/services/volumeSliderService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"volumeSliderService.d.ts","sourceRoot":"","sources":["../../src/services/volumeSliderService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,mBAAmB,CAAK;IAChC,OAAO,CAAC,YAAY,CAA6B;gBAG/C,QAAQ,EAAE,8BAA8B,EACxC,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EAAE,EACtB,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,GAAG;IAgCnB,OAAO,CAAC,kBAAkB;IA4B1B;;;OAGG;YACW,KAAK;IAwBnB;;;OAGG;YACW,KAAK;IAuBnB;;OAEG;YACW,aAAa;IA8B3B;;OAEG;YACW,aAAa;IA4C3B;;OAEG;WACW,2BAA2B,IAAI,MAAM,EAAE;IAIrD;;OAEG;WACW,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;IAInE;;OAEG;IACI,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAkB5C;;OAEG;IACI,OAAO,IAAI,IAAI;CAOvB"}
|
|
@@ -46,13 +46,14 @@ class VolumeSliderService extends baseService_1.BaseService {
|
|
|
46
46
|
this.pollInterval = setInterval(async () => {
|
|
47
47
|
try {
|
|
48
48
|
this.log.debug(`🔄 Volume slider polling for ${this.name}...`);
|
|
49
|
-
//
|
|
50
|
-
await this.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
// Use the proper status mechanism instead of direct API calls
|
|
50
|
+
if (await this.getStatus()) {
|
|
51
|
+
// Update characteristics from device status
|
|
52
|
+
const onValue = await this.getOn();
|
|
53
|
+
const brightnessValue = await this.getBrightness();
|
|
54
|
+
this.service.updateCharacteristic(this.platform.Characteristic.On, onValue);
|
|
55
|
+
this.service.updateCharacteristic(this.platform.Characteristic.Brightness, brightnessValue);
|
|
56
|
+
}
|
|
56
57
|
}
|
|
57
58
|
catch (error) {
|
|
58
59
|
this.log.debug(`Volume slider polling error for ${this.name}:`, error);
|
|
@@ -64,64 +65,52 @@ class VolumeSliderService extends baseService_1.BaseService {
|
|
|
64
65
|
* On = true means NOT muted, On = false means muted
|
|
65
66
|
*/
|
|
66
67
|
async getOn() {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
return new Promise((resolve) => {
|
|
69
|
+
this.getStatus().then(success => {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
if (!success) {
|
|
72
|
+
this.log.debug(`Could not get status for mute check on ${this.name}`);
|
|
73
|
+
resolve(true); // Default to not muted if we can't get status
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
try {
|
|
77
|
+
// Get mute status from component data (same pattern as TelevisionService)
|
|
78
|
+
const component = this.multiServiceAccessory.components.find(c => c.componentId === this.componentId);
|
|
79
|
+
const audioMuteData = (_a = component === null || component === void 0 ? void 0 : component.status) === null || _a === void 0 ? void 0 : _a.audioMute;
|
|
80
|
+
const muteValue = (_b = audioMuteData === null || audioMuteData === void 0 ? void 0 : audioMuteData.mute) === null || _b === void 0 ? void 0 : _b.value;
|
|
81
|
+
const isNotMuted = muteValue !== 'muted';
|
|
82
|
+
this.log.debug(`Volume slider On state for ${this.name}: ${isNotMuted} (mute: ${muteValue})`);
|
|
83
|
+
resolve(isNotMuted);
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
this.log.debug(`Error parsing mute status for ${this.name}:`, error);
|
|
87
|
+
resolve(true); // Default to not muted
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
80
92
|
}
|
|
81
93
|
/**
|
|
82
94
|
* Set On state (toggle mute)
|
|
83
95
|
* On = true means unmute, On = false means mute
|
|
84
96
|
*/
|
|
85
97
|
async setOn(value) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
this.log.debug(`Volume slider turning ON (unmuting) ${this.name}`);
|
|
90
|
-
await this.platform.axInstance.post(`devices/${this.accessory.context.device.deviceId}/commands`, {
|
|
91
|
-
commands: [{
|
|
92
|
-
component: 'main', // Always target main component
|
|
93
|
-
capability: 'audioMute',
|
|
94
|
-
command: 'unmute',
|
|
95
|
-
}],
|
|
96
|
-
});
|
|
97
|
-
this.log.info(`✅ Volume slider unmuted successfully for ${this.name}`);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
// Turning off = mute
|
|
101
|
-
this.log.debug(`Volume slider turning OFF (muting) ${this.name}`);
|
|
102
|
-
await this.platform.axInstance.post(`devices/${this.accessory.context.device.deviceId}/commands`, {
|
|
103
|
-
commands: [{
|
|
104
|
-
component: 'main', // Always target main component
|
|
105
|
-
capability: 'audioMute',
|
|
106
|
-
command: 'mute',
|
|
107
|
-
}],
|
|
108
|
-
});
|
|
109
|
-
this.log.info(`✅ Volume slider muted successfully for ${this.name}`);
|
|
110
|
-
}
|
|
111
|
-
// Update our characteristics immediately with fresh API calls (bypass cached status)
|
|
112
|
-
setTimeout(async () => {
|
|
113
|
-
try {
|
|
114
|
-
this.log.debug(`🔄 Refreshing volume slider state after mute command for ${this.name}`);
|
|
115
|
-
const onValue = await this.getOn(); // This makes a fresh API call
|
|
116
|
-
this.service.updateCharacteristic(this.platform.Characteristic.On, onValue);
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
this.log.debug(`Status refresh after mute toggle failed for ${this.name}:`, error);
|
|
120
|
-
}
|
|
121
|
-
}, 2000); // Allow time for SmartThings to process the command
|
|
98
|
+
if (!this.multiServiceAccessory.isOnline()) {
|
|
99
|
+
this.log.error(`${this.name} is offline`);
|
|
100
|
+
throw new this.platform.api.hap.HapStatusError(-70402 /* this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE */);
|
|
122
101
|
}
|
|
123
|
-
|
|
124
|
-
|
|
102
|
+
const command = value ? 'unmute' : 'mute';
|
|
103
|
+
this.log.debug(`Volume slider turning ${value ? 'ON (unmuting)' : 'OFF (muting)'} ${this.name}`);
|
|
104
|
+
const success = await this.multiServiceAccessory.sendCommand('audioMute', command);
|
|
105
|
+
if (success) {
|
|
106
|
+
this.log.info(`✅ Volume slider ${command}d successfully for ${this.name}`);
|
|
107
|
+
// Force a status refresh after a delay to get updated values
|
|
108
|
+
setTimeout(() => {
|
|
109
|
+
this.multiServiceAccessory.forceNextStatusRefresh();
|
|
110
|
+
}, 1000);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
this.log.error(`❌ Failed to ${command} volume slider for ${this.name}`);
|
|
125
114
|
throw new this.platform.api.hap.HapStatusError(-70402 /* this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE */);
|
|
126
115
|
}
|
|
127
116
|
}
|
|
@@ -129,80 +118,77 @@ class VolumeSliderService extends baseService_1.BaseService {
|
|
|
129
118
|
* Get Brightness (represents volume level 0-100)
|
|
130
119
|
*/
|
|
131
120
|
async getBrightness() {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
121
|
+
return new Promise((resolve) => {
|
|
122
|
+
this.getStatus().then(success => {
|
|
123
|
+
var _a, _b;
|
|
124
|
+
if (!success) {
|
|
125
|
+
this.log.debug(`Could not get status for volume check on ${this.name}`);
|
|
126
|
+
resolve(0); // Default to 0 volume if we can't get status
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
try {
|
|
130
|
+
// Get volume from component data (same pattern as TelevisionService)
|
|
131
|
+
const component = this.multiServiceAccessory.components.find(c => c.componentId === this.componentId);
|
|
132
|
+
const audioVolumeData = (_a = component === null || component === void 0 ? void 0 : component.status) === null || _a === void 0 ? void 0 : _a.audioVolume;
|
|
133
|
+
const volume = (_b = audioVolumeData === null || audioVolumeData === void 0 ? void 0 : audioVolumeData.volume) === null || _b === void 0 ? void 0 : _b.value;
|
|
134
|
+
if (typeof volume === 'number') {
|
|
135
|
+
const boundedVolume = Math.max(0, Math.min(100, volume)); // Bound between 0-100
|
|
136
|
+
this.log.debug(`Volume slider brightness for ${this.name}: ${boundedVolume}%`);
|
|
137
|
+
resolve(boundedVolume);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
this.log.warn(`⚠️ No audioVolume data for ${this.name}`);
|
|
141
|
+
resolve(0);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
this.log.debug(`Error parsing volume status for ${this.name}:`, error);
|
|
146
|
+
resolve(0); // Default to 0 volume
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
153
153
|
* Set Brightness (set volume level 0-100)
|
|
154
154
|
*/
|
|
155
155
|
async setBrightness(value) {
|
|
156
156
|
var _a, _b;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
this.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}],
|
|
168
|
-
});
|
|
157
|
+
if (!this.multiServiceAccessory.isOnline()) {
|
|
158
|
+
this.log.error(`${this.name} is offline`);
|
|
159
|
+
throw new this.platform.api.hap.HapStatusError(-70402 /* this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE */);
|
|
160
|
+
}
|
|
161
|
+
const volume = Math.max(0, Math.min(100, value)); // Bound between 0-100
|
|
162
|
+
this.log.debug(`Volume slider setting brightness to ${volume}% for ${this.name}`);
|
|
163
|
+
// Set volume using proper command mechanism
|
|
164
|
+
const success = await this.multiServiceAccessory.sendCommand('audioVolume', 'setVolume', [volume]);
|
|
165
|
+
if (success) {
|
|
166
|
+
this.log.info(`✅ Volume slider set successfully to ${volume}% for ${this.name}`);
|
|
169
167
|
// If setting volume above 0 and TV is muted, automatically unmute
|
|
170
168
|
if (volume > 0) {
|
|
171
169
|
try {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}],
|
|
182
|
-
});
|
|
170
|
+
// Check current mute status from component data
|
|
171
|
+
if (await this.getStatus()) {
|
|
172
|
+
const component = this.multiServiceAccessory.components.find(c => c.componentId === this.componentId);
|
|
173
|
+
const audioMuteData = (_a = component === null || component === void 0 ? void 0 : component.status) === null || _a === void 0 ? void 0 : _a.audioMute;
|
|
174
|
+
const muteValue = (_b = audioMuteData === null || audioMuteData === void 0 ? void 0 : audioMuteData.mute) === null || _b === void 0 ? void 0 : _b.value;
|
|
175
|
+
if (muteValue === 'muted') {
|
|
176
|
+
this.log.debug(`Auto-unmuting ${this.name} because volume was set to ${volume}%`);
|
|
177
|
+
await this.multiServiceAccessory.sendCommand('audioMute', 'unmute');
|
|
178
|
+
}
|
|
183
179
|
}
|
|
184
180
|
}
|
|
185
181
|
catch (error) {
|
|
186
182
|
this.log.debug(`Could not check/set mute state during volume change for ${this.name}:`, error);
|
|
187
183
|
}
|
|
188
184
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
this.log.debug(`🔄 Refreshing volume slider state after volume command for ${this.name}`);
|
|
194
|
-
const brightnessValue = await this.getBrightness(); // This makes a fresh API call
|
|
195
|
-
const onValue = await this.getOn(); // This makes a fresh API call
|
|
196
|
-
this.service.updateCharacteristic(this.platform.Characteristic.Brightness, brightnessValue);
|
|
197
|
-
this.service.updateCharacteristic(this.platform.Characteristic.On, onValue);
|
|
198
|
-
}
|
|
199
|
-
catch (error) {
|
|
200
|
-
this.log.debug(`Status refresh after volume change failed for ${this.name}:`, error);
|
|
201
|
-
}
|
|
202
|
-
}, 2000); // Allow time for SmartThings to process the command
|
|
185
|
+
// Force a status refresh after a delay to get updated values
|
|
186
|
+
setTimeout(() => {
|
|
187
|
+
this.multiServiceAccessory.forceNextStatusRefresh();
|
|
188
|
+
}, 1000);
|
|
203
189
|
}
|
|
204
|
-
|
|
205
|
-
this.log.error(`❌ Failed to set volume for slider ${this.name}
|
|
190
|
+
else {
|
|
191
|
+
this.log.error(`❌ Failed to set volume for slider ${this.name}`);
|
|
206
192
|
throw new this.platform.api.hap.HapStatusError(-70402 /* this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE */);
|
|
207
193
|
}
|
|
208
194
|
}
|
|
@@ -218,6 +204,27 @@ class VolumeSliderService extends baseService_1.BaseService {
|
|
|
218
204
|
static supportsVolumeSlider(capabilities) {
|
|
219
205
|
return capabilities.includes('audioVolume') || capabilities.includes('audioMute');
|
|
220
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Process webhook events for real-time updates
|
|
209
|
+
*/
|
|
210
|
+
processEvent(event) {
|
|
211
|
+
this.log.debug(`Volume slider received event for ${this.name}: ${event.capability}.${event.attribute} = ${event.value}`);
|
|
212
|
+
try {
|
|
213
|
+
if (event.capability === 'audioMute' && event.attribute === 'mute') {
|
|
214
|
+
const isNotMuted = event.value !== 'muted';
|
|
215
|
+
this.service.updateCharacteristic(this.platform.Characteristic.On, isNotMuted);
|
|
216
|
+
this.log.debug(`Volume slider mute state updated via webhook for ${this.name}: ${isNotMuted}`);
|
|
217
|
+
}
|
|
218
|
+
else if (event.capability === 'audioVolume' && event.attribute === 'volume') {
|
|
219
|
+
const volume = Math.max(0, Math.min(100, Number(event.value) || 0));
|
|
220
|
+
this.service.updateCharacteristic(this.platform.Characteristic.Brightness, volume);
|
|
221
|
+
this.log.debug(`Volume slider volume updated via webhook for ${this.name}: ${volume}%`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
this.log.debug(`Error processing event for volume slider ${this.name}:`, error);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
221
228
|
/**
|
|
222
229
|
* Cleanup method to stop polling when accessory is removed
|
|
223
230
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeSliderService.js","sourceRoot":"","sources":["../../src/services/volumeSliderService.ts"],"names":[],"mappings":";;;AACA,+CAA4C;
|
|
1
|
+
{"version":3,"file":"volumeSliderService.js","sourceRoot":"","sources":["../../src/services/volumeSliderService.ts"],"names":[],"mappings":";;;AACA,+CAA4C;AAK5C;;;;;;;GAOG;AACH,MAAa,mBAAoB,SAAQ,yBAAW;IAKlD,YACE,QAAwC,EACxC,SAA4B,EAC5B,WAAmB,EACnB,YAAsB,EACtB,qBAA4C,EAC5C,IAAY,EACZ,YAAiB;QAEjB,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,qBAAqB,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;QAZ3F,wBAAmB,GAAG,CAAC,CAAC;QAc9B,iEAAiE;QACjE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,UA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AI,CAAC,YAAY,CAAC,CAAC;YACjC,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,qCAAqC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;CACF;AA5PD,kDA4PC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"displayName": "Homebridge Smartthings oAuth Plugin",
|
|
4
4
|
"name": "homebridge-smartthings-oauth",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.30",
|
|
6
6
|
"description": "Connects SmartThings devices to Homebridge. Automatically discovers devices.",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|