iobroker.lorawan 1.20.7 → 1.20.8
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 +3 -0
- package/io-package.json +14 -14
- package/lib/modules/objectStore.js +6 -9
- package/main.js +20 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,9 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
|
|
|
23
23
|
Placeholder for the next version (at the beginning of the line):
|
|
24
24
|
### **WORK IN PROGRESS**
|
|
25
25
|
-->
|
|
26
|
+
### 1.20.8 (2026-01-26)
|
|
27
|
+
* (BenAhrdt) changes in objectStore
|
|
28
|
+
|
|
26
29
|
### 1.20.7 (2026-01-25)
|
|
27
30
|
* (BenAhrdt) bugfix correct writing of indicators
|
|
28
31
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.20.
|
|
4
|
+
"version": "1.20.8",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.20.8": {
|
|
7
|
+
"en": "changes in objectStore",
|
|
8
|
+
"de": "änderungen des Objekts Store",
|
|
9
|
+
"ru": "изменения в объекте Магазин",
|
|
10
|
+
"pt": "alterações no objeto Armazenar",
|
|
11
|
+
"nl": "wijzigingen in object Opslaan",
|
|
12
|
+
"fr": "changements d'objet A conserver",
|
|
13
|
+
"it": "cambiamenti nell'oggetto Negozio",
|
|
14
|
+
"es": "cambios en el objeto Store",
|
|
15
|
+
"pl": "zmiany w obiekcie Przechowywać",
|
|
16
|
+
"uk": "зміни об'єкта Магазини",
|
|
17
|
+
"zh-cn": "对象变化 存储"
|
|
18
|
+
},
|
|
6
19
|
"1.20.7": {
|
|
7
20
|
"en": "bugfix correct writing of indicators",
|
|
8
21
|
"de": "bugfix korrektes schreiben von indikatoren",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "menedżer i obiekt urządzenia bugfix Kontrole urządzeń do przechowywania",
|
|
81
94
|
"uk": "диспетчер пристроїв та об'єкт Перевірка пристрою магазину",
|
|
82
95
|
"zh-cn": "错误修正设备管理器和对象 存储设备检查"
|
|
83
|
-
},
|
|
84
|
-
"1.20.1": {
|
|
85
|
-
"en": "bugfix device Manager",
|
|
86
|
-
"de": "bugfix Gerät Manager",
|
|
87
|
-
"ru": "bugfix устройство диспетчер",
|
|
88
|
-
"pt": "gerenciador de dispositivos de correção de erros",
|
|
89
|
-
"nl": "bugfix apparaatbeheer",
|
|
90
|
-
"fr": "gestionnaire de périphériques bugfix",
|
|
91
|
-
"it": "bugfix dispositivo Manager",
|
|
92
|
-
"es": "bugfix device Manager",
|
|
93
|
-
"pl": "menedżer urządzeń bugfix",
|
|
94
|
-
"uk": "диспетчер пристроїв",
|
|
95
|
-
"zh-cn": "错误修正设备管理器"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -105,11 +105,11 @@ class objectStoreClass {
|
|
|
105
105
|
let assign = undefined;
|
|
106
106
|
if (payload.object) {
|
|
107
107
|
if (Object.hasOwn(this.rolesToCheck, payload.object.common.role)) {
|
|
108
|
-
if (!deviceObject[deviceId].indicators) {
|
|
109
|
-
deviceObject[deviceId].indicators = {};
|
|
110
|
-
}
|
|
111
108
|
if (this.rolesToCheck[payload.object.common.role].indicator) {
|
|
112
109
|
if (typeof this.rolesToCheck[payload.object.common.role].indicator === 'string') {
|
|
110
|
+
if (!deviceObject[deviceId].indicators) {
|
|
111
|
+
deviceObject[deviceId].indicators = {};
|
|
112
|
+
}
|
|
113
113
|
deviceObject[deviceId].indicators[
|
|
114
114
|
this.rolesToCheck[payload.object.common.role].indicator
|
|
115
115
|
] = true;
|
|
@@ -128,11 +128,11 @@ class objectStoreClass {
|
|
|
128
128
|
if (this.rolesToCheck[payload.object.common.role].indicator.name) {
|
|
129
129
|
name = this.rolesToCheck[payload.object.common.role].indicator.name;
|
|
130
130
|
}
|
|
131
|
+
if (!deviceObject[deviceId].indicators) {
|
|
132
|
+
deviceObject[deviceId].indicators = {};
|
|
133
|
+
}
|
|
131
134
|
deviceObject[deviceId].indicators[name] = true;
|
|
132
135
|
}
|
|
133
|
-
deviceObject[deviceId].indicators[
|
|
134
|
-
this.rolesToCheck[payload.object.common.role].indicator
|
|
135
|
-
] = true;
|
|
136
136
|
}
|
|
137
137
|
if (this.rolesToCheck[payload.object.common.role].assignToDeviceInformations) {
|
|
138
138
|
assign = this.rolesToCheck[payload.object.common.role].assignToDeviceInformations;
|
|
@@ -150,9 +150,6 @@ class objectStoreClass {
|
|
|
150
150
|
}
|
|
151
151
|
// Assign to device
|
|
152
152
|
if (Object.hasOwn(this.assignToDeviceInformations, key) || assign) {
|
|
153
|
-
if (!deviceObject[deviceId].indicators) {
|
|
154
|
-
deviceObject[deviceId].indicators = {};
|
|
155
|
-
}
|
|
156
153
|
let name = key;
|
|
157
154
|
if (assign) {
|
|
158
155
|
if (typeof assign === 'string') {
|
package/main.js
CHANGED
|
@@ -771,16 +771,7 @@ class Lorawan extends utils.Adapter {
|
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
773
|
await this.setState(id, state.val, true);
|
|
774
|
-
|
|
775
|
-
const topic = await this.getStateAsync(`${this.namespace}.bridge.topic`);
|
|
776
|
-
const payload = await this.getStateAsync(`${this.namespace}.bridge.payload`);
|
|
777
|
-
if (topic && payload) {
|
|
778
|
-
await this.bridge?.bridgeMqttClient.publish(topic.val, payload.val, {});
|
|
779
|
-
|
|
780
|
-
await this.setState(`${this.namespace}.bridge.topic`, topic.val, true);
|
|
781
|
-
await this.setState(`${this.namespace}.bridge.payload`, payload.val, true);
|
|
782
|
-
}
|
|
783
|
-
await this.setState(id, state.val, true);
|
|
774
|
+
// notification
|
|
784
775
|
} else if (id.endsWith('.bridge.notification')) {
|
|
785
776
|
const words = state.val.split(' ');
|
|
786
777
|
const hash = this.createHash(words[0], this.secret.salt);
|
|
@@ -892,6 +883,19 @@ class Lorawan extends utils.Adapter {
|
|
|
892
883
|
native: {},
|
|
893
884
|
});
|
|
894
885
|
await this.setState(id, '', true);
|
|
886
|
+
} else if (words[1] === 'objectStore') {
|
|
887
|
+
this.extendObject('bridge.debug.objecStore', {
|
|
888
|
+
type: 'state',
|
|
889
|
+
common: {
|
|
890
|
+
name: 'topic of mqtt message',
|
|
891
|
+
type: 'string',
|
|
892
|
+
role: 'json',
|
|
893
|
+
read: true,
|
|
894
|
+
write: true,
|
|
895
|
+
def: '',
|
|
896
|
+
},
|
|
897
|
+
native: {},
|
|
898
|
+
});
|
|
895
899
|
}
|
|
896
900
|
} else {
|
|
897
901
|
let notificationId = `${this.namespace}.${this.bridge?.Words.notification}${this.bridge?.GeneralId}`;
|
|
@@ -908,6 +912,7 @@ class Lorawan extends utils.Adapter {
|
|
|
908
912
|
} else if (id.endsWith('bridge.debug.outgoingTopicFilter')) {
|
|
909
913
|
this.bridge?.bridgeMqttClient.setFilter('outgoing', state.val);
|
|
910
914
|
await this.setState(id, state.val, true);
|
|
915
|
+
// Send Topic and payload to bridge
|
|
911
916
|
} else if (id.endsWith('.bridge.debug.send')) {
|
|
912
917
|
const topic = await this.getStateAsync('bridge.debug.topic');
|
|
913
918
|
const payload = await this.getStateAsync('bridge.debug.payload');
|
|
@@ -917,6 +922,11 @@ class Lorawan extends utils.Adapter {
|
|
|
917
922
|
await this.setState('bridge.debug.payload', payload.val, true);
|
|
918
923
|
}
|
|
919
924
|
await this.setState(id, false, true);
|
|
925
|
+
// get objectStore
|
|
926
|
+
} else if (id.endsWith('.bridge.debug.objecStore')) {
|
|
927
|
+
if (this.objectStore?.[state.val]) {
|
|
928
|
+
this.setState(id, JSON.stringify(this.objectStore[state.val]), true);
|
|
929
|
+
}
|
|
920
930
|
} else if (id.endsWith('.bridge.dataFromIob')) {
|
|
921
931
|
if (this.bridge) {
|
|
922
932
|
await this.setState(id, state.val, true);
|