homebridge-melcloud-control 4.3.0-beta.55 → 4.3.0-beta.56
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 +5 -5
- package/package.json +1 -1
- package/src/melcloudata.js +4 -4
package/index.js
CHANGED
|
@@ -181,11 +181,11 @@ class MelCloudPlatform {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
configuredDevice.on('devInfo', (info) => logLevel.devInfo && log.info(info))
|
|
184
|
-
.on('success', (msg) =>
|
|
185
|
-
.on('info', (msg) =>
|
|
186
|
-
.on('debug', (msg) =>
|
|
187
|
-
.on('warn', (msg) =>
|
|
188
|
-
.on('error', (msg) =>
|
|
184
|
+
.on('success', (msg) => log.success(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`))
|
|
185
|
+
.on('info', (msg) => log.info(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`))
|
|
186
|
+
.on('debug', (msg) => log.info(`${accountName}, ${deviceTypeString}, ${deviceName}, debug: ${msg}`))
|
|
187
|
+
.on('warn', (msg) => log.warn(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`))
|
|
188
|
+
.on('error', (msg) => log.error(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`));
|
|
189
189
|
|
|
190
190
|
const accessory = await configuredDevice.start();
|
|
191
191
|
if (accessory) {
|
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.0-beta.
|
|
4
|
+
"version": "4.3.0-beta.56",
|
|
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/melcloudata.js
CHANGED
|
@@ -103,7 +103,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
103
103
|
socket.close();
|
|
104
104
|
})
|
|
105
105
|
.on('close', () => {
|
|
106
|
-
if (this.logDebug) this.emit('debug', `Socket closed`);
|
|
106
|
+
if (!this.logDebug) this.emit('debug', `Socket closed`);
|
|
107
107
|
this.cleanupSocket();
|
|
108
108
|
})
|
|
109
109
|
.on('open', () => {
|
|
@@ -115,7 +115,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
115
115
|
// heartbeat
|
|
116
116
|
this.heartbeat = setInterval(() => {
|
|
117
117
|
if (socket.readyState === socket.OPEN) {
|
|
118
|
-
if (!this.logDebug) this.emit('
|
|
118
|
+
if (!this.logDebug) this.emit('debug', `Socket send heartbeat`);
|
|
119
119
|
socket.ping();
|
|
120
120
|
}
|
|
121
121
|
}, 30000);
|
|
@@ -156,12 +156,12 @@ class MelCloudAta extends EventEmitter {
|
|
|
156
156
|
updateDeviceState = true;
|
|
157
157
|
break;
|
|
158
158
|
default:
|
|
159
|
-
if (this.
|
|
159
|
+
if (!this.logDebug) this.emit('debug', `Unit ${unitId}, received unknown message type: ${stringifyMessage}`);
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
break;
|
|
163
163
|
default:
|
|
164
|
-
if (this.
|
|
164
|
+
if (!this.logDebug) this.emit('debug', `Incoming unknown unit id: ${stringifyMessage}`);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
|