iobroker.alpha-ess 2.1.0 → 2.1.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/README.md CHANGED
@@ -35,10 +35,10 @@ The quality attribute of each state is set accordingly to its status:
35
35
  | Quality | meaning |
36
36
  |:--------|:--------------------------------------------------|
37
37
  |0x00 |OK and up to date |
38
- |0x01 |value not updated due to unknown reason, see log |
38
+ |0x01 |value not updated due to unknown reason, see debug log |
39
39
  |0x02 |problem with online connection for this data point |
40
40
  |0x12 |adapter disconnected or stopped |
41
- |0x44 |API returned error or internal error, see log |
41
+ |0x44 |API returned error or internal error, see debug log |
42
42
 
43
43
  ## Settings:
44
44
 
@@ -61,6 +61,14 @@ How to find SN and Check code for registration is described here: https://github
61
61
  **All product and company names or logos are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them or any associated subsidiaries! This personal project is maintained in spare time and has no business goal.**
62
62
 
63
63
  ## Changelog
64
+ ### 2.1.2 (2024-08-07)
65
+
66
+ - (Gaspode) Quality of states optimized
67
+
68
+ ### 2.1.1 (2024-08-07)
69
+
70
+ - (Gaspode) Do not longer report read timeouts as error. It should be enough to set the quality of concerned states to values according the table above and to display warnings, if values were not updated for a long time. To see details, debug log level must be enabled by the user.
71
+
64
72
  ### 2.1.0 (2024-08-01)
65
73
 
66
74
  - (Gaspode) Adapter requires node.js >= 18 and js-controller >= 5 now
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "alpha-ess",
4
- "version": "2.1.0",
4
+ "version": "2.1.2",
5
5
  "news": {
6
+ "2.1.2": {
7
+ "en": "Quality of states optimized",
8
+ "de": "Quality Wert von States optimiert",
9
+ "ru": "Качество оптимизированных состояний",
10
+ "pt": "Qualidade de estados otimizados",
11
+ "nl": "Kwaliteit van geoptimaliseerde staten",
12
+ "fr": "Qualité des états optimisés",
13
+ "it": "Qualità degli stati ottimizzati",
14
+ "es": "Calidad de los estados optimizada",
15
+ "pl": "Jakość państw zoptymalizowanych",
16
+ "uk": "Якість держав оптимізовано",
17
+ "zh-cn": "国家质量得到优化"
18
+ },
19
+ "2.1.1": {
20
+ "en": "Do not longer report read timeouts as error. It should be enough to set the quality of concerned states to values according the table above and to display warnings, if values were not updated for a long time. To see details, debug log level must be enabled by the user.",
21
+ "de": "Read Timeouts werden nicht länger als Fehler im Log angezeigt. Es sollte ausreichen, dass die Quality der betreffenden States auf Werte gemäß der obigen Tabelle gesetzt wird und dass Warnungen angezeigt werden, wenn Werte lange nicht aktualisiert wurden. Um Details zu sehen, muss der Log-Level Debug vom Benutzer aktiviert werden.",
22
+ "ru": "Не сообщайте больше о времени чтения как об ошибке. Это должно быть достаточно, чтобы установить качество соответствующих состояний к значениям согласно таблице выше и отображать предупреждения, если значения не обновлялись в течение длительного времени. Чтобы увидеть детали, уровень отладки журнала должен быть включен пользователем.",
23
+ "pt": "Não reporte mais tempo de leitura como erro. Deve ser suficiente definir a qualidade dos estados em causa para valores de acordo com a tabela acima e para exibir avisos, se os valores não foram atualizados por muito tempo. Para ver detalhes, o nível de log de depuração deve ser ativado pelo usuário.",
24
+ "nl": "Niet langer lezen time-outs rapporteren als fout. Het zou voldoende moeten zijn om de kwaliteit van de betrokken staten vast te stellen op waarden volgens bovenstaande tabel en waarschuwingen weer te geven, indien de waarden lange tijd niet werden bijgewerkt. Om details te zien, moet het debug-logniveau door de gebruiker worden ingeschakeld.",
25
+ "fr": "Ne déclarez plus les temps de lecture comme erreur. Il devrait suffire de fixer la qualité des états concernés à des valeurs selon le tableau ci-dessus et d'afficher des avertissements, si les valeurs ne sont pas mises à jour pendant longtemps. Pour voir les détails, le niveau de débogage doit être activé par l'utilisateur.",
26
+ "it": "Non report più i timeout di lettura come errore. Dovrebbe essere sufficiente impostare la qualità degli stati interessati ai valori secondo la tabella sopra e mostrare avvisi, se i valori non sono stati aggiornati per molto tempo. Per visualizzare i dettagli, il livello di registro del debug deve essere abilitato dall'utente.",
27
+ "es": "No reporte más tiempo de lectura como error. Debe ser suficiente para establecer la calidad de los estados interesados a valores según la tabla anterior y para mostrar advertencias, si los valores no se actualizaron durante mucho tiempo. Para ver detalles, el nivel de registro de depuración debe ser habilitado por el usuario.",
28
+ "pl": "Nie raportuj już timeout jako błąd. Powinno wystarczyć ustawić jakość danych państw na wartości zgodnie z powyższą tabelą oraz wyświetlić ostrzeżenia, jeżeli wartości nie były aktualizowane przez długi czas. Aby zobaczyć szczegóły, poziom dziennika debugowania musi być włączony przez użytkownika.",
29
+ "uk": "Не довший звіт про те, як помилка. Для того, щоб встановити якість занепокоєних станів до значень, зазначених вище таблиці та для відображення попередження, якщо значення не було оновлено протягом тривалого часу. Щоб дізнатися подробиці, рівень дебюг повинен бути включений користувачем.",
30
+ "zh-cn": "不再将超时读取为错误 。 如果长期不更新有关数值,则应该足以按照上表的数值确定有关国家的质量,并显示警告。 要查看细节,调试日志级别必须由用户启用."
31
+ },
6
32
  "2.1.0": {
7
33
  "en": "Adapter requires node.js >= 18 and js-controller >= 5 now\nDependencies updated\nAdapter logo updated. Alpha-ESS has kindly permitted to use the Alpha-ESS logo. This does not imply any affiliation with Alpha-ESS! Alpha-ESS is not the developer or provider of this adapter!",
8
34
  "de": "Adapter benötigt jetzt node.js >= 18 und js-controller >= 5\nAbhängigkeiten aktualisiert\nAdapter-Logo aktualisiert. Alpha-ESS hat freundlicherweise die Nutzung des Alpha-ESS-Logos genehmigt. Dies impliziert keine Zugehörigkeit zu Alpha-ESS! Alpha-ESS ist nicht der Entwickler oder Anbieter dieses Adapters!",
@@ -67,32 +93,6 @@
67
93
  "pl": "Współdzielnia z API Open\nStart i zatrzymanie ładowania skrzynki z Open API",
68
94
  "uk": "Підтримка настінної коробки з відкритим API\nСтарт і зупинка зарядки стінок з відкритим API",
69
95
  "zh-cn": "A. 开放式API的支助墙箱\nA. 开端和停止向开放的阿联酋投掷石箱"
70
- },
71
- "1.2.1": {
72
- "en": "Fixed severe error in ClosedAPI",
73
- "de": "Schweren Fehler in ClosedAPI behoben",
74
- "ru": "Исправлена тяжелая ошибка в ClosedAPI",
75
- "pt": "Erro grave fixo em ClosedAPI",
76
- "nl": "Een ernstige fout in ClosedAPI",
77
- "fr": "Erreur sévère fixe dans le fichier FerméAPI",
78
- "it": "Risolto grave errore in ClosedAPI",
79
- "es": "Error severo corregido en CerradaAPI",
80
- "pl": "Szczegółowy błąd w ClosedAPI",
81
- "uk": "Виправлено тяжку помилку в ClosedAPI",
82
- "zh-cn": "A. 近似严重错误"
83
- },
84
- "1.2.0": {
85
- "en": "Added additional realtime attributes for OpenAPI",
86
- "de": "Zusätzliche Echtzeit-Attribute für OpenAPI hinzugefügt",
87
- "ru": "Добавлены дополнительные атрибуты в реальном времени для OpenAPI",
88
- "pt": "Adicionado atributos em tempo real adicionais para OpenAPI",
89
- "nl": "Toegevoegd aanvullingen voor OpenAPI",
90
- "fr": "Ajout d'autres attributs en temps réel pour OpenAPI",
91
- "it": "Aggiunto attributi in tempo reale aggiuntivi per OpenAPI",
92
- "es": "Atributos adicionales en tiempo real para OpenAPI",
93
- "pl": "Dodać dodatkowe atrybuty dla OpenAPI",
94
- "uk": "Додано додаткові атрибути в режимі реального часу для OpenAPI",
95
- "zh-cn": "增加开放协会实时归属"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/main.js CHANGED
@@ -651,7 +651,7 @@ class OpenAPI {
651
651
  return res;
652
652
  }
653
653
  catch (e) {
654
- this.adapter.log.error('Error prforming get request ' + path + ': ' + e);
654
+ this.adapter.log.debug('Error performing get request ' + path + ': ' + e);
655
655
  return this.emptyBody;
656
656
  }
657
657
  }
@@ -676,7 +676,7 @@ class OpenAPI {
676
676
  return res;
677
677
  }
678
678
  catch (e) {
679
- this.adapter.log.error('Error prforming post request ' + path + ': ' + e);
679
+ this.adapter.log.error('Error performing post request ' + path + ': ' + e);
680
680
  return this.emptyBody;
681
681
  }
682
682
  }
@@ -1010,25 +1010,25 @@ class OpenAPI {
1010
1010
  if (res.data && res.data.code && res.data.code != 0) {
1011
1011
  this.adapter.log.error(`Alpha ESS Api returns an error! Group: ${group}`);
1012
1012
  switch (res.data.code) {
1013
- case 6001: this.adapter.log.info(`Error code: ${res.data.code} - Parameter error (#${this.adapter.errorCount})`); break;
1014
- case 6002: this.adapter.log.info(`Error code: ${res.data.code} - The SN is not bound to the user (#${this.adapter.errorCount})`); break;
1015
- case 6003: this.adapter.log.info(`Error code: ${res.data.code} - You have bound this SN (#${this.adapter.errorCount})`); break;
1016
- case 6004: this.adapter.log.info(`Error code: ${res.data.code} - CheckCode error (#${this.adapter.errorCount})`); break;
1017
- case 6005: this.adapter.log.info(`Error code: ${res.data.code} - This appId is not bound to the SN (#${this.adapter.errorCount})`); break;
1018
- case 6006: this.adapter.log.info(`Error code: ${res.data.code} - Timestamp error (#${this.adapter.errorCount})`); break;
1019
- case 6007: this.adapter.log.info(`Error code: ${res.data.code} - Sign verification error (#${this.adapter.errorCount})`); break;
1020
- case 6008: this.adapter.log.info(`Error code: ${res.data.code} - Set failed (#${this.adapter.errorCount})`); break;
1021
- case 6009: this.adapter.log.info(`Error code: ${res.data.code} - Whitelist verification failed (#${this.adapter.errorCount})`); break;
1022
- case 6010: this.adapter.log.info(`Error code: ${res.data.code} - Sign is empty (#${this.adapter.errorCount})`); break;
1023
- case 6011: this.adapter.log.info(`Error code: ${res.data.code} - timestamp is empty (#${this.adapter.errorCount})`); break;
1024
- case 6012: this.adapter.log.info(`Error code: ${res.data.code} - AppId is empty (#${this.adapter.errorCount})`); break;
1025
- case 6016: this.adapter.log.info(`Error code: ${res.data.code} - Data does not exist or has been deleted (#${this.adapter.errorCount})`); break;
1026
- case 6026: this.adapter.log.info(`Error code: ${res.data.code} - Internal Error (#${this.adapter.errorCount})`); break;
1027
- case 6029: this.adapter.log.info(`Error code: ${res.data.code} - operation failed (#${this.adapter.errorCount})`); break;
1028
- case 6038: this.adapter.log.info(`Error code: ${res.data.code} - system sn does not exist (#${this.adapter.errorCount})`); break;
1029
- case 6042: this.adapter.log.info(`Error code: ${res.data.code} - system offline (#${this.adapter.errorCount})`); break;
1030
- case 6046: this.adapter.log.info(`Error code: ${res.data.code} - Verification code error (#${this.adapter.errorCount})`); break;
1031
- case 6053: this.adapter.log.info(`Error code: ${res.data.code} - The request was too fast, please try again later (#${this.adapter.errorCount})`); break;
1013
+ case 6001: this.adapter.log.error(`Error code: ${res.data.code} - Parameter error (#${this.adapter.errorCount})`); break;
1014
+ case 6002: this.adapter.log.error(`Error code: ${res.data.code} - The SN is not bound to the user (#${this.adapter.errorCount})`); break;
1015
+ case 6003: this.adapter.log.error(`Error code: ${res.data.code} - You have bound this SN (#${this.adapter.errorCount})`); break;
1016
+ case 6004: this.adapter.log.error(`Error code: ${res.data.code} - CheckCode error (#${this.adapter.errorCount})`); break;
1017
+ case 6005: this.adapter.log.error(`Error code: ${res.data.code} - This appId is not bound to the SN (#${this.adapter.errorCount})`); break;
1018
+ case 6006: this.adapter.log.error(`Error code: ${res.data.code} - Timestamp error (#${this.adapter.errorCount})`); break;
1019
+ case 6007: this.adapter.log.error(`Error code: ${res.data.code} - Sign verification error (#${this.adapter.errorCount})`); break;
1020
+ case 6008: this.adapter.log.error(`Error code: ${res.data.code} - Set failed (#${this.adapter.errorCount})`); break;
1021
+ case 6009: this.adapter.log.error(`Error code: ${res.data.code} - Whitelist verification failed (#${this.adapter.errorCount})`); break;
1022
+ case 6010: this.adapter.log.error(`Error code: ${res.data.code} - Sign is empty (#${this.adapter.errorCount})`); break;
1023
+ case 6011: this.adapter.log.error(`Error code: ${res.data.code} - timestamp is empty (#${this.adapter.errorCount})`); break;
1024
+ case 6012: this.adapter.log.error(`Error code: ${res.data.code} - AppId is empty (#${this.adapter.errorCount})`); break;
1025
+ case 6016: this.adapter.log.error(`Error code: ${res.data.code} - Data does not exist or has been deleted (#${this.adapter.errorCount})`); break;
1026
+ case 6026: this.adapter.log.error(`Error code: ${res.data.code} - Internal Error (#${this.adapter.errorCount})`); break;
1027
+ case 6029: this.adapter.log.error(`Error code: ${res.data.code} - operation failed (#${this.adapter.errorCount})`); break;
1028
+ case 6038: this.adapter.log.error(`Error code: ${res.data.code} - system sn does not exist (#${this.adapter.errorCount})`); break;
1029
+ case 6042: this.adapter.log.error(`Error code: ${res.data.code} - system offline (#${this.adapter.errorCount})`); break;
1030
+ case 6046: this.adapter.log.error(`Error code: ${res.data.code} - Verification code error (#${this.adapter.errorCount})`); break;
1031
+ case 6053: this.adapter.log.error(`Error code: ${res.data.code} - The request was too fast, please try again later (#${this.adapter.errorCount})`); break;
1032
1032
  default: this.adapter.log.info(`Error code: ${res.data.code} - Unknown error (#${this.adapter.errorCount})`);
1033
1033
  }
1034
1034
  if (res.data.code == 6002 ||
@@ -1042,11 +1042,12 @@ class OpenAPI {
1042
1042
  this.adapter.log.error(' Adapter won\'t try again to fetch any data.');
1043
1043
  this.adapter.wrongCredentials = true;
1044
1044
  }
1045
+ await this.adapter.setQualityForGroup(group, 0x44);
1045
1046
  }
1046
1047
  else {
1047
- this.adapter.log.error(`Unknown error occurred: ${JSON.stringify(res.data)} (#${this.adapter.errorCount}) Group:${group}`);
1048
+ this.adapter.log.debug(`Unknown error occurred: ${JSON.stringify(res.data)} (#${this.adapter.errorCount}) Group:${group}`);
1049
+ await this.adapter.setQualityForGroup(group, 0x2);
1048
1050
  }
1049
- await this.adapter.setQualityForGroup(group, 0x44);
1050
1051
  }
1051
1052
  }
1052
1053
 
@@ -1591,7 +1592,7 @@ class AlphaEss extends utils.Adapter {
1591
1592
  await this.setStateChangedAsync(group + '.' + this.osn(stateInfo.id), { val: tvalue, q: 0 }, true);
1592
1593
  }
1593
1594
  stateInfo.lastUpdateTs = Date.now();
1594
- this.log.debug('Received object ' + group + '.' + this.osn(stateInfo.alphaAttrName) + ' with value ' + rawValue);
1595
+ this.log.silly('Received object ' + group + '.' + this.osn(stateInfo.alphaAttrName) + ' with value ' + rawValue);
1595
1596
  }
1596
1597
  }
1597
1598
 
@@ -1749,7 +1750,7 @@ class AlphaEss extends utils.Adapter {
1749
1750
  }
1750
1751
  else {
1751
1752
  if (timeInS < 300000) { // 5 minutes
1752
- this.log.warn(txt + ': Five or more errors occurred, next request in 5 minutes.');
1753
+ this.log.error(txt + ': Five or more errors occurred, next request in 5 minutes.');
1753
1754
  return 300000;
1754
1755
  }
1755
1756
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.alpha-ess",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Read and write data from and to Alpha ESS systems.",
5
5
  "author": {
6
6
  "name": "Gaspode",