iobroker.zeptrion 0.8.6 → 1.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 CHANGED
@@ -190,6 +190,10 @@ npm run test:integration # starts a real js-controller (takes longer)
190
190
 
191
191
  ## Changelog
192
192
 
193
+ ### 1.0.0 (2026-07-17)
194
+ - First 1.0 release - the adapter has reached a stable, complete feature set (multicast command bundling, mDNS discovery, hail bulk commands, position estimation, Smartfront support, CSV import, full i18n).
195
+ - FIX: the previous release corrected calibrate/ntp.per roles and the info.connection translation, but ensureState() never updates an object that already exists - so installations updated from an older version kept the old, incorrect objects forever. Added a one-time startup migration that force-corrects exactly those known objects via extendObjectAsync(), without touching anything else (including the adapter's own built-in root info.connection object).
196
+
193
197
  ### 0.8.6 (2026-07-17)
194
198
  - Corrected object role/type mismatches found by the ioBroker store submission's object structure check: calibrate and ntp.per used role 'value', which strictly requires read=true/write=false and does not fit these intentionally writable states - changed to role 'level'. Also added the missing full i18n translation for info.connection.
195
199
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zeptrion",
4
- "version": "0.8.6",
4
+ "version": "1.0.0",
5
5
  "news": {
6
+ "1.0.0": {
7
+ "en": "First 1.0 release. FIX: the previous release corrected calibrate/ntp.per roles and the info.connection translation, but ensureState() never updates an object that already exists - so installations updated from an older version kept the old, incorrect objects forever. Added a one-time startup migration that force-corrects exactly those known objects via extendObjectAsync(), without touching anything else (including the adapter's own built-in root info.connection object). No other functional changes since 0.8.6 - the version bump to 1.0.0 reflects that the adapter has reached a stable, complete feature set (multicast command bundling, mDNS discovery, hail bulk commands, position estimation, Smartfront support, CSV import, full i18n).",
8
+ "de": "Erstes 1.0-Release. FIX: Das vorherige Release hat die calibrate/ntp.per-Rollen und die info.connection-Übersetzung korrigiert, aber ensureState() aktualisiert nie ein bereits existierendes Objekt - Installationen, die von einer älteren Version aktualisiert haben, behielten die alten, falschen Objekte dauerhaft. Eine einmalige Start-Migration ergänzt, die genau diese bekannten Objekte per extendObjectAsync() zwangskorrigiert, ohne sonst etwas anzufassen (auch nicht das adaptereigene, eingebaute root-info.connection-Objekt). Keine weiteren funktionalen Änderungen seit 0.8.6 - der Sprung auf 1.0.0 spiegelt wider, dass der Adapter einen stabilen, vollständigen Funktionsumfang erreicht hat (Multicast-Befehlsbündelung, mDNS-Discovery, Hagel-Sammelbefehle, Positionsschätzung, Smartfront-Unterstützung, CSV-Import, vollständige i18n).",
9
+ "ru": "Первый релиз 1.0. ИСПРАВЛЕНИЕ: предыдущий релиз исправил роли calibrate/ntp.per и перевод info.connection, но ensureState() никогда не обновляет уже существующий объект - поэтому установки, обновлённые с более старой версии, навсегда сохраняли старые, неверные объекты. Добавлена одноразовая миграция при запуске, принудительно исправляющая именно эти известные объекты.",
10
+ "pt": "Primeiro lançamento 1.0. CORREÇÃO: o lançamento anterior corrigiu as funções calibrate/ntp.per e a tradução info.connection, mas ensureState() nunca atualiza um objeto já existente - por isso as instalações atualizadas de uma versão mais antiga mantinham para sempre os objetos antigos incorretos. Adicionada uma migração única no arranque.",
11
+ "nl": "Eerste 1.0-release. FIX: de vorige release corrigeerde de calibrate/ntp.per-rollen en de info.connection-vertaling, maar ensureState() werkt nooit een reeds bestaand object bij - installaties bijgewerkt vanaf een oudere versie behielden dus permanent de oude, onjuiste objecten. Eenmalige opstartmigratie toegevoegd.",
12
+ "fr": "Première version 1.0. CORRECTIF : la version précédente a corrigé les rôles calibrate/ntp.per et la traduction info.connection, mais ensureState() ne met jamais à jour un objet déjà existant - les installations mises à jour depuis une version plus ancienne conservaient donc indéfiniment les anciens objets incorrects. Migration unique au démarrage ajoutée.",
13
+ "it": "Prima versione 1.0. CORREZIONE: la versione precedente ha corretto i ruoli calibrate/ntp.per e la traduzione info.connection, ma ensureState() non aggiorna mai un oggetto già esistente - le installazioni aggiornate da una versione precedente mantenevano quindi per sempre i vecchi oggetti errati. Aggiunta una migrazione una tantum all'avvio.",
14
+ "es": "Primera versión 1.0. CORRECCIÓN: la versión anterior corrigió los roles calibrate/ntp.per y la traducción de info.connection, pero ensureState() nunca actualiza un objeto ya existente, por lo que las instalaciones actualizadas desde una versión anterior conservaban para siempre los objetos antiguos incorrectos. Se añadió una migración única al inicio.",
15
+ "pl": "Pierwsze wydanie 1.0. POPRAWKA: poprzednie wydanie naprawiło role calibrate/ntp.per oraz tłumaczenie info.connection, ale ensureState() nigdy nie aktualizuje już istniejącego obiektu - instalacje zaktualizowane ze starszej wersji na stałe zachowywały więc stare, błędne obiekty. Dodano jednorazową migrację przy starcie.",
16
+ "uk": "Перший реліз 1.0. ВИПРАВЛЕННЯ: попередній реліз виправив ролі calibrate/ntp.per та переклад info.connection, але ensureState() ніколи не оновлює вже існуючий об'єкт - тому інсталяції, оновлені зі старішої версії, назавжди зберігали старі, неправильні об'єкти. Додано одноразову міграцію під час запуску.",
17
+ "zh-cn": "首个 1.0 版本。修复:上一版本修正了 calibrate/ntp.per 角色和 info.connection 翻译,但 ensureState() 从不更新已存在的对象——因此从旧版本升级的安装会永久保留旧的、不正确的对象。新增了一次性启动迁移来强制修正这些已知对象。"
18
+ },
6
19
  "0.8.6": {
7
20
  "en": "Corrected object role/type mismatches found by the ioBroker store submission's object structure check: calibrate and ntp.per used role 'value', which strictly requires read=true/write=false and does not fit these intentionally writable states - changed to role 'level'. Also added the missing full i18n translation for info.connection. No functional/API changes - purely metadata (common.role/common.name) corrections.",
8
21
  "de": "Objekt-Rollen-/Typ-Abweichungen behoben, die beim Objektstruktur-Check der ioBroker-Store-Einreichung gefunden wurden: calibrate und ntp.per nutzten die Rolle 'value', die zwingend read=true/write=false erfordert und nicht zu diesen bewusst schreibbaren States passt - auf Rolle 'level' umgestellt. Zusätzlich die fehlende vollständige i18n-Übersetzung für info.connection ergänzt. Keine funktionalen/API-Änderungen - reine Metadaten-Korrekturen (common.role/common.name).",
package/main.js CHANGED
@@ -120,7 +120,66 @@ class Zeptrion extends utils.Adapter {
120
120
 
121
121
  // ---------------------------------------------------------------- ready
122
122
 
123
+ // Force-corrects a small set of known-bad object roles/names left over from before this fix.
124
+ // Only touches an object if it still holds the exact old, known-bad value, so it never
125
+ // clobbers anything a user might have customized in the meantime. Role fixes are matched by
126
+ // ID suffix (calibrate/ntp.per are always per-device, unambiguous); the info.connection name
127
+ // fix is matched by its exact old string value instead of by ID, since the adapter's own
128
+ // built-in root "info.connection" object (not created by ensureState, must not be touched)
129
+ // would otherwise be hard to tell apart from the per-device one by ID pattern alone.
130
+ async migrateObjectRoles() {
131
+ try {
132
+ const objects = await this.getAdapterObjectsAsync();
133
+ let fixedCount = 0;
134
+ for (const id of Object.keys(objects)) {
135
+ const obj = objects[id];
136
+ if (!obj || obj.type !== 'state' || !obj.common) {
137
+ continue;
138
+ }
139
+ if (/\.calibrate$/.test(id) && obj.common.role === 'value') {
140
+ await this.extendObjectAsync(id, { common: { role: 'level' } });
141
+ fixedCount++;
142
+ } else if (/\.ntp\.per$/.test(id) && obj.common.role === 'value') {
143
+ await this.extendObjectAsync(id, { common: { role: 'level' } });
144
+ fixedCount++;
145
+ } else if (/\.info\.connection$/.test(id) && obj.common.name === 'Verbindung OK') {
146
+ await this.extendObjectAsync(id, {
147
+ common: {
148
+ name: {
149
+ en: 'Connection OK',
150
+ de: 'Verbindung OK',
151
+ ru: 'Соединение в порядке',
152
+ pt: 'Ligação OK',
153
+ nl: 'Verbinding OK',
154
+ fr: 'Connexion OK',
155
+ it: 'Connessione OK',
156
+ es: 'Conexión OK',
157
+ pl: 'Połączenie OK',
158
+ uk: "З'єднання в порядку",
159
+ 'zh-cn': '连接正常'
160
+ }
161
+ }
162
+ });
163
+ fixedCount++;
164
+ }
165
+ }
166
+ if (fixedCount > 0) {
167
+ this.log.info(`Migration: corrected role/name on ${fixedCount} existing object(s) created by an older version.`);
168
+ }
169
+ } catch (e) {
170
+ // Never let a migration failure block adapter startup.
171
+ this.log.warn(`Migration of object roles/names failed (non-fatal, adapter will continue starting): ${e}`);
172
+ }
173
+ }
174
+
123
175
  async onReady() {
176
+ // One-time (cheap-and-idempotent-every-startup) fix for role/name mistakes present in
177
+ // objects created before this fix (see CHANGELOG). ensureState()/setObjectNotExistsAsync()
178
+ // never touches an object that already exists, so simply updating the adapter does not
179
+ // correct objects an already-running installation had already created - this actively
180
+ // force-corrects them via extendObjectAsync() instead.
181
+ await this.migrateObjectRoles();
182
+
124
183
  await this.setStateAsync('info.connection', { val: false, ack: true });
125
184
 
126
185
  const timeout = parseInt(String(this.config.requestTimeout), 10) || 4000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zeptrion",
3
- "version": "0.8.6",
3
+ "version": "1.0.0",
4
4
  "description": "ioBroker Adapter für Feller zeptrion / zApp WLAN-Aktoren (WLAN-Nebenstelle 4K, WLAN-Zwischenmodul 2K) über die zrap Webservice API - inkl. Sammelbefehlen für Hagelalarm und mDNS-Discovery",
5
5
  "author": {
6
6
  "name": "Stefan",