@switchbot/homebridge-switchbot 3.5.1-beta.0 → 3.5.1-beta.10
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 +16 -0
- package/dist/device/blindtilt.d.ts +15 -6
- package/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +224 -370
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts +9 -4
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +197 -221
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts +10 -5
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +214 -292
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts +10 -5
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +335 -421
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts +9 -4
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +121 -200
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts +20 -7
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +229 -403
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts +41 -22
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +212 -181
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.d.ts +9 -4
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +204 -249
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts +9 -5
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +107 -233
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts +12 -4
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +193 -235
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts +9 -4
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +92 -159
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts +10 -5
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +288 -370
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts +10 -5
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +172 -219
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts +9 -4
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +94 -160
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts +9 -4
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +95 -157
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts +9 -4
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +85 -144
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts +9 -4
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +100 -127
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts +9 -6
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +172 -259
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts +12 -4
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +106 -131
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts +2 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +2 -3
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts +2 -1
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +2 -3
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts +2 -1
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +2 -3
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts +2 -1
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +2 -3
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/irdevice.d.ts +3 -1
- package/dist/irdevice/irdevice.d.ts.map +1 -1
- package/dist/irdevice/irdevice.js +5 -1
- package/dist/irdevice/irdevice.js.map +1 -1
- package/dist/irdevice/light.d.ts +2 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +2 -3
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts +2 -1
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +2 -3
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts +2 -1
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +2 -3
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts +2 -1
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +2 -3
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts +2 -1
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +2 -3
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts +14 -14
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +102 -86
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +49 -190
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +19 -0
- package/dist/settings.js.map +1 -1
- package/dist/types/bledevicestatus.d.ts +279 -0
- package/dist/types/bledevicestatus.d.ts.map +1 -0
- package/dist/types/bledevicestatus.js +2 -0
- package/dist/types/bledevicestatus.js.map +1 -0
- package/dist/types/devicelist.d.ts +89 -0
- package/dist/types/devicelist.d.ts.map +1 -0
- package/dist/types/devicelist.js +6 -0
- package/dist/types/devicelist.js.map +1 -0
- package/dist/types/deviceresponse.d.ts +13 -0
- package/dist/types/deviceresponse.d.ts.map +1 -0
- package/dist/types/deviceresponse.js +2 -0
- package/dist/types/deviceresponse.js.map +1 -0
- package/dist/types/devicestatus.d.ts +149 -0
- package/dist/types/devicestatus.d.ts.map +1 -0
- package/dist/types/devicestatus.js +3 -0
- package/dist/types/devicestatus.js.map +1 -0
- package/dist/types/devicewebhookstatus.d.ts +156 -0
- package/dist/types/devicewebhookstatus.d.ts.map +1 -0
- package/dist/types/devicewebhookstatus.js +2 -0
- package/dist/types/devicewebhookstatus.js.map +1 -0
- package/dist/types/irdevicelist.d.ts +10 -0
- package/dist/types/irdevicelist.d.ts.map +1 -0
- package/dist/types/irdevicelist.js +2 -0
- package/dist/types/irdevicelist.js.map +1 -0
- package/dist/types/pushbody.d.ts +6 -0
- package/dist/types/pushbody.d.ts.map +1 -0
- package/dist/types/pushbody.js +2 -0
- package/dist/types/pushbody.js.map +1 -0
- package/dist/utils.d.ts +25 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +28 -0
- package/dist/utils.js.map +1 -1
- package/package.json +11 -11
- package/src/device/blindtilt.ts +254 -376
- package/src/device/bot.ts +209 -224
- package/src/device/ceilinglight.ts +227 -297
- package/src/device/colorbulb.ts +345 -435
- package/src/device/contact.ts +139 -200
- package/src/device/curtain.ts +254 -414
- package/src/device/device.ts +221 -190
- package/src/device/fan.ts +222 -253
- package/src/device/hub.ts +127 -248
- package/src/device/humidifier.ts +217 -246
- package/src/device/iosensor.ts +115 -168
- package/src/device/lightstrip.ts +303 -380
- package/src/device/lock.ts +188 -224
- package/src/device/meter.ts +117 -179
- package/src/device/meterplus.ts +118 -176
- package/src/device/motion.ts +100 -146
- package/src/device/plug.ts +111 -131
- package/src/device/robotvacuumcleaner.ts +191 -258
- package/src/device/waterdetector.ts +124 -141
- package/src/irdevice/airconditioner.ts +4 -4
- package/src/irdevice/airpurifier.ts +4 -4
- package/src/irdevice/camera.ts +4 -4
- package/src/irdevice/fan.ts +4 -4
- package/src/irdevice/irdevice.ts +8 -2
- package/src/irdevice/light.ts +4 -4
- package/src/irdevice/other.ts +4 -4
- package/src/irdevice/tv.ts +4 -4
- package/src/irdevice/vacuumcleaner.ts +4 -4
- package/src/irdevice/waterheater.ts +4 -4
- package/src/platform.ts +104 -87
- package/src/settings.ts +30 -238
- package/src/types/bledevicestatus.ts +305 -0
- package/src/types/devicelist.ts +124 -0
- package/src/types/deviceresponse.ts +15 -0
- package/src/types/devicestatus.ts +178 -0
- package/src/types/devicewebhookstatus.ts +196 -0
- package/src/types/irdevicelist.ts +15 -0
- package/src/types/pushbody.ts +9 -0
- package/src/utils.ts +33 -0
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* robotvacuumcleaner.ts: @switchbot/homebridge-switchbot.
|
|
4
4
|
*/
|
|
5
5
|
import { deviceBase } from './device.js';
|
|
6
|
-
import {
|
|
7
|
-
import { debounceTime, take, tap } from 'rxjs
|
|
6
|
+
import { SwitchBotBLEModel, SwitchBotBLEModelName } from 'node-switchbot';
|
|
7
|
+
import { Subject, debounceTime, interval, skipWhile, take, tap } from 'rxjs';
|
|
8
8
|
export class RobotVacuumCleaner extends deviceBase {
|
|
9
9
|
platform;
|
|
10
10
|
// Services
|
|
@@ -81,14 +81,14 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
81
81
|
this.refreshStatus();
|
|
82
82
|
// Update Homekit
|
|
83
83
|
this.updateHomeKitCharacteristics();
|
|
84
|
+
//regisiter webhook event handler
|
|
85
|
+
this.registerWebhook();
|
|
84
86
|
// Start an update interval
|
|
85
87
|
interval(this.deviceRefreshRate * 1000)
|
|
86
88
|
.pipe(skipWhile(() => this.robotVacuumCleanerUpdateInProgress))
|
|
87
89
|
.subscribe(async () => {
|
|
88
90
|
await this.refreshStatus();
|
|
89
91
|
});
|
|
90
|
-
//regisiter webhook event handler
|
|
91
|
-
this.registerWebhook(accessory, device);
|
|
92
92
|
// Watch for Plug change events
|
|
93
93
|
// We put in a debounce of 100ms so we don't make duplicate calls
|
|
94
94
|
this.doRobotVacuumCleanerUpdate
|
|
@@ -100,66 +100,46 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
100
100
|
await this.pushChanges();
|
|
101
101
|
}
|
|
102
102
|
catch (e) {
|
|
103
|
-
this.apiError(e);
|
|
104
|
-
this.errorLog(
|
|
105
|
-
+ ` Error Message: ${JSON.stringify(e.message)}`);
|
|
103
|
+
await this.apiError(e);
|
|
104
|
+
await this.errorLog(`failed pushChanges with ${device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
106
105
|
}
|
|
107
106
|
this.robotVacuumCleanerUpdateInProgress = false;
|
|
108
107
|
});
|
|
109
108
|
}
|
|
110
109
|
async BLEparseStatus(serviceData) {
|
|
111
|
-
this.debugLog(
|
|
112
|
-
//
|
|
110
|
+
await this.debugLog('BLEparseStatus');
|
|
111
|
+
// On
|
|
112
|
+
this.LightBulb.On = serviceData.state === 'on' ? true : false;
|
|
113
|
+
await this.debugLog(`On: ${this.LightBulb.On}`);
|
|
114
|
+
// BatteryLevel
|
|
113
115
|
this.Battery.BatteryLevel = Number(serviceData.battery);
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
this.debugLog(`${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel}, StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
121
|
-
// State
|
|
122
|
-
switch (serviceData.state) {
|
|
123
|
-
case 'on':
|
|
124
|
-
this.LightBulb.On = true;
|
|
125
|
-
break;
|
|
126
|
-
default:
|
|
127
|
-
this.LightBulb.On = false;
|
|
128
|
-
}
|
|
129
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} On: ${this.LightBulb.On}`);
|
|
116
|
+
await this.debugLog(`BatteryLevel: ${this.Battery.BatteryLevel}`);
|
|
117
|
+
// StatusLowBattery
|
|
118
|
+
this.Battery.StatusLowBattery = this.Battery.BatteryLevel < 10
|
|
119
|
+
? this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_LOW : this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL;
|
|
120
|
+
await this.debugLog(`StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
130
121
|
}
|
|
131
122
|
async openAPIparseStatus(deviceStatus) {
|
|
132
|
-
this.debugLog(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
break;
|
|
137
|
-
default:
|
|
138
|
-
this.LightBulb.On = false;
|
|
139
|
-
}
|
|
140
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} On: ${this.LightBulb.On}`);
|
|
123
|
+
await this.debugLog('openAPIparseStatus');
|
|
124
|
+
// On
|
|
125
|
+
this.LightBulb.On = deviceStatus.onlineStatus === 'online' ? true : false;
|
|
126
|
+
await this.debugLog(`On: ${this.LightBulb.On}`);
|
|
141
127
|
// BatteryLevel
|
|
142
|
-
this.Battery.BatteryLevel = Number(deviceStatus.
|
|
128
|
+
this.Battery.BatteryLevel = Number(deviceStatus.battery);
|
|
129
|
+
await this.debugLog(`BatteryLevel: ${this.Battery.BatteryLevel}`);
|
|
143
130
|
// StatusLowBattery
|
|
144
|
-
|
|
145
|
-
this.
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
this.Battery.StatusLowBattery = this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL;
|
|
149
|
-
}
|
|
150
|
-
if (Number.isNaN(this.Battery.BatteryLevel)) {
|
|
151
|
-
this.Battery.BatteryLevel = 100;
|
|
152
|
-
}
|
|
131
|
+
this.Battery.StatusLowBattery = this.Battery.BatteryLevel < 10
|
|
132
|
+
? this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_LOW : this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL;
|
|
133
|
+
await this.debugLog(`StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
153
134
|
// ChargingState
|
|
154
|
-
this.Battery.ChargingState = deviceStatus.
|
|
135
|
+
this.Battery.ChargingState = deviceStatus.workingStatus === 'Charging'
|
|
155
136
|
? this.hap.Characteristic.ChargingState.CHARGING : this.hap.Characteristic.ChargingState.NOT_CHARGING;
|
|
156
|
-
this.debugLog(
|
|
157
|
-
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}, ChargingState: ${this.Battery.ChargingState}`);
|
|
137
|
+
await this.debugLog(`ChargingState: ${this.Battery.ChargingState}`);
|
|
158
138
|
// Firmware Version
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const deviceVersion = version
|
|
139
|
+
if (deviceStatus.version) {
|
|
140
|
+
const version = deviceStatus.version.toString();
|
|
141
|
+
await this.debugLog(`Firmware Version: ${version.replace(/^V|-.*$/g, '')}`);
|
|
142
|
+
const deviceVersion = version.replace(/^V|-.*$/g, '') ?? '0.0.0';
|
|
163
143
|
this.accessory
|
|
164
144
|
.getService(this.hap.Service.AccessoryInformation)
|
|
165
145
|
.setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
|
|
@@ -167,15 +147,34 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
167
147
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
168
148
|
.updateValue(deviceVersion);
|
|
169
149
|
this.accessory.context.deviceVersion = deviceVersion;
|
|
170
|
-
this.debugSuccessLog(
|
|
150
|
+
await this.debugSuccessLog(`deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
171
151
|
}
|
|
172
152
|
}
|
|
153
|
+
async parseStatusWebhook(context) {
|
|
154
|
+
await this.debugLog('parseStatusWebhook');
|
|
155
|
+
await this.debugLog(`(onlineStatus, battery, workingStatus) = Webhook: (${context.onlineStatus}, ${context.battery}, ${context.workingStatus}),`
|
|
156
|
+
+ ` current: (${this.LightBulb.On}, ${this.Battery.BatteryLevel}, ${this.Battery.ChargingState})`);
|
|
157
|
+
// On
|
|
158
|
+
this.LightBulb.On = context.onlineStatus === 'online' ? true : false;
|
|
159
|
+
await this.debugLog(`On: ${this.LightBulb.On}`);
|
|
160
|
+
// BatteryLevel
|
|
161
|
+
this.Battery.BatteryLevel = Number(context.battery);
|
|
162
|
+
await this.debugLog(`BatteryLevel: ${this.Battery.BatteryLevel}`);
|
|
163
|
+
// StatusLowBattery
|
|
164
|
+
this.Battery.StatusLowBattery = this.Battery.BatteryLevel < 10
|
|
165
|
+
? this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_LOW : this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL;
|
|
166
|
+
await this.debugLog(`StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
167
|
+
// ChargingState
|
|
168
|
+
this.Battery.ChargingState = context.workingStatus === 'Charging'
|
|
169
|
+
? this.hap.Characteristic.ChargingState.CHARGING : this.hap.Characteristic.ChargingState.NOT_CHARGING;
|
|
170
|
+
await this.debugLog(`ChargingState: ${this.Battery.ChargingState}`);
|
|
171
|
+
}
|
|
173
172
|
/**
|
|
174
173
|
* Asks the SwitchBot API for the latest device information
|
|
175
174
|
*/
|
|
176
175
|
async refreshStatus() {
|
|
177
176
|
if (!this.device.enableCloudService && this.OpenAPI) {
|
|
178
|
-
this.errorLog(
|
|
177
|
+
await this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`);
|
|
179
178
|
}
|
|
180
179
|
else if (this.BLE) {
|
|
181
180
|
await this.BLERefreshStatus();
|
|
@@ -185,12 +184,11 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
185
184
|
}
|
|
186
185
|
else {
|
|
187
186
|
await this.offlineOff();
|
|
188
|
-
this.debugWarnLog(
|
|
189
|
-
+ ` ${this.device.connectionType}, refreshStatus will not happen.`);
|
|
187
|
+
await this.debugWarnLog(`Connection Type: ${this.device.connectionType}, refreshStatus will not happen.`);
|
|
190
188
|
}
|
|
191
189
|
}
|
|
192
190
|
async BLERefreshStatus() {
|
|
193
|
-
this.debugLog(
|
|
191
|
+
await this.debugLog('BLERefreshStatus');
|
|
194
192
|
const switchbot = await this.switchbotBLE();
|
|
195
193
|
if (switchbot === undefined) {
|
|
196
194
|
await this.BLERefreshConnection(switchbot);
|
|
@@ -201,63 +199,55 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
201
199
|
// Start to monitor advertisement packets
|
|
202
200
|
const serviceData = await this.monitorAdvertisementPackets(switchbot);
|
|
203
201
|
// Update HomeKit
|
|
204
|
-
if (serviceData.model
|
|
202
|
+
if (serviceData.model === SwitchBotBLEModel.Unknown && serviceData.modelName === SwitchBotBLEModelName.Unknown) {
|
|
205
203
|
await this.BLEparseStatus(serviceData);
|
|
206
204
|
await this.updateHomeKitCharacteristics();
|
|
207
205
|
}
|
|
208
206
|
else {
|
|
209
|
-
this.errorLog(
|
|
207
|
+
await this.errorLog(`failed to get serviceData, serviceData: ${serviceData}`);
|
|
210
208
|
await this.BLERefreshConnection(switchbot);
|
|
211
209
|
}
|
|
212
210
|
})();
|
|
213
211
|
}
|
|
214
212
|
}
|
|
215
213
|
async openAPIRefreshStatus() {
|
|
216
|
-
this.debugLog(
|
|
214
|
+
await this.debugLog('openAPIRefreshStatus');
|
|
217
215
|
try {
|
|
218
216
|
const { body, statusCode } = await this.deviceRefreshStatus();
|
|
219
217
|
const deviceStatus = await body.json();
|
|
220
|
-
await this.
|
|
218
|
+
await this.debugLog(`statusCode: ${statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
221
219
|
;
|
|
222
|
-
if (
|
|
223
|
-
await this.
|
|
224
|
-
await this.openAPIparseStatus(deviceStatus);
|
|
220
|
+
if (await this.successfulStatusCodes(statusCode, deviceStatus)) {
|
|
221
|
+
await this.debugSuccessLog(`statusCode: ${statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
222
|
+
await this.openAPIparseStatus(deviceStatus.body);
|
|
225
223
|
await this.updateHomeKitCharacteristics();
|
|
226
224
|
}
|
|
227
225
|
else {
|
|
228
|
-
await this.
|
|
226
|
+
await this.debugWarnLog(`statusCode: ${statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
227
|
+
await this.debugWarnLog(statusCode, deviceStatus);
|
|
229
228
|
}
|
|
230
229
|
}
|
|
231
230
|
catch (e) {
|
|
232
|
-
this.apiError(e);
|
|
233
|
-
this.errorLog(
|
|
234
|
-
+ ` Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
231
|
+
await this.apiError(e);
|
|
232
|
+
await this.errorLog(`failed openAPIRefreshStatus with ${this.device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
235
233
|
}
|
|
236
234
|
}
|
|
237
|
-
async registerWebhook(
|
|
238
|
-
if (device.webhook) {
|
|
239
|
-
this.debugLog(
|
|
240
|
-
this.platform.webhookEventHandler[device.deviceId] = async (context) => {
|
|
235
|
+
async registerWebhook() {
|
|
236
|
+
if (this.device.webhook) {
|
|
237
|
+
await this.debugLog('is listening webhook.');
|
|
238
|
+
this.platform.webhookEventHandler[this.device.deviceId] = async (context) => {
|
|
241
239
|
try {
|
|
242
|
-
this.debugLog(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
const { BatteryLevel, ChargingState } = this.Battery;
|
|
246
|
-
this.debugLog(`${device.deviceType}: ${accessory.displayName} (onlineStatus, battery, workingStatus) = `
|
|
247
|
-
+ `Webhook: (${onlineStatus}, ${battery}, ${workingStatus}), current: (${On}, ${BatteryLevel}, ${ChargingState})`);
|
|
248
|
-
this.LightBulb.On = onlineStatus === 'online' ? true : false;
|
|
249
|
-
this.Battery.ChargingState = workingStatus === 'Charging'
|
|
250
|
-
? this.hap.Characteristic.ChargingState.CHARGING : this.hap.Characteristic.ChargingState.NOT_CHARGING;
|
|
251
|
-
this.Battery.BatteryLevel = battery;
|
|
252
|
-
this.updateHomeKitCharacteristics();
|
|
240
|
+
await this.debugLog(`received Webhook: ${JSON.stringify(context)}`);
|
|
241
|
+
await this.parseStatusWebhook(context);
|
|
242
|
+
await this.updateHomeKitCharacteristics();
|
|
253
243
|
}
|
|
254
244
|
catch (e) {
|
|
255
|
-
this.errorLog(
|
|
245
|
+
await this.errorLog(`failed to handle webhook. Received: ${JSON.stringify(context)} Error: ${e}`);
|
|
256
246
|
}
|
|
257
247
|
};
|
|
258
248
|
}
|
|
259
249
|
else {
|
|
260
|
-
this.debugLog(
|
|
250
|
+
await this.debugLog('is not listening webhook.');
|
|
261
251
|
}
|
|
262
252
|
}
|
|
263
253
|
/**
|
|
@@ -270,7 +260,7 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
270
260
|
*/
|
|
271
261
|
async pushChanges() {
|
|
272
262
|
if (!this.device.enableCloudService && this.OpenAPI) {
|
|
273
|
-
this.errorLog(
|
|
263
|
+
await this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`);
|
|
274
264
|
}
|
|
275
265
|
else if (this.BLE) {
|
|
276
266
|
await this.BLEpushChanges();
|
|
@@ -280,8 +270,7 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
280
270
|
}
|
|
281
271
|
else {
|
|
282
272
|
await this.offlineOff();
|
|
283
|
-
this.debugWarnLog(
|
|
284
|
-
+ ` ${this.device.connectionType}, pushChanges will not happen.`);
|
|
273
|
+
await this.debugWarnLog(`Connection Type: ${this.device.connectionType}, pushChanges will not happen.`);
|
|
285
274
|
}
|
|
286
275
|
// Refresh the status from the API
|
|
287
276
|
interval(15000)
|
|
@@ -292,162 +281,122 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
292
281
|
});
|
|
293
282
|
}
|
|
294
283
|
async BLEpushChanges() {
|
|
295
|
-
this.debugLog(
|
|
284
|
+
await this.debugLog('BLEpushChanges');
|
|
296
285
|
if (this.LightBulb.On !== this.accessory.context.On) {
|
|
297
|
-
this.
|
|
298
|
-
+ ` On: ${this.LightBulb.On} OnCached: ${this.accessory.context.On}`);
|
|
299
|
-
const switchbot = await this.platform.connectBLE();
|
|
300
|
-
// Convert to BLE Address
|
|
286
|
+
const switchbot = await this.platform.connectBLE(this.accessory, this.device);
|
|
301
287
|
await this.convertBLEAddress();
|
|
302
|
-
switchbot
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
288
|
+
if (switchbot !== false) {
|
|
289
|
+
switchbot
|
|
290
|
+
.discover({ model: this.device.bleModel, id: this.device.bleMac })
|
|
291
|
+
.then(async (device_list) => {
|
|
292
|
+
await this.infoLog(`On: ${this.LightBulb.On}`);
|
|
293
|
+
return await this.retryBLE({
|
|
294
|
+
max: await this.maxRetryBLE(),
|
|
295
|
+
fn: async () => {
|
|
296
|
+
if (this.LightBulb.On) {
|
|
297
|
+
return await device_list[0].turnOn({ id: this.device.bleMac });
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
return await device_list[0].turnOff({ id: this.device.bleMac });
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
});
|
|
304
|
+
})
|
|
305
|
+
.then(async () => {
|
|
306
|
+
await this.successLog(`On: ${this.LightBulb.On} sent over SwitchBot BLE, sent successfully`);
|
|
307
|
+
await this.updateHomeKitCharacteristics();
|
|
308
|
+
})
|
|
309
|
+
.catch(async (e) => {
|
|
310
|
+
await this.apiError(e);
|
|
311
|
+
await this.errorLog(`failed BLEpushChanges with ${this.device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
312
|
+
await this.BLEPushConnection();
|
|
319
313
|
});
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
this.
|
|
323
|
-
this.successLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
324
|
-
+ `On: ${this.LightBulb.On} sent over BLE, sent successfully`);
|
|
325
|
-
this.LightBulb.On = false;
|
|
326
|
-
})
|
|
327
|
-
.catch(async (e) => {
|
|
328
|
-
this.apiError(e);
|
|
329
|
-
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} failed BLEpushChanges with ${this.device.connectionType}`
|
|
330
|
-
+ ` Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`);
|
|
331
317
|
await this.BLEPushConnection();
|
|
332
|
-
}
|
|
318
|
+
}
|
|
333
319
|
}
|
|
334
320
|
else {
|
|
335
|
-
this.debugLog(
|
|
336
|
-
+ ` On: ${this.LightBulb.On}, OnCached: ${this.accessory.context.On}`);
|
|
321
|
+
await this.debugLog(`No changes (BLEpushChanges), On: ${this.LightBulb.On}, OnCached: ${this.accessory.context.On}`);
|
|
337
322
|
}
|
|
338
323
|
}
|
|
339
324
|
async openAPIpushChanges() {
|
|
340
|
-
this.debugLog(
|
|
325
|
+
await this.debugLog('openAPIpushChanges');
|
|
341
326
|
if (this.LightBulb.On !== this.accessory.context.On) {
|
|
342
|
-
const
|
|
343
|
-
|
|
327
|
+
const command = this.LightBulb.On ? 'start' : 'dock';
|
|
328
|
+
const bodyChange = JSON.stringify({
|
|
329
|
+
command: `${command}`,
|
|
330
|
+
parameter: 'default',
|
|
331
|
+
commandType: 'command',
|
|
332
|
+
});
|
|
333
|
+
await this.debugLog(`SwitchBot OpenAPI bodyChange: ${JSON.stringify(bodyChange)}`);
|
|
344
334
|
try {
|
|
345
335
|
const { body, statusCode } = await this.pushChangeRequest(bodyChange);
|
|
346
336
|
const deviceStatus = await body.json();
|
|
347
|
-
await this.
|
|
348
|
-
if (
|
|
349
|
-
this.
|
|
350
|
-
|
|
351
|
-
this.successLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
352
|
-
+ `request to SwitchBot API, body: ${JSON.stringify(JSON.parse(bodyChange))} sent successfully`);
|
|
337
|
+
await this.debugLog(`statusCode: ${statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
338
|
+
if (await this.successfulStatusCodes(statusCode, deviceStatus)) {
|
|
339
|
+
await this.debugSuccessLog(`statusCode: ${statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
340
|
+
await this.updateHomeKitCharacteristics();
|
|
353
341
|
}
|
|
354
342
|
else {
|
|
355
|
-
this.statusCode(statusCode);
|
|
356
|
-
this.statusCode(deviceStatus.statusCode);
|
|
343
|
+
await this.statusCode(statusCode);
|
|
344
|
+
await this.statusCode(deviceStatus.statusCode);
|
|
357
345
|
}
|
|
358
346
|
}
|
|
359
347
|
catch (e) {
|
|
360
|
-
this.apiError(e);
|
|
361
|
-
this.errorLog(
|
|
362
|
-
+ ` Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
348
|
+
await this.apiError(e);
|
|
349
|
+
await this.errorLog(`failed openAPIpushChanges with ${this.device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
363
350
|
}
|
|
364
351
|
}
|
|
365
352
|
else {
|
|
366
|
-
this.debugLog(
|
|
367
|
-
+ `OnCached: ${this.accessory.context.On}`);
|
|
353
|
+
await this.debugLog(`No changes (openAPIpushChanges), On: ${this.LightBulb.On}, OnCached: ${this.accessory.context.On}`);
|
|
368
354
|
}
|
|
369
355
|
}
|
|
370
356
|
async openAPIpushBrightnessChanges() {
|
|
371
|
-
this.debugLog(
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
357
|
+
await this.debugLog('openAPIpushBrightnessChanges');
|
|
358
|
+
if (this.LightBulb.Brightness !== this.accessory.context.Brightness) {
|
|
359
|
+
const command = this.LightBulb.Brightness === 0 ? 'dock' : 'PowLevel';
|
|
360
|
+
const parameter = this.LightBulb.Brightness === 25 ? '0' : this.LightBulb.Brightness === 50 ? '1' : this.LightBulb.Brightness === 75
|
|
361
|
+
? '2' : this.LightBulb.Brightness === 100 ? '3' : 'default';
|
|
362
|
+
const bodyChange = JSON.stringify({
|
|
363
|
+
command: `${command}`,
|
|
364
|
+
parameter: `${parameter}`,
|
|
365
|
+
commandType: 'command',
|
|
366
|
+
});
|
|
367
|
+
await this.debugLog(`SwitchBot OpenAPI bodyChange: ${JSON.stringify(bodyChange)}`);
|
|
368
|
+
try {
|
|
369
|
+
const { body, statusCode } = await this.pushChangeRequest(bodyChange);
|
|
370
|
+
const deviceStatus = await body.json();
|
|
371
|
+
await this.debugLog(`statusCode: ${statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
372
|
+
if (await this.successfulStatusCodes(statusCode, deviceStatus)) {
|
|
373
|
+
await this.debugSuccessLog(`statusCode: ${statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
374
|
+
await this.updateHomeKitCharacteristics();
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
await this.statusCode(statusCode);
|
|
378
|
+
await this.statusCode(deviceStatus.statusCode);
|
|
379
|
+
}
|
|
382
380
|
}
|
|
383
|
-
|
|
384
|
-
await this.
|
|
385
|
-
await this.
|
|
381
|
+
catch (e) {
|
|
382
|
+
await this.apiError(e);
|
|
383
|
+
await this.errorLog(`failed openAPIpushChanges with ${this.device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
386
384
|
}
|
|
387
385
|
}
|
|
388
|
-
catch (e) {
|
|
389
|
-
this.apiError(e);
|
|
390
|
-
this.errorLog(`${this.device.deviceType}: ${this.accessory.displayName} failed openAPIpushChanges with ${this.device.connectionType}`
|
|
391
|
-
+ ` Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
async commands() {
|
|
395
|
-
let command;
|
|
396
|
-
let parameter;
|
|
397
|
-
if (this.LightBulb.On) {
|
|
398
|
-
command = 'start';
|
|
399
|
-
parameter = 'default';
|
|
400
|
-
}
|
|
401
386
|
else {
|
|
402
|
-
|
|
403
|
-
|
|
387
|
+
await this.debugLog(`No changes (openAPIpushBrightnessChanges), Brightness: ${this.LightBulb.Brightness},`
|
|
388
|
+
+ ` BrightnessCached: ${this.accessory.context.Brightness}`);
|
|
404
389
|
}
|
|
405
|
-
const body = JSON.stringify({
|
|
406
|
-
command: `${command}`,
|
|
407
|
-
parameter: `${parameter}`,
|
|
408
|
-
commandType: 'command',
|
|
409
|
-
});
|
|
410
|
-
return body;
|
|
411
|
-
}
|
|
412
|
-
async brightnessCommands() {
|
|
413
|
-
let command;
|
|
414
|
-
let parameter;
|
|
415
|
-
if (this.LightBulb.Brightness === 25) {
|
|
416
|
-
command = 'PowLevel';
|
|
417
|
-
parameter = '0';
|
|
418
|
-
}
|
|
419
|
-
else if (this.LightBulb.Brightness === 50) {
|
|
420
|
-
command = 'PowLevel';
|
|
421
|
-
parameter = '1';
|
|
422
|
-
}
|
|
423
|
-
else if (this.LightBulb.Brightness === 75) {
|
|
424
|
-
command = 'PowLevel';
|
|
425
|
-
parameter = '2';
|
|
426
|
-
}
|
|
427
|
-
else if (this.LightBulb.Brightness === 100) {
|
|
428
|
-
command = 'PowLevel';
|
|
429
|
-
parameter = '3';
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
command = 'dock';
|
|
433
|
-
parameter = 'default';
|
|
434
|
-
}
|
|
435
|
-
const bodyChange = JSON.stringify({
|
|
436
|
-
command: `${command}`,
|
|
437
|
-
parameter: `${parameter}`,
|
|
438
|
-
commandType: 'command',
|
|
439
|
-
});
|
|
440
|
-
return bodyChange;
|
|
441
390
|
}
|
|
442
391
|
/**
|
|
443
392
|
* Handle requests to set the value of the "On" characteristic
|
|
444
393
|
*/
|
|
445
394
|
async OnSet(value) {
|
|
446
|
-
if (this.LightBulb.On
|
|
447
|
-
this.
|
|
395
|
+
if (this.LightBulb.On !== this.accessory.context.On) {
|
|
396
|
+
this.infoLog(`Set On: ${value}`);
|
|
448
397
|
}
|
|
449
398
|
else {
|
|
450
|
-
this.
|
|
399
|
+
this.debugLog(`No Changes, On: ${value}`);
|
|
451
400
|
}
|
|
452
401
|
this.LightBulb.On = value;
|
|
453
402
|
this.doRobotVacuumCleanerUpdate.next();
|
|
@@ -456,78 +405,42 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
456
405
|
* Handle requests to set the value of the "Brightness" characteristic
|
|
457
406
|
*/
|
|
458
407
|
async BrightnessSet(value) {
|
|
459
|
-
if (this.LightBulb.Brightness
|
|
460
|
-
this.
|
|
461
|
-
}
|
|
462
|
-
else if (this.LightBulb.On) {
|
|
463
|
-
this.infoLog(`${this.device.deviceType}: ${this.accessory.displayName} Set Brightness: ${value}`);
|
|
408
|
+
if (this.LightBulb.On && (this.LightBulb.Brightness !== this.accessory.context.Brightness)) {
|
|
409
|
+
await this.infoLog(`Set Brightness: ${value}`);
|
|
464
410
|
}
|
|
465
411
|
else {
|
|
466
|
-
|
|
412
|
+
if (this.LightBulb.On) {
|
|
413
|
+
this.debugLog(`No Changes, Brightness: ${value}`);
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
this.debugLog(`Brightness: ${value}, On: ${this.LightBulb.On}`);
|
|
417
|
+
}
|
|
467
418
|
}
|
|
468
419
|
this.LightBulb.Brightness = value;
|
|
469
420
|
this.doRobotVacuumCleanerUpdate.next();
|
|
470
421
|
}
|
|
471
422
|
async updateHomeKitCharacteristics() {
|
|
472
423
|
// On
|
|
473
|
-
|
|
474
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} On: ${this.LightBulb.On}`);
|
|
475
|
-
}
|
|
476
|
-
else {
|
|
477
|
-
this.accessory.context.On = this.LightBulb.On;
|
|
478
|
-
this.LightBulb.Service.updateCharacteristic(this.hap.Characteristic.On, this.LightBulb.On);
|
|
479
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} updateCharacteristic On: ${this.LightBulb.On}`);
|
|
480
|
-
}
|
|
424
|
+
await this.updateCharacteristic(this.LightBulb.Service, this.hap.Characteristic.On, this.LightBulb.On, 'On');
|
|
481
425
|
// Brightness
|
|
482
|
-
|
|
483
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Brightness: ${this.LightBulb.Brightness}`);
|
|
484
|
-
}
|
|
485
|
-
else {
|
|
486
|
-
this.accessory.context.Brightness = this.LightBulb.Brightness;
|
|
487
|
-
this.LightBulb.Service.updateCharacteristic(this.hap.Characteristic.Brightness, this.LightBulb.Brightness);
|
|
488
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} updateCharacteristic Brightness: ${this.LightBulb.Brightness}`);
|
|
489
|
-
}
|
|
426
|
+
await this.updateCharacteristic(this.LightBulb.Service, this.hap.Characteristic.Brightness, this.LightBulb.Brightness, 'Brightness');
|
|
490
427
|
// BatteryLevel
|
|
491
|
-
|
|
492
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel}`);
|
|
493
|
-
}
|
|
494
|
-
else {
|
|
495
|
-
this.accessory.context.BatteryLevel = this.Battery.BatteryLevel;
|
|
496
|
-
this.Battery.Service.updateCharacteristic(this.hap.Characteristic.BatteryLevel, this.Battery.BatteryLevel);
|
|
497
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} updateCharacteristic BatteryLevel: ${this.Battery.BatteryLevel}`);
|
|
498
|
-
}
|
|
428
|
+
await this.updateCharacteristic(this.Battery.Service, this.hap.Characteristic.BatteryLevel, this.Battery.BatteryLevel, 'BatteryLevel');
|
|
499
429
|
// StatusLowBattery
|
|
500
|
-
|
|
501
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
this.accessory.context.StatusLowBattery = this.Battery.StatusLowBattery;
|
|
505
|
-
this.Battery.Service.updateCharacteristic(this.hap.Characteristic.StatusLowBattery, this.Battery.StatusLowBattery);
|
|
506
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} updateCharacteristic`
|
|
507
|
-
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
508
|
-
}
|
|
430
|
+
await this.updateCharacteristic(this.Battery.Service, this.hap.Characteristic.StatusLowBattery, this.Battery.StatusLowBattery, 'StatusLowBattery');
|
|
509
431
|
// ChargingState
|
|
510
|
-
|
|
511
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} ChargingState: ${this.Battery.ChargingState}`);
|
|
512
|
-
}
|
|
513
|
-
else {
|
|
514
|
-
this.accessory.context.ChargingState = this.Battery.ChargingState;
|
|
515
|
-
this.Battery.Service.updateCharacteristic(this.hap.Characteristic.ChargingState, this.Battery.ChargingState);
|
|
516
|
-
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} updateCharacteristic`
|
|
517
|
-
+ ` ChargingState: ${this.Battery.ChargingState}`);
|
|
518
|
-
}
|
|
432
|
+
await this.updateCharacteristic(this.Battery.Service, this.hap.Characteristic.ChargingState, this.Battery.ChargingState, 'ChargingState');
|
|
519
433
|
}
|
|
520
434
|
async BLEPushConnection() {
|
|
521
435
|
if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
|
|
522
|
-
this.warnLog(
|
|
436
|
+
await this.warnLog('Using OpenAPI Connection to Push Changes');
|
|
523
437
|
await this.openAPIpushChanges();
|
|
524
438
|
}
|
|
525
439
|
}
|
|
526
440
|
async BLERefreshConnection(switchbot) {
|
|
527
|
-
this.errorLog(
|
|
528
|
-
+ ` ${JSON.stringify(switchbot)}`);
|
|
441
|
+
await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${JSON.stringify(switchbot)}`);
|
|
529
442
|
if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
|
|
530
|
-
this.warnLog(
|
|
443
|
+
await this.warnLog('Using OpenAPI Connection to Refresh Status');
|
|
531
444
|
await this.openAPIRefreshStatus();
|
|
532
445
|
}
|
|
533
446
|
}
|