homebridge-tasmota-control 1.2.1 → 1.2.2

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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.2] - (07.02.2025)
9
+
10
+ ## Changes
11
+
12
+ - stability and improvements
13
+
8
14
  ## [1.2.0] - (31.01.2025)
9
15
 
10
16
  ## Changes
package/index.js CHANGED
@@ -102,6 +102,9 @@ class tasmotaPlatform {
102
102
  try {
103
103
  const startDone = await tasmotaDevice.start();
104
104
  const stopImpulseGenerator = startDone ? await impulseGenerator.stop() : false;
105
+
106
+ //start impulse generator
107
+ const startImpulseGenerator = startDone ? await tasmotaDevice.startImpulseGenerator() : false
105
108
  } catch (error) {
106
109
  const emitLog = disableLogError ? false : log.error(`Device: ${host} ${deviceName}, ${error}, trying again.`);
107
110
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "1.2.1",
4
+ "version": "1.2.2",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -1311,6 +1311,18 @@ class TasmotaDevice extends EventEmitter {
1311
1311
  };
1312
1312
  }
1313
1313
 
1314
+ async startImpulseGenerator() {
1315
+ try {
1316
+ //start impulse generator
1317
+ const timers = [{ name: 'checkDeviceState', sampling: this.refreshInterval }];
1318
+ const remoteTempSensor = this.remoteTemperatureSensorEnable ? timers.push({ name: 'updateRemoteTemp', sampling: this.remoteTemperatureSensorRefreshInterval }) : false;
1319
+ await this.impulseGenerator.start(timers);
1320
+ return true;
1321
+ } catch (error) {
1322
+ throw new Error(`Impulse generator start error: ${error}`);
1323
+ };
1324
+ }
1325
+
1314
1326
  deviceInfo() {
1315
1327
  this.emit('devInfo', `----- ${this.deviceName} -----`);
1316
1328
  this.emit('devInfo', `Manufacturer: Tasmota`);
@@ -2461,11 +2473,6 @@ class TasmotaDevice extends EventEmitter {
2461
2473
  this.startPrepareAccessory = false;
2462
2474
  }
2463
2475
 
2464
- //start update data
2465
- const timers = [{ name: 'checkDeviceState', sampling: this.refreshInterval }];
2466
- const remoteTempSensor = this.remoteTemperatureSensorEnable ? timers.push({ name: 'updateRemoteTemp', sampling: this.remoteTemperatureSensorRefreshInterval }) : false;
2467
- await this.impulseGenerator.start(timers);
2468
-
2469
2476
  return true;
2470
2477
  } catch (error) {
2471
2478
  throw new Error(`Start error: ${error}`);