iobroker.sigenergy 3.3.0 → 3.3.1
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 +4 -0
- package/io-package.json +14 -1
- package/lib/modbus.js +31 -1
- package/main.js +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -255,6 +255,10 @@ Status and power readings for the DC charger.
|
|
|
255
255
|
|
|
256
256
|
## Changelog
|
|
257
257
|
|
|
258
|
+
### 3.3.1 (2026-09-07)
|
|
259
|
+
- (ssbingo) fix: registers the device marks as not valid are no longer turned into plausible looking measurements. The protocol signals this by setting all bits ("Range:[0, 0xFFFFFFFE]. With value 0xFFFFFFFF, register is not valid.") and a device answers that way for a register that does not currently apply or that its firmware does not implement. The raw sentinel was scaled by the register gain, so it arrived as a reading that looks real: observed on a SigenStor EC 10.0 TP **with** a DC charger installed, `dcCharger.runningState` = 65535 (Appendix 14 only defines 0x00-0x0A), `dcCharger.dischargingCurrent` = 6553.5 A, `dcCharger.currentDischargingCapacity` = 42949672.95 kWh and `dcCharger.currentDischargingDuration` = 4294967295 s, while the neighbouring DC charger registers (rated power, PV generation, totals) returned real values. The same pattern appears outside the DC charger, e.g. `plant.currentCtrlCmdValue` = 655.35 %, `plant.mergedAlarm7` = 65535, `inverter.essMaxBatteryCellVoltage` = 65.535 V and the ESS/PCS/grid limit registers as 4294967.295 kW. Such registers now report no value instead
|
|
260
|
+
- (ssbingo) fix: a register that reports no value no longer feeds the statistics calculation, which keeps the last known good reading instead
|
|
261
|
+
|
|
258
262
|
### 3.3.0 (2026-09-07)
|
|
259
263
|
- (ssbingo) fix: when the device rejects a grouped register read with a Modbus exception, the registers of that group are now read one by one and only the register(s) the device does not implement are excluded from further polling. Previously a single unsupported register silently disabled its whole group for the rest of the adapter runtime, e.g. `dcCharger.runningState` (31513) never received a value when the discharging registers 31514–31518 of the same group were rejected
|
|
260
264
|
- (ssbingo) feat: new state `info.protocolVersion` (number, e.g. `2.9`) next to the textual `info.protocolLevel`, so widgets and scripts can adapt to the detected protocol version without parsing strings
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "sigenergy",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.1",
|
|
5
5
|
"news": {
|
|
6
|
+
"3.3.1": {
|
|
7
|
+
"en": "(ssbingo) fix: registers the device marks as not valid (all bits set, 0xFFFF / 0xFFFFFFFF) are no longer scaled by the register gain into plausible looking measurements — observed as a 6553.5 A discharging current, 42949672.95 kWh and an out-of-range running state 65535 on the DC charger, and as 655.35 % or 65.535 V elsewhere. Such registers now report no value",
|
|
8
|
+
"de": "(ssbingo) fix: Register, die das Gerät als ungültig kennzeichnet (alle Bits gesetzt, 0xFFFF / 0xFFFFFFFF), werden nicht mehr über den Gain in plausibel aussehende Messwerte umgerechnet — sichtbar als 6553,5 A Entladestrom, 42949672,95 kWh und Betriebszustand 65535 beim DC-Charger sowie als 655,35 % oder 65,535 V an anderer Stelle. Solche Register liefern jetzt keinen Wert",
|
|
9
|
+
"ru": "(ssbingo) fix: регистры, помеченные устройством как недействительные (все биты установлены, 0xFFFF / 0xFFFFFFFF), больше не пересчитываются через коэффициент в правдоподобные значения — это проявлялось как ток разряда 6553,5 A, 42949672,95 кВт·ч и состояние 65535 у DC-зарядки, а также как 655,35 % или 65,535 В в других местах. Теперь такие регистры не возвращают значения",
|
|
10
|
+
"pt": "(ssbingo) fix: os registos que o dispositivo marca como inválidos (todos os bits a 1, 0xFFFF / 0xFFFFFFFF) deixam de ser convertidos pelo ganho em medições aparentemente plausíveis — surgiam como 6553,5 A de corrente de descarga, 42949672,95 kWh e o estado 65535 no carregador DC, e como 655,35 % ou 65,535 V noutros pontos. Esses registos passam a não devolver valor",
|
|
11
|
+
"nl": "(ssbingo) fix: registers die het apparaat als ongeldig markeert (alle bits gezet, 0xFFFF / 0xFFFFFFFF) worden niet langer via de gain omgerekend naar plausibel ogende metingen — zichtbaar als 6553,5 A ontlaadstroom, 42949672,95 kWh en status 65535 bij de DC-lader, en als 655,35 % of 65,535 V elders. Zulke registers geven nu geen waarde meer",
|
|
12
|
+
"fr": "(ssbingo) fix : les registres que l'appareil marque comme non valides (tous les bits à 1, 0xFFFF / 0xFFFFFFFF) ne sont plus convertis par le gain en mesures d'apparence plausible — cela apparaissait comme un courant de décharge de 6553,5 A, 42949672,95 kWh et l'état 65535 sur le chargeur DC, et comme 655,35 % ou 65,535 V ailleurs. Ces registres ne renvoient plus de valeur",
|
|
13
|
+
"it": "(ssbingo) fix: i registri che il dispositivo segnala come non validi (tutti i bit a 1, 0xFFFF / 0xFFFFFFFF) non vengono più convertiti dal gain in misure apparentemente plausibili — comparivano come corrente di scarica di 6553,5 A, 42949672,95 kWh e stato 65535 sul caricatore DC, e come 655,35 % o 65,535 V altrove. Tali registri ora non restituiscono alcun valore",
|
|
14
|
+
"es": "(ssbingo) fix: los registros que el dispositivo marca como no válidos (todos los bits a 1, 0xFFFF / 0xFFFFFFFF) ya no se convierten mediante la ganancia en mediciones de apariencia plausible — aparecían como una corriente de descarga de 6553,5 A, 42949672,95 kWh y el estado 65535 en el cargador DC, y como 655,35 % o 65,535 V en otros puntos. Esos registros ya no devuelven valor",
|
|
15
|
+
"pl": "(ssbingo) fix: rejestry oznaczone przez urządzenie jako nieprawidłowe (wszystkie bity ustawione, 0xFFFF / 0xFFFFFFFF) nie są już przeliczane przez wzmocnienie na wiarygodnie wyglądające pomiary — objawiało się to prądem rozładowania 6553,5 A, 42949672,95 kWh i stanem 65535 na ładowarce DC oraz 655,35 % lub 65,535 V w innych miejscach. Takie rejestry nie zwracają teraz wartości",
|
|
16
|
+
"uk": "(ssbingo) fix: регістри, позначені пристроєм як недійсні (усі біти встановлено, 0xFFFF / 0xFFFFFFFF), більше не перетворюються через коефіцієнт на правдоподібні вимірювання — це виглядало як струм розряду 6553,5 A, 42949672,95 кВт·год і стан 65535 на DC-зарядці та як 655,35 % або 65,535 В в інших місцях. Тепер такі регістри не повертають значення",
|
|
17
|
+
"zh-cn": "(ssbingo) fix: 设备标记为无效的寄存器(全部位为 1,0xFFFF / 0xFFFFFFFF)不再经增益换算成看似合理的测量值——此前表现为直流充电桩的 6553.5 A 放电电流、42949672.95 kWh 和超出范围的运行状态 65535,以及其他位置的 655.35 % 或 65.535 V。此类寄存器现在不再返回数值"
|
|
18
|
+
},
|
|
6
19
|
"3.3.0": {
|
|
7
20
|
"en": "(ssbingo) feat: registers are gated by the detected Modbus protocol version, so a device is no longer asked for registers its firmware does not know; rejected register groups are now retried register by register, so one unsupported register no longer silences its whole group; new state info.protocolVersion",
|
|
8
21
|
"de": "(ssbingo) feat: Register werden anhand der erkannten Modbus-Protokollversion gefiltert, damit ein Gerät nicht mehr nach Registern gefragt wird, die seine Firmware nicht kennt; abgelehnte Registergruppen werden jetzt einzeln nachgelesen, sodass ein nicht unterstütztes Register nicht mehr die ganze Gruppe stilllegt; neuer State info.protocolVersion",
|
package/lib/modbus.js
CHANGED
|
@@ -269,13 +269,38 @@ class ModbusConnection {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
/**
|
|
273
|
+
* Values the protocol uses to mark an unsigned register as "not valid",
|
|
274
|
+
* i.e. all bits set. The V2.9 document spells this out for the power
|
|
275
|
+
* limitation registers ("Range:[0, 0xFFFFFFFE]. With value 0xFFFFFFFF,
|
|
276
|
+
* register is not valid.") and devices apply the same convention to
|
|
277
|
+
* registers they do not implement — e.g. a SigenStor without a DC charger
|
|
278
|
+
* answers 0xFFFF for [DC Charger] running state 31513.
|
|
279
|
+
*
|
|
280
|
+
* Only the unsigned types are listed. The document does not define a
|
|
281
|
+
* sentinel for the signed types, and 0x7FFF / 0x7FFFFFFF are legal
|
|
282
|
+
* measurements there, so those must not be filtered.
|
|
283
|
+
*/
|
|
284
|
+
static get INVALID_RAW() {
|
|
285
|
+
return {
|
|
286
|
+
U16: 0xffff,
|
|
287
|
+
U32: 0xffffffff,
|
|
288
|
+
U64: 18446744073709552000, // 2^64 - 1, as close as a double gets
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
|
|
272
292
|
/**
|
|
273
293
|
* Parse raw register data into a typed value
|
|
274
294
|
*
|
|
295
|
+
* Returns null when the device marked the register as not valid (see
|
|
296
|
+
* INVALID_RAW). Without this, the sentinel is scaled by the gain and ends
|
|
297
|
+
* up as a plausible looking measurement — 0xFFFF with gain 10 becomes
|
|
298
|
+
* "6553.5 A", 0xFFFFFFFF with gain 1000 becomes "4294967.295 kW".
|
|
299
|
+
*
|
|
275
300
|
* @param {number[]} rawData - Raw register data
|
|
276
301
|
* @param {string} type - Data type (U16, S16, U32, S32, U64, STRING)
|
|
277
302
|
* @param {number|null} gain - Scaling factor
|
|
278
|
-
* @returns {number|string|null} Decoded value
|
|
303
|
+
* @returns {number|string|null} Decoded value, or null if the register is not valid
|
|
279
304
|
*/
|
|
280
305
|
static parseValue(rawData, type, gain) {
|
|
281
306
|
let raw;
|
|
@@ -327,6 +352,11 @@ class ModbusConnection {
|
|
|
327
352
|
raw = rawData[0];
|
|
328
353
|
}
|
|
329
354
|
|
|
355
|
+
const invalid = ModbusConnection.INVALID_RAW[type];
|
|
356
|
+
if (invalid !== undefined && raw === invalid) {
|
|
357
|
+
return null;
|
|
358
|
+
}
|
|
359
|
+
|
|
330
360
|
if (gain && gain !== 1 && gain !== null) {
|
|
331
361
|
return raw / gain;
|
|
332
362
|
}
|
package/main.js
CHANGED
|
@@ -991,9 +991,16 @@ class Sigenergy extends utils.Adapter {
|
|
|
991
991
|
'inverter.pv3Voltage': 'pv3Voltage',
|
|
992
992
|
'inverter.pv3Current': 'pv3Current',
|
|
993
993
|
};
|
|
994
|
-
if (map[name]
|
|
995
|
-
|
|
994
|
+
if (map[name] === undefined) {
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
// A null value means the device marked the register as not valid
|
|
998
|
+
// (see ModbusConnection.INVALID_RAW). Keep the last known good value
|
|
999
|
+
// instead, so the statistics are not poisoned by a single bad poll.
|
|
1000
|
+
if (value === null) {
|
|
1001
|
+
return;
|
|
996
1002
|
}
|
|
1003
|
+
this._currentData[map[name]] = value;
|
|
997
1004
|
}
|
|
998
1005
|
|
|
999
1006
|
/**
|