iobroker.alpha-ess 3.0.0 → 4.0.0
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 +9 -7
- package/admin/jsonConfig.json +3 -3
- package/io-package.json +30 -31
- package/main.js +13 -5
- package/package.json +15 -25
package/README.md
CHANGED
|
@@ -20,12 +20,6 @@ https://www.storion4you.de/thread/683
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
### Due to current circumstances, please take note!
|
|
24
|
-
|
|
25
|
-
[Interface restriction announcement](https://github.com/alphaess-developer/alphacloud_open_api/issues/54)
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
23
|
This adapter logs into the web API of [Alpha-ESS](https://www.alphaess.com/) and retrieves information for your Alpha-ESS equipment.\
|
|
30
24
|
Depending on your Alpha-ESS product, it is possible to get realtime data and configuration data for your equipment. Which data points are returned by the API depends on your Alpha-ESS equipment.
|
|
31
25
|
|
|
@@ -62,6 +56,14 @@ How to find SN and Check code for registration is described here: https://github
|
|
|
62
56
|
|
|
63
57
|
## Changelog
|
|
64
58
|
|
|
59
|
+
### 4.0.0 (2025-11-01)
|
|
60
|
+
|
|
61
|
+
- (Gaspode) Update dependencies, Node.js version 20 or later is now required
|
|
62
|
+
|
|
63
|
+
### 3.0.1 (2024-12-22)
|
|
64
|
+
|
|
65
|
+
- (Gaspode) Optimizations of reading pseudo-realtime power data for slow systems
|
|
66
|
+
|
|
65
67
|
### 3.0.0 (2024-12-21)
|
|
66
68
|
|
|
67
69
|
- (Gaspode) **Breaking Change:** Renamed state "Charging_period 1_end" to "Charging_period_1_end"
|
|
@@ -207,7 +209,7 @@ How to find SN and Check code for registration is described here: https://github
|
|
|
207
209
|
|
|
208
210
|
MIT License
|
|
209
211
|
|
|
210
|
-
Copyright (c)
|
|
212
|
+
Copyright (c) 2025 Gaspode <gaspode69@online.de> (**NO SUPPORT VIA EMAIL**)
|
|
211
213
|
|
|
212
214
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
213
215
|
of this software and associated documentation files (the "Software"), to deal
|
package/admin/jsonConfig.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "panel",
|
|
4
4
|
"items": {
|
|
5
5
|
"appID": {
|
|
6
|
-
"xs":
|
|
6
|
+
"xs": 12,
|
|
7
7
|
"sm": 8,
|
|
8
8
|
"md": 4,
|
|
9
9
|
"lg": 3,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"newLine": true
|
|
14
14
|
},
|
|
15
15
|
"appSecret": {
|
|
16
|
-
"xs":
|
|
16
|
+
"xs": 12,
|
|
17
17
|
"sm": 8,
|
|
18
18
|
"md": 4,
|
|
19
19
|
"lg": 3,
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"newLine": true
|
|
24
24
|
},
|
|
25
25
|
"systemId": {
|
|
26
|
-
"xs":
|
|
26
|
+
"xs": 12,
|
|
27
27
|
"sm": 8,
|
|
28
28
|
"md": 4,
|
|
29
29
|
"lg": 3,
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "alpha-ess",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"4.0.0": {
|
|
7
|
+
"en": "Update dependencies, Node.js version 20 or later is now required",
|
|
8
|
+
"de": "Abhängigkeiten aktualisiert, Node.js Version 20 oder höher ist jetzt erforderlich",
|
|
9
|
+
"ru": "Обновление зависимостей, теперь требуется версия Node.js 20 или новее",
|
|
10
|
+
"pt": "Atualizar dependências, agora é necessária a versão 20 ou posterior do Node.js",
|
|
11
|
+
"nl": "Afhankelijkheden bijwerken, Node.js versie 20 of later is nu vereist",
|
|
12
|
+
"fr": "Mise à jour des dépendances, la version 20 ou ultérieure de Node.js est désormais requise",
|
|
13
|
+
"it": "Dipendenze di aggiornamento, ora è richiesta la versione 20 o successiva di Node.js",
|
|
14
|
+
"es": "Actualizar las dependencias, ahora se requiere la versión 20 o posterior de Node.js",
|
|
15
|
+
"pl": "Aktualizuj zależności, wymagana jest teraz wersja Node.js 20 lub nowsza",
|
|
16
|
+
"uk": "Оновлення залежності, ",
|
|
17
|
+
"zh-cn": "更新依赖关系,现在需要 Node.js 20 或更高版本"
|
|
18
|
+
},
|
|
19
|
+
"3.0.1": {
|
|
20
|
+
"en": "Optimizations of reading pseudo-realtime power data for slow systems",
|
|
21
|
+
"de": "Lesen von Pseudo-Realtime-Leistungsdaten für langsame Systeme optimiert",
|
|
22
|
+
"ru": "Оптимизация чтения псевдо-реальных данных питания для медленных систем",
|
|
23
|
+
"pt": "Otimizações de leitura de dados de energia pseudo-realtime para sistemas lentos",
|
|
24
|
+
"nl": "Optimalisaties van het lezen van pseudo-realtime stroomgegevens voor trage systemen",
|
|
25
|
+
"fr": "Optimisation de la lecture des données de puissance pseudo-en temps réel pour les systèmes lents",
|
|
26
|
+
"it": "Ottimizzazione dei dati di potenza pseudo-realtime di lettura per sistemi lenti",
|
|
27
|
+
"es": "Optimizaciones de lectura de datos de energía pseudo-real para sistemas lentos",
|
|
28
|
+
"pl": "Optymalizacja odczytu danych o mocy pseudorealtime dla powolnych systemów",
|
|
29
|
+
"uk": "Оптимізація даних псевдореального часу для повільних систем",
|
|
30
|
+
"zh-cn": "对慢系统读取伪实时功率数据的优化"
|
|
31
|
+
},
|
|
6
32
|
"3.0.0": {
|
|
7
33
|
"en": "**Breaking Change:** Renamed state \"Charging_period 1_end\" to \"Charging_period_1_end\"\nOptimizations in configuration dialog",
|
|
8
34
|
"de": "**Breaking Change:** Zustand \"Charging_period 1_end\" wurde zu \"Charging_period_1_end\" umbenannt\nOptimierungen im Konfigurationsdialog",
|
|
@@ -18,7 +44,7 @@
|
|
|
18
44
|
},
|
|
19
45
|
"2.3.0": {
|
|
20
46
|
"en": "Provides the ability to read pseudo-realtime power data using the API function getTodayPowerBySn. This feature is useful for systems that lack \"realtime data support.\" When activated, data is fetched every 5 minutes and stored in the \"Recent\" folder.",
|
|
21
|
-
"de": "Bietet die Möglichkeit, pseudo-realtime
|
|
47
|
+
"de": "Bietet die Möglichkeit, pseudo-realtime Leistungsdaten mit der API-Funktion getTodayPowerBySn zu lesen. Diese Funktion ist nützlich für Systeme, die keinen \"Realtime Data Support\" haben. Wenn aktiviert, werden alle 5 Minuten Daten gelesen und im Ordner \"Recent\" gespeichert.",
|
|
22
48
|
"ru": "Предоставляет возможность чтения псевдо-в реальном времени данных питания с использованием функции API getTodayPowerBySn. Эта функция полезна для систем, которые не имеют «поддержки данных в реальном времени». При активации данные загружаются каждые 5 минут и хранятся в папке «Recent».",
|
|
23
49
|
"pt": "Fornece a capacidade de ler dados de energia pseudo-realtime usando a função API getTodayPowerBySn. Esse recurso é útil para sistemas que não possuem \"apoio de dados em tempo real\". Quando ativado, os dados são obtidos a cada 5 minutos e armazenados na pasta \"Recente\".",
|
|
24
50
|
"nl": "Biedt de mogelijkheid om pseudo-realtime power data te lezen met behulp van de API-functie krijgenTodayPowerBySn. Deze functie is nuttig voor systemen die geen \"realtime data support\" hebben. Wanneer geactiveerd, worden de gegevens elke 5 minuten opgehaald en opgeslagen in de \"Recent\" map.",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Zoptymalizowany interfejs graficzny dla wszystkich rozdzielczości ekranu (responsible design)",
|
|
68
94
|
"uk": "Оптимізований графічний інтерфейс для всіх дозволів екрану (відповідальний дизайн)",
|
|
69
95
|
"zh-cn": "优化所有屏幕分辨率的图形用户界面(响应设计)"
|
|
70
|
-
},
|
|
71
|
-
"2.1.4": {
|
|
72
|
-
"en": "Updated some formal stuff",
|
|
73
|
-
"de": "Einige Formalien aktualisiert",
|
|
74
|
-
"ru": "Обновление некоторых формальных вещей",
|
|
75
|
-
"pt": "Actualizado algumas coisas formais",
|
|
76
|
-
"nl": "Bijgewerkt wat formele dingen",
|
|
77
|
-
"fr": "Mise à jour de certains trucs formels",
|
|
78
|
-
"it": "Aggiornato alcune cose formali",
|
|
79
|
-
"es": "Actualizado algunas cosas formales",
|
|
80
|
-
"pl": "Aktualizacja niektórych formalnych rzeczy",
|
|
81
|
-
"uk": "Оновлено деякі формальні речі",
|
|
82
|
-
"zh-cn": "更新了一些正式的东西"
|
|
83
|
-
},
|
|
84
|
-
"2.1.3": {
|
|
85
|
-
"en": "Increased read timeout from 10s to 20s",
|
|
86
|
-
"de": "Read Timeout von 10 auf 20 Sekunden erhöht",
|
|
87
|
-
"ru": "Увеличение времени чтения с 10 до 20 с",
|
|
88
|
-
"pt": "Aumento do tempo de leitura de 10 a 20 s",
|
|
89
|
-
"nl": "Verhoogde leestijd van 10 tot 20 s",
|
|
90
|
-
"fr": "Augmentation du temps de lecture de 10 à 20 s",
|
|
91
|
-
"it": "Tempo di lettura aumentato da 10 a 20 s",
|
|
92
|
-
"es": "Mayor tiempo de lectura de 10 a 20 s",
|
|
93
|
-
"pl": "Zwiększony czas odczytu od 10 do 20 s",
|
|
94
|
-
"uk": "Підвищений час читання від 10 до 20 с",
|
|
95
|
-
"zh-cn": "阅读超时从10秒增加到20秒"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
],
|
|
155
155
|
"globalDependencies": [
|
|
156
156
|
{
|
|
157
|
-
"admin": ">=
|
|
157
|
+
"admin": ">=7.4.10"
|
|
158
158
|
}
|
|
159
159
|
]
|
|
160
160
|
},
|
|
@@ -162,12 +162,11 @@
|
|
|
162
162
|
"appSecret"
|
|
163
163
|
],
|
|
164
164
|
"protectedNative": [
|
|
165
|
-
"username",
|
|
166
|
-
"appID",
|
|
167
165
|
"appSecret"
|
|
168
166
|
],
|
|
169
167
|
"native": {
|
|
170
168
|
"apiType": 1,
|
|
169
|
+
"username": "",
|
|
171
170
|
"appID": "",
|
|
172
171
|
"appSecret": "",
|
|
173
172
|
"systemId": "",
|
package/main.js
CHANGED
|
@@ -279,6 +279,14 @@ class OpenAPI {
|
|
|
279
279
|
type: 'string',
|
|
280
280
|
unit: null,
|
|
281
281
|
},
|
|
282
|
+
{
|
|
283
|
+
alphaAttrName: 'uploadTime',
|
|
284
|
+
role: 'text',
|
|
285
|
+
id: 'Upload_time',
|
|
286
|
+
name: 'Upload time to Alpha ESS Cloud',
|
|
287
|
+
type: 'string',
|
|
288
|
+
unit: null,
|
|
289
|
+
},
|
|
282
290
|
],
|
|
283
291
|
},
|
|
284
292
|
{
|
|
@@ -875,8 +883,8 @@ class OpenAPI {
|
|
|
875
883
|
});
|
|
876
884
|
if (latestEntry.uploadTime != null) {
|
|
877
885
|
const deliveredTs = new Date(latestEntry.uploadTime.replace(' ', 'T')).getTime();
|
|
878
|
-
if (Date.now() - deliveredTs <
|
|
879
|
-
// ensure that the data is not older than
|
|
886
|
+
if (Date.now() - deliveredTs < 600000) {
|
|
887
|
+
// ensure that the data is not older than 10 minutes
|
|
880
888
|
await this.adapter.createAndUpdateStates(group, latestEntry);
|
|
881
889
|
} else {
|
|
882
890
|
this.adapter.log.error(
|
|
@@ -1414,7 +1422,7 @@ class AlphaEss extends utils.Adapter {
|
|
|
1414
1422
|
const groupInfo = this.getStateInfoList()[gidx];
|
|
1415
1423
|
|
|
1416
1424
|
if (groupInfo.isSchedule) {
|
|
1417
|
-
groupInfo.interval =
|
|
1425
|
+
groupInfo.interval = 600; // 10 Minutes, used for watchdog only
|
|
1418
1426
|
} else {
|
|
1419
1427
|
groupInfo.interval = this.config[groupInfo.intervalName] * groupInfo.intervalFactor;
|
|
1420
1428
|
this.log.debug(`${groupInfo.intervalName}: ${groupInfo.interval}`);
|
|
@@ -2058,7 +2066,7 @@ class AlphaEss extends utils.Adapter {
|
|
|
2058
2066
|
*/
|
|
2059
2067
|
calculateIntervalInMs(timeInS, groupInfo) {
|
|
2060
2068
|
if (groupInfo.isSchedule) {
|
|
2061
|
-
// In this case we calculate the seconds until the next full 5 minutes plus
|
|
2069
|
+
// In this case we calculate the seconds until the next full 5 minutes plus 50 seconds
|
|
2062
2070
|
const now = new Date();
|
|
2063
2071
|
const minutes = now.getMinutes();
|
|
2064
2072
|
const seconds = now.getSeconds();
|
|
@@ -2066,7 +2074,7 @@ class AlphaEss extends utils.Adapter {
|
|
|
2066
2074
|
const remainingMinutes = nextFullFiveMinute - minutes - 1;
|
|
2067
2075
|
const remainingSeconds = 60 - seconds;
|
|
2068
2076
|
|
|
2069
|
-
timeInS = remainingMinutes * 60 + remainingSeconds +
|
|
2077
|
+
timeInS = remainingMinutes * 60 + remainingSeconds + 50;
|
|
2070
2078
|
} else {
|
|
2071
2079
|
if (this.errorCount < 5) {
|
|
2072
2080
|
return timeInS * 1000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.alpha-ess",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Read and write data from and to Alpha ESS systems.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Gaspode",
|
|
@@ -18,37 +18,27 @@
|
|
|
18
18
|
"url": "https://github.com/Gaspode69/ioBroker.alpha-ess.git"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">= 20"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@iobroker/adapter-core": "^3.
|
|
25
|
-
"axios": "^1.
|
|
24
|
+
"@iobroker/adapter-core": "^3.3.2",
|
|
25
|
+
"axios": "^1.11.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@alcalzone/release-script": "^
|
|
29
|
-
"@alcalzone/release-script-plugin-iobroker": "^
|
|
30
|
-
"@alcalzone/release-script-plugin-license": "^
|
|
31
|
-
"@alcalzone/release-script-plugin-manual-review": "^
|
|
32
|
-
"@iobroker/adapter-dev": "^1.
|
|
33
|
-
"@iobroker/dev-server": "^0.
|
|
34
|
-
"@iobroker/eslint-config": "^
|
|
35
|
-
"@iobroker/testing": "^5.
|
|
36
|
-
"@tsconfig/node14": "^14.1.
|
|
28
|
+
"@alcalzone/release-script": "^5.0.0",
|
|
29
|
+
"@alcalzone/release-script-plugin-iobroker": "^4.0.0",
|
|
30
|
+
"@alcalzone/release-script-plugin-license": "^4.0.0",
|
|
31
|
+
"@alcalzone/release-script-plugin-manual-review": "^4.0.0",
|
|
32
|
+
"@iobroker/adapter-dev": "^1.5.0",
|
|
33
|
+
"@iobroker/dev-server": "^0.8.0",
|
|
34
|
+
"@iobroker/eslint-config": "^2.0.2",
|
|
35
|
+
"@iobroker/testing": "^5.1.1",
|
|
36
|
+
"@tsconfig/node14": "^14.1.5",
|
|
37
37
|
"@tsconfig/node18": "^18.2.4",
|
|
38
|
-
"@types/
|
|
39
|
-
"@types/chai-as-promised": "^7.1.8",
|
|
40
|
-
"@types/mocha": "^10.0.9",
|
|
41
|
-
"@types/node": "^22.10.1",
|
|
38
|
+
"@types/node": "^24.9.2",
|
|
42
39
|
"@types/proxyquire": "^1.3.31",
|
|
43
|
-
"@types/sinon": "^17.0.3",
|
|
44
|
-
"@types/sinon-chai": "^3.2.12",
|
|
45
|
-
"chai": "^4.5.0",
|
|
46
|
-
"chai-as-promised": "^7.1.2",
|
|
47
|
-
"mocha": "^10.8.2",
|
|
48
40
|
"proxyquire": "^2.1.3",
|
|
49
|
-
"
|
|
50
|
-
"sinon-chai": "^3.7.0",
|
|
51
|
-
"typescript": "~5.6.3"
|
|
41
|
+
"typescript": "~5.8.3"
|
|
52
42
|
},
|
|
53
43
|
"main": "main.js",
|
|
54
44
|
"files": [
|