Skip to content

Commit

Permalink
chore: release v1.14.33
Browse files Browse the repository at this point in the history
fix problems with CuxD and HMIP (fixes #307)
more palces where we now log message on real errors instead of error object
  • Loading branch information
foxriver76 committed Jan 30, 2021
1 parent 8593fbe commit 171651a
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 40 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ by ioBroker, when you have a running 'dummy' program on the CCU which depends on
### __WORK IN PROGRESS__
-->

### 1.14.33 (2021-01-30)
* (foxriver76) fix problems with CuxD and HMIP (fixes #307)
* (foxriver76) more palces where we now log message on real errors instead of error object

### 1.14.32 (2021-01-29)
* (foxriver76) revert received messages with invalid command
* (foxriver76) log message on real errors instead of error object
Expand Down
26 changes: 13 additions & 13 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,20 @@
"es": "Conecta los Procesos de Interfaz HomeMatic (BidCos-Services, Homegear y CUxD) a través de XML-RPC o BIN-RPC a ioBroker",
"pl": "Łączy procesy HomeMatic-Interface (BidCos-Services, Homegear i CUxD) za pośrednictwem XML-RPC lub BIN-RPC z ioBroker"
},
"version": "1.14.32",
"version": "1.14.33",
"news": {
"1.14.33": {
"en": "fix problems with CuxD and HMIP (fixes #307)\nmore palces where we now log message on real errors instead of error object",
"de": "Beheben Sie Probleme mit CuxD und HMIP (behebt # 307)\nWeitere Palces, in denen wir jetzt Nachrichten über echte Fehler anstelle von Fehlerobjekten protokollieren",
"ru": "исправить проблемы с CuxD и HMIP (исправления # 307)\nбольше мест, где мы теперь регистрируем сообщение о реальных ошибках вместо объекта ошибки",
"pt": "corrigir problemas com CuxD e HMIP (correções # 307)\nmais locais onde agora registramos mensagens sobre erros reais em vez de objeto de erro",
"nl": "problemen oplossen met CuxD en HMIP (fix # 307)\nmeer palces waar we nu een bericht registreren over echte fouten in plaats van een foutobject",
"fr": "résoudre les problèmes avec CuxD et HMIP (corrections # 307)\nplus de palces où nous enregistrons maintenant un message sur des erreurs réelles au lieu d'un objet d'erreur",
"it": "risolve problemi con CuxD e HMIP (correzioni # 307)\npiù luoghi in cui ora registriamo il messaggio sugli errori reali invece che sull'oggetto errore",
"es": "solucionar problemas con CuxD y HMIP (arreglos # 307)\nmás lugares donde ahora registramos el mensaje sobre errores reales en lugar del objeto de error",
"pl": "napraw problemy z CuxD i HMIP (poprawki # 307)\nmore palces, gdzie teraz rejestrujemy komunikaty dotyczące rzeczywistych błędów zamiast obiektu błędu",
"zh-cn": "修复CuxD和HMIP的问题(修复#307)\n现在我们在实际错误而不是错误对象上记录消息的更多地方"
},
"1.14.32": {
"en": "revert received messages with invalid command\nlog message on real errors instead of error object\nfix for crashes on decrypt",
"de": "Empfangene Nachrichten mit ungültigem Befehl zurücksetzen\nProtokollmeldung über echte Fehler anstelle des Fehlerobjekts\nBehebung von Abstürzen beim Entschlüsseln",
Expand Down Expand Up @@ -242,18 +254,6 @@
"es": "se agregaron algunos roles hmip para el canal 0",
"pl": "dodano kilka ról hmip dla kanału 0",
"zh-cn": "为频道0添加了一些hmip角色"
},
"1.14.5": {
"en": "fixed a potential problem when CCU (xml-rpc) delivers unexpected format on \"newDevices\"",
"de": "Ein potenzielles Problem wurde behoben, wenn CCU (xml-rpc) ein unerwartetes Format für \"newDevices\" liefert.",
"ru": "исправлена потенциальная проблема, когда CCU (xml-rpc) доставляет неожиданный формат на \"newDevices\"",
"pt": "Foi corrigido um problema em potencial quando o CCU (xml-rpc) entrega um formato inesperado em \"newDevices\"",
"nl": "een mogelijk probleem opgelost wanneer CCU (xml-rpc) onverwacht formaat op \"newDevices\" levert",
"fr": "correction d'un problème potentiel lorsque CCU (xml-rpc) fournit un format inattendu sur \"newDevices\"",
"it": "risolto un potenziale problema quando CCU (xml-rpc) consegna un formato imprevisto su \"newDevices\"",
"es": "solucionó un problema potencial cuando CCU (xml-rpc) entrega un formato inesperado en \"newDevices\"",
"pl": "naprawiono potencjalny problem, gdy CCU (xml-rpc) dostarcza nieoczekiwany format w „newDevices”",
"zh-cn": "修复了CCU(xml-rpc)在“ newDevices”上传递意外格式时的潜在问题"
}
},
"authors": [
Expand Down
51 changes: 26 additions & 25 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,12 +739,12 @@ async function main() {
try {
await adapter.delForeignObjectAsync(row.id);
} catch (e) {
adapter.log.warn(`Could not delete ${row.id}: ${e}`);
adapter.log.warn(`Could not delete ${row.id}: ${e.message}`);
}
}
}
} catch (e) {
adapter.log.error(`getObjectListAsync hm-rpc: ${e}`);
adapter.log.error(`getObjectListAsync hm-rpc: ${e.message}`);
}

try {
Expand All @@ -754,7 +754,7 @@ async function main() {
metaRoles = res.native;
}
} catch (e) {
adapter.log.error(`hm-rpc.meta.roles: ${e}`);
adapter.log.error(`hm-rpc.meta.roles: ${e.message}`);
}

try {
Expand Down Expand Up @@ -798,7 +798,7 @@ async function main() {
}
}
} catch (e) {
adapter.log.error(`Could not get state view on start: ${e}`);
adapter.log.error(`Could not get state view on start: ${e.message}`);
}

// Start Adapter
Expand All @@ -816,13 +816,12 @@ async function sendInit() {
adapter.log.debug(`${adapter.config.type}rpc -> ${adapter.config.homematicAddress}:${adapter.config.homematicPort}${homematicPath} init ${JSON.stringify([daemonURL, clientId])}`);
await rpcMethodCallAsync('init', [daemonURL, clientId]);
if (adapter.config.daemon === 'CUxD') {
getCuxDevices(err2 => {
if (!err2) {
updateConnection();
} else {
adapter.log.error(`getCuxDevices error: ${err2}`);
}
});
try {
await getCuxDevices();
updateConnection();
} catch (e) {
adapter.log.error(`getCuxDevices error: ${e.message}`);
}
} else {
updateConnection();
}
Expand Down Expand Up @@ -886,7 +885,7 @@ async function initRpcServer() {
port: port
});
} catch (e) {
adapter.log.error(`Could not create RPC Server: ${e}`);
adapter.log.error(`Could not create RPC Server: ${e.message}`);
return void adapter.restart();
}

Expand Down Expand Up @@ -972,7 +971,7 @@ async function initRpcServer() {
endkey: `hm-rpc.${adapter.instance}.\u9999`
});
} catch (e) {
adapter.log.error(`getObjectViewAsync hm-rpc: ${e}`);
adapter.log.error(`getObjectViewAsync hm-rpc: ${e.message}`);
}

if (doc && doc.rows) {
Expand Down Expand Up @@ -1021,10 +1020,12 @@ async function initRpcServer() {
}

adapter.log.info(`new ${adapter.config.daemon} devices/channels after filter: ${newDevices.length}`);
createDevices(newDevices, callback);
await createDevices(newDevices);
} else {
createDevices(newDevices, callback);
await createDevices(newDevices);
}
// call it otherwise HMIP won't work
callback(null, '');
});

rpcServer.on('listDevices', async (err, params, callback) => {
Expand All @@ -1039,7 +1040,7 @@ async function initRpcServer() {
endkey: `hm-rpc.${adapter.instance}.\u9999`
});
} catch (e) {
adapter.log.error(`Error on listDevices (getObjectView): ${e}`);
adapter.log.error(`Error on listDevices (getObjectView): ${e.message}`);
}

const response = [];
Expand All @@ -1063,7 +1064,7 @@ async function initRpcServer() {
try {
for (let r = response.length - 1; r >= 0; r--) {
if (!response[r].ADDRESS) {
adapter.log.warn(`${adapter.config.type}rpc -> found empty entry at position ${r} !`);
adapter.log.warn(`${adapter.config.type}rpc -> found empty entry at position ${r}!`);
response.splice(r, 1);
}
}
Expand Down Expand Up @@ -1308,7 +1309,7 @@ async function addParamsetObjects(channel, paramset) {
const res = await adapter.extendObjectAsync(`${channel._id}.${key}`, obj);
adapter.log.debug(`object ${res.id} extended`);
} catch (e) {
adapter.log.error(`Could not extend object ${channel._id}.${key}: ${e}`);
adapter.log.error(`Could not extend object ${channel._id}.${key}: ${e.message}`);
}
} // endFor
} // endAddParamsetObjects
Expand All @@ -1334,7 +1335,7 @@ async function getValueParamsets() {

await addParamsetObjects(obj, metaValues[cid]);
} catch (e) {
adapter.log.error(`Error on getParamsetDescription for [${obj.native.ADDRESS}, 'VALUES']": ${e}`);
adapter.log.error(`Error on getParamsetDescription for [${obj.native.ADDRESS}, 'VALUES']": ${e.message}`);
}
}

Expand All @@ -1343,15 +1344,15 @@ async function getValueParamsets() {
try {
await adapter.setStateAsync('updated', true, false);
} catch (e) {
adapter.log.error(`Could not inform hm-rega about new devices: ${e}`);
adapter.log.error(`Could not inform hm-rega about new devices: ${e.message}`);
}
// If it has been a force reinit run, set it to false and restart
if (adapter.config.forceReInit) {
adapter.log.info('Restarting now, because we had a forced reinitialization run');
try {
await adapter.extendForeignObjectAsync(`system.adapter.${adapter.namespace}`, {native: {forceReInit: false}});
} catch (e) {
adapter.log.error(`Could not restart and set forceReinit to false: ${e}`);
adapter.log.error(`Could not restart and set forceReinit to false: ${e.message}`);
}
}
}
Expand Down Expand Up @@ -1552,7 +1553,7 @@ async function createDevices(deviceArr) {
const res = await adapter.setObjectAsync(obj._id, obj);
adapter.log.debug(`object ${res.id} created`);
} catch (e) {
adapter.log.error(`object ${obj._id} error on creation: ${e}`);
adapter.log.error(`object ${obj._id} error on creation: ${e.message}`);
}

if (obj.type === 'channel') {
Expand Down Expand Up @@ -1589,7 +1590,7 @@ async function getCuxDevices() {
endkey: `hm-rpc.${adapter.instance}.\u9999`
});
} catch (e) {
adapter.log.error(`getObjectView hm-rpc: ${e}`);
adapter.log.error(`getObjectView hm-rpc: ${e.message}`);
}

if (doc && doc.rows) {
Expand Down Expand Up @@ -1684,7 +1685,7 @@ function connect(isFirst) {
reconnectTimeout: adapter.config.reconnectInterval * 1000
});
} catch (e) {
adapter.log.error(`Could not create non-secure ${adapter.config.type}-rpc client: ${e}`);
adapter.log.error(`Could not create non-secure ${adapter.config.type}-rpc client: ${e.message}`);
return void adapter.restart();
} // endCatch

Expand Down Expand Up @@ -1717,7 +1718,7 @@ function connect(isFirst) {
rejectUnauthorized: false
});
} catch (e) {
adapter.log.error(`Could not create secure ${adapter.config.type}-rpc client: ${e}`);
adapter.log.error(`Could not create secure ${adapter.config.type}-rpc client: ${e.message}`);
return void adapter.restart();
} // endCatch
});
Expand Down
2 changes: 1 addition & 1 deletion 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-rpc",
"version": "1.14.32",
"version": "1.14.33",
"description": "Connects HomeMatic Interface-Processes (BidCos-Services, Homegear and CUxD) via XML-RPC or BIN-RPC to ioBroker",
"author": {
"name": "hobbyquaker",
Expand Down

0 comments on commit 171651a

Please sign in to comment.