iobroker.senec 1.6.6 → 1.6.7

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
@@ -293,6 +293,9 @@ This channel contains values polled from SENEC App-API.
293
293
 
294
294
 
295
295
  ## Changelog
296
+ ### 1.6.7 (NoBl)
297
+ * Added option to turn off local polling.
298
+
296
299
  ### 1.6.6 (NoBl)
297
300
  * Node 16 required
298
301
  * Bugfixes
@@ -18,6 +18,40 @@
18
18
  "zh-cn": "一般环境"
19
19
  },
20
20
  "items": {
21
+ "lala_use": {
22
+ "type": "checkbox",
23
+ "sm": 12,
24
+ "md": 6,
25
+ "lg": 6,
26
+ "label": {
27
+ "en": "Connect via lala.cgi?",
28
+ "de": "Verbinden über lala.cgi?",
29
+ "ru": "Подключитесь через lala.cgi?",
30
+ "pt": "Ligar via lala.cgi?",
31
+ "nl": "Connecteren via lala.cgi?",
32
+ "fr": "Connectez-vous via lala.cgi?",
33
+ "it": "Collegare via lala.cgi?",
34
+ "es": "¿Conectar vía lala.cgi?",
35
+ "pl": "Połączenie przez lala.cgi?",
36
+ "uk": "Підключення через lala.cgi?",
37
+ "zh-cn": "陪审团?"
38
+ },
39
+ "help": {
40
+ "en": "Connect to SENEC appliance via local network. This requires access to local monitoring.",
41
+ "de": "Verbindung zum SENEC Gerät wird über lokales Netzwerk hergestellt. Dies erfordert den Zugang zur lokalen Überwachung.",
42
+ "ru": "Подключитесь к SENEC Appliance через местную сеть. Это требует доступа к местному мониторингу.",
43
+ "pt": "Conecte-se ao aparelho SENEC via rede local. Isso requer acesso ao monitoramento local.",
44
+ "nl": "Verbinding met SENEC appliance via het lokale netwerk. Dit vereist toegang tot de lokale monitoring.",
45
+ "fr": "Connectez-vous à l'appareil SENEC via le réseau local. Cela nécessite l'accès à la surveillance locale.",
46
+ "it": "Collegare l'apparecchio SENEC tramite rete locale. Ciò richiede l'accesso al monitoraggio locale.",
47
+ "es": "Conéctese a SENEC appliance vía red local. Esto requiere acceso a la vigilancia local.",
48
+ "pl": "Złącza się do SENEC poprzez lokalną sieć. Potrzebuje to dostęp do monitorowania miejscowego.",
49
+ "uk": "Підключення до додатку SENEC через локальну мережу. Це вимагає доступу до локального моніторингу.",
50
+ "zh-cn": "通过当地网络,与SENEC的观察站一致。 这需要获得地方监测。."
51
+ },
52
+ "default": true,
53
+ "newLine": true
54
+ },
21
55
  "senecip": {
22
56
  "type": "text",
23
57
  "sm": 12,
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "senec",
4
- "version": "1.6.6",
4
+ "version": "1.6.7",
5
5
  "news": {
6
+ "1.6.7": {
7
+ "en": "Added option to turn off local polling.",
8
+ "de": "Option hinzugefügt, um die lokale Abfrage der Appliance abzuschalten.",
9
+ "ru": "Добавлена возможность отключить локальный опрос.",
10
+ "pt": "Opção adicionada para desligar a sondagem local.",
11
+ "nl": "Toegevoegd optie om lokale peilingen uit te zetten.",
12
+ "fr": "Ajout de l'option pour désactiver le vote local.",
13
+ "it": "Aggiunta opzione per spegnere polling locale.",
14
+ "es": "Se agregó la opción de apagar las encuestas locales.",
15
+ "pl": "Wstępna opcja, aby odwołać lokalną sondę.",
16
+ "uk": "Додана можливість вимкнути локальне опитування.",
17
+ "zh-cn": "增加地方投票的选择。."
18
+ },
6
19
  "1.6.6": {
7
20
  "en": "Node 16 required; Bugfixes; Removed non-existing branches: _calc, Bat1Obj[2-4], Display, Statistic, File; Added branches: CURRENT_IMBALANCE_CONTROL, BMZ_CURRENT_LIMITS, CELL_DEVIATION_ROC, SENEC_IO_OUTPUT, SENEC_IO_INPUT",
8
21
  "de": "Node 16 erforderlich; Bugfixes; Entfernt: _calc, Bat1Obj[2-4,] Display, Statistic, Datei; Hinzugefügt: CURRENT_IMBALANCE_CONTROL, BMZ_CURRENT_LIMITS, CELL_DEVIATION_ROC, SENEC_IO_OUTPUT, SENEC_IO_INPUT",
@@ -199,6 +212,7 @@
199
212
  ]
200
213
  },
201
214
  "native": {
215
+ "lala_use": true,
202
216
  "senecip": "0.0.0.0",
203
217
  "interval": 10,
204
218
  "intervalLow": 60,
package/main.js CHANGED
@@ -23,6 +23,7 @@ const apiSystemsUrl = apiUrl + "/anlagen";
23
23
  const apiKnownSystems = []
24
24
 
25
25
  let apiConnected = false;
26
+ let lalaConnected = false;
26
27
  let apiLoginToken = "";
27
28
  let retry = 0; // retry-counter
28
29
  let retryLowPrio = 0; // retry-counter
@@ -62,14 +63,32 @@ class Senec extends utils.Adapter {
62
63
  this.setState('info.connection', false, true);
63
64
  try {
64
65
  await this.checkConfig();
65
- await this.initPollSettings();
66
- await this.checkConnection();
67
- await this.initSenecAppApi();
68
- if (apiConnected) await this.getApiSystems();
69
- await this.pollSenec(true, 0); // highPrio
70
- await this.pollSenec(false, 0); // lowPrio
71
- if (apiConnected) await this.pollSenecAppApi(0); // App API
72
- this.setState('info.connection', true, true);
66
+ if (this.config.lala_use) {
67
+ this.log.info("Usage of lala.cgi configured.");
68
+ await this.initPollSettings();
69
+ await this.checkConnection();
70
+ if (lalaConnected) {
71
+ await this.pollSenec(true, 0); // highPrio
72
+ await this.pollSenec(false, 0); // lowPrio
73
+ }
74
+ } else {
75
+ this.log.warn("Usage of lala.cgi not configured. Only polling SENEC App API if configured.");
76
+ }
77
+ if (this.config.api_use) {
78
+ this.log.info("Usage of SENEC App API configured.");
79
+ await this.initSenecAppApi();
80
+ if (apiConnected) {
81
+ await this.getApiSystems();
82
+ await this.pollSenecAppApi(0); // App API
83
+ }
84
+ } else {
85
+ this.log.warn("Usage of SENEC App API not configured. Only polling appliance via local network if configured.");
86
+ }
87
+ if (lalaConnected || apiConnected) {
88
+ this.setState('info.connection', true, true);
89
+ } else {
90
+ this.log.error("Neither local connection nor API connection configured. Please check config!");
91
+ }
73
92
  } catch (error) {
74
93
  this.log.error(error);
75
94
  this.setState('info.connection', false, true);
@@ -227,6 +246,7 @@ class Senec extends utils.Adapter {
227
246
  this.log.info('connecting to Senec: ' + url);
228
247
  const body = await this.doGet(url, form, this, this.config.pollingTimeout, true);
229
248
  this.log.info('connected to Senec: ' + url);
249
+ lalaConnected = true;
230
250
  } catch (error) {
231
251
  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.");
232
252
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.senec",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "Senec Home",
5
5
  "author": {
6
6
  "name": "NoBl",