homebridge-texecom-full 4.2.7 → 4.2.8

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/index.js +37 -36
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  This change log documents all release versions of homebridge-texecom
4
4
 
5
+ ### 4.2.8 (2025-7-28)
6
+
7
+ - **TWEAK** - Data conversion issue (Typo)
8
+ - **NEWS** - We are verified!!
9
+
5
10
  ### 4.2.7 (2025-7-28)
6
11
 
7
12
  - **FIX** - Connection issue
package/index.js CHANGED
@@ -202,6 +202,42 @@ TexecomPlatform.prototype = {
202
202
  }
203
203
  }
204
204
 
205
+ function setupConnection() {
206
+ platform.log.log('Attempting connection to Texecom...');
207
+
208
+ connection = net.createConnection(platform.ip_port, platform.ip_address);
209
+
210
+ connection.setNoDelay(true);
211
+
212
+ connection.on('connect', () => {
213
+ platform.log.log('Connected via IP');
214
+ });
215
+
216
+ connection.on('data', function (data) {
217
+ platform.log.debug(`IP data received: ${data}`);
218
+ responseEmitter.emit('data', data);
219
+ processData(data);
220
+ });
221
+
222
+ connection.on('error', (err) => {
223
+ platform.log.error('IP connection error:', err.message);
224
+ // We'll reconnect on 'close'
225
+ });
226
+
227
+ connection.on('close', () => {
228
+ platform.log.error('IP connection closed. Will attempt to reconnect in 10s.');
229
+ setTimeout(() => {
230
+ setupConnection(); // try again
231
+ }, 10000);
232
+ });
233
+
234
+ connection.on('end', () => {
235
+ platform.log.log('IP connection ended');
236
+ });
237
+
238
+ platform.texecomConnection = connection;
239
+ }
240
+
205
241
  if (this.serial_device) {
206
242
  var SerialPort = serialport.SerialPort;
207
243
 
@@ -223,7 +259,7 @@ TexecomPlatform.prototype = {
223
259
 
224
260
  setupConnection();
225
261
 
226
-
262
+
227
263
  /*try {
228
264
  connection = net.createConnection(platform.ip_port, platform.ip_address, function () {
229
265
  platform.log.log('Connected via IP');
@@ -266,41 +302,6 @@ TexecomPlatform.prototype = {
266
302
  }
267
303
  }
268
304
 
269
- function setupConnection() {
270
- platform.log.log('Attempting connection to Texecom...');
271
-
272
- connection = net.createConnection(platform.ip_port, platform.ip_address);
273
-
274
- connection.setNoDelay(true);
275
-
276
- connection.on('connect', () => {
277
- platform.log.log('Connected via IP');
278
- });
279
-
280
- connection.on('data', function (data) {
281
- platform.log.debug(`IP data received: ${data}`);
282
- responseEmitter.emit('data', data);
283
- processData(data);
284
- });
285
-
286
- connection.on('error', (err) => {
287
- platform.log.error('IP connection error:', err.message);
288
- // We'll reconnect on 'close'
289
- });
290
-
291
- connection.on('close', () => {
292
- platform.log.error('IP connection closed. Will attempt to reconnect in 10s.');
293
- setTimeout(() => {
294
- setupConnection(); // try again
295
- }, 10000);
296
- });
297
-
298
- connection.on('end', () => {
299
- platform.log.log('IP connection ended');
300
- });
301
-
302
- platform.texecomConnection = connection;
303
- }
304
305
 
305
306
  function TexecomAccessory(log, config) {
306
307
  this.log = log;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "displayName": "Homebridge Texecom",
3
3
  "name": "homebridge-texecom-full",
4
4
  "description": "A plugin for homebridge to integrate Texecom Premier Elite alarm systems into HomeKit",
5
- "version": "4.2.7",
5
+ "version": "4.2.8",
6
6
  "author": {
7
7
  "name": "Chris Posthumus",
8
8
  "email": "chris.posthumus@gmail.com"