iobroker.acinfinity 0.8.5 → 0.9.5

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 laurent Standard raspi@laurent-vite.de
3
+ Copyright (c) 2026 laurent Standard <raspi@laurent-vite.de>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -205,6 +205,17 @@ Der Adapter erkennt automatisch alle verbundenen Controller und legt den State-B
205
205
 
206
206
  ## Changelog
207
207
 
208
+ ### 0.9.5 (2026-03-02)
209
+ - Fix: LICENSE Copyright-Format korrigiert (ioBroker Checker E7001)
210
+ - CI: Node.js 18.x aus Test-Matrix entfernt (Adapter erfordert Node ≥ 20)
211
+
212
+ ### 0.9.0 (2026-03-02)
213
+ - Sicherheit: Auth-Token wird nicht mehr in Logs geschrieben
214
+ - Stabilität: Race Condition bei parallelen Re-Login-Versuchen behoben
215
+ - Robustheit: Null-Prüfung für Sensorwerte (verhindert NaN bei nicht angeschlossenen Sensoren)
216
+ - Dokumentation: HTTP-Nutzung der AC Infinity API im Code kommentiert
217
+ - Hinweis: AC Infinity API unterstützt kein HTTPS (serverseitige Einschränkung)
218
+
208
219
  ### 0.8.5 (2026-03-01)
209
220
  - Admin-UI: Hinweistext jetzt rot und fett dargestellt
210
221
  - Admin-UI: Minimales Abfrageintervall von 5 auf 10 Sekunden erhöht
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "acinfinity",
4
- "version": "0.8.5",
4
+ "version": "0.9.5",
5
5
  "news": {
6
+ "0.9.5": {
7
+ "en": "Fix: LICENSE copyright format (ioBroker checker E7001); CI: drop Node.js 18.x (requires Node >=20)",
8
+ "de": "Fix: LICENSE Copyright-Format korrigiert (E7001); CI: Node.js 18.x entfernt (erfordert Node ≥20)",
9
+ "ru": "Исправление: формат авторских прав в LICENSE (E7001); CI: удалена Node.js 18.x (требуется Node >=20)",
10
+ "pt": "Fix: formato de copyright do LICENSE corrigido (E7001); CI: Node.js 18.x removido (requer Node >=20)",
11
+ "nl": "Fix: LICENSE copyright-formaat gecorrigeerd (E7001); CI: Node.js 18.x verwijderd (vereist Node >=20)",
12
+ "fr": "Fix: format du copyright LICENSE corrigé (E7001); CI: Node.js 18.x supprimé (requiert Node >=20)",
13
+ "it": "Fix: formato copyright LICENSE corretto (E7001); CI: Node.js 18.x rimosso (richiede Node >=20)",
14
+ "es": "Fix: formato de copyright de LICENSE corregido (E7001); CI: Node.js 18.x eliminado (requiere Node >=20)",
15
+ "pl": "Poprawka: format praw autorskich LICENSE (E7001); CI: usunięto Node.js 18.x (wymagane Node >=20)",
16
+ "uk": "Виправлення: формат авторських прав LICENSE (E7001); CI: видалено Node.js 18.x (потрібно Node >=20)",
17
+ "zh-cn": "修复:LICENSE版权格式(E7001);CI:删除Node.js 18.x(需要Node >=20)"
18
+ },
19
+ "0.9.0": {
20
+ "en": "Security: token no longer logged; fix re-login race condition; null-safe sensor values; HTTP API documented",
21
+ "de": "Sicherheit: Token nicht mehr in Logs; Race Condition bei Re-Login behoben; Null-sichere Sensorwerte; HTTP-API dokumentiert",
22
+ "ru": "Безопасность: токен больше не логируется; исправлена гонка при повторном входе; безопасные сенсорные значения; задокументировано использование HTTP",
23
+ "pt": "Segurança: token não registrado; correção de condição de corrida no re-login; valores de sensor seguros para null; API HTTP documentada",
24
+ "nl": "Beveiliging: token niet meer gelogd; race condition bij re-login opgelost; null-veilige sensorwaarden; HTTP API gedocumenteerd",
25
+ "fr": "Sécurité: token non journalisé; correction de la condition de course à la reconnexion; valeurs capteur sûres pour null; API HTTP documentée",
26
+ "it": "Sicurezza: token non più registrato; race condition nel re-login corretta; valori sensore sicuri per null; API HTTP documentata",
27
+ "es": "Seguridad: token ya no registrado; race condition en re-login corregida; valores de sensor seguros para null; API HTTP documentada",
28
+ "pl": "Bezpieczeństwo: token nie jest już logowany; naprawiono race condition przy ponownym logowaniu; bezpieczne wartości null dla sensorów; API HTTP udokumentowane",
29
+ "uk": "Безпека: токен більше не логується; виправлено race condition при повторному вході; null-безпечні значення сенсорів; HTTP API задокументовано",
30
+ "zh-cn": "安全:不再记录令牌;修复重新登录时的竞争条件;传感器值空值安全;HTTP API已记录"
31
+ },
6
32
  "0.8.5": {
7
33
  "en": "Admin UI: disclaimer text now red and bold; minimum polling interval increased to 10 seconds",
8
34
  "de": "Admin-UI: Hinweistext jetzt rot und fett; minimales Abfrageintervall auf 10 Sekunden erhöht",
@@ -67,32 +93,6 @@
67
93
  "pl": "Admin UI: usunięto pole ostrzeżenia, poprawiono układ ustawień, naprawiono link pomocy",
68
94
  "uk": "Admin UI: видалено блок попередження, покращено макет налаштувань, виправлено посилання на довідку",
69
95
  "zh-cn": "管理界面:移除警告框,优化设置布局,修复帮助链接"
70
- },
71
- "0.7.2": {
72
- "en": "Code quality: migrate to ESLint 9 with @iobroker/eslint-config",
73
- "de": "Codequalität: Migration auf ESLint 9 mit @iobroker/eslint-config",
74
- "ru": "Качество кода: миграция на ESLint 9 с @iobroker/eslint-config",
75
- "pt": "Qualidade do código: migração para ESLint 9 com @iobroker/eslint-config",
76
- "nl": "Codekwaliteit: migratie naar ESLint 9 met @iobroker/eslint-config",
77
- "fr": "Qualité du code: migration vers ESLint 9 avec @iobroker/eslint-config",
78
- "it": "Qualità del codice: migrazione a ESLint 9 con @iobroker/eslint-config",
79
- "es": "Calidad del código: migración a ESLint 9 con @iobroker/eslint-config",
80
- "pl": "Jakość kodu: migracja do ESLint 9 z @iobroker/eslint-config",
81
- "uk": "Якість коду: міграція на ESLint 9 з @iobroker/eslint-config",
82
- "zh-cn": "代码质量:迁移到 ESLint 9 并使用 @iobroker/eslint-config"
83
- },
84
- "0.7.1": {
85
- "en": "Add value ranges to state names for better readability",
86
- "de": "Wertebereiche zu Datenpunkt-Namen hinzugefügt für bessere Lesbarkeit",
87
- "ru": "Добавлены диапазоны значений к названиям точек данных",
88
- "pt": "Intervalos de valores adicionados aos nomes dos pontos de dados",
89
- "nl": "Waardebereiken toegevoegd aan namen van datapunten",
90
- "fr": "Plages de valeurs ajoutées aux noms des points de données",
91
- "it": "Intervalli di valori aggiunti ai nomi dei punti dati",
92
- "es": "Rangos de valores añadidos a los nombres de los puntos de datos",
93
- "pl": "Dodano zakresy wartości do nazw punktów danych",
94
- "uk": "Додано діапазони значень до назв точок даних",
95
- "zh-cn": "为数据点名称添加了值范围以提高可读性"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/lib/constants.js CHANGED
@@ -5,6 +5,9 @@
5
5
  'use strict';
6
6
 
7
7
  // API constants
8
+ // NOTE: The AC Infinity server does NOT support HTTPS. This is a limitation of the
9
+ // AC Infinity infrastructure, not of this adapter. The same applies to the official
10
+ // Home Assistant integration (dalinicus/homeassistant-acinfinity).
8
11
  const API_BASE_URL = 'http://www.acinfinityserver.com';
9
12
  const API_ENDPOINTS = {
10
13
  LOGIN: '/api/user/appUserLogin',
package/lib/dataModels.js CHANGED
@@ -26,9 +26,10 @@ class ACInfinityController {
26
26
  this.deviceType = data.deviceType;
27
27
 
28
28
  // Sensor values (stored as integers representing floating point with 2 decimal places)
29
- this.temperature = data.temperature / 100;
30
- this.humidity = data.humidity / 100;
31
- this.vpd = data.vpdnums / 100;
29
+ // Null check: optional sensors (CO2, soil, water) may be absent in API response
30
+ this.temperature = data.temperature != null ? data.temperature / 100 : null;
31
+ this.humidity = data.humidity != null ? data.humidity / 100 : null;
32
+ this.vpd = data.vpdnums != null ? data.vpdnums / 100 : null;
32
33
 
33
34
  // Process ports
34
35
  this.ports = [];
package/main.js CHANGED
@@ -31,6 +31,7 @@ class ACInfinity extends utils.Adapter {
31
31
  this.stateManager = null;
32
32
  this.pollingInterval = null;
33
33
  this.isConnected = false;
34
+ this.isLoginInProgress = false;
34
35
  }
35
36
 
36
37
  /**
@@ -108,11 +109,16 @@ class ACInfinity extends utils.Adapter {
108
109
  this.log.error(`Error during polling update: ${error.message}`);
109
110
  if (error.message.includes('unauthorized') || error.message.includes('auth')) {
110
111
  this.log.info('Authentication error detected, attempting to re-login');
111
- try {
112
- await this.client.login();
113
- this.log.info('Re-login successful');
114
- } catch (loginError) {
115
- this.log.error(`Failed to re-login: ${loginError.message}`);
112
+ if (!this.isLoginInProgress) {
113
+ this.isLoginInProgress = true;
114
+ try {
115
+ await this.client.login();
116
+ this.log.info('Re-login successful');
117
+ } catch (loginError) {
118
+ this.log.error(`Failed to re-login: ${loginError.message}`);
119
+ } finally {
120
+ this.isLoginInProgress = false;
121
+ }
116
122
  }
117
123
  }
118
124
  }
@@ -296,9 +302,14 @@ class ACInfinity extends utils.Adapter {
296
302
  this.log.info(
297
303
  `Not logged in, trying to log in again. isConnected: ${this.isConnected}, isLoggedIn: ${this.client ? this.client.isLoggedIn() : 'client is null'}`,
298
304
  );
305
+ if (this.isLoginInProgress) {
306
+ this.log.debug('Login already in progress, skipping duplicate re-login');
307
+ return;
308
+ }
309
+ this.isLoginInProgress = true;
299
310
  try {
300
311
  await this.client.login();
301
- this.log.info(`Re-login successful. Token: ${this.client.token}`);
312
+ this.log.info('Re-login successful');
302
313
  this.isConnected = true;
303
314
  await this.setStateAsync('info.connection', { val: true, ack: true });
304
315
  } catch (loginError) {
@@ -306,6 +317,8 @@ class ACInfinity extends utils.Adapter {
306
317
  this.isConnected = false;
307
318
  await this.setStateAsync('info.connection', { val: false, ack: true });
308
319
  throw new Error('Login failed, state change cannot be processed');
320
+ } finally {
321
+ this.isLoginInProgress = false;
309
322
  }
310
323
  }
311
324
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.acinfinity",
3
- "version": "0.8.5",
3
+ "version": "0.9.5",
4
4
  "description": "Monitor and control AC Infinity devices",
5
5
  "author": {
6
6
  "name": "laurent Standard",