From eba600db431284e638c0bab9dd1ed82e2e7e83fc Mon Sep 17 00:00:00 2001 From: foxriver76 Date: Thu, 30 Mar 2023 22:56:01 +0200 Subject: [PATCH] chore: release v3.0.46 * (foxriver76) fix for controller v5 (closes #368) --- README.md | 2 +- io-package.json | 27 ++++++++++++++------------- main.js | 6 ++++-- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 45b6148..e057ed0 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ with the ioBroker CLI. You can change the port via `iob set hm-rega. - Placeholder for the next version (at the beginning of the line): ### __WORK IN PROGRESS__ --> -### 3.0.45 (2023-03-30) +### 3.0.46 (2023-03-30) * (foxriver76) fix for controller v5 (closes #368) ### 3.0.44 (2023-02-20) diff --git a/io-package.json b/io-package.json index 2ad3e65..3365c60 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "hm-rega", - "version": "3.0.45", + "version": "3.0.46", "news": { + "3.0.46": { + "en": "fix for controller v5 (closes #368)", + "de": "fix für controller v5 (schließt #368)", + "ru": "для контроллера v5 (closes #368)", + "pt": "correção para controlador v5 (fecha #368)", + "nl": "vertaling:", + "fr": "correction pour le contrôleur v5 (fermetures #368)", + "it": "fix per controller v5 (chiude #368)", + "es": "fijado para el controlador v5 (cerca #368)", + "pl": "rezultatem dla kontrolera v5 jest numer 368)", + "uk": "фіксатор для контролера v5 (закривається #368)", + "zh-cn": "fix 控制勒诉5(第368号)" + }, "3.0.45": { "en": "fix for controller v5 (closes #368)", "de": "fix für controller v5 (schließt #368)", @@ -76,18 +89,6 @@ "es": "si no se puede acceder a LGW, ahora establecemos el ciclo de trabajo en `nulo` en lugar de `-1`", "pl": "jeśli LGW nie jest osiągalne, ustawiamy teraz cykl pracy na „null” zamiast „-1”", "zh-cn": "如果无法访问 LGW,我们现在将占空比设置为“空”而不是“-1”" - }, - "3.0.39": { - "en": "fixed another `ValueList` bug", - "de": "Ein weiterer `ValueList`-Bug wurde behoben", - "ru": "исправлена еще одна ошибка `ValueList`", - "pt": "corrigido outro bug `ValueList`", - "nl": "een andere `ValueList`-bug gerepareerd", - "fr": "correction d'un autre bogue `ValueList`", - "it": "risolto un altro bug di `ValueList`", - "es": "corrigió otro error de `ValueList`", - "pl": "naprawiono kolejny błąd `ValueList`", - "zh-cn": "修复了另一个“ValueList”错误" } }, "title": "HomeMatic ReGaHSS", diff --git a/main.js b/main.js index e951792..f596f90 100644 --- a/main.js +++ b/main.js @@ -183,14 +183,16 @@ function startAdapter(options) { const sourceFile = fs.readFileSync(`${__dirname}/regascripts/${regascript}`, 'utf-8'); let targetFile; try { - targetFile = await adapter.readFileAsync('hm-rega', `regascripts/${regascript}`, 'utf-8'); + targetFile = await adapter.readFileAsync('hm-rega', `regascripts/${regascript}`); } catch (e) { adapter.log.debug(`[REGASCRIPTS] Script ${regascript} does not exist in file storage yet`); } if (!targetFile || targetFile.file !== sourceFile) { // update file storage - await adapter.writeFileAsync('hm-rega', `regascripts/${regascript}`, sourceFile, 'utf-8'); + await adapter.writeFileAsync('hm-rega', `regascripts/${regascript}`, sourceFile, { + mimeType: 'text/plain' + }); adapter.log.info(`[REGASCRIPTS] Successfully updated ${regascript}`); } else { adapter.log.debug(`[REGASCRIPTS] Script ${regascript} is already up-to-date`); diff --git a/package-lock.json b/package-lock.json index 8fd1e53..beb1e6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.hm-rega", - "version": "3.0.45", + "version": "3.0.46", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.hm-rega", - "version": "3.0.45", + "version": "3.0.46", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.0", diff --git a/package.json b/package.json index 2a21fcb..91fa7d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.hm-rega", - "version": "3.0.45", + "version": "3.0.46", "engines": { "node": ">=10.0.0" },