Skip to content

Commit

Permalink
chore: release v3.0.23
Browse files Browse the repository at this point in the history
we now correctly convert the rssi values, workaround for jens-maus/RaspberryMatic#897
we made counter states of type "number", was incorrectly "string" (closes #897)
  • Loading branch information
foxriver76 committed Apr 30, 2021
1 parent 29e864c commit a8c0323
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 20 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,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.23 (2021-04-30)
* (foxriver76) we now correctly convert the rssi values, workaround for https://github.com/jens-maus/RaspberryMatic/issues/897
* (foxriver76) we made counter states of type "number", was incorrectly "string" (closes #897)

### 3.0.22 (2021-04-30)
* (foxriver76) parse the dutyCycle state to int (fixes #144)
Expand Down
13 changes: 9 additions & 4 deletions hm-rega.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,14 +503,14 @@ async function pollDutyCycle() {

// CONNECTED State:
if (dp.CONNECTED) {
updateNewState(`${adapter.namespace}.${id}.0.CONNECTED`, dp.CONNECTED);
adapter.log.debug(`Dutycycle: ${adapter.namespace}.${id}.0.CONNECTED => ${dp.CONNECTED}`);
updateNewState(`${adapter.namespace}.${id}.0.CONNECTED`, parseInt(dp.CONNECTED));
adapter.log.debug(`Dutycycle: ${adapter.namespace}.${id}.0.CONNECTED => ${parseInt(dp.CONNECTED)}`);
}

// DEFAULT State:
if (dp.DEFAULT) {
updateNewState(`${adapter.namespace}.${id}.0.DEFAULT`, dp.DEFAULT);
adapter.log.debug(`Dutycycle: ${adapter.namespace}.${id}.0.DEFAULT => ${dp.DEFAULT}`);
updateNewState(`${adapter.namespace}.${id}.0.DEFAULT`, parseInt(dp.DEFAULT));
adapter.log.debug(`Dutycycle: ${adapter.namespace}.${id}.0.DEFAULT => ${parseInt(dp.DEFAULT)}`);
}

// FIRMWARE_VERSION State:
Expand Down Expand Up @@ -1412,6 +1412,11 @@ async function getDatapoints() {
states[id] = state;
// only set the state if it's a valid dp at RPC API and thus has an object
if (existingStates.includes(id)) {
if (id.endsWith('.RSSI_DEVICE') || id.endsWith('.RSSI_PEER')) {
// workaround until https://github.com/jens-maus/RaspberryMatic/issues/897 is fixed
state.val = state.val - 256;
}

await adapter.setForeignStateAsync(id, state);
} else {
adapter.log.debug(`Do not set "${JSON.stringify(state)}" to "${id}", because non-existing in corresponding adapter`);
Expand Down
26 changes: 13 additions & 13 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"common": {
"name": "hm-rega",
"version": "3.0.22",
"version": "3.0.23",
"news": {
"3.0.23": {
"en": "we now correctly convert the rssi values, workaround for https://github.com/jens-maus/RaspberryMatic/issues/897\nwe made counter states of type \"number\", was incorrectly \"string\" (closes #897)",
"de": "Wir konvertieren jetzt die RSSI-Werte korrekt, Problemumgehung für https://github.com/jens-maus/RaspberryMatic/issues/897\nWir haben Zählerzustände vom Typ \"Nummer\" erstellt, die fälschlicherweise \"Zeichenfolge\" waren (schließt # 897).",
"ru": "теперь мы правильно конвертируем значения rssi, обходной путь для https://github.com/jens-maus/RaspberryMatic/issues/897\nсделали состояния счетчика типа \"число\", было некорректно \"строка\" (закрывает # 897)",
"pt": "agora convertemos corretamente os valores rssi, solução alternativa para https://github.com/jens-maus/RaspberryMatic/issues/897\ncriamos estados de contador do tipo \"número\", era incorretamente \"string\" (fecha # 897)",
"nl": "we converteren nu correct de rssi-waarden, workaround voor https://github.com/jens-maus/RaspberryMatic/issues/897\nwe hebben tellerstanden gemaakt van het type \"nummer\", was ten onrechte \"string\" (sluit # 897)",
"fr": "nous convertissons maintenant correctement les valeurs rssi, solution de contournement pour https://github.com/jens-maus/RaspberryMatic/issues/897\nnous avons fait des états de compteur de type \"nombre\", était incorrectement \"chaîne\" (ferme # 897)",
"it": "ora convertiamo correttamente i valori rssi, soluzione alternativa per https://github.com/jens-maus/RaspberryMatic/issues/897\nabbiamo creato stati contatore di tipo \"numero\", era erroneamente \"stringa\" (chiude # 897)",
"es": "ahora convertimos correctamente los valores rssi, solución alternativa para https://github.com/jens-maus/RaspberryMatic/issues/897\nhicimos estados de contador de tipo \"número\", era incorrectamente \"cadena\" (cierra # 897)",
"pl": "teraz poprawnie konwertujemy wartości rssi, obejście dla https://github.com/jens-maus/RaspberryMatic/issues/897\nzrobiliśmy stan licznika typu „liczba”, był niepoprawnie „ciąg” (zamyka # 897)",
"zh-cn": "我们现在可以正确转换rssi值,https://github.com/jens-maus/RaspberryMatic/issues/897的解决方法\n我们将计数器状态设置为“数字”类型,错误地将其设置为“字符串”(关闭#897)"
},
"3.0.22": {
"en": "parse the dutyCycle state to int (fixes #144)\nupdate dependencies\nremoved unneeded dependency",
"de": "Analysieren Sie den DutyCycle-Status auf int (Fixes # 144).\nAbhängigkeiten aktualisieren\nnicht benötigte Abhängigkeit entfernt",
Expand Down Expand Up @@ -230,18 +242,6 @@
"es": "Se corrigieron las traducciones de enumeración que faltaban (cambiadas en la API)",
"pl": "naprawiono brakujące tłumaczenia wyliczeń (zmienione w API)",
"zh-cn": "修复缺少的枚举翻译(已在API中更改)"
},
"2.6.25": {
"en": "fixed aliases being removed from enums if they contain \"hm-rpc.\"",
"de": "Fehler behoben, bei denen Aliase aus Aufzählungen entfernt wurden, wenn sie \"hm-rpc\" enthielten.",
"ru": "исправлено удаление псевдонимов из перечислений, если они содержат «hm-rpc».",
"pt": "aliases corrigidos sendo removidos de enums se contiverem \"hm-rpc.\"",
"nl": "vaste aliassen verwijderd uit enums als ze \"hm-rpc\" bevatten.",
"fr": "correction des alias supprimés des énumérations s'ils contiennent \"hm-rpc\".",
"it": "corretti gli alias rimossi dalle enumerazioni se contengono \"hm-rpc\".",
"es": "Se corrigieron los alias que se eliminaron de las enumeraciones si contienen \"hm-rpc\".",
"pl": "naprawiono usuwanie aliasów z wyliczeń, jeśli zawierają one „hm-rpc”.",
"zh-cn": "固定别名(如果它们包含“ hm-rpc”)将从枚举中删除。"
}
},
"title": "HomeMatic ReGaHSS",
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.22",
"version": "3.0.23",
"engines": {
"node": ">=10.0.0"
},
Expand Down

0 comments on commit a8c0323

Please sign in to comment.