homebridge-tasmota-control 1.6.10 → 1.6.12

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "1.6.10",
4
+ "version": "1.6.12",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -31,10 +31,10 @@
31
31
  ],
32
32
  "engines": {
33
33
  "homebridge": "^1.9.0 || ^2.0.0 || ^2.0.0-beta.29",
34
- "node": "^18.20.4 || ^20.15.1 || ^22.7.0 || ^23.2.0 || ^24.0.0"
34
+ "node": "^20 || ^22 || ^24"
35
35
  },
36
36
  "dependencies": {
37
- "axios": "^1.9.0"
37
+ "axios": "^1.10.0"
38
38
  },
39
39
  "keywords": [
40
40
  "homebridge",
package/src/fans.js CHANGED
@@ -45,13 +45,19 @@ class Fans extends EventEmitter {
45
45
  });
46
46
 
47
47
  //impulse generator
48
+ this.call = false;
48
49
  this.impulseGenerator = new ImpulseGenerator();
49
50
  this.impulseGenerator.on('checkDeviceState', async () => {
51
+ if (this.call) return;
52
+
50
53
  try {
54
+ this.call = true;
51
55
  await this.checkDeviceState();
56
+ this.call = false;
52
57
  } catch (error) {
53
- this.emit('error', `Impulse generator error: ${error}`);
54
- }
58
+ this.call = false;
59
+ this.emit('error', `Inpulse generator error: ${error}`);
60
+ };
55
61
  }).on('state', (state) => {
56
62
  const emitState = state ? this.emit('success', `Impulse generator started`) : this.emit('warn', `Impulse generator stopped`);
57
63
  });
package/src/lights.js CHANGED
@@ -43,14 +43,19 @@ class Lights extends EventEmitter {
43
43
  }
44
44
  });
45
45
 
46
- //impulse generator
46
+ this.call = false;
47
47
  this.impulseGenerator = new ImpulseGenerator();
48
48
  this.impulseGenerator.on('checkDeviceState', async () => {
49
+ if (this.call) return;
50
+
49
51
  try {
52
+ this.call = true;
50
53
  await this.checkDeviceState();
54
+ this.call = false;
51
55
  } catch (error) {
52
- this.emit('error', `Impulse generator error: ${error}`);
53
- }
56
+ this.call = false;
57
+ this.emit('error', `Inpulse generator error: ${error}`);
58
+ };
54
59
  }).on('state', (state) => {
55
60
  const emitState = state ? this.emit('success', `Impulse generator started`) : this.emit('warn', `Impulse generator stopped`);
56
61
  });
package/src/mielhvac.js CHANGED
@@ -151,17 +151,28 @@ class MiElHvac extends EventEmitter {
151
151
  }
152
152
 
153
153
  //impulse generator
154
+ this.call = false;
155
+ this.call1 = false;
154
156
  this.impulseGenerator = new ImpulseGenerator();
155
157
  this.impulseGenerator.on('checkDeviceState', async () => {
158
+ if (this.call) return;
159
+
156
160
  try {
161
+ this.call = true;
157
162
  await this.checkDeviceState();
163
+ this.call = false;
158
164
  } catch (error) {
159
- this.emit('error', `Impulse generator error: ${error}`);
160
- }
165
+ this.call = false;
166
+ this.emit('error', `Inpulse generator error: ${error}`);
167
+ };
161
168
  }).on('updateRemoteTemp', async () => {
169
+ if (this.call1) return;
170
+
162
171
  try {
172
+ this.call1 = true;
163
173
  await this.updateRemoteTemp();
164
174
  } catch (error) {
175
+ this.call1 = false;
165
176
  this.emit('error', `Impulse generator error: ${error}`);
166
177
  }
167
178
  }).on('state', (state) => {
package/src/sensors.js CHANGED
@@ -46,13 +46,19 @@ class Sensors extends EventEmitter {
46
46
  });
47
47
 
48
48
  //impulse generator
49
+ this.call = false;
49
50
  this.impulseGenerator = new ImpulseGenerator();
50
51
  this.impulseGenerator.on('checkDeviceState', async () => {
52
+ if (this.call) return;
53
+
51
54
  try {
55
+ this.call = true;
52
56
  await this.checkDeviceState();
57
+ this.call = false;
53
58
  } catch (error) {
54
- this.emit('error', `Impulse generator error: ${error}`);
55
- }
59
+ this.call = false;
60
+ this.emit('error', `Inpulse generator error: ${error}`);
61
+ };
56
62
  }).on('state', (state) => {
57
63
  const emitState = state ? this.emit('success', `Impulse generator started`) : this.emit('warn', `Impulse generator stopped`);
58
64
  });
package/src/switches.js CHANGED
@@ -45,13 +45,19 @@ class Switches extends EventEmitter {
45
45
  });
46
46
 
47
47
  //impulse generator
48
+ this.call = false;
48
49
  this.impulseGenerator = new ImpulseGenerator();
49
50
  this.impulseGenerator.on('checkDeviceState', async () => {
51
+ if (this.call) return;
52
+
50
53
  try {
54
+ this.call = true;
51
55
  await this.checkDeviceState();
56
+ this.call = false;
52
57
  } catch (error) {
53
- this.emit('error', `Impulse generator error: ${error}`);
54
- }
58
+ this.call = false;
59
+ this.emit('error', `Inpulse generator error: ${error}`);
60
+ };
55
61
  }).on('state', (state) => {
56
62
  const emitState = state ? this.emit('success', `Impulse generator started`) : this.emit('warn', `Impulse generator stopped`);
57
63
  });