@switchbot/homebridge-switchbot
Advanced tools
Comparing version
@@ -291,3 +291,8 @@ "use strict"; | ||
} | ||
setTimeout(this.refreshStatus, 5000); | ||
(0, rxjs_1.interval)(5000) | ||
.pipe((0, operators_1.skipWhile)(() => this.botUpdateInProgress)) | ||
.pipe((0, operators_1.take)(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} | ||
@@ -294,0 +299,0 @@ async BLEpushChanges() { |
@@ -429,3 +429,8 @@ "use strict"; | ||
} | ||
setTimeout(this.refreshStatus, 5000); | ||
(0, rxjs_1.interval)(5000) | ||
.pipe((0, operators_1.skipWhile)(() => this.curtainUpdateInProgress)) | ||
.pipe((0, operators_1.take)(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} | ||
@@ -432,0 +437,0 @@ async BLEpushChanges() { |
@@ -349,3 +349,8 @@ "use strict"; | ||
//} | ||
setTimeout(this.refreshStatus, 5000); | ||
(0, rxjs_1.interval)(5000) | ||
.pipe((0, operators_1.skipWhile)(() => this.humidifierUpdateInProgress)) | ||
.pipe((0, operators_1.take)(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} | ||
@@ -352,0 +357,0 @@ async BLEpushChanges() { |
@@ -134,3 +134,8 @@ "use strict"; | ||
this.statusCode(push); | ||
setTimeout(this.refreshStatus, 5000); | ||
(0, rxjs_1.interval)(5000) | ||
.pipe((0, operators_1.skipWhile)(() => this.cameraUpdateInProgress)) | ||
.pipe((0, operators_1.take)(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} | ||
@@ -137,0 +142,0 @@ else { |
@@ -129,2 +129,8 @@ "use strict"; | ||
this.statusCode(push); | ||
(0, rxjs_1.interval)(5000) | ||
.pipe((0, operators_1.skipWhile)(() => this.plugUpdateInProgress)) | ||
.pipe((0, operators_1.take)(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} | ||
@@ -131,0 +137,0 @@ updateHomeKitCharacteristics() { |
{ | ||
"displayName": "Homebridge SwitchBot", | ||
"name": "@switchbot/homebridge-switchbot", | ||
"version": "1.3.1-beta.3", | ||
"version": "1.3.1-beta.4", | ||
"description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.", | ||
@@ -6,0 +6,0 @@ "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)", |
@@ -6,3 +6,3 @@ | ||
import { SwitchBotPlatform } from '../platform'; | ||
import { debounceTime, skipWhile, tap } from 'rxjs/operators'; | ||
import { debounceTime, skipWhile, take, tap } from 'rxjs/operators'; | ||
import { Service, PlatformAccessory, CharacteristicValue } from 'homebridge'; | ||
@@ -334,3 +334,8 @@ import { DeviceURL, device, devicesConfig, serviceData, ad, switchbot, deviceStatusResponse, payload } from '../settings'; | ||
} | ||
setTimeout(this.refreshStatus, 5000); | ||
interval(5000) | ||
.pipe(skipWhile(() => this.botUpdateInProgress)) | ||
.pipe(take(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} | ||
@@ -337,0 +342,0 @@ |
@@ -6,3 +6,3 @@ | ||
import { SwitchBotPlatform } from '../platform'; | ||
import { debounceTime, skipWhile, tap } from 'rxjs/operators'; | ||
import { debounceTime, skipWhile, take, tap } from 'rxjs/operators'; | ||
import { Service, PlatformAccessory, CharacteristicValue } from 'homebridge'; | ||
@@ -491,3 +491,8 @@ import { DeviceURL, device, devicesConfig, serviceData, switchbot, deviceStatusResponse, payload } from '../settings'; | ||
} | ||
setTimeout(this.refreshStatus, 5000); | ||
interval(5000) | ||
.pipe(skipWhile(() => this.curtainUpdateInProgress)) | ||
.pipe(take(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} | ||
@@ -494,0 +499,0 @@ |
@@ -5,3 +5,3 @@ import { AxiosResponse } from 'axios'; | ||
import { SwitchBotPlatform } from '../platform'; | ||
import { debounceTime, skipWhile, tap } from 'rxjs/operators'; | ||
import { debounceTime, skipWhile, take, tap } from 'rxjs/operators'; | ||
import { Service, PlatformAccessory, CharacteristicValue } from 'homebridge'; | ||
@@ -398,3 +398,8 @@ import { DeviceURL, device, devicesConfig, serviceData, ad, deviceStatusResponse, payload } from '../settings'; | ||
//} | ||
setTimeout(this.refreshStatus, 5000); | ||
interval(5000) | ||
.pipe(skipWhile(() => this.humidifierUpdateInProgress)) | ||
.pipe(take(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} | ||
@@ -401,0 +406,0 @@ |
import { AxiosResponse } from 'axios'; | ||
import { interval, Subject } from 'rxjs'; | ||
import { SwitchBotPlatform } from '../platform'; | ||
import { debounceTime, skipWhile, tap } from 'rxjs/operators'; | ||
import { debounceTime, skipWhile, take, tap } from 'rxjs/operators'; | ||
import { Service, PlatformAccessory, CharacteristicValue } from 'homebridge'; | ||
@@ -181,3 +181,8 @@ import { DeviceURL, device, devicesConfig, deviceStatusResponse, payload } from '../settings'; | ||
this.statusCode(push); | ||
setTimeout(this.refreshStatus, 5000); | ||
interval(5000) | ||
.pipe(skipWhile(() => this.cameraUpdateInProgress)) | ||
.pipe(take(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} else { | ||
@@ -184,0 +189,0 @@ this.platform.device(`Indoor Cam: ${this.accessory.displayName} No pushChanges. Active: ${this.Active}`); |
@@ -5,3 +5,3 @@ | ||
import { SwitchBotPlatform } from '../platform'; | ||
import { debounceTime, skipWhile, tap } from 'rxjs/operators'; | ||
import { debounceTime, skipWhile, take, tap } from 'rxjs/operators'; | ||
import { Service, PlatformAccessory, CharacteristicValue } from 'homebridge'; | ||
@@ -164,2 +164,8 @@ import { DeviceURL, device, devicesConfig, deviceStatusResponse, payload } from '../settings'; | ||
this.statusCode(push); | ||
interval(5000) | ||
.pipe(skipWhile(() => this.plugUpdateInProgress)) | ||
.pipe(take(1)) | ||
.subscribe(() => { | ||
this.refreshStatus(); | ||
}); | ||
} | ||
@@ -166,0 +172,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1436552
0.18%17606
0.3%