iobroker.lorawan 1.22.33 → 1.22.34
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 -3
- package/io-package.json +14 -14
- package/lib/modules/bridgeDeviceHandler.js +28 -29
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -28,6 +28,9 @@ For numeric sensor entities, the bridge assigns Home Assistant `device_class` an
|
|
|
28
28
|
Placeholder for the next version (at the beginning of the line):
|
|
29
29
|
### **WORK IN PROGRESS**
|
|
30
30
|
-->
|
|
31
|
+
### 1.22.34 (2026-09-23)
|
|
32
|
+
- (BenAhrdt) Process Bridge entity availability on discovery and normal messages and keep existing state types for incompatible values.
|
|
33
|
+
|
|
31
34
|
### 1.22.33 (2026-08-19)
|
|
32
35
|
- (BenAhrdt) Add Home Assistant wind direction and angle measurement classification
|
|
33
36
|
|
|
@@ -41,9 +44,6 @@ For numeric sensor entities, the bridge assigns Home Assistant `device_class` an
|
|
|
41
44
|
- (BenAhrdt) Add PIR Mini device Profile
|
|
42
45
|
- (BenAhrdt) Add possibillity to ad states to downlink numbers
|
|
43
46
|
|
|
44
|
-
### 1.22.29 (2026-07-06)
|
|
45
|
-
- (BenAhrdt) Add some roles and units to assignhandler
|
|
46
|
-
|
|
47
47
|
[Older changes can be found there](CHANGELOG_OLD.md)
|
|
48
48
|
|
|
49
49
|
## DISCLAIMER
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.22.
|
|
4
|
+
"version": "1.22.34",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.22.34": {
|
|
7
|
+
"en": "Process Bridge entity availability on discovery and normal messages and keep existing state types for incompatible values.",
|
|
8
|
+
"de": "Verarbeitet Bridge-Entitäten in Discovery- und Normalnachrichten und behält bestehende Statustypen für inkompatible Werte bei.",
|
|
9
|
+
"ru": "Доступность объектов Process Bridge при обнаружении и обычных сообщениях и сохраняйте существующие типы состояний для несовместимых значений.",
|
|
10
|
+
"pt": "Use a entidade Process Bridge na descoberta e em mensagens normais e mantenha os tipos de estado incompatíveis.",
|
|
11
|
+
"nl": "Verwerk de beschikbaarheid van entiteiten bij detectie en normale berichten en behoud bestaande statussen voor incompatibele waarden.",
|
|
12
|
+
"fr": "Traitez la disponibilité des entités Bridge lors de leur découverte et des messages normaux et conservez les types d'état existants.",
|
|
13
|
+
"it": "Entità Process Bridge su discovery e messaggi normali e conserva i tipi di stato esistenti per valori incompatibili.",
|
|
14
|
+
"es": "Procese Bridge la disponibilidad de la entidad al detectar y los mensajes normales y conservar los tipos de estado existentes para valores incompatibles.",
|
|
15
|
+
"pl": "Przetwarzaj dostępność jednostek programu Bridge w wiadomościach wykrywania i zwykłych komunikatów i zachowaj istniejące typy stanów dla niekompatybilnych wartości.",
|
|
16
|
+
"uk": "Обробляйте доступність сутності Bridge при виявленні та звичайних повідомленнях та збережіть існуючі типи станів для несумісних значень.",
|
|
17
|
+
"zh-cn": "处理 Bridge 实体在发现和普通消息中的可用性,并保留现有状态类型以防不兼容的值。"
|
|
18
|
+
},
|
|
6
19
|
"1.22.33": {
|
|
7
20
|
"en": "Add Home Assistant wind direction and angle measurement classification",
|
|
8
21
|
"de": "Klassifizierung der Windrichtungs- und Winkelmessung in Home Assistant hinzufügen",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Dodaj DewPointTemperature do assignhandler",
|
|
81
94
|
"uk": "Додати DewPointTemperature до assignhandler",
|
|
82
95
|
"zh-cn": "将露点温度添加到赋值处理程序"
|
|
83
|
-
},
|
|
84
|
-
"1.22.27": {
|
|
85
|
-
"en": "Bugfix warning for wrong id\nAdd Profile to downloadconfig",
|
|
86
|
-
"de": "Bugfix-Warnung wegen falscher ID\nProfil zu downloadconfig hinzufügen",
|
|
87
|
-
"ru": "Исправлено предупреждение об ошибке, связанной с неверным идентификатором.\nДобавить профиль в downloadconfig",
|
|
88
|
-
"pt": "Aviso de correção de bug para ID incorreto\nAdicionar perfil ao downloadconfig",
|
|
89
|
-
"nl": "Bugfix-waarschuwing voor onjuiste ID\nVoeg profiel toe aan downloadconfig",
|
|
90
|
-
"fr": "Avertissement de correction de bug pour identifiant incorrect\nAjouter le profil à downloadconfig",
|
|
91
|
-
"it": "Avviso di correzione bug per ID errato\nAggiungi il profilo a downloadconfig",
|
|
92
|
-
"es": "Advertencia de corrección de errores por ID incorrecto\nAgregar perfil a downloadconfig",
|
|
93
|
-
"pl": "Ostrzeżenie o naprawie błędu dotyczącego nieprawidłowego identyfikatora\nDodaj profil do downloadconfig",
|
|
94
|
-
"uk": "Попередження про виправлення помилки для неправильного ідентифікатора\nДодати профіль до завантаженої конфігурації",
|
|
95
|
-
"zh-cn": "修复错误 ID 警告\n将配置文件添加到 downloadconfig"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -127,29 +127,19 @@ class bridgeDeviceHandlerClass {
|
|
|
127
127
|
},
|
|
128
128
|
native: {},
|
|
129
129
|
});
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
entity.domain !== 'button' &&
|
|
143
|
-
entity.domain !== 'event' &&
|
|
144
|
-
entity.domain !== 'scene' &&
|
|
145
|
-
entity.available === false
|
|
146
|
-
) {
|
|
147
|
-
available[entityInfo.device.availableId] = false;
|
|
148
|
-
await this.adapter.setState(entityInfo.device.availableId, false, true);
|
|
149
|
-
}
|
|
130
|
+
const relevantForAvailability =
|
|
131
|
+
entity.domain !== 'button' && entity.domain !== 'event' && entity.domain !== 'scene';
|
|
132
|
+
if (relevantForAvailability && typeof entity.available === 'boolean') {
|
|
133
|
+
const availableId = entityInfo.device.availableId;
|
|
134
|
+
const previousAvailability = available[availableId];
|
|
135
|
+
const nextAvailability =
|
|
136
|
+
previousAvailability === undefined
|
|
137
|
+
? entity.available
|
|
138
|
+
: previousAvailability && entity.available;
|
|
139
|
+
if (previousAvailability !== nextAvailability) {
|
|
140
|
+
available[availableId] = nextAvailability;
|
|
141
|
+
await this.adapter.setState(availableId, nextAvailability, true);
|
|
150
142
|
}
|
|
151
|
-
} else {
|
|
152
|
-
await this.adapter.setState(entityInfo.device.availableId, true, true);
|
|
153
143
|
}
|
|
154
144
|
|
|
155
145
|
// DeviceLink
|
|
@@ -182,11 +172,13 @@ class bridgeDeviceHandlerClass {
|
|
|
182
172
|
}
|
|
183
173
|
unique_id.replace('.', '_');
|
|
184
174
|
for (const state of entityInfo.state) {
|
|
175
|
+
const existingObject = await this.adapter.getObjectAsync(state.id);
|
|
176
|
+
const stateType = existingObject?.common?.type || state.type;
|
|
185
177
|
await this.adapter.extendObject(state.id, {
|
|
186
178
|
type: 'state',
|
|
187
179
|
common: {
|
|
188
180
|
name: state.name,
|
|
189
|
-
type:
|
|
181
|
+
type: stateType,
|
|
190
182
|
role: state.role,
|
|
191
183
|
read: state.read,
|
|
192
184
|
write: state.write,
|
|
@@ -199,19 +191,26 @@ class bridgeDeviceHandlerClass {
|
|
|
199
191
|
native: { entity: entity, entityInfo: entityInfo, state: state },
|
|
200
192
|
});
|
|
201
193
|
let stateValue = state.val;
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
} else if (state.type === 'number') {
|
|
205
|
-
if (state.states && typeof state.val === 'string') {
|
|
194
|
+
if (stateType === 'boolean') {
|
|
195
|
+
if (typeof state.val === 'boolean') {
|
|
206
196
|
stateValue = state.val;
|
|
197
|
+
} else if (state.val === 'on' || state.val === 'true') {
|
|
198
|
+
stateValue = true;
|
|
199
|
+
} else if (state.val === 'off' || state.val === 'false') {
|
|
200
|
+
stateValue = false;
|
|
207
201
|
} else {
|
|
208
|
-
stateValue =
|
|
202
|
+
stateValue = undefined;
|
|
209
203
|
}
|
|
204
|
+
} else if (stateType === 'number') {
|
|
205
|
+
stateValue = Number(state.val);
|
|
206
|
+
} else if (stateType === 'string') {
|
|
207
|
+
stateValue = String(state.val);
|
|
210
208
|
}
|
|
211
209
|
if (
|
|
212
210
|
this.adapter.objectExists(state.id) &&
|
|
213
211
|
state.val != null &&
|
|
214
|
-
|
|
212
|
+
stateValue !== undefined &&
|
|
213
|
+
(stateType !== 'number' || Number.isFinite(stateValue)) &&
|
|
215
214
|
stateValue != '#000000'
|
|
216
215
|
) {
|
|
217
216
|
await this.adapter.setState(state.id, stateValue, true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.lorawan",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.34",
|
|
4
4
|
"description": "converts the desired lora gateway data to a ioBroker structure",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "BenAhrdt",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@iobroker/adapter-core": "^3.4.1",
|
|
29
|
-
"@iobroker/dm-utils": "^3.
|
|
29
|
+
"@iobroker/dm-utils": "^3.2.0",
|
|
30
30
|
"easy-crc": "^1.1.0",
|
|
31
31
|
"lodash": "^4.18.1",
|
|
32
32
|
"mqtt": "^5.15.2",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@alcalzone/release-script": "^5.2.1",
|
|
37
37
|
"@alcalzone/release-script-plugin-iobroker": "^5.2.0",
|
|
38
|
-
"@alcalzone/release-script-plugin-license": "^5.2.
|
|
38
|
+
"@alcalzone/release-script-plugin-license": "^5.2.2",
|
|
39
39
|
"@alcalzone/release-script-plugin-manual-review": "^5.2.0",
|
|
40
40
|
"@iobroker/adapter-dev": "^1.5.0",
|
|
41
41
|
"@iobroker/eslint-config": "^2.2.0",
|
|
42
42
|
"@iobroker/testing": "^5.3.0",
|
|
43
|
-
"@tsconfig/node22": "^22.0.
|
|
44
|
-
"@types/lodash": "^4.17.
|
|
43
|
+
"@tsconfig/node22": "^22.0.6",
|
|
44
|
+
"@types/lodash": "^4.17.25",
|
|
45
45
|
"@types/node": "^22.20.1",
|
|
46
46
|
"typescript": "~5.9.3"
|
|
47
47
|
},
|