iobroker.senec 1.4.1 → 1.4.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 +3 -0
- package/admin/jsonConfig.json +31 -0
- package/io-package.json +16 -2
- package/main.js +12 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -366,6 +366,9 @@ This channel contains calculated values. Currently these are day/week/month/year
|
|
|
366
366
|
*Read-only number, which designates the number of wallbox [0..3]. This is only available on systems with configured wallboxes.*
|
|
367
367
|
|
|
368
368
|
## Changelog
|
|
369
|
+
### 1.4.2 (NoBl)
|
|
370
|
+
* Added option to use https for connecting to SENEC (only activate if your appliance supports / requires this!)
|
|
371
|
+
|
|
369
372
|
### 1.4.1 (NoBl)
|
|
370
373
|
* Fix: Autarky calculations are working again.
|
|
371
374
|
|
package/admin/jsonConfig.json
CHANGED
|
@@ -33,6 +33,37 @@
|
|
|
33
33
|
"default": "0.0.0.0",
|
|
34
34
|
"newLine": true
|
|
35
35
|
},
|
|
36
|
+
"useHttps": {
|
|
37
|
+
"type": "checkbox",
|
|
38
|
+
"label": {
|
|
39
|
+
"en": "Use https?",
|
|
40
|
+
"de": "https verwenden?",
|
|
41
|
+
"ru": "Используйте https?",
|
|
42
|
+
"pt": "Usar https?",
|
|
43
|
+
"nl": "HTP's gebruiken?",
|
|
44
|
+
"fr": "Utiliser des https ?",
|
|
45
|
+
"it": "Utilizzare https?",
|
|
46
|
+
"es": "¿Usar https?",
|
|
47
|
+
"pl": "Użycie https?",
|
|
48
|
+
"uk": "Використовуйте HTTPS?",
|
|
49
|
+
"zh-cn": "使用网址?"
|
|
50
|
+
},
|
|
51
|
+
"help": {
|
|
52
|
+
"en": "Is https required to connect to SENEC? Only check if SENEC supports https already!",
|
|
53
|
+
"de": "Ist https erforderlich, um mit SENEC zu verbinden? Nur aktivieren, falls SENEC bereits https unterstützt!",
|
|
54
|
+
"ru": "Необходимо ли подключиться к SENEC? Только проверьте, поддерживает ли SENEC https уже!",
|
|
55
|
+
"pt": "São necessários https para se conectar ao SENEC? Basta verificar se o SENEC suporta https já!",
|
|
56
|
+
"nl": "Is HTP's nodig om te verbinden met SENEC? Controleer of SENEC al HTP's steunt!",
|
|
57
|
+
"fr": "Les https sont-ils nécessaires pour se connecter à SENEC? Vérifiez seulement si SENEC prend déjà en charge https!",
|
|
58
|
+
"it": "Https è necessario connettersi a SENEC? Controlla solo se SENEC supporta già https!",
|
|
59
|
+
"es": "¿Se requiere https para conectarse a SENEC? ¡Sólo comprueba si SENEC admite https ya!",
|
|
60
|
+
"pl": "Czy https musi łączyć się z SENEC? Jeśli SENEC obsługuje https już!",
|
|
61
|
+
"uk": "Чи потрібен HTTPS для підключення до SENEC? Тільки перевірте, чи підтримує SENEC HTTPS вже!",
|
|
62
|
+
"zh-cn": "是否需要与ENEC联系? 只有检查有无国界协会支持已经!"
|
|
63
|
+
},
|
|
64
|
+
"default": false,
|
|
65
|
+
"newLine": false
|
|
66
|
+
},
|
|
36
67
|
"interval": {
|
|
37
68
|
"type": "number",
|
|
38
69
|
"label": {
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "senec",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.2",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.4.2": {
|
|
7
|
+
"en": "Added option to use https for connecting to SENEC (only activate if your appliance supports / requires this!)",
|
|
8
|
+
"de": "Zusätzliche Option zur Verwendung von https zur Verbindung mit SENEC hinzugefügt (nur aktivieren, wenn Ihr Gerät dies unterstützt / erfordert)",
|
|
9
|
+
"ru": "Добавлена возможность использования https для подключения к SENEC (только активируйте, если ваше приложение поддерживает / требует этого)",
|
|
10
|
+
"pt": "Adicionado opção para usar https para conectar-se ao SENEC (apenas ativar se o seu aparelho suporta / requer este)",
|
|
11
|
+
"nl": "Aangepaste optie om HTP's te gebruiken voor verbinding met SENEC (only geactiveerd als je appliance steunt / vereist dit",
|
|
12
|
+
"fr": "Ajout de l'option d'utiliser les https pour se connecter à SENEC (seulement activer si votre appareil prend en charge / nécessite ceci) ",
|
|
13
|
+
"it": "Aggiunta opzione per utilizzare https per il collegamento a SENEC (solo attivare se il tuo elettrodomestici supporta / richiede questo)",
|
|
14
|
+
"es": "Opción agregada para usar https para conectarse a SENEC (sólo activar si su dispositivo soporta / requiere esto)",
|
|
15
|
+
"pl": "Dodana opcja do używania https dla połączenia z SENEC (w sposób aktywowana, jeśli dana osoba obsługuje / wymaga to)",
|
|
16
|
+
"uk": "Додано можливість використовувати HTTPS для підключення до SENEC (тільки активуйте, якщо підтримує додаток / вимагає цього)",
|
|
17
|
+
"zh-cn": "增加使用连接到SENEC的网站的选择(如果你的可靠支持/要求这样做)"
|
|
18
|
+
},
|
|
6
19
|
"1.4.1": {
|
|
7
20
|
"en": "Autarky calculations are working again.",
|
|
8
21
|
"de": "Autarkieberechnungen funktionieren wieder.",
|
|
@@ -126,7 +139,8 @@
|
|
|
126
139
|
"intervalLow": 60,
|
|
127
140
|
"pollingTimeout": 5000,
|
|
128
141
|
"retries": 10,
|
|
129
|
-
"retrymultiplier": 2
|
|
142
|
+
"retrymultiplier": 2,
|
|
143
|
+
"useHttps": false
|
|
130
144
|
},
|
|
131
145
|
"objects": [],
|
|
132
146
|
"instanceObjects": [{
|
package/main.js
CHANGED
|
@@ -7,6 +7,7 @@ const state_trans = require(__dirname + '/lib/state_trans.js');
|
|
|
7
7
|
|
|
8
8
|
let retry = 0; // retry-counter
|
|
9
9
|
let retryLowPrio = 0; // retry-counter
|
|
10
|
+
let connectVia = "http://";
|
|
10
11
|
|
|
11
12
|
let unloaded = false;
|
|
12
13
|
|
|
@@ -96,21 +97,26 @@ class Senec extends utils.Adapter {
|
|
|
96
97
|
this.log.warn("(checkConf) Config retry multiplier " + this.config.retrymultiplier + " not [1..10] seconds. Using default: 2");
|
|
97
98
|
this.config.retrymultiplier = 2;
|
|
98
99
|
}
|
|
100
|
+
this.log.debug("(checkConf) Configured https-usage: " + this.config.useHttps);
|
|
101
|
+
if (this.config.useHttps) {
|
|
102
|
+
connectVia = "https://";
|
|
103
|
+
this.log.debug("(checkConf) Switching to https ... " + this.config.useHttps);
|
|
104
|
+
}
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
/**
|
|
102
108
|
* checks connection to senec service
|
|
103
109
|
*/
|
|
104
110
|
async checkConnection() {
|
|
105
|
-
const url =
|
|
111
|
+
const url = connectVia + this.config.senecip + '/lala.cgi';
|
|
106
112
|
const form = '{"ENERGY":{"STAT_STATE":""}}';
|
|
107
113
|
try {
|
|
108
|
-
this.log.info('connecting to Senec: ' +
|
|
114
|
+
this.log.info('connecting to Senec: ' + url);
|
|
109
115
|
const body = await this.doGet(url, form, this, this.config.pollingTimeout);
|
|
110
|
-
this.log.info('connected to Senec: ' +
|
|
116
|
+
this.log.info('connected to Senec: ' + url);
|
|
111
117
|
this.setState('info.connection', true, true);
|
|
112
118
|
} catch (error) {
|
|
113
|
-
throw new Error("Error connecting to Senec (IP: " + this.config.senecip + "). Exiting! (" + error + ")");
|
|
119
|
+
throw new Error("Error connecting to Senec (IP: " + connectVia + this.config.senecip + "). Exiting! (" + error + "). Try to toggle https-mode in settings and check FQDN of SENEC appliance.");
|
|
114
120
|
}
|
|
115
121
|
}
|
|
116
122
|
|
|
@@ -168,7 +174,7 @@ class Senec extends utils.Adapter {
|
|
|
168
174
|
// "PM1OBJ1":{"FREQ":"","U_AC":"","I_AC":"","P_AC":"","P_TOTAL":""},"PM1OBJ2":{"FREQ":"","U_AC":"","I_AC":"","P_AC":"","P_TOTAL":""}
|
|
169
175
|
// "ENERGY":{"STAT_HOURS_OF_OPERATION":"","STAT_DAYS_SINCE_MAINT":"","GUI_BAT_DATA_POWER":"","GUI_BAT_DATA_VOLTAGE":"","GUI_BAT_DATA_CURRENT":"","GUI_BAT_DATA_FUEL_CHARGE":"","GUI_BAT_DATA_OA_CHARGING":"","STAT_SULFAT_CHRG_COUNTER":"","STAT_LIMITED_NET_SKEW":"","STAT_LIMITED_NO_STAND_BY":"","GUI_CAP_TEST_DIS_COUNT":"","GUI_SCHARGE_REMAIN":"","GUI_SCHARGE_ELAPSED":"","GUI_CHARGING_INFO":"","OFFPEAK_DURATION":"","OFFPEAK_RUNNING":"","OFFPEAK_CURRENT":"","OFFPEAK_TARGET":""},"SYS_UPDATE":{"NPU_VER":"","NPU_IMAGE_VERSION":""}}
|
|
170
176
|
|
|
171
|
-
const url =
|
|
177
|
+
const url = connectVia + this.config.senecip + '/lala.cgi';
|
|
172
178
|
var form = '{';
|
|
173
179
|
form += '"BMS":{"CELL_TEMPERATURES_MODULE_A":"","CELL_TEMPERATURES_MODULE_B":"","CELL_TEMPERATURES_MODULE_C":"","CELL_TEMPERATURES_MODULE_D":"","CELL_VOLTAGES_MODULE_A":"","CELL_VOLTAGES_MODULE_B":"","CELL_VOLTAGES_MODULE_C":"","CELL_VOLTAGES_MODULE_D":"","CURRENT":"","SOC":"","SYSTEM_SOC":"","TEMP_MAX":"","TEMP_MIN":"","VOLTAGE":""}';
|
|
174
180
|
form += ',"ENERGY":{"STAT_STATE":"","GUI_BAT_DATA_POWER":"","GUI_INVERTER_POWER":"","GUI_HOUSE_POW":"","GUI_GRID_POW":"","GUI_BAT_DATA_FUEL_CHARGE":"","GUI_CHARGING_INFO":"","GUI_BOOSTING_INFO":"","GUI_BAT_DATA_POWER":"","GUI_BAT_DATA_VOLTAGE":"","GUI_BAT_DATA_CURRENT":"","GUI_BAT_DATA_FUEL_CHARGE":"","GUI_BAT_DATA_OA_CHARGING":"","STAT_LIMITED_NET_SKEW":""}';
|
|
@@ -214,7 +220,7 @@ class Senec extends utils.Adapter {
|
|
|
214
220
|
this.log.info('LowPrio polling ...');
|
|
215
221
|
// we are polling all known objects ...
|
|
216
222
|
|
|
217
|
-
const url =
|
|
223
|
+
const url = connectVia + this.config.senecip + '/lala.cgi';
|
|
218
224
|
const form = '{"STATISTIC":{},"ENERGY":{},"FEATURES":{},"LOG":{},"SYS_UPDATE":{},"WIZARD":{},"BMS":{},"BAT1":{},"BAT1OBJ1":{},"BAT1OBJ2":{},"BAT1OBJ2":{},"BAT1OBJ3":{},"BAT1OBJ4":{},"PWR_UNIT":{},"PM1OBJ1":{},"PM1OBJ2":{},"PV1":{},"FACTORY":{},"GRIDCONFIG":{},"EG_CONTROL":{},"RTC":{},"PM1":{},"TEMPMEASURE":{},"DEBUG":{},"SOCKETS":{},"CASC":{},"WALLBOX":{},"CONNX50":{},"STECA":{}}';
|
|
219
225
|
|
|
220
226
|
try {
|