homebridge-tasmota-control 1.8.0-beta.3 → 1.8.0
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 +3 -3
- package/package.json +2 -2
- package/src/deviceinfo.js +1 -1
- package/src/lights.js +1 -1
- package/src/mielhvac.js +1 -1
- package/src/sensors.js +2 -2
- package/src/switches.js +1 -1
package/index.js
CHANGED
|
@@ -77,9 +77,9 @@ class tasmotaPlatform {
|
|
|
77
77
|
try {
|
|
78
78
|
//get device info
|
|
79
79
|
const deviceInfo = new DeviceInfo(url, auth, user, passwd, deviceName, loadNameFromDevice, logLevel.debug)
|
|
80
|
-
.on('debug', (msg) =>
|
|
81
|
-
.on('warn', (msg) =>
|
|
82
|
-
.on('error', (msg) =>
|
|
80
|
+
.on('debug', (msg) => log.info(`Device: ${host} ${deviceName}, debug: ${msg}`))
|
|
81
|
+
.on('warn', (msg) => log.warn(`Device: ${host} ${deviceName}, ${msg}`))
|
|
82
|
+
.on('error', (msg) => log.error(`Device: ${host} ${deviceName}, ${msg}`));
|
|
83
83
|
|
|
84
84
|
const info = await deviceInfo.getInfo();
|
|
85
85
|
if (!info.serialNumber) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Tasmota Control",
|
|
3
3
|
"name": "homebridge-tasmota-control",
|
|
4
|
-
"version": "1.8.0
|
|
4
|
+
"version": "1.8.0",
|
|
5
5
|
"description": "Homebridge plugin to control Tasmota flashed devices.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"LICENSE"
|
|
31
31
|
],
|
|
32
32
|
"engines": {
|
|
33
|
-
"homebridge": "^1.8.0 || ^2.0.0 || ^2.0.0-beta.
|
|
33
|
+
"homebridge": "^1.8.0 || ^2.0.0 || ^2.0.0-beta.80 || ^2.0.0-alpha.68",
|
|
34
34
|
"node": "^20 || ^22 || ^24 || ^25"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
package/src/deviceinfo.js
CHANGED
|
@@ -75,7 +75,7 @@ class DeviceInfo extends EventEmitter {
|
|
|
75
75
|
serialNumber: addressMac,
|
|
76
76
|
firmwareRevision: firmwareRevision
|
|
77
77
|
};
|
|
78
|
-
this.emit('debug', `Sensor: ${JSON.stringify(obj, null, 2)}`)
|
|
78
|
+
if (this.logDebug) this.emit('debug', `Sensor: ${JSON.stringify(obj, null, 2)}`)
|
|
79
79
|
return obj;
|
|
80
80
|
} catch (error) {
|
|
81
81
|
throw new Error(`Check info error: ${error}`);
|
package/src/lights.js
CHANGED
|
@@ -299,7 +299,7 @@ class Lights extends EventEmitter {
|
|
|
299
299
|
this.emit('success', `Connect Success`)
|
|
300
300
|
|
|
301
301
|
//check device info
|
|
302
|
-
if (
|
|
302
|
+
if (this.logDeviceInfo) await this.deviceInfo();
|
|
303
303
|
|
|
304
304
|
//start prepare accessory
|
|
305
305
|
const accessory = await this.prepareAccessory();
|
package/src/mielhvac.js
CHANGED
|
@@ -1156,7 +1156,7 @@ class MiElHvac extends EventEmitter {
|
|
|
1156
1156
|
this.emit('success', `Connect Success`)
|
|
1157
1157
|
|
|
1158
1158
|
//check device info
|
|
1159
|
-
if (
|
|
1159
|
+
if (this.logDeviceInfo) await this.deviceInfo();
|
|
1160
1160
|
|
|
1161
1161
|
//start prepare accessory
|
|
1162
1162
|
const accessory = await this.prepareAccessory();
|
package/src/sensors.js
CHANGED
|
@@ -391,7 +391,7 @@ class Sensors extends EventEmitter {
|
|
|
391
391
|
|
|
392
392
|
//energy
|
|
393
393
|
if (sensor.name === 'ENERGY') {
|
|
394
|
-
|
|
394
|
+
if (this.logDebug) this.emit('debug', `Prepare Power And Energy Service`);
|
|
395
395
|
const serviceName = this.sensorsNamePrefix ? `${accessoryName} ${sensorName}` : `${sensorName}`;
|
|
396
396
|
const powerAndEnergyService = accessory.addService(Service.PowerAndEnergy, serviceName, `Energy Sensor ${i}`);
|
|
397
397
|
powerAndEnergyService.setCharacteristic(Characteristic.ConfiguredName, serviceName);
|
|
@@ -505,7 +505,7 @@ class Sensors extends EventEmitter {
|
|
|
505
505
|
this.emit('success', `Connect Success`)
|
|
506
506
|
|
|
507
507
|
//check device info
|
|
508
|
-
if (
|
|
508
|
+
if (this.logDeviceInfo) await this.deviceInfo();
|
|
509
509
|
|
|
510
510
|
//start prepare accessory
|
|
511
511
|
const accessory = await this.prepareAccessory();
|
package/src/switches.js
CHANGED
|
@@ -180,7 +180,7 @@ class Switches extends EventEmitter {
|
|
|
180
180
|
this.emit('success', `Connect Success`)
|
|
181
181
|
|
|
182
182
|
//check device info
|
|
183
|
-
if (
|
|
183
|
+
if (this.logDeviceInfo) await this.deviceInfo();
|
|
184
184
|
|
|
185
185
|
//start prepare accessory
|
|
186
186
|
const accessory = await this.prepareAccessory();
|