iobroker.lorawan 1.18.9 → 1.18.10
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/admin/i18n/de/translations.json +3 -0
- package/admin/i18n/en/translations.json +4 -1
- package/admin/i18n/es/translations.json +3 -0
- package/admin/i18n/fr/translations.json +3 -0
- package/admin/i18n/it/translations.json +3 -0
- package/admin/i18n/nl/translations.json +3 -0
- package/admin/i18n/pl/translations.json +3 -0
- package/admin/i18n/pt/translations.json +3 -0
- package/admin/i18n/ru/translations.json +3 -0
- package/admin/i18n/uk/translations.json +3 -0
- package/admin/i18n/zh-cn/translations.json +3 -0
- package/admin/jsonConfig.json +20 -7
- package/io-package.json +14 -14
- package/lib/modules/bridge.js +53 -1
- 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.18.10 (2025-11-23)
|
|
27
|
+
* (BenAhrdt) Effects for Lights in common.states
|
|
28
|
+
|
|
26
29
|
### 1.18.9 (2025-11-23)
|
|
27
30
|
* (BenAhrdt) Automactic Scale of light brightness in case of common.max in state
|
|
28
31
|
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "Farbe",
|
|
55
55
|
"LightColorText": "Farb-ID",
|
|
56
56
|
"LightColorTooltip": "Aktivieren, um die Farb-ID festzulegen",
|
|
57
|
+
"LightEffects": "Effekte",
|
|
58
|
+
"LightEffectsText": "Effekt-ID",
|
|
59
|
+
"LightEffectsTooltip": "Aktivieren, um die Effekt-ID festzulegen",
|
|
57
60
|
"LightHeader": "Definieren Sie Zustände für eine Licht Entität",
|
|
58
61
|
"LightInformation": "Hier können Sie eine Reihe von Lichtdefinitionen definieren",
|
|
59
62
|
"LightNameText": "Entitätsname",
|
|
@@ -196,5 +196,8 @@
|
|
|
196
196
|
"LightColorTooltip": "enable to set color id",
|
|
197
197
|
"LightOnOffText": "On / Off",
|
|
198
198
|
"LightBrightnessText": "Brightness id",
|
|
199
|
-
"LightColorText": "Color id"
|
|
199
|
+
"LightColorText": "Color id",
|
|
200
|
+
"LightEffects": "Effects",
|
|
201
|
+
"LightEffectsTooltip": "enable to set Effects id",
|
|
202
|
+
"LightEffectsText": "Effects id"
|
|
200
203
|
}
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "Color",
|
|
55
55
|
"LightColorText": "identificación del color",
|
|
56
56
|
"LightColorTooltip": "habilitar para establecer la identificación del color",
|
|
57
|
+
"LightEffects": "Efectos",
|
|
58
|
+
"LightEffectsText": "Identificación de efectos",
|
|
59
|
+
"LightEffectsTooltip": "habilitar para configurar la identificación de efectos",
|
|
57
60
|
"LightHeader": "Definir estados para una entidad ligera",
|
|
58
61
|
"LightInformation": "Aquí puede definir una variedad de definiciones de Luz.",
|
|
59
62
|
"LightNameText": "nombre de entidad",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "Couleur",
|
|
55
55
|
"LightColorText": "Identifiant de couleur",
|
|
56
56
|
"LightColorTooltip": "permettre de définir l'identifiant de couleur",
|
|
57
|
+
"LightEffects": "Effets",
|
|
58
|
+
"LightEffectsText": "Identifiant des effets",
|
|
59
|
+
"LightEffectsTooltip": "activer pour définir l'identifiant des effets",
|
|
57
60
|
"LightHeader": "Définir les états d'une entité légère",
|
|
58
61
|
"LightInformation": "Ici, vous pouvez définir un tableau de définitions de lumière",
|
|
59
62
|
"LightNameText": "Nom de l'entité",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "Colore",
|
|
55
55
|
"LightColorText": "Identificativo colore",
|
|
56
56
|
"LightColorTooltip": "abilitare per impostare l'ID colore",
|
|
57
|
+
"LightEffects": "Effetti",
|
|
58
|
+
"LightEffectsText": "ID effetti",
|
|
59
|
+
"LightEffectsTooltip": "abilitare per impostare l'ID degli effetti",
|
|
57
60
|
"LightHeader": "Definire gli stati per un'entità luce",
|
|
58
61
|
"LightInformation": "Qui puoi definire una serie di definizioni di Luce",
|
|
59
62
|
"LightNameText": "Nome entità",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "Kleur",
|
|
55
55
|
"LightColorText": "Kleur-id",
|
|
56
56
|
"LightColorTooltip": "inschakelen om kleur-ID in te stellen",
|
|
57
|
+
"LightEffects": "Effecten",
|
|
58
|
+
"LightEffectsText": "Effecten id",
|
|
59
|
+
"LightEffectsTooltip": "inschakelen om Effect-ID in te stellen",
|
|
57
60
|
"LightHeader": "Definieer toestanden voor een lichte entiteit",
|
|
58
61
|
"LightInformation": "Hier kunt u een reeks lichtdefinities definiëren",
|
|
59
62
|
"LightNameText": "Entiteitsnaam",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "Kolor",
|
|
55
55
|
"LightColorText": "Identyfikator koloru",
|
|
56
56
|
"LightColorTooltip": "włącz ustawienie identyfikatora koloru",
|
|
57
|
+
"LightEffects": "Ruchomości",
|
|
58
|
+
"LightEffectsText": "Identyfikator efektów",
|
|
59
|
+
"LightEffectsTooltip": "włącz, aby ustawić identyfikator efektów",
|
|
57
60
|
"LightHeader": "Zdefiniuj Stany dla Bytu Lekkiego",
|
|
58
61
|
"LightInformation": "Tutaj możesz zdefiniować tablicę definicji Światła",
|
|
59
62
|
"LightNameText": "Nazwa jednostki",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "Cor",
|
|
55
55
|
"LightColorText": "ID da cor",
|
|
56
56
|
"LightColorTooltip": "ativar para definir o ID da cor",
|
|
57
|
+
"LightEffects": "Efeitos",
|
|
58
|
+
"LightEffectsText": "ID dos efeitos",
|
|
59
|
+
"LightEffectsTooltip": "ativar para definir o ID dos efeitos",
|
|
57
60
|
"LightHeader": "Definir estados para uma entidade leve",
|
|
58
61
|
"LightInformation": "Aqui você pode definir uma série de definições de luz",
|
|
59
62
|
"LightNameText": "Nome da entidade",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "Цвет",
|
|
55
55
|
"LightColorText": "Идентификатор цвета",
|
|
56
56
|
"LightColorTooltip": "включить установку идентификатора цвета",
|
|
57
|
+
"LightEffects": "Эффекты",
|
|
58
|
+
"LightEffectsText": "Идентификатор эффекта",
|
|
59
|
+
"LightEffectsTooltip": "включить установку идентификатора эффектов",
|
|
57
60
|
"LightHeader": "Определите состояния для легкой сущности",
|
|
58
61
|
"LightInformation": "Здесь вы можете определить массив определений света.",
|
|
59
62
|
"LightNameText": "Имя объекта",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "Колір",
|
|
55
55
|
"LightColorText": "Ідентифікатор кольору",
|
|
56
56
|
"LightColorTooltip": "дозволити встановити ідентифікатор кольору",
|
|
57
|
+
"LightEffects": "Ефекти",
|
|
58
|
+
"LightEffectsText": "Ідентифікатор ефектів",
|
|
59
|
+
"LightEffectsTooltip": "дозволити встановити ідентифікатор ефектів",
|
|
57
60
|
"LightHeader": "Визначення станів для легкої сутності",
|
|
58
61
|
"LightInformation": "Тут ви можете визначити масив визначень Light",
|
|
59
62
|
"LightNameText": "Назва сутності",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"LightColor": "颜色",
|
|
55
55
|
"LightColorText": "颜色编号",
|
|
56
56
|
"LightColorTooltip": "启用设置颜色 ID",
|
|
57
|
+
"LightEffects": "效果",
|
|
58
|
+
"LightEffectsText": "效果 ID",
|
|
59
|
+
"LightEffectsTooltip": "启用设置效果 ID",
|
|
57
60
|
"LightHeader": "定义光实体的状态",
|
|
58
61
|
"LightInformation": "在这里您可以定义一组灯光定义",
|
|
59
62
|
"LightNameText": "实体名称",
|
package/admin/jsonConfig.json
CHANGED
|
@@ -1802,14 +1802,16 @@
|
|
|
1802
1802
|
"xl": 2
|
|
1803
1803
|
},
|
|
1804
1804
|
{
|
|
1805
|
-
"type": "
|
|
1806
|
-
"attr": "
|
|
1807
|
-
"label": "",
|
|
1805
|
+
"type": "checkbox",
|
|
1806
|
+
"attr": "LightEffects",
|
|
1807
|
+
"label": "LightEffects",
|
|
1808
|
+
"tooltip": "LightEffectsTooltip",
|
|
1809
|
+
"default": false,
|
|
1808
1810
|
"xs": 12,
|
|
1809
|
-
"sm":
|
|
1810
|
-
"md":
|
|
1811
|
-
"lg":
|
|
1812
|
-
"xl":
|
|
1811
|
+
"sm": 2,
|
|
1812
|
+
"md": 2,
|
|
1813
|
+
"lg": 2,
|
|
1814
|
+
"xl": 2
|
|
1813
1815
|
},
|
|
1814
1816
|
{
|
|
1815
1817
|
"type": "objectId",
|
|
@@ -1842,6 +1844,17 @@
|
|
|
1842
1844
|
"md": 4,
|
|
1843
1845
|
"lg": 4,
|
|
1844
1846
|
"xl": 4
|
|
1847
|
+
},
|
|
1848
|
+
{
|
|
1849
|
+
"type": "objectId",
|
|
1850
|
+
"attr": "EffectsId",
|
|
1851
|
+
"label": "LightEffectsText",
|
|
1852
|
+
"hidden": "data.LightEffects === false",
|
|
1853
|
+
"xs": 12,
|
|
1854
|
+
"sm": 4,
|
|
1855
|
+
"md": 4,
|
|
1856
|
+
"lg": 4,
|
|
1857
|
+
"xl": 4
|
|
1845
1858
|
}
|
|
1846
1859
|
]
|
|
1847
1860
|
},
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.18.
|
|
4
|
+
"version": "1.18.10",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.18.10": {
|
|
7
|
+
"en": "Effects for Lights in common.states",
|
|
8
|
+
"de": "Effekte für Lichter gemeinsam. Staaten",
|
|
9
|
+
"ru": "Эффекты для общего света. государства",
|
|
10
|
+
"pt": "Efeitos para Luzes em comum. estados",
|
|
11
|
+
"nl": "Effecten voor Lichten gemeen. staat",
|
|
12
|
+
"fr": "Effets pour les lumières en commun. États",
|
|
13
|
+
"it": "Effetti per le luci in comune. Stati",
|
|
14
|
+
"es": "Efectos para las luces en común. estados",
|
|
15
|
+
"pl": "Skutki dla Lights wspólne. stany",
|
|
16
|
+
"uk": "Ефекти для вогнів в цілому. Стан",
|
|
17
|
+
"zh-cn": "对光的影响是共同的。 状态"
|
|
18
|
+
},
|
|
6
19
|
"1.18.9": {
|
|
7
20
|
"en": "Automactic Scale of light brightness in case of common.max in state",
|
|
8
21
|
"de": "Automaktische Skala der Lichthelligkeit bei Common.max im Zustand",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Zmiana niepowtarzalnego identyfikatora dla stanów wewnętrznych Lorawan\nZmień sekwencję dicovery i sprawdź linki w dół przy starcie",
|
|
81
94
|
"uk": "Зміна унікальних ідентифікаторів для внутрішніх стандартних станів лоурен\nЗміна послідовності дифективних і контрольних посилань при запуску",
|
|
82
95
|
"zh-cn": "更改 Lorawan 内部标准状态的独有 ID\n更改隐藏的顺序并在启动时检查下行链路"
|
|
83
|
-
},
|
|
84
|
-
"1.18.3": {
|
|
85
|
-
"en": "Add possibility to switch the LoraWAN communication off (origin)",
|
|
86
|
-
"de": "Möglichkeit hinzufügen, die LoraWAN-Kommunikation auszuschalten (Ursprung)",
|
|
87
|
-
"ru": "Добавить возможность отключения связи LoraWAN (оригинал)",
|
|
88
|
-
"pt": "Adicionar possibilidade de desligar a comunicação LoraWAN (origem)",
|
|
89
|
-
"nl": "Mogelijkheid toevoegen om de LoraWAN communicatie uit te schakelen (origine)",
|
|
90
|
-
"fr": "Ajouter la possibilité d'éteindre la communication LoraWAN (origine)",
|
|
91
|
-
"it": "Aggiungi la possibilità di spegnere la comunicazione LoraWAN (origine)",
|
|
92
|
-
"es": "Añadir posibilidad de apagar la comunicación LoraWAN (origin)",
|
|
93
|
-
"pl": "Dodaj możliwość wyłączenia komunikacji LoraWAN (pochodzenie)",
|
|
94
|
-
"uk": "Додати можливість переключити LoraWAN зв'язок (рігін)",
|
|
95
|
-
"zh-cn": "添加切换 LoraWAN 通讯( 来源) 的可能性"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/lib/modules/bridge.js
CHANGED
|
@@ -235,6 +235,12 @@ class bridgeClass {
|
|
|
235
235
|
const color = this.rgbToHex(message.color);
|
|
236
236
|
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.color, color);
|
|
237
237
|
}
|
|
238
|
+
if (message.effect) {
|
|
239
|
+
const effect = this.SubscribedTopics[topic].effects[message.effect]
|
|
240
|
+
? this.SubscribedTopics[topic].effects[message.effect]
|
|
241
|
+
: '';
|
|
242
|
+
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.effects, effect);
|
|
243
|
+
}
|
|
238
244
|
return;
|
|
239
245
|
}
|
|
240
246
|
// Check for namespace and write own, oder foreign state
|
|
@@ -743,6 +749,14 @@ class bridgeClass {
|
|
|
743
749
|
(await this.adapter.getForeignStateAsync(this.PublishedIds[id].LightIds.color)).val,
|
|
744
750
|
);
|
|
745
751
|
}
|
|
752
|
+
if (this.PublishedIds[id].LightIds.effects) {
|
|
753
|
+
const effect = (await this.adapter.getForeignStateAsync(this.PublishedIds[id].LightIds.effects))
|
|
754
|
+
.val;
|
|
755
|
+
val.effect = '';
|
|
756
|
+
if (this.PublishedIds[id].effects[effect]) {
|
|
757
|
+
val.effect = this.PublishedIds[id].effects[effect];
|
|
758
|
+
}
|
|
759
|
+
}
|
|
746
760
|
}
|
|
747
761
|
|
|
748
762
|
// safe old values (5 last values)
|
|
@@ -2205,6 +2219,21 @@ class bridgeClass {
|
|
|
2205
2219
|
if (config.LightColor) {
|
|
2206
2220
|
DiscoveryPayload.supported_color_modes = ['rgb'];
|
|
2207
2221
|
}
|
|
2222
|
+
const effectSet = {};
|
|
2223
|
+
let effectState = {};
|
|
2224
|
+
if (config.LightEffects) {
|
|
2225
|
+
const effectObject = await this.adapter.getForeignObjectAsync(config.LightIds.effects);
|
|
2226
|
+
const effect_list = [];
|
|
2227
|
+
if (effectObject.common.states) {
|
|
2228
|
+
effectState = effectObject.common.states;
|
|
2229
|
+
for (const effect in effectObject.common.states) {
|
|
2230
|
+
effectSet[effectObject.common.states[effect]] = effect;
|
|
2231
|
+
effect_list.push(effectObject.common.states[effect]);
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
DiscoveryPayload.effect = true;
|
|
2235
|
+
DiscoveryPayload.effect_list = effect_list;
|
|
2236
|
+
}
|
|
2208
2237
|
|
|
2209
2238
|
// Assign Subscribed Topic
|
|
2210
2239
|
this.assignTopicStructure(
|
|
@@ -2216,7 +2245,7 @@ class bridgeClass {
|
|
|
2216
2245
|
DiscoveryTopic,
|
|
2217
2246
|
DiscoveryPayload,
|
|
2218
2247
|
Id,
|
|
2219
|
-
{ light: true, LightIds: config.LightIds },
|
|
2248
|
+
{ light: true, LightIds: config.LightIds, effects: effectSet },
|
|
2220
2249
|
);
|
|
2221
2250
|
|
|
2222
2251
|
// Assign published Ids
|
|
@@ -2260,6 +2289,20 @@ class bridgeClass {
|
|
|
2260
2289
|
);
|
|
2261
2290
|
}
|
|
2262
2291
|
|
|
2292
|
+
if (config.LightEffects) {
|
|
2293
|
+
this.assignIdStructure(
|
|
2294
|
+
this.PublishedIds,
|
|
2295
|
+
config.LightIds.effects,
|
|
2296
|
+
{
|
|
2297
|
+
usedDeviceId: onOff.DeviceIdentifier,
|
|
2298
|
+
},
|
|
2299
|
+
DiscoveryTopic,
|
|
2300
|
+
DiscoveryPayload,
|
|
2301
|
+
`${lightTopic}${this.EndingState}`,
|
|
2302
|
+
{ light: true, LightIds: config.LightIds, effects: effectState },
|
|
2303
|
+
);
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2263
2306
|
const informations = {
|
|
2264
2307
|
onOff: {
|
|
2265
2308
|
usedDeviceId: onOff.DeviceIdentifier,
|
|
@@ -2281,6 +2324,9 @@ class bridgeClass {
|
|
|
2281
2324
|
if (config.LightColors) {
|
|
2282
2325
|
await this.publishId(config.LightIds.color, undefined, {});
|
|
2283
2326
|
}
|
|
2327
|
+
if (config.LightEffects) {
|
|
2328
|
+
await this.publishId(config.LightIds.effects, undefined, {});
|
|
2329
|
+
}
|
|
2284
2330
|
// Subscribe state for onStatechange mathode
|
|
2285
2331
|
await this.adapter.subscribeForeignStatesAsync(config.LightIds.onOff);
|
|
2286
2332
|
if (config.LightBrightness) {
|
|
@@ -2289,6 +2335,9 @@ class bridgeClass {
|
|
|
2289
2335
|
if (config.LightColor) {
|
|
2290
2336
|
await this.adapter.subscribeForeignStatesAsync(config.LightIds.color);
|
|
2291
2337
|
}
|
|
2338
|
+
if (config.LightEffects) {
|
|
2339
|
+
await this.adapter.subscribeForeignStatesAsync(config.LightIds.effect);
|
|
2340
|
+
}
|
|
2292
2341
|
}, 1000);
|
|
2293
2342
|
} catch (error) {
|
|
2294
2343
|
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
@@ -2314,6 +2363,9 @@ class bridgeClass {
|
|
|
2314
2363
|
if (config.LightColor) {
|
|
2315
2364
|
LightIds.color = config.ColorId;
|
|
2316
2365
|
}
|
|
2366
|
+
if (config.LightEffects) {
|
|
2367
|
+
LightIds.effects = config.EffectsId;
|
|
2368
|
+
}
|
|
2317
2369
|
for (const id of Object.values(LightIds)) {
|
|
2318
2370
|
if (!(await this.adapter.getForeignObjectAsync(id))) {
|
|
2319
2371
|
this.adapter.log.debug(`Id: ${id} does not exsit.`);
|