homebridge-melcloud-control 4.3.5-beta.2 → 4.3.5-beta.3
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/index.js +1 -1
- package/package.json +1 -1
- package/src/melcloudhome.js +3 -3
package/index.js
CHANGED
|
@@ -179,7 +179,7 @@ class MelCloudPlatform {
|
|
|
179
179
|
let configuredDevice;
|
|
180
180
|
switch (deviceType) {
|
|
181
181
|
case 0: //ATA
|
|
182
|
-
configuredDevice = new DeviceAta(api, account, device, devicesFile, defaultTempsFile, accountInfo, accountFile
|
|
182
|
+
configuredDevice = new DeviceAta(api, account, device, devicesFile, defaultTempsFile, accountInfo, accountFile, devicesList.WebSocket);
|
|
183
183
|
break;
|
|
184
184
|
case 1: //ATW
|
|
185
185
|
configuredDevice = new DeviceAtw(api, account, device, devicesFile, defaultTempsFile, accountInfo, accountFile, devicesList.WebSocket);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.3.5-beta.
|
|
4
|
+
"version": "4.3.5-beta.3",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/melcloudhome.js
CHANGED
|
@@ -228,7 +228,7 @@ class MelCloudHome extends EventEmitter {
|
|
|
228
228
|
this.socket = new WebSocket(url, { headers: this.webSocketOptions.Headers })
|
|
229
229
|
.on('error', (error) => {
|
|
230
230
|
if (this.logError) this.emit('error', `Socket error: ${error}`);
|
|
231
|
-
socket.close();
|
|
231
|
+
this.socket.close();
|
|
232
232
|
})
|
|
233
233
|
.on('close', () => {
|
|
234
234
|
if (this.logDebug) this.emit('debug', `Socket closed`);
|
|
@@ -241,9 +241,9 @@ class MelCloudHome extends EventEmitter {
|
|
|
241
241
|
|
|
242
242
|
// heartbeat
|
|
243
243
|
this.heartbeat = setInterval(() => {
|
|
244
|
-
if (socket.readyState === socket.OPEN) {
|
|
244
|
+
if (this.socket.readyState === this.socket.OPEN) {
|
|
245
245
|
if (!this.logDebug) this.emit('debug', `Socket send heartbeat`);
|
|
246
|
-
socket.ping();
|
|
246
|
+
this.socket.ping();
|
|
247
247
|
}
|
|
248
248
|
}, 30000);
|
|
249
249
|
})
|