iobroker.sigenergy 3.0.3 → 3.0.6

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
@@ -245,6 +245,15 @@ Status and power readings for the DC charger.
245
245
 
246
246
  ## Changelog
247
247
 
248
+ ### 3.0.6 (2026-06-14)
249
+ - (ssbingo) fix: remove duplicate common.license field — licenseInformation already present
250
+
251
+ ### 3.0.5 (2026-06-14)
252
+ - (ssbingo) fix: add missing license field to io-package.json common block
253
+
254
+ ### 3.0.4 (2026-06-14)
255
+ - (ssbingo) fix: emergency Telegram notification now sent only once per grid-failure event (not repeated every poll); device switching limited to 3 attempts max (initial + 2 retries) while off-grid
256
+
248
257
  ### 3.0.3 (2026-06-13)
249
258
  - (ssbingo) fix: remove non-functional welcomeText from io-package.json; add visible warning staticText in Emergency Switching config tab (yellow box, i18n in all 11 languages)
250
259
 
package/io-package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "sigenergy",
4
- "version": "3.0.3",
4
+ "version": "3.0.6",
5
5
  "news": {
6
- "3.0.3": {
7
- "en": "(ssbingo) feat: emergency gateway switching — automatic disconnection of external PV systems on grid failure; configurable stability timer; optional Telegram notifications",
8
- "de": "(ssbingo) Neu: Notabschaltung — automatische Trennung externer PV-Systeme bei Netzausfall; konfigurierbarer Stabilisierungs-Timer; optionale Telegram-Benachrichtigungen",
9
- "ru": "(ssbingo) Новое: аварийное отключение — автоматическое отключение внешних ФЭ-систем при пропадании сети; таймер стабилизации; уведомления Telegram",
10
- "pt": "(ssbingo) Novo: desligamento de emergência — desconexão automática de sistemas PV externos em caso de falha da rede; temporizador de estabilização; notificações Telegram",
11
- "nl": "(ssbingo) Nieuw: nooduitschakeling — automatisch loskoppelen van externe PV-systemen bij netuitval; stabilisatietimer; Telegram-meldingen",
12
- "fr": "(ssbingo) Nouveau : coupure d'urgence — déconnexion automatique des systèmes PV externes lors d'une coupure réseau ; minuterie de stabilisation ; notifications Telegram",
13
- "it": "(ssbingo) Nuovo: disconnessione d'emergenza — scollegamento automatico dei sistemi FV esterni in caso di mancanza di rete; timer di stabilizzazione; notifiche Telegram",
14
- "es": "(ssbingo) Nuevo: desconexión de emergencia — desconexión automática de sistemas FV externos ante fallos de red; temporizador de estabilización; notificaciones Telegram",
15
- "pl": "(ssbingo) Nowe: wyłączenie awaryjne — automatyczne odłączanie zewnętrznych systemów PV przy zaniku sieci; timer stabilizacji; powiadomienia Telegram",
16
- "uk": "(ssbingo) Нове: аварійне відключення — автоматичне відключення зовнішніх ФЕ-систем при зникненні мережі; таймер стабілізації; сповіщення Telegram",
17
- "zh-cn": "(ssbingo) 新功能:紧急断电 — 电网断电时自动断开外部光伏系统;稳定计时器;Telegram 通知"
6
+ "3.0.6": {
7
+ "en": "(ssbingo) fix: remove duplicate common.license field — licenseInformation already present",
8
+ "de": "(ssbingo) fix: doppeltes common.license-Feld entfernt — licenseInformation bereits vorhanden",
9
+ "ru": "(ssbingo) fix: удалено дублирующее поле common.license — licenseInformation уже присутствует",
10
+ "pt": "(ssbingo) fix: campo common.license duplicado removido — licenseInformation já presente",
11
+ "nl": "(ssbingo) fix: dubbel common.license-veld verwijderd — licenseInformation al aanwezig",
12
+ "fr": "(ssbingo) fix: champ common.license en double supprimé — licenseInformation déjà présent",
13
+ "it": "(ssbingo) fix: rimosso il campo common.license duplicato — licenseInformation già presente",
14
+ "es": "(ssbingo) fix: campo common.license duplicado eliminado — licenseInformation ya presente",
15
+ "pl": "(ssbingo) fix: usunięto zduplikowane pole common.license — licenseInformation już obecne",
16
+ "uk": "(ssbingo) fix: видалено дубльоване поле common.license — licenseInformation вже присутнє",
17
+ "zh-cn": "(ssbingo) fix: 删除重复的 common.license 字段 — licenseInformation 已存在"
18
18
  }
19
19
  },
20
20
  "titleLang": {
package/main.js CHANGED
@@ -136,6 +136,7 @@ class Sigenergy extends utils.Adapter {
136
136
  this._protocolDetected = false;
137
137
  this._emergencyWasOffGrid = false;
138
138
  this._emergencyStabilityTimer = null;
139
+ this._emergencySwitchCount = 0;
139
140
  this._protoDetectWarnLogged = false;
140
141
  this._modelVerified = false;
141
142
  this._pvStringCount = 0;
@@ -2175,12 +2176,14 @@ class Sigenergy extends utils.Adapter {
2175
2176
  this.log.info(`[emergency] Initial onOffGridStatus: ${val} (${this._emergencyModeName(val)})`);
2176
2177
  if (isOff) {
2177
2178
  this._emergencyWasOffGrid = true;
2179
+ this._emergencySwitchCount = 1;
2178
2180
  this.log.warn(`[emergency] System already off-grid at start — switching emergency devices`);
2179
2181
  await this._emergencySwitchAll(true);
2180
2182
  await this._emergencySendTelegram(
2181
2183
  `⚠️ Sigenergy — Grid failure\n\nMode: ${this._emergencyModeName(val)}\nEmergency devices switched.\n\n🕐 ${new Date().toLocaleString()}`,
2182
2184
  );
2183
2185
  } else {
2186
+ this._emergencySwitchCount = 0;
2184
2187
  this.log.info('[emergency] System on-grid at start — restoring emergency devices');
2185
2188
  await this._emergencySwitchAll(false);
2186
2189
  }
@@ -2195,17 +2198,29 @@ class Sigenergy extends utils.Adapter {
2195
2198
  const isOff = this._emergencyIsOffGrid(val);
2196
2199
 
2197
2200
  if (isOff) {
2198
- if (!this._emergencyWasOffGrid) {
2201
+ const wasAlreadyOff = this._emergencyWasOffGrid;
2202
+ this._emergencyWasOffGrid = true;
2203
+ this._emergencyCancelTimer();
2204
+ if (!wasAlreadyOff) {
2205
+ // First transition on→off-grid: switch immediately, send Telegram once
2199
2206
  this.log.warn(
2200
2207
  `[emergency] Off-grid detected: ${this._emergencyModeName(val)} — switching emergency devices`,
2201
2208
  );
2209
+ this._emergencySwitchCount = 1;
2210
+ await this._emergencySwitchAll(true);
2211
+ await this._emergencySendTelegram(
2212
+ `⚠️ Sigenergy — Grid failure\n\nMode: ${this._emergencyModeName(val)}\nEmergency devices switched.\n\n🕐 ${new Date().toLocaleString()}`,
2213
+ );
2214
+ } else if (this._emergencySwitchCount < 3) {
2215
+ // Still off-grid on subsequent polls: retry switch, max 2 retries (3 total)
2216
+ this._emergencySwitchCount++;
2217
+ this.log.info(
2218
+ `[emergency] Still off-grid — retry device switch (attempt ${this._emergencySwitchCount}/3)`,
2219
+ );
2220
+ await this._emergencySwitchAll(true);
2221
+ } else {
2222
+ this.log.debug('[emergency] Still off-grid — max switch attempts reached, skipping');
2202
2223
  }
2203
- this._emergencyWasOffGrid = true;
2204
- this._emergencyCancelTimer();
2205
- await this._emergencySwitchAll(true);
2206
- await this._emergencySendTelegram(
2207
- `⚠️ Sigenergy — Grid failure\n\nMode: ${this._emergencyModeName(val)}\nEmergency devices switched.\n\n🕐 ${new Date().toLocaleString()}`,
2208
- );
2209
2224
  } else {
2210
2225
  if (!this._emergencyWasOffGrid) {
2211
2226
  return;
@@ -2225,6 +2240,7 @@ class Sigenergy extends utils.Adapter {
2225
2240
  if (current && !this._emergencyIsOffGrid(current.val)) {
2226
2241
  this.log.info(`[emergency] ${delayMin} min stable — restoring all emergency devices`);
2227
2242
  this._emergencyWasOffGrid = false;
2243
+ this._emergencySwitchCount = 0;
2228
2244
  await this._emergencySwitchAll(false);
2229
2245
  await this._emergencySendTelegram(
2230
2246
  `✅ Sigenergy — Grid stable\n\nGrid has been stable for ${delayMin} minutes.\nAll emergency devices restored.\n\n🕐 ${new Date().toLocaleString()}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.sigenergy",
3
- "version": "3.0.3",
3
+ "version": "3.0.6",
4
4
  "description": "ioBroker adapter for Sigenergy solar energy systems via Modbus TCP/RTU",
5
5
  "author": {
6
6
  "name": "ssbingo",
@@ -37,7 +37,7 @@
37
37
  "@iobroker/eslint-config": "^2.3.4",
38
38
  "@iobroker/testing": "^5.2.2",
39
39
  "@tsconfig/node22": "^22.0.5",
40
- "@types/node": "^22.0.0"
40
+ "@types/node": "^22.19.20"
41
41
  },
42
42
  "main": "main.js",
43
43
  "files": [