homebridge-smartthings-oauth 1.0.62 → 1.0.63
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,6 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [1.0.63] - Window Covering State Fixes
|
|
5
|
+
|
|
6
|
+
> Fixes a cluster of five bugs in `windowCoveringService.ts` that made window shades show a perpetual "Opening…"/"Closing…" spinner in the Home app and made full open/close commands unreliable. Root cause confirmed by live reproduction on Z-Wave shades: HomeKit displays the spinner whenever `TargetPosition` differs from `CurrentPosition`, and the service hardcoded its target to `0` at startup and never reconciled it with the device — so any shade not fully closed spun forever, and closing the shade (position 0 = the stale target) was the only way to make the tile settle. The same reconcile-target-from-device-state pattern already used by `lockService.ts` and `doorService.ts` is now applied to window coverings. Thanks to @bcourbage for the fix (#44), live reproduction, and SmartThings-API-level verification.
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- **Window shades no longer stuck on "Opening…"/"Closing…"** — `TargetPosition` was initialized to `0` and only ever updated by HomeKit-issued commands, while the poller actively re-pushed the stale target to HomeKit every cycle. The service now treats the target as unknown until learned, reports the last known position for an unknown target, and reconciles `TargetPosition` to the actual position whenever the shade is idle — in the polling paths and in the webhook event path — so shades moved by remote, the SmartThings app, or automations settle correctly. Shades commanded from the Home app are unaffected: the target is never touched while the device reports `opening`/`closing`, so the in-flight spinner still behaves as before.
|
|
10
|
+
- **Polling never detected a moving shade** — `getCurrentPositionState()` read `status.windowShade.windowShade` without `.value`, comparing the SmartThings attribute object `{value, timestamp}` against the strings `'opening'`/`'closing'`. The comparison could never match, so the polled `PositionState` was permanently `STOPPED` regardless of what the shade was doing. Now reads `.value` like every other service.
|
|
11
|
+
- **`PollWindowShadesSeconds` config option was ignored** — the constructor checked `PollWindowShadesSeconds` but then assigned `PollSwitchesAndLightsSeconds` to the polling interval. Shades now poll at the documented, user-configured rate.
|
|
12
|
+
- **Opening/closing direction inverted in HomeKit** — SmartThings `opening` was mapped to `PositionState.DECREASING` and `closing` to `INCREASING`. HomeKit defines position `100` as fully open, so the mappings were backwards; while moving, the Home app animated the wrong direction. Both the polling and webhook paths now map `opening` → `INCREASING`, `closing` → `DECREASING`.
|
|
13
|
+
- **Fully opening/closing a shade from the Home app now uses the native `open`/`close` commands** — the plugin drove shades exclusively through level commands (`setShadeLevel`/`setLevel`), even for a full open or close. Some Z-Wave shade drivers intermittently ignore a level command at the travel limits while honoring the `windowShade` capability's mandatory `open`/`close` commands immediately (verified live: `setShadeLevel(0)` ACCEPTED by the API but the shade never moved; `windowShade.close` on the same device closed it within seconds). Targets of 0 and 100 now map to `close` and `open`; intermediate targets use the level command as before.
|
|
14
|
+
- **Missing shade level no longer resolves `undefined` to HomeKit** — `getCurrentPosition()` resolved whatever the status blob contained, even `undefined`, producing HAP characteristic warnings. Position reads now go through a guarded helper (`readPositionFromStatus()`) that handles both `windowShadeLevel` and `switchLevel` devices and rejects with `SERVICE_COMMUNICATION_FAILURE` when no usable level is present.
|
|
15
|
+
- **Hardened for `windowShade`-less device shapes** — `WindowCoveringService` can also be matched on a device exposing only `windowShadeLevel`/`switchLevel` (via the single-capability fallback). The new full-open/close path now sends the native `open`/`close` command only when the device actually advertises the `windowShade` capability, otherwise falling back to the level command; and `getCurrentPositionState()` optional-chains the `windowShade` status read so such a device reports `STOPPED` instead of throwing a `TypeError`.
|
|
16
|
+
|
|
17
|
+
### Documentation
|
|
18
|
+
- **New "Window shades and blinds" troubleshooting section** — covers the stuck-spinner symptom and its fix, the inverted-direction fix, the `PollWindowShadesSeconds` fix, and how to recognize the remaining (device-side) case where the SmartThings cloud itself holds a stale `opening`/`closing` state for a sleepy battery-powered shade until the device is woken.
|
|
19
|
+
|
|
4
20
|
## [1.0.62] - Webhook Lifecycle Robustness, installedAppId Diagnostics & Target-URL Confirmation Docs
|
|
5
21
|
|
|
6
22
|
> Stable release graduating `1.0.62-beta.0`. Prompted by a deep investigation of #43 (real-time webhooks reported non-functional for an `API_ONLY` SmartApp). A full clean-room reproduction confirmed the webhook/subscription flow **works end-to-end** with the standard `r:devices:* x:devices:* r:locations:*` scopes: SmartThings returns `installed_app_id` directly in the OAuth token-exchange response, so the plugin needs neither an `installedapps` scope nor `GET /installedapps` discovery to create subscriptions. The reproduction also surfaced the **actual reason real-time events silently never arrive**: a freshly-created `API_ONLY` app's Target URL stays in `targetStatus: PENDING`, and SmartThings delivers no events until it is `CONFIRMED` — which OAuth authorization does **not** do. The missing step is a one-time `smartthings apps:register <app-id>` (run while Homebridge is up, so the plugin auto-acks the CONFIRMATION). This release hardens the webhook endpoint, adds diagnostics, and documents the required confirmation step. Thanks to @mikegraben for the exceptionally detailed report and source-level analysis.
|
|
@@ -5,6 +5,7 @@ import { MultiServiceAccessory } from '../multiServiceAccessory';
|
|
|
5
5
|
import { ShortEvent } from '../webhook/subscriptionHandler';
|
|
6
6
|
export declare class WindowCoveringService extends BaseService {
|
|
7
7
|
private targetPosition;
|
|
8
|
+
private currentPosition;
|
|
8
9
|
private timer;
|
|
9
10
|
private states;
|
|
10
11
|
private currentPositionState;
|
|
@@ -32,5 +33,7 @@ export declare class WindowCoveringService extends BaseService {
|
|
|
32
33
|
*/
|
|
33
34
|
getCurrentPosition(): Promise<CharacteristicValue>;
|
|
34
35
|
processEvent(event: ShortEvent): void;
|
|
36
|
+
private readPositionFromStatus;
|
|
37
|
+
private syncTargetPosition;
|
|
35
38
|
}
|
|
36
39
|
//# sourceMappingURL=windowCoveringService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windowCoveringService.d.ts","sourceRoot":"","sources":["../../src/services/windowCoveringService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,C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U,GAAG,IAAI;IAyB5C,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,kBAAkB;CAe3B"}
|
|
@@ -5,7 +5,11 @@ const baseService_1 = require("./baseService");
|
|
|
5
5
|
class WindowCoveringService extends baseService_1.BaseService {
|
|
6
6
|
constructor(platform, accessory, componentId, capabilities, multiServiceAccessory, name, deviceStatus) {
|
|
7
7
|
super(platform, accessory, componentId, capabilities, multiServiceAccessory, name, deviceStatus);
|
|
8
|
-
|
|
8
|
+
// null = not yet learned. HomeKit shows 'Opening…'/'Closing…' whenever
|
|
9
|
+
// TargetPosition differs from CurrentPosition, so a hardcoded startup target
|
|
10
|
+
// would make any shade not sitting at that exact position spin forever.
|
|
11
|
+
this.targetPosition = null;
|
|
12
|
+
this.currentPosition = null;
|
|
9
13
|
this.states = {
|
|
10
14
|
decreasing: this.platform.Characteristic.PositionState.DECREASING,
|
|
11
15
|
increasing: this.platform.Characteristic.PositionState.INCREASING,
|
|
@@ -25,7 +29,7 @@ class WindowCoveringService extends baseService_1.BaseService {
|
|
|
25
29
|
.onSet(this.setTargetPosition.bind(this));
|
|
26
30
|
let pollWindowShadesSeconds = 10; // default to 10 seconds
|
|
27
31
|
if (this.platform.config.PollWindowShadesSeconds !== undefined) {
|
|
28
|
-
pollWindowShadesSeconds = this.platform.config.
|
|
32
|
+
pollWindowShadesSeconds = this.platform.config.PollWindowShadesSeconds;
|
|
29
33
|
}
|
|
30
34
|
if (pollWindowShadesSeconds > 0) {
|
|
31
35
|
multiServiceAccessory.startPollingState(pollWindowShadesSeconds, this.getCurrentPosition.bind(this), this.service, platform.Characteristic.CurrentPosition, platform.Characteristic.TargetPosition, this.getTargetPosition.bind(this));
|
|
@@ -48,11 +52,23 @@ class WindowCoveringService extends baseService_1.BaseService {
|
|
|
48
52
|
}
|
|
49
53
|
let capability = 'switchLevel';
|
|
50
54
|
let command = 'setLevel';
|
|
51
|
-
|
|
55
|
+
let args = [value];
|
|
56
|
+
if (this.capabilities.includes('windowShade') && (this.targetPosition === 0 || this.targetPosition === 100)) {
|
|
57
|
+
// At the travel limits, use the windowShade capability's mandatory
|
|
58
|
+
// open/close commands instead of a level command — some Z-Wave shade
|
|
59
|
+
// drivers intermittently ignore setShadeLevel(0)/setLevel(0) while
|
|
60
|
+
// honoring close immediately. Only valid if the device actually exposes
|
|
61
|
+
// windowShade; a windowShadeLevel/switchLevel-only device falls through
|
|
62
|
+
// to the level command below.
|
|
63
|
+
capability = 'windowShade';
|
|
64
|
+
command = this.targetPosition === 0 ? 'close' : 'open';
|
|
65
|
+
args = [];
|
|
66
|
+
}
|
|
67
|
+
else if (this.useWindowShadeLevel) {
|
|
52
68
|
capability = 'windowShadeLevel';
|
|
53
69
|
command = 'setShadeLevel';
|
|
54
70
|
}
|
|
55
|
-
this.multiServiceAccessory.sendCommand(this.componentId, capability, command,
|
|
71
|
+
this.multiServiceAccessory.sendCommand(this.componentId, capability, command, args)
|
|
56
72
|
.then(() => {
|
|
57
73
|
this.log.debug('onSet(' + value + ') SUCCESSFUL for ' + this.name);
|
|
58
74
|
this.multiServiceAccessory.forceNextStatusRefresh();
|
|
@@ -64,23 +80,38 @@ class WindowCoveringService extends baseService_1.BaseService {
|
|
|
64
80
|
}
|
|
65
81
|
async getTargetPosition() {
|
|
66
82
|
return new Promise(resolve => {
|
|
67
|
-
|
|
83
|
+
var _a;
|
|
84
|
+
if (this.targetPosition !== null) {
|
|
85
|
+
resolve(this.targetPosition);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
// No target learned yet (no HomeKit command, no status sync) — report
|
|
89
|
+
// the last known position so HomeKit doesn't invent a phantom move.
|
|
90
|
+
resolve((_a = this.currentPosition) !== null && _a !== void 0 ? _a : 0);
|
|
91
|
+
}
|
|
68
92
|
});
|
|
69
93
|
}
|
|
70
94
|
async getCurrentPositionState() {
|
|
71
95
|
this.log.debug('Received getCurrentPositionState() event for ' + this.name);
|
|
72
96
|
return new Promise((resolve, reject) => {
|
|
73
97
|
this.getStatus().then(success => {
|
|
98
|
+
var _a, _b;
|
|
74
99
|
if (success) {
|
|
75
|
-
|
|
100
|
+
// Guard the read: the service can also be matched on a
|
|
101
|
+
// windowShadeLevel/switchLevel-only device that never exposes
|
|
102
|
+
// windowShade, in which case there is no movement state to report.
|
|
103
|
+
const state = (_b = (_a = this.deviceStatus.status.windowShade) === null || _a === void 0 ? void 0 : _a.windowShade) === null || _b === void 0 ? void 0 : _b.value;
|
|
104
|
+
// HomeKit position semantics: 100 = fully open, 0 = fully closed,
|
|
105
|
+
// so 'opening' means the position is INCREASING.
|
|
76
106
|
if (state === 'opening') {
|
|
77
|
-
this.currentPositionState = this.states.
|
|
107
|
+
this.currentPositionState = this.states.increasing;
|
|
78
108
|
}
|
|
79
109
|
else if (state === 'closing') {
|
|
80
|
-
this.currentPositionState = this.states.
|
|
110
|
+
this.currentPositionState = this.states.decreasing;
|
|
81
111
|
}
|
|
82
112
|
else {
|
|
83
113
|
this.currentPositionState = this.states.stopped;
|
|
114
|
+
this.syncTargetPosition(this.readPositionFromStatus());
|
|
84
115
|
}
|
|
85
116
|
this.log.debug(`getCurrentPositionState() SUCCESSFUL for ${this.name} return value ${state}, ` +
|
|
86
117
|
`setting to ${this.currentPositionState}`);
|
|
@@ -116,12 +147,14 @@ class WindowCoveringService extends baseService_1.BaseService {
|
|
|
116
147
|
}
|
|
117
148
|
this.getStatus().then(success => {
|
|
118
149
|
if (success) {
|
|
119
|
-
|
|
120
|
-
if (
|
|
121
|
-
|
|
150
|
+
const position = this.readPositionFromStatus();
|
|
151
|
+
if (position === null) {
|
|
152
|
+
this.log.error('onGet() FAILED for ' + this.name + '. Undefined value');
|
|
153
|
+
return reject(new this.platform.api.hap.HapStatusError(-70402 /* this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE */));
|
|
122
154
|
}
|
|
123
|
-
|
|
124
|
-
|
|
155
|
+
this.currentPosition = position;
|
|
156
|
+
if (this.currentPositionState === this.states.stopped) {
|
|
157
|
+
this.syncTargetPosition(position);
|
|
125
158
|
}
|
|
126
159
|
this.log.debug('onGet() SUCCESSFUL for ' + this.name + '. value = ' + position);
|
|
127
160
|
resolve(position);
|
|
@@ -136,23 +169,49 @@ class WindowCoveringService extends baseService_1.BaseService {
|
|
|
136
169
|
processEvent(event) {
|
|
137
170
|
if (event.capability === 'windowShadeLevel' || event.capability === 'switchLevel') {
|
|
138
171
|
this.log.debug(`Event updating windowShadeLevel capability for ${this.name} to ${event.value}`);
|
|
172
|
+
this.currentPosition = event.value;
|
|
139
173
|
this.service.updateCharacteristic(this.platform.Characteristic.CurrentPosition, event.value);
|
|
174
|
+
if (this.currentPositionState === this.states.stopped) {
|
|
175
|
+
this.syncTargetPosition(event.value);
|
|
176
|
+
}
|
|
140
177
|
}
|
|
141
178
|
else if (event.capability === 'windowShade') {
|
|
142
179
|
this.log.debug(`Event updating windowShade capability for ${this.name} to ${event.value}`);
|
|
143
180
|
if (event.value === 'opening') {
|
|
144
|
-
this.currentPositionState = this.states.
|
|
181
|
+
this.currentPositionState = this.states.increasing;
|
|
145
182
|
}
|
|
146
183
|
else if (event.value === 'closing') {
|
|
147
|
-
this.currentPositionState = this.states.
|
|
184
|
+
this.currentPositionState = this.states.decreasing;
|
|
148
185
|
}
|
|
149
186
|
else {
|
|
150
187
|
this.currentPositionState = this.states.stopped;
|
|
188
|
+
this.syncTargetPosition(this.currentPosition);
|
|
151
189
|
}
|
|
152
190
|
this.log.debug(`From event, setting characteristic to ${this.currentPositionState}`);
|
|
153
191
|
this.service.updateCharacteristic(this.platform.Characteristic.PositionState, this.currentPositionState);
|
|
154
192
|
}
|
|
155
193
|
}
|
|
194
|
+
// Reads the shade position from the cached device status, from whichever
|
|
195
|
+
// level capability this device exposes. Returns null if not yet available.
|
|
196
|
+
readPositionFromStatus() {
|
|
197
|
+
var _a, _b, _c, _d;
|
|
198
|
+
const status = this.deviceStatus.status;
|
|
199
|
+
const position = this.useWindowShadeLevel
|
|
200
|
+
? (_b = (_a = status.windowShadeLevel) === null || _a === void 0 ? void 0 : _a.shadeLevel) === null || _b === void 0 ? void 0 : _b.value
|
|
201
|
+
: (_d = (_c = status.switchLevel) === null || _c === void 0 ? void 0 : _c.level) === null || _d === void 0 ? void 0 : _d.value;
|
|
202
|
+
return typeof position === 'number' ? position : null;
|
|
203
|
+
}
|
|
204
|
+
// When the shade is idle, TargetPosition must mirror the real position or
|
|
205
|
+
// HomeKit reports a phantom 'Opening…'/'Closing…' until they match. Shades
|
|
206
|
+
// moved outside HomeKit (remote, SmartThings app, automations) only get
|
|
207
|
+
// their target reconciled here.
|
|
208
|
+
syncTargetPosition(position) {
|
|
209
|
+
if (position === null || this.targetPosition === position) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
this.targetPosition = position;
|
|
213
|
+
this.service.updateCharacteristic(this.platform.Characteristic.TargetPosition, position);
|
|
214
|
+
}
|
|
156
215
|
}
|
|
157
216
|
exports.WindowCoveringService = WindowCoveringService;
|
|
158
217
|
//# sourceMappingURL=windowCoveringService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windowCoveringService.js","sourceRoot":"","sources":["../../src/services/windowCoveringService.ts"],"names":[],"mappings":";;;AAEA,+CAA4C;AAI5C,MAAa,qBAAsB,SAAQ,yBAAW;
|
|
1
|
+
{"version":3,"file":"windowCoveringService.js","sourceRoot":"","sources":["../../src/services/windowCoveringService.ts"],"names":[],"mappings":";;;AAEA,+CAA4C;AAI5C,MAAa,qBAAsB,SAAQ,yBAAW;IAiBpD,YAAY,QAAwC,EAAE,SAA4B,EAAE,WAAmB,EAAE,YAAsB,EAC7H,qBAA4C,EAC5C,IAAY,EAAE,YAAY;QAC1B,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,qBAAqB,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;QAnBnG,uEAAuE;QACvE,6EAA6E;QAC7E,wEAAwE;QAChE,mBAAc,GAAkB,IAAI,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,WAAW,0CAAE,KAAK,0CAAE,KAAK,CAAC;QACrC,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,CAAC;IAED,0EAA0E;IAC1E,2EAA2E;IAC3E,wEAAwE;IACxE,gCAAgC;IACxB,kBAAkB,CAAC,QAAuB;QAChD,IAAI,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,QAAQ,EAAE,CAAC;YAC1D,OAAO;QACT,CAAC;QACD,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC3F,CAAC;CASF;AA7OD,sDA6OC"}
|
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.63",
|
|
6
6
|
"description": "Connects SmartThings devices to Homebridge. Automatically discovers devices.",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|