Skip to content

Commit

Permalink
chore: release v3.0.15
Browse files Browse the repository at this point in the history
Ensure that objects are created if something (devices, variables, programs) created during runtime (fixes #124)
  • Loading branch information
foxriver76 committed Jan 31, 2021
1 parent 172bffd commit a815e8e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 15 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ with the ioBroker CLI. You can change the port via `iob set hm-rega.<instance> -
### __WORK IN PROGRESS__
-->

### 3.0.15 (2021-01-31)
* (foxriver76) Ensure that objects are created if something (devices, variables, programs) created during runtime (fixes #124)

### 3.0.14 (2021-01-30)
* (foxriver76) fix pot. crash after reconnect because of existingStates array

Expand Down
19 changes: 19 additions & 0 deletions hm-rega.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,12 @@ async function pollVariables() {
setTimeout(pollServiceMsgs, 1000);
}

if (!objects[fullId]) {
adapter.log.info(`Variable received for not-known dp ${id}, requesting Variables`);
await getVariables();
return;
}

if (!states[fullId] || !states[fullId].ack || states[fullId].val !== val || (states[fullId].ts && states[fullId].ts !== timestamp)) {
states[fullId] = {val: val, ack: true, ts: timestamp};
try {
Expand Down Expand Up @@ -598,6 +604,13 @@ async function pollPrograms() {
const val = data[dp].Active;

const fullId = `${adapter.namespace}.${id}.Active`;

if (!objects[fullId]) {
adapter.log.info(`Program received for not-known dp ${id}, requesting programs`);
await getPrograms();
return;
}

if (!states[fullId] ||
!states[fullId].ack ||
states[fullId].val !== val
Expand Down Expand Up @@ -647,6 +660,12 @@ async function pollServiceMsgs() {

id = `hm-rpc.${instanceNumber}.${id.replace(':', '.').replace(FORBIDDEN_CHARS, '_')}_ALARM`;

if (!objects[id]) {
adapter.log.info(`Alarm DP received for not-known dp ${id}, requesting Service Messages`);
await getServiceMsgs();
return;
}

const state = {
val: data[dp].AlState,
ack: true,
Expand Down
26 changes: 13 additions & 13 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@
"$schema": "https://raw.githubusercontent.com/foxriver76/ioBroker.js-controller/schemas/schemas/io-package.json",
"common": {
"name": "hm-rega",
"version": "3.0.14",
"version": "3.0.15",
"news": {
"3.0.15": {
"en": "Ensure that objects are created if something (devices, variables, programs) created during runtime (fixes #124)",
"de": "Stellen Sie sicher, dass Objekte erstellt werden, wenn zur Laufzeit etwas (Geräte, Variablen, Programme) erstellt wurde (Fixes # 124).",
"ru": "Убедитесь, что объекты созданы, если что-то (устройства, переменные, программы) было создано во время выполнения (исправления # 124)",
"pt": "Certifique-se de que os objetos sejam criados se algo (dispositivos, variáveis, programas) for criado durante o tempo de execução (correções # 124)",
"nl": "Zorg ervoor dat objecten worden gemaakt als er iets (apparaten, variabelen, programma's) is gemaakt tijdens runtime (fixes # 124)",
"fr": "Assurez-vous que les objets sont créés si quelque chose (périphériques, variables, programmes) est créé pendant l'exécution (corrections # 124)",
"it": "Assicurati che gli oggetti vengano creati se qualcosa (dispositivi, variabili, programmi) viene creato durante il runtime (correzioni # 124)",
"es": "Asegúrese de que los objetos se creen si algo (dispositivos, variables, programas) se crea durante el tiempo de ejecución (arreglos # 124)",
"pl": "Upewnij się, że obiekty są tworzone, jeśli coś (urządzenia, zmienne, programy) zostały utworzone w czasie wykonywania (poprawki # 124)",
"zh-cn": "确保在运行时创建某些对象(设备,变量,程序)时创建对象(修复程序#124)"
},
"3.0.14": {
"en": "fix pot. crash after reconnect because of existingStates array",
"de": "Topf reparieren. Absturz nach erneuter Verbindung aufgrund des vorhandenen State-Arrays",
Expand Down Expand Up @@ -231,18 +243,6 @@
"es": "problemas potenciales solucionados con la escala de valores de porcentaje",
"pl": "naprawiono potencjalne problemy ze skalowaniem wartości%",
"zh-cn": "修正了%值缩放的潜在问题"
},
"2.6.14": {
"en": "fixed potential problem on enum sync",
"de": "Mögliches Problem bei der Enum-Synchronisierung behoben",
"ru": "исправлена потенциальная проблема при синхронизации перечислений",
"pt": "problema potencial fixo na sincronização enum",
"nl": "Potentieel probleem opgelost met enum sync",
"fr": "correction d'un problème potentiel sur la synchronisation enum",
"it": "risolto potenziale problema sulla sincronizzazione enum",
"es": "problema potencial solucionado en la sincronización de enumeración",
"pl": "naprawiono potencjalny problem z synchronizacją enum",
"zh-cn": "修复了枚举同步的潜在问题"
}
},
"title": "HomeMatic ReGaHSS",
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-rega",
"version": "3.0.14",
"version": "3.0.15",
"engines": {
"node": ">=10.0.0"
},
Expand Down

0 comments on commit a815e8e

Please sign in to comment.