iobroker.zwavews 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
  ![Test and Release](https://github.com/arteck/ioBroker.zwavews/workflows/Test%20and%20Release/badge.svg)
14
14
  ![CodeQL](https://github.com/arteck/ioBroker.zwavews/actions/workflows/codeql.yml/badge.svg?branch=main)
15
15
 
16
- ## zwavews adapter for ioBroker
16
+ ## zwave-WS adapter for ioBroker
17
17
 
18
18
  The `zwavews` adapter connects a [`zwave-js-ui`](https://zwave-js.github.io/zwave-js-ui/#/) to ioBroker and creates corresponding data points for devices, values, and statuses. This allows Z-Wave devices to be conveniently used in visualizations, logic, and automations.
19
19
 
@@ -32,6 +32,12 @@ we use the Home Assistant Settings for this:
32
32
 
33
33
 
34
34
  ## Changelog
35
+ ### 0.0.5 (2026-01-06)
36
+ * (arteck) add online status
37
+
38
+ ### 0.0.4 (2026-01-06)
39
+ * (arteck) fix overrideState
40
+
35
41
  ### 0.0.3 (2026-01-06)
36
42
  * (arteck) fix title
37
43
 
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zwavews",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "news": {
6
+ "0.0.5": {
7
+ "en": "add online status",
8
+ "de": "online-status hinzufügen",
9
+ "ru": "добавить онлайн статус",
10
+ "pt": "adicionar status online",
11
+ "nl": "online status toevoegen",
12
+ "fr": "ajouter le statut en ligne",
13
+ "it": "aggiungere lo stato online",
14
+ "es": "añadir estado en línea",
15
+ "pl": "dodaj status online",
16
+ "uk": "додати статус онлайн",
17
+ "zh-cn": "添加在线状态"
18
+ },
19
+ "0.0.4": {
20
+ "en": "fix overrideState \n",
21
+ "de": "override fixieren Staat\n",
22
+ "ru": "исправить ошибку государство\n",
23
+ "pt": "corrigir sobreposição Estado\n",
24
+ "nl": "fix override Staat\n",
25
+ "fr": "correction de la priorité État\n",
26
+ "it": "correzione di sovraccarico Stato\n",
27
+ "es": "corrección Estado\n",
28
+ "pl": "fix derover Państwo\n",
29
+ "uk": "закріпити напляскване Стан\n",
30
+ "zh-cn": "固定覆盖 状态\n"
31
+ },
6
32
  "0.0.3": {
7
33
  "en": "fix title",
8
34
  "de": "bersetzung titel",
@@ -15,32 +41,6 @@
15
41
  "pl": "ustaw tytuł",
16
42
  "uk": "заголовок",
17
43
  "zh-cn": "固定标题"
18
- },
19
- "0.0.2": {
20
- "en": "first release",
21
- "de": "erste veröffentlichung",
22
- "ru": "первый выпуск",
23
- "pt": "primeira versão",
24
- "nl": "eerste release",
25
- "fr": "première sortie",
26
- "it": "primo rilascio",
27
- "es": "primera liberación",
28
- "pl": "pierwsze wydanie",
29
- "uk": "перший реліз",
30
- "zh-cn": "第一次发布"
31
- },
32
- "0.0.1": {
33
- "en": "init",
34
- "de": "init",
35
- "ru": "инициализация",
36
- "pt": "inicialização",
37
- "nl": "init",
38
- "fr": "initialisation",
39
- "it": "inizializzazione",
40
- "es": "inicialización",
41
- "pl": "init",
42
- "uk": "ініціалізація",
43
- "zh-cn": "初始化"
44
44
  }
45
45
  },
46
46
  "messages": [],
@@ -130,7 +130,7 @@
130
130
  ],
131
131
  "globalDependencies": [
132
132
  {
133
- "admin": ">=7.4.10"
133
+ "admin": ">=7.6.17"
134
134
  }
135
135
  ]
136
136
  },
@@ -153,8 +153,7 @@
153
153
  "webUIScheme": "http",
154
154
  "webUIServer": "",
155
155
  "webUIPort": 8091,
156
- "showNodeInfoMessages": true,
157
- "renewNodeInfo": true,
156
+ "showNodeInfoMessage": true,
158
157
  "useEventInDesc": false,
159
158
  "wakeUpInfo": false,
160
159
  "newTypeEvent": true
package/lib/constants.js CHANGED
@@ -13,7 +13,8 @@ const noInfoDP = [
13
13
  ];
14
14
  const mixedType = [
15
15
  "status",
16
- "interviewStage"
16
+ "interviewStage",
17
+ "overrideState"
17
18
  ];
18
19
  const RGB = ["Red", "Green", "Blue"];
19
20
 
package/lib/helper.js CHANGED
@@ -53,7 +53,7 @@ class Helper {
53
53
  common: {
54
54
  name: element.name ?? element.label,
55
55
  statusStates: {
56
- onlineId: `${nodeId}.ready`,
56
+ onlineId: `${this.adapter.name}.${this.adapter.instance}.${nodeId}.ready`,
57
57
  },
58
58
  },
59
59
  native: {},
@@ -518,21 +518,26 @@ class Helper {
518
518
  *
519
519
  * @param nodeId
520
520
  * @param element
521
+ * @param nameChange
521
522
  */
522
- async updateDevice(nodeId, element) {
523
+ async updateDevice(nodeId, element, nameChange = true) {
523
524
  const obj = await this.adapter.getObjectAsync(nodeId);
524
525
  if (obj) {
525
- const newName = element.name || element.productLabel || element.manufacturer || element.newValue;
526
-
527
- if (obj.common?.name !== newName) {
528
- obj.common = obj.common ?? {};
529
- obj.common.name = newName;
530
-
526
+ if (nameChange) {
527
+ const newName = element.name || element.productLabel || element.manufacturer || element.newValue;
528
+
529
+ if (obj.common?.name !== newName) {
530
+ obj.common = obj.common ?? {};
531
+ obj.common.name = newName;
532
+ } else {
533
+ const newDesc = element.desc;
534
+ obj.common = obj.common ?? {};
535
+ obj.common.desc = newDesc;
536
+ }
531
537
  await this.adapter.setObjectAsync(nodeId, obj);
532
538
  }
533
539
  }
534
540
  }
535
-
536
541
  }
537
542
 
538
543
  module.exports = {
package/main.js CHANGED
@@ -290,8 +290,14 @@ class zwavews extends core.Adapter {
290
290
 
291
291
  case 'node removed': {
292
292
  const nodeId = utils.formatNodeId(eventTyp.nodeId);
293
- const nodeArg = {name : 'Node is Deleted'};
294
- await helper.updateDevice(nodeId, nodeArg);
293
+
294
+ if (this.config.useEventInDesc) {
295
+ const nodeArg = {desc: "Node is Deleted"};
296
+ await helper.updateDevice(nodeId, nodeArg, false);
297
+ } else {
298
+ const nodeArg = {name : 'Node is Deleted'};
299
+ await helper.updateDevice(nodeId, nodeArg, true);
300
+ }
295
301
  this.log.error(`Delete ${utils.formatNodeId(eventTyp.nodeId)}`);
296
302
  break;
297
303
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zwavews",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "zwavews adapter for ioBroker",
5
5
  "author": {
6
6
  "name": "Dennis Rathjen and Arthur Rupp",
@@ -42,7 +42,7 @@
42
42
  "@alcalzone/release-script-plugin-manual-review": "^4.0.0",
43
43
  "@iobroker/adapter-dev": "^1.5.0",
44
44
  "@iobroker/testing": "^5.2.2",
45
- "@iobroker/eslint-config": "^2.1.0",
45
+ "@iobroker/eslint-config": "^2.2.0",
46
46
  "@tsconfig/node14": "^14.1.8",
47
47
  "@types/node": "^25.0.3",
48
48
  "@types/node-schedule": "^2.1.8",