Skip to content

Commit

Permalink
chore: release v3.0.45
Browse files Browse the repository at this point in the history
* (foxriver76) fix for controller v5 (closes #368)
  • Loading branch information
foxriver76 committed Mar 30, 2023
1 parent ecf8ea0 commit bf78f07
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 150 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ with the ioBroker CLI. You can change the port via `iob set hm-rega.<instance> -
Placeholder for the next version (at the beginning of the line):
### __WORK IN PROGRESS__
-->
### 3.0.45 (2023-03-30)
* (foxriver76) fix for controller v5 (closes #368)

### 3.0.44 (2023-02-20)
* (foxriver76) compatibility of RSSI_DEVICE and RSSI_PEER for CCU update (closes #352)
* (foxriver76) also sync enums for maintenance channel of rfd devices (closes #320)
Expand Down
27 changes: 14 additions & 13 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
"common": {
"name": "hm-rega",
"version": "3.0.44",
"version": "3.0.45",
"news": {
"3.0.45": {
"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.44": {
"en": "compatibility of RSSI_DEVICE and RSSI_PEER for CCU update (closes #352)\nalso sync enums for maintenance channel of rfd devices (closes #320)",
"de": "kompatibilität von RSSI_DEVICE und RSSI_PEER für CCU-Update (schließt #352)\nauch sync-enums für wartungskanal von rfd-geräten (schließt #320)",
Expand Down Expand Up @@ -75,18 +88,6 @@
"es": "corrigió otro error de `ValueList`",
"pl": "naprawiono kolejny błąd `ValueList`",
"zh-cn": "修复了另一个“ValueList”错误"
},
"3.0.38": {
"en": "fixed bug with `ValueList` (closes #268)",
"de": "Fehler mit `ValueList` behoben (schließt #268)",
"ru": "исправлена ошибка с `ValueList` (закрывает #268)",
"pt": "bug corrigido com `ValueList` (fecha #268)",
"nl": "bug opgelost met `ValueList` (sluit #268)",
"fr": "correction d'un bug avec `ValueList` (ferme #268)",
"it": "bug corretto con `ValueList` (chiude #268)",
"es": "error corregido con `ValueList` (cierra #268)",
"pl": "naprawiony błąd z `ValueList` (zamyka #268)",
"zh-cn": "修复了 `ValueList` 的错误(关闭 #268)"
}
},
"title": "HomeMatic ReGaHSS",
Expand Down
136 changes: 2 additions & 134 deletions lib/rega.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,139 +91,7 @@ class Rega {
resolve(diff);
});
});
} // endCheckTime

/*
loadTranslation(lang, callback) {
if (!(lang === 'de' || lang === 'en' || lang === 'tr')) lang = 'de';
request.get({
url: `${this.protocol + this.options.ccuIp}/webui/js/lang/${lang}/translate.lang.js`,
encoding: null,
strictSSL: false
}, (err, res, body) => {
if (res.statusCode === 200) {
try {
const langJSON = {};
const str = unescape(iconv.decode(body, 'ISO-8859-1'));
const jscode = str.replace(/jQuery\./g, '');
eval(jscode);
this.logger.debug(langJSON);
this.logger.info('loaded translate.lang.js');
request.get({
url: `${this.protocol + this.options.ccuIp}/webui/js/lang/${lang}/translate.lang.stringtable.js`,
encoding: null,
strictSSL: false
}, (err, res, body) => {
if (res.statusCode === 200) {
const str = unescape(iconv.decode(body, 'ISO-8859-1'));
const jscode = str.replace(/jQuery\./g, '');
try {
eval(jscode);
} catch (e) {
callback(langJSON);
}
this.logger.debug(langJSON);
this.logger.info('loaded translate.lang.stringtable.js');
} else {
callback(langJSON);
return;
}
request.get({
url: `${this.protocol + this.options.ccuIp}/webui/js/lang/${lang}/translate.lang.extensionV.js`,
encoding: null,
strictSSL: false
}, (err, res, body) => {
if (res.statusCode === 200) {
const str = unescape(iconv.decode(body, 'ISO-8859-1'));
const jscode = str.replace(/jQuery\./g, '');
try {
eval(jscode);
} catch (e) {
callback(langJSON);
return;
}
this.logger.debug(langJSON);
this.logger.info('loaded translate.lang.extensionV.js');
}
callback(langJSON);
});
});
} catch (e) {
this.logger.error(`loadTranslation ${e}`);
callback(null);
}
} else {
callback(null);
}
});
} // endLoadTranslation
loadStringTable(language, callback) {
language = language || 'de';
this.loadTranslation(language, (translation) => {
request.get({
url: `${this.protocol + this.options.ccuIp}/config/stringtable_de.txt`,
encoding: null,
strictSSL: false
}, (err, res, body) => {
const str = iconv.decode(body, 'ISO-8859-1');
const dataArr = str.split('\n');
const lang = {};
for (let i = 0; i < dataArr.length; i++) {
const line = dataArr[i];
if (line && line !== '') {
const resultArr = line.match(/^([A-Z0-9_-]+)\|?([A-Z0-9_-]+)?=?([A-Z0-9_-]+)?[ \t]+(.+)$/);
if (resultArr) {
let text = resultArr[4];
if (translation && translation[language]) {
text = translation[language][text.replace(/\${([^}]*)}/, '$1')] || text;
}
if (!lang[resultArr[1]]) {
lang[resultArr[1]] = {};
}
if (resultArr[3]) {
if (!lang[resultArr[1]][resultArr[2]]) {
lang[resultArr[1]][resultArr[2]] = {};
}
if (!lang[resultArr[1]][resultArr[2]][resultArr[3]]) {
lang[resultArr[1]][resultArr[2]][resultArr[3]] = {};
}
lang[resultArr[1]][resultArr[2]][resultArr[3]].text = text;
} else if (resultArr[2]) {
if (!lang[resultArr[1]][resultArr[2]]) {
lang[resultArr[1]][resultArr[2]] = {};
}
lang[resultArr[1]][resultArr[2]].text = text;
} else {
lang[resultArr[1]].text = text;
}
}
}
}
this.logger.info('stringtable loaded');
callback(lang);
});
});
} // endLoadStringTable
*/
}

/**
* run a script file from file system by given path
Expand All @@ -235,7 +103,7 @@ class Rega {
this.logger.debug(`--> ${script}.fn`);

try {
const data = await this.readFileAsync('hm-rega', `regascripts/${script}.fn`, 'utf8');
const data = await this.readFileAsync('hm-rega', `regascripts/${script}.fn`);
return new Promise(resolve => {
this.script(data.file, stdout => resolve(stdout));
});
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.hm-rega",
"version": "3.0.44",
"version": "3.0.45",
"engines": {
"node": ">=10.0.0"
},
Expand Down

0 comments on commit bf78f07

Please sign in to comment.