iobroker.lorawan 1.22.33 → 1.22.35
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 +6 -7
- package/io-package.json +27 -27
- package/lib/modules/bridgeDeviceHandler.js +28 -29
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -28,6 +28,12 @@ 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.35 (2026-09-23)
|
|
32
|
+
- (codex) Update adapter-core and test dependencies to the current recommended versions.
|
|
33
|
+
|
|
34
|
+
### 1.22.34 (2026-09-23)
|
|
35
|
+
- (BenAhrdt) Process Bridge entity availability on discovery and normal messages and keep existing state types for incompatible values.
|
|
36
|
+
|
|
31
37
|
### 1.22.33 (2026-08-19)
|
|
32
38
|
- (BenAhrdt) Add Home Assistant wind direction and angle measurement classification
|
|
33
39
|
|
|
@@ -37,13 +43,6 @@ For numeric sensor entities, the bridge assigns Home Assistant `device_class` an
|
|
|
37
43
|
### 1.22.31 (2026-07-09)
|
|
38
44
|
- (BenAhrdt) Add selection of ToIob source id
|
|
39
45
|
|
|
40
|
-
### 1.22.30 (2026-07-07)
|
|
41
|
-
- (BenAhrdt) Add PIR Mini device Profile
|
|
42
|
-
- (BenAhrdt) Add possibillity to ad states to downlink numbers
|
|
43
|
-
|
|
44
|
-
### 1.22.29 (2026-07-06)
|
|
45
|
-
- (BenAhrdt) Add some roles and units to assignhandler
|
|
46
|
-
|
|
47
46
|
[Older changes can be found there](CHANGELOG_OLD.md)
|
|
48
47
|
|
|
49
48
|
## DISCLAIMER
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.22.
|
|
4
|
+
"version": "1.22.35",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.22.35": {
|
|
7
|
+
"en": "Update adapter-core and test dependencies to the current recommended versions.",
|
|
8
|
+
"de": "Aktualisiere Adaptercore und teste Abhängigkeiten auf die empfohlene Version.",
|
|
9
|
+
"ru": "Обновите зависимости ядра адаптера и тестирования до текущих рекомендуемых версий.",
|
|
10
|
+
"pt": "Atualize adapter-core e test dependências para as versões atuais.",
|
|
11
|
+
"nl": "Update de kern van de adapter en test de afhankelijkheden naar de huidige aanbevolen versies.",
|
|
12
|
+
"fr": "Passez à jour Adapter-Core et testez les dépendances aux versions recommandées.",
|
|
13
|
+
"it": "Aggiorna adapter-core e test le dipendenze alle versioni consigliate.",
|
|
14
|
+
"es": "Actualice el núcleo del adaptador y las dependencias de prueba a las versiones recomendadas.",
|
|
15
|
+
"pl": "Zaktualizuj zależności rdzenia adaptera i testów do aktualnych zalecanych wersji.",
|
|
16
|
+
"uk": "Оновіть адаптер-ядра та тестові залежності до поточних рекомендованих версій.",
|
|
17
|
+
"zh-cn": "将适配器核心和测试依赖项更新到当前推荐版本。"
|
|
18
|
+
},
|
|
19
|
+
"1.22.34": {
|
|
20
|
+
"en": "Process Bridge entity availability on discovery and normal messages and keep existing state types for incompatible values.",
|
|
21
|
+
"de": "Verarbeitet Bridge-Entitäten in Discovery- und Normalnachrichten und behält bestehende Statustypen für inkompatible Werte bei.",
|
|
22
|
+
"ru": "Доступность объектов Process Bridge при обнаружении и обычных сообщениях и сохраняйте существующие типы состояний для несовместимых значений.",
|
|
23
|
+
"pt": "Use a entidade Process Bridge na descoberta e em mensagens normais e mantenha os tipos de estado incompatíveis.",
|
|
24
|
+
"nl": "Verwerk de beschikbaarheid van entiteiten bij detectie en normale berichten en behoud bestaande statussen voor incompatibele waarden.",
|
|
25
|
+
"fr": "Traitez la disponibilité des entités Bridge lors de leur découverte et des messages normaux et conservez les types d'état existants.",
|
|
26
|
+
"it": "Entità Process Bridge su discovery e messaggi normali e conserva i tipi di stato esistenti per valori incompatibili.",
|
|
27
|
+
"es": "Procese Bridge la disponibilidad de la entidad al detectar y los mensajes normales y conservar los tipos de estado existentes para valores incompatibles.",
|
|
28
|
+
"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.",
|
|
29
|
+
"uk": "Обробляйте доступність сутності Bridge при виявленні та звичайних повідомленнях та збережіть існуючі типи станів для несумісних значень.",
|
|
30
|
+
"zh-cn": "处理 Bridge 实体在发现和普通消息中的可用性,并保留现有状态类型以防不兼容的值。"
|
|
31
|
+
},
|
|
6
32
|
"1.22.33": {
|
|
7
33
|
"en": "Add Home Assistant wind direction and angle measurement classification",
|
|
8
34
|
"de": "Klassifizierung der Windrichtungs- und Winkelmessung in Home Assistant hinzufügen",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Dodaj role i jednostki do assignhandler",
|
|
68
94
|
"uk": "Додати деякі ролі та юніти до assignhandler",
|
|
69
95
|
"zh-cn": "向 assignhandler 添加一些角色和单位"
|
|
70
|
-
},
|
|
71
|
-
"1.22.28": {
|
|
72
|
-
"en": "Add DewPointTemperature to assignhandler",
|
|
73
|
-
"de": "Füge DewPointTemperature zum Zuweisungshandler hinzu.",
|
|
74
|
-
"ru": "Добавьте DewPointTemperature в assignhandler",
|
|
75
|
-
"pt": "Adicione DewPointTemperature ao assignhandler",
|
|
76
|
-
"nl": "Voeg DewPointTemperature toe aan assignhandler",
|
|
77
|
-
"fr": "Ajouter DewPointTemperature à assignhandler",
|
|
78
|
-
"it": "Aggiungi DewPointTemperature all'assignhandler",
|
|
79
|
-
"es": "Agregar DewPointTemperature a assignhandler",
|
|
80
|
-
"pl": "Dodaj DewPointTemperature do assignhandler",
|
|
81
|
-
"uk": "Додати DewPointTemperature до assignhandler",
|
|
82
|
-
"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.35",
|
|
4
4
|
"description": "converts the desired lora gateway data to a ioBroker structure",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "BenAhrdt",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"node": ">= 22"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@iobroker/adapter-core": "^3.4.
|
|
29
|
-
"@iobroker/dm-utils": "^3.
|
|
28
|
+
"@iobroker/adapter-core": "^3.4.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
|
-
"@iobroker/testing": "^
|
|
43
|
-
"@tsconfig/node22": "^22.0.
|
|
44
|
-
"@types/lodash": "^4.17.
|
|
42
|
+
"@iobroker/testing": "^6.2.2",
|
|
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
|
},
|