iobroker.alarm 3.4.3 → 3.6.0
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/LICENSE +1 -1
- package/README.md +7 -9
- package/admin/index_m.html +14 -0
- package/admin/words.js +37 -12
- package/io-package.json +143 -27
- package/main.js +61 -1
- package/package.json +9 -9
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2019-
|
|
3
|
+
Copyright (c) 2019-2024 misanorot <audi16v@gmx.de>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
Placeholder for the next version (at the beginning of the line):
|
|
30
30
|
### **WORK IN PROGRESS**
|
|
31
31
|
-->
|
|
32
|
+
### 3.6.0 (2024-01-06)
|
|
33
|
+
* (misanorot) added new zone functions ON/OFF / Please check the readme
|
|
34
|
+
|
|
35
|
+
### 3.5.0 (2024-01-05)
|
|
36
|
+
* (misanorot) added activation aborted speech output
|
|
37
|
+
|
|
32
38
|
### 3.4.3 (2023-11-05)
|
|
33
39
|
* (misanorot) added silent_alarm (state list) to shortcuts
|
|
34
40
|
|
|
@@ -38,15 +44,7 @@
|
|
|
38
44
|
### 3.4.1 (2023-10-29)
|
|
39
45
|
* (misanorot) fixed astro at presence simulation (jsControler 5.x???)
|
|
40
46
|
|
|
41
|
-
### 3.4.0 (2023-10-03)
|
|
42
|
-
* (misanorot) fixed #168
|
|
43
|
-
|
|
44
|
-
**[older changelogs](CHANGELOG_OLD.md)**
|
|
45
|
-
|
|
46
|
-
### 3.3.7 (2023-01-02)
|
|
47
|
-
* (misanorot) fixed issues at presence light trigger
|
|
48
|
-
|
|
49
47
|
## License
|
|
50
48
|
MIT License
|
|
51
49
|
|
|
52
|
-
Copyright (c) 2019-
|
|
50
|
+
Copyright (c) 2019-2024 misanorot <audi16v@gmx.de>
|
package/admin/index_m.html
CHANGED
|
@@ -207,6 +207,7 @@
|
|
|
207
207
|
});
|
|
208
208
|
$('#sayit .values-input[data-name="opt_say_one"][data-index="' + id_say + '"]').prop("checked", true).trigger('change');
|
|
209
209
|
$('#sayit .values-input[data-name="opt_say_two"][data-index="' + id_say + '"]').prop("checked", true).trigger('change');
|
|
210
|
+
$('#sayit .values-input[data-name="opt_say_aborted"][data-index="' + id_say + '"]').prop("checked", true).trigger('change');
|
|
210
211
|
$('#sayit .values-input[data-name="opt_say_three"][data-index="' + id_say + '"]').prop("checked", true).trigger('change');
|
|
211
212
|
$('#sayit .values-input[data-name="opt_say_four"][data-index="' + id_say + '"]').prop("checked", true).trigger('change');
|
|
212
213
|
$('#sayit .values-input[data-name="opt_say_five"][data-index="' + id_say + '"]').prop("checked", true).trigger('change');
|
|
@@ -1216,6 +1217,9 @@
|
|
|
1216
1217
|
</th>
|
|
1217
1218
|
<th data-name="opt_say_two" style="background: #174475; width: 40px" data-type="checkbox" class="">2
|
|
1218
1219
|
</th>
|
|
1220
|
+
<th data-name="opt_say_aborted" style="background: #174475; width: 40px" data-type="checkbox"
|
|
1221
|
+
class="">
|
|
1222
|
+
x</th>
|
|
1219
1223
|
<th data-name="opt_say_three" style="background: #174475; width: 40px" data-type="checkbox"
|
|
1220
1224
|
class="">3
|
|
1221
1225
|
</th>
|
|
@@ -1263,6 +1267,11 @@
|
|
|
1263
1267
|
<textarea id="text_deactivated" class="materialize-textarea value"></textarea>
|
|
1264
1268
|
<label for="text_deactivated" class="translate">text_deactivated</label>
|
|
1265
1269
|
</div>
|
|
1270
|
+
<div class="input-field col s12">
|
|
1271
|
+
<i class="material-icons prefix">highlight_off</i>
|
|
1272
|
+
<textarea id="text_aborted" class="materialize-textarea value"></textarea>
|
|
1273
|
+
<label for="text_aborted" class="translate">text_aborted</label>
|
|
1274
|
+
</div>
|
|
1266
1275
|
<div class="input-field col s12">
|
|
1267
1276
|
<i class="material-icons prefix">filter_3</i>
|
|
1268
1277
|
<textarea id="text_failed" class="materialize-textarea value"></textarea>
|
|
@@ -1459,6 +1468,11 @@
|
|
|
1459
1468
|
<textarea id="log_deact" class="materialize-textarea value"></textarea>
|
|
1460
1469
|
<label for="log_deact" class="translate">log_deact</label>
|
|
1461
1470
|
</div>
|
|
1471
|
+
<div class="input-field col s12">
|
|
1472
|
+
<i class="material-icons prefix">edit</i>
|
|
1473
|
+
<textarea id="log_aborted" class="materialize-textarea value"></textarea>
|
|
1474
|
+
<label for="log_aborted" class="translate">log_aborted</label>
|
|
1475
|
+
</div>
|
|
1462
1476
|
<div class="input-field col s12">
|
|
1463
1477
|
<i class="material-icons prefix">edit</i>
|
|
1464
1478
|
<textarea id="log_warn_act" class="materialize-textarea value"></textarea>
|
package/admin/words.js
CHANGED
|
@@ -49,18 +49,6 @@ systemDictionary = {
|
|
|
49
49
|
'pl': 'cichy alarm ostry w środku',
|
|
50
50
|
'zh-cn': '静音报警尖锐内部'
|
|
51
51
|
},
|
|
52
|
-
'speech_delay': {
|
|
53
|
-
'en': 'delay (sec)',
|
|
54
|
-
'de': 'Verzögerung (Sek.)',
|
|
55
|
-
'ru': 'задержка (сек)',
|
|
56
|
-
'pt': 'atraso (s)',
|
|
57
|
-
'nl': 'vertraging (sec)',
|
|
58
|
-
'fr': 'délai (sec)',
|
|
59
|
-
'it': 'ritardo (sec)',
|
|
60
|
-
'es': 'retraso (seg)',
|
|
61
|
-
'pl': 'opóźnienie (sek)',
|
|
62
|
-
'zh-cn': '延迟(秒)'
|
|
63
|
-
},
|
|
64
52
|
'disabled': { 'en': 'disabled', 'de': 'deaktiviert', 'ru': 'отключен', 'pt': 'Desativado', 'nl': 'invalide', 'fr': 'désactivée', 'it': 'Disabilitato', 'es': 'discapacitado', 'pl': 'wyłączone', 'zh-cn': '残' },
|
|
65
53
|
'donat': {
|
|
66
54
|
'en': "I'm not a professional developer and this is a private project, the development takes place in my spare time, if you want to support this you can thank me with a donation under PayPal. You are also welcome to send me feature requests for future versions of the adapter.",
|
|
@@ -104,6 +92,18 @@ systemDictionary = {
|
|
|
104
92
|
'pl': 'Zostawić',
|
|
105
93
|
'zh-cn': '离开'
|
|
106
94
|
},
|
|
95
|
+
'log_aborted': {'en': 'Activation aborted',
|
|
96
|
+
'de': 'Aktivierung abgebrochen',
|
|
97
|
+
'ru': 'Активация прервана',
|
|
98
|
+
'pt': 'Ativação abortada',
|
|
99
|
+
'nl': 'Activering afgebroken',
|
|
100
|
+
'fr': 'Activation interrompue',
|
|
101
|
+
'it': 'Attivazione annullata',
|
|
102
|
+
'es': 'Activación abortada',
|
|
103
|
+
'pl': 'Przerwana aktywacja',
|
|
104
|
+
'uk': 'Активація',
|
|
105
|
+
'zh-cn': '激活中止'
|
|
106
|
+
},
|
|
107
107
|
'log_act': { 'en': 'Activated', 'de': 'Aktiviert', 'ru': 'активированная', 'pt': 'ativado', 'nl': 'Geactiveerd', 'fr': 'Activé', 'it': 'attivato', 'es': 'Activado', 'pl': 'Aktywowany', 'zh-cn': '活性' },
|
|
108
108
|
'log_act_not': { 'en': 'Can not activate', 'de': 'Kann nicht aktiviert werden', 'ru': 'Не может активировать', 'pt': 'Não é possível ativar', 'nl': 'Kan niet activeren', 'fr': "Impossible d'activer", 'it': 'Impossibile attivare', 'es': 'No se puede activar', 'pl': 'Nie można aktywować', 'zh-cn': '无法激活' },
|
|
109
109
|
'log_act_warn': { 'en': 'Activated with warnings', 'de': 'Mit Warnungen aktiviert', 'ru': 'Активируется с предупреждениями', 'pt': 'Ativado com avisos', 'nl': 'Geactiveerd met waarschuwingen', 'fr': 'Activé avec des avertissements', 'it': 'Attivato con avvisi', 'es': 'Activado con advertencias', 'pl': 'Aktywowany z ostrzeżeniami', 'zh-cn': '警告激活' },
|
|
@@ -346,7 +346,32 @@ systemDictionary = {
|
|
|
346
346
|
'pl': 'częstotliwość światła błyskowego przy cichym alarmie',
|
|
347
347
|
'zh-cn': '静音时出现闪光灯频率'
|
|
348
348
|
},
|
|
349
|
+
'speech_delay': {
|
|
350
|
+
'en': 'delay',
|
|
351
|
+
'de': 'verzögerung',
|
|
352
|
+
'ru': 'отсрочка',
|
|
353
|
+
'pt': 'atraso',
|
|
354
|
+
'nl': 'vertraging',
|
|
355
|
+
'fr': 'retard',
|
|
356
|
+
'it': 'ritardo',
|
|
357
|
+
'es': 'demora',
|
|
358
|
+
'pl': 'opóźnienie',
|
|
359
|
+
'uk': 'затримка',
|
|
360
|
+
'zh-cn': '延迟'
|
|
361
|
+
},
|
|
349
362
|
'states': { 'en': 'monitoring', 'de': 'Überwachung', 'ru': 'состояния', 'pt': 'Estados', 'nl': 'Staten', 'fr': 'États', 'it': 'stati', 'es': 'Estados', 'pl': 'Stany Zjednoczone', 'zh-cn': '状态' },
|
|
363
|
+
'text_aborted': {'en': 'Activation aborted',
|
|
364
|
+
'de': 'Aktivierung abgebrochen',
|
|
365
|
+
'ru': 'Активация прервана',
|
|
366
|
+
'pt': 'Ativação abortada',
|
|
367
|
+
'nl': 'Activering afgebroken',
|
|
368
|
+
'fr': 'Activation interrompue',
|
|
369
|
+
'it': 'Attivazione annullata',
|
|
370
|
+
'es': 'Activación abortada',
|
|
371
|
+
'pl': 'Przerwana aktywacja',
|
|
372
|
+
'uk': 'Активація',
|
|
373
|
+
'zh-cn': '激活中止'
|
|
374
|
+
},
|
|
350
375
|
'text_activated': { 'en': 'Phrase after activation', 'de': 'Satz nach Aktivierung', 'ru': 'Фраза после активации', 'pt': 'Frase após ativação', 'nl': 'Zin na activering', 'fr': 'Phrase après activation', 'it': "Frase dopo l'attivazione", 'es': 'Frase después de la activación', 'pl': 'Zdanie po aktywacji', 'zh-cn': '激活后的短语' },
|
|
351
376
|
'text_alarm': { 'en': 'Phrase at burgle', 'de': 'Satz bei Einbruch', 'ru': 'Фраза в бургле', 'pt': 'Frase no burgle', 'nl': 'Zin in inbraak', 'fr': 'Phrase à burgle', 'it': 'Frase al burgle', 'es': 'Frase en Burgle', 'pl': 'Zdanie w burgle', 'zh-cn': '在burgle的短语' },
|
|
352
377
|
'text_alarm_pause': {
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "alarm",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.6.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"3.6.0": {
|
|
7
|
+
"en": "added new zone functions ON/OFF / Please check the readme",
|
|
8
|
+
"de": "neue Zonenfunktionen ON/OFF / Bitte überprüfen Sie das Readme",
|
|
9
|
+
"ru": "дополнительные функции зоны ON/OFF / Пожалуйста, проверяйте считыватель",
|
|
10
|
+
"pt": "adicionado novas funções de zona ON/OFF / Por favor, verifique o readme",
|
|
11
|
+
"nl": "toegevoegde nieuwe zonefuncties AAN/UIT / Controleer de readme",
|
|
12
|
+
"fr": "ajout de nouvelles fonctions de zone ON/OFF / Veuillez vérifier la lecture",
|
|
13
|
+
"it": "aggiunto nuove funzioni zona ON/OFF / Si prega di controllare il readme",
|
|
14
|
+
"es": "nuevas funciones de zona ON/OFF / Por favor, compruebe el readme",
|
|
15
|
+
"pl": "dodano nowe funkcje strefy ON / OFF / Proszę sprawdzić readme",
|
|
16
|
+
"uk": "додано нові функції зони ON/OFF / Будь ласка, перевірте",
|
|
17
|
+
"zh-cn": "添加新区域函数 ON/OFF / 请检查 readme"
|
|
18
|
+
},
|
|
19
|
+
"3.5.0": {
|
|
20
|
+
"en": "added activation aborted speech output",
|
|
21
|
+
"de": "zusätzliche aktivierung abgebrochene sprachausgabe",
|
|
22
|
+
"ru": "добавленная активация прерванный выход речи",
|
|
23
|
+
"pt": "adicionada ativação abortada saída de fala",
|
|
24
|
+
"nl": "toegevoegde activering afgebroken spraakuitvoer",
|
|
25
|
+
"fr": "ajout d'une sortie vocale avortée d'activation",
|
|
26
|
+
"it": "attivazione aggiunta abortire uscita del discorso",
|
|
27
|
+
"es": "añadida activación abortada discurso salida",
|
|
28
|
+
"pl": "dodana aktywacja przerwane wyjście mowy",
|
|
29
|
+
"uk": "додана активація прискореного виходу мови",
|
|
30
|
+
"zh-cn": "添加激活中止的语音输出"
|
|
31
|
+
},
|
|
6
32
|
"3.4.3": {
|
|
7
33
|
"en": "added silent_alarm (state list) to shortcuts",
|
|
8
34
|
"de": "stumm_alarm (stateliste) zu shortcuts hinzugefügt",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "#147",
|
|
68
94
|
"uk": "фіксована #147",
|
|
69
95
|
"zh-cn": "固定行动147"
|
|
70
|
-
},
|
|
71
|
-
"3.3.12": {
|
|
72
|
-
"en": "fixed select-id popup and little issues on setting pages",
|
|
73
|
-
"de": "feste ausgewählte popups und kleine probleme bei der einstellung von seiten",
|
|
74
|
-
"ru": "фиксированный селективный попап и мелкие вопросы по настройке страниц",
|
|
75
|
-
"pt": "pop-up select-id fixo e pequenos problemas nas páginas de configuração",
|
|
76
|
-
"nl": "vertaling:",
|
|
77
|
-
"fr": "popup sélectif fixe et petits problèmes sur les pages de configuration",
|
|
78
|
-
"it": "popup selezionato fisso e piccoli problemi nell'impostazione delle pagine",
|
|
79
|
-
"es": "emergente selecto fijo y pequeños problemas en las páginas de configuración",
|
|
80
|
-
"pl": "zbieramy wybrane popupy i mało problemów na stronach",
|
|
81
|
-
"uk": "виправлений вибір спливаючого спливаючого та маленького питання щодо налаштування сторінок",
|
|
82
|
-
"zh-cn": "b. 固定选择的居民人数和很少的问题"
|
|
83
|
-
},
|
|
84
|
-
"3.3.11": {
|
|
85
|
-
"en": "fixed issue at night rest",
|
|
86
|
-
"de": "festes problem bei nachtruhe",
|
|
87
|
-
"ru": "фиксированная проблема в ночной отдых",
|
|
88
|
-
"pt": "problema fixo no descanso noturno",
|
|
89
|
-
"nl": "'s nachts rust",
|
|
90
|
-
"fr": "problème fixe au repos nocturne",
|
|
91
|
-
"it": "problema fisso al riposo notturno",
|
|
92
|
-
"es": "tema fijo en el descanso nocturno",
|
|
93
|
-
"pl": "trwały problem w nocy",
|
|
94
|
-
"uk": "виправлено проблему в нічному режимі",
|
|
95
|
-
"zh-cn": "夜间固定问题休息"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"title": "Alarm",
|
|
@@ -225,6 +225,7 @@
|
|
|
225
225
|
"text_countdown": "Sekunden bis zur Aktivierung",
|
|
226
226
|
"text_one": "Alarmanlage meldet einen Feueralarm:",
|
|
227
227
|
"text_two": "Alarmanlage meldet einen Wasseralarm:",
|
|
228
|
+
"text_aborted": "Aktivierung abgebrochen",
|
|
228
229
|
"password": "",
|
|
229
230
|
"sendTo": "",
|
|
230
231
|
"alarm": "",
|
|
@@ -250,6 +251,7 @@
|
|
|
250
251
|
"log_nights_b_w": "Nachtruhe beginnt mit Warnungen:",
|
|
251
252
|
"log_one": "Alarmanlage meldet einen Feueralarm:",
|
|
252
253
|
"log_two": "Alarmanlage meldet einen Wasseralarm:",
|
|
254
|
+
"log_aborted": "Aktivierung abgebrochen",
|
|
253
255
|
"one_name": "Feueralarm",
|
|
254
256
|
"two_name": "Wasseralarm",
|
|
255
257
|
"log_zone_one": "Veränderungen in Zone eins",
|
|
@@ -375,6 +377,120 @@
|
|
|
375
377
|
},
|
|
376
378
|
"native": {}
|
|
377
379
|
},
|
|
380
|
+
{
|
|
381
|
+
"_id": "zone.one_on_off",
|
|
382
|
+
"type": "state",
|
|
383
|
+
"common": {
|
|
384
|
+
"role": "switch",
|
|
385
|
+
"name": {
|
|
386
|
+
"en": "Zone one",
|
|
387
|
+
"de": "Gebiet eins",
|
|
388
|
+
"ru": "Зона одна",
|
|
389
|
+
"pt": "Zona um",
|
|
390
|
+
"nl": "Zone één",
|
|
391
|
+
"fr": "Zone 1",
|
|
392
|
+
"it": "Zona",
|
|
393
|
+
"es": "Zona 1",
|
|
394
|
+
"pl": "Strefa jednej strefy",
|
|
395
|
+
"uk": "Зона один",
|
|
396
|
+
"zh-cn": "第一部分"
|
|
397
|
+
},
|
|
398
|
+
"desc": {
|
|
399
|
+
"en": "Enable zone one",
|
|
400
|
+
"de": "Zone eins aktivieren",
|
|
401
|
+
"ru": "Включить зону один",
|
|
402
|
+
"pt": "Habilitar uma zona",
|
|
403
|
+
"nl": "Zone één inschakelen",
|
|
404
|
+
"fr": "Activer la zone un",
|
|
405
|
+
"it": "Abilitare la zona uno",
|
|
406
|
+
"es": "Zona 1",
|
|
407
|
+
"pl": "Włącz strefę 1",
|
|
408
|
+
"uk": "Увімкнути зону",
|
|
409
|
+
"zh-cn": "启用第一区"
|
|
410
|
+
},
|
|
411
|
+
"type": "boolean",
|
|
412
|
+
"def": true,
|
|
413
|
+
"read": true,
|
|
414
|
+
"write": true
|
|
415
|
+
},
|
|
416
|
+
"native": {}
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"_id": "zone.two_on_off",
|
|
420
|
+
"type": "state",
|
|
421
|
+
"common": {
|
|
422
|
+
"role": "switch",
|
|
423
|
+
"name": {
|
|
424
|
+
"en": "Zone two",
|
|
425
|
+
"de": "Gebiet zwei",
|
|
426
|
+
"ru": "Зона 2",
|
|
427
|
+
"pt": "Zona dois",
|
|
428
|
+
"nl": "Zone twee",
|
|
429
|
+
"fr": "Zone deux",
|
|
430
|
+
"it": "Zona due",
|
|
431
|
+
"es": "Zona dos",
|
|
432
|
+
"pl": "Strefa 2",
|
|
433
|
+
"uk": "Зона 2",
|
|
434
|
+
"zh-cn": "第二部分"
|
|
435
|
+
},
|
|
436
|
+
"desc": {
|
|
437
|
+
"en": "Enable zone two",
|
|
438
|
+
"de": "Zone zwei aktivieren",
|
|
439
|
+
"ru": "Включить зону два",
|
|
440
|
+
"pt": "Ativar zona dois",
|
|
441
|
+
"nl": "Zone twee inschakelen",
|
|
442
|
+
"fr": "Activer la zone deux",
|
|
443
|
+
"it": "Zona due",
|
|
444
|
+
"es": "Zona 2",
|
|
445
|
+
"pl": "Włącz strefę drugą",
|
|
446
|
+
"uk": "Увімкнути зону 2",
|
|
447
|
+
"zh-cn": "启用二区"
|
|
448
|
+
},
|
|
449
|
+
"type": "boolean",
|
|
450
|
+
"def": true,
|
|
451
|
+
"read": true,
|
|
452
|
+
"write": true
|
|
453
|
+
},
|
|
454
|
+
"native": {}
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"_id": "zone.three_on_off",
|
|
458
|
+
"type": "state",
|
|
459
|
+
"common": {
|
|
460
|
+
"role": "switch",
|
|
461
|
+
"name": {
|
|
462
|
+
"en": "Zone three",
|
|
463
|
+
"de": "Gebiet drei",
|
|
464
|
+
"ru": "Зона три",
|
|
465
|
+
"pt": "Zona três",
|
|
466
|
+
"nl": "Zone drie",
|
|
467
|
+
"fr": "Zone trois",
|
|
468
|
+
"it": "Zona tre",
|
|
469
|
+
"es": "Zona tres",
|
|
470
|
+
"pl": "Strefa 3",
|
|
471
|
+
"uk": "Зона три",
|
|
472
|
+
"zh-cn": "第三部分"
|
|
473
|
+
},
|
|
474
|
+
"desc": {
|
|
475
|
+
"en": "Enable zone three",
|
|
476
|
+
"de": "Zone drei aktivieren",
|
|
477
|
+
"ru": "Включить зону три",
|
|
478
|
+
"pt": "Habilitar a zona três",
|
|
479
|
+
"nl": "Zone drie inschakelen",
|
|
480
|
+
"fr": "Activer la zone trois",
|
|
481
|
+
"it": "Zona tre",
|
|
482
|
+
"es": "Zona habilitada 3",
|
|
483
|
+
"pl": "Włącz strefę trzecią",
|
|
484
|
+
"uk": "Увімкнути зону три",
|
|
485
|
+
"zh-cn": "启用三区"
|
|
486
|
+
},
|
|
487
|
+
"type": "boolean",
|
|
488
|
+
"def": true,
|
|
489
|
+
"read": true,
|
|
490
|
+
"write": true
|
|
491
|
+
},
|
|
492
|
+
"native": {}
|
|
493
|
+
},
|
|
378
494
|
{
|
|
379
495
|
"_id": "status.activated",
|
|
380
496
|
"type": "state",
|
package/main.js
CHANGED
|
@@ -63,7 +63,10 @@ let is_alarm = false,
|
|
|
63
63
|
|
|
64
64
|
const change_ids = {};
|
|
65
65
|
|
|
66
|
-
let opt_presence = false
|
|
66
|
+
let opt_presence = false,
|
|
67
|
+
opt_one = true,
|
|
68
|
+
opt_two = true,
|
|
69
|
+
opt_three = true;
|
|
67
70
|
|
|
68
71
|
let activated = false,
|
|
69
72
|
night_rest = false,
|
|
@@ -201,6 +204,21 @@ class Alarm extends utils.Adapter {
|
|
|
201
204
|
opt_presence = false;
|
|
202
205
|
this.setState('presence.on_off', false, true);
|
|
203
206
|
} else opt_presence = stateP.val;
|
|
207
|
+
const stateOne = await this.getStateAsync('zone.one_on_off').catch((e) => this.log.warn(e));
|
|
208
|
+
if (stateOne == null) {
|
|
209
|
+
opt_one = false;
|
|
210
|
+
this.setState('zone.one_on_off', false, true);
|
|
211
|
+
} else opt_one = stateOne.val;
|
|
212
|
+
const stateTwo = await this.getStateAsync('zone.two_on_off').catch((e) => this.log.warn(e));
|
|
213
|
+
if (stateTwo == null) {
|
|
214
|
+
opt_two = false;
|
|
215
|
+
this.setState('zone.two_on_off', false, true);
|
|
216
|
+
} else opt_two = stateTwo.val;
|
|
217
|
+
const stateThree = await this.getStateAsync('zone.three_on_off').catch((e) => this.log.warn(e));
|
|
218
|
+
if (stateThree == null) {
|
|
219
|
+
opt_three = false;
|
|
220
|
+
this.setState('zone.three_on_off', false, true);
|
|
221
|
+
} else opt_three = stateThree.val;
|
|
204
222
|
const stateS = await this.getStateAsync('status.sleep').catch((e) => this.log.warn(e));
|
|
205
223
|
if (stateS == null) {
|
|
206
224
|
night_rest = false;
|
|
@@ -613,6 +631,18 @@ class Alarm extends utils.Adapter {
|
|
|
613
631
|
}
|
|
614
632
|
return;
|
|
615
633
|
}
|
|
634
|
+
else if (id === this.namespace + '.zone.one_on_off') {
|
|
635
|
+
opt_one = state.val;
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
else if (id === this.namespace + '.zone.two_on_off') {
|
|
639
|
+
opt_two = state.val;
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
else if (id === this.namespace + '.zone.three_on_off') {
|
|
643
|
+
opt_three = state.val;
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
616
646
|
else if (id === this.namespace + '.status.sleep') {
|
|
617
647
|
// night_rest = state.val;
|
|
618
648
|
this.shortcuts('status.sleep', state.val);
|
|
@@ -796,14 +826,17 @@ class Alarm extends utils.Adapter {
|
|
|
796
826
|
return;
|
|
797
827
|
}
|
|
798
828
|
if (alarm_ids.includes(id) && activated && this.isTrue(id, state, 'main')) {
|
|
829
|
+
if (!this.zone(id)) return;
|
|
799
830
|
this.burglary(id, state, this.isSilent(id));
|
|
800
831
|
return;
|
|
801
832
|
}
|
|
802
833
|
if (inside_ids.includes(id) && inside && this.isTrue(id, state, 'main')) {
|
|
834
|
+
if (!this.zone(id)) return;
|
|
803
835
|
this.burglary(id, state, this.isSilent(id, true), true);
|
|
804
836
|
}
|
|
805
837
|
|
|
806
838
|
if (notification_ids.includes(id) && this.isTrue(id, state, 'main')) {
|
|
839
|
+
if (!this.zone(id)) return;
|
|
807
840
|
if (!activated && !inside && !night_rest) return;
|
|
808
841
|
const name = this.get_name(id);
|
|
809
842
|
this.setState('info.log', `${this.config.log_warn} ${name}`, true);
|
|
@@ -860,16 +893,19 @@ class Alarm extends utils.Adapter {
|
|
|
860
893
|
this.setState('other_alarms.two_changes', true, true);
|
|
861
894
|
}
|
|
862
895
|
if (zone_one_ids.includes(id) && this.isTrue(id, state, 'zone_one')) {
|
|
896
|
+
if (!opt_one) return;
|
|
863
897
|
const name = this.get_name(id, 'zone_one');
|
|
864
898
|
if (log) this.log.info(`${this.config.log_zone_one} ${name}`);
|
|
865
899
|
if (this.config.send_zone_one) this.messages(`${this.config.log_zone_one} ${name}`);
|
|
866
900
|
}
|
|
867
901
|
if (zone_two_ids.includes(id) && this.isTrue(id, state, 'zone_two')) {
|
|
902
|
+
if (!opt_two) return;
|
|
868
903
|
const name = this.get_name(id, 'zone_two');
|
|
869
904
|
if (log) this.log.info(`${this.config.log_zone_two} ${name}`);
|
|
870
905
|
if (this.config.send_zone_two) this.messages(`${this.config.log_zone_two} ${name}`);
|
|
871
906
|
}
|
|
872
907
|
if (zone_three_ids.includes(id) && this.isTrue(id, state, 'zone_three')) {
|
|
908
|
+
if (!opt_three) return;
|
|
873
909
|
const name = this.get_name(id, 'zone_three');
|
|
874
910
|
if (log) this.log.info(`${this.config.log_zone_three} ${name}`);
|
|
875
911
|
if (this.config.send_zone_three) this.messages(`${this.config.log_zone_three} ${name}`);
|
|
@@ -944,6 +980,7 @@ class Alarm extends utils.Adapter {
|
|
|
944
980
|
this.subscribeStates('use.*');
|
|
945
981
|
this.subscribeStates('status.*');
|
|
946
982
|
this.subscribeStates('presence.*');
|
|
983
|
+
this.subscribeStates('zone.*');
|
|
947
984
|
this.subscribeStates('homekit.TargetState');
|
|
948
985
|
}
|
|
949
986
|
//##############################################################################
|
|
@@ -1059,6 +1096,11 @@ class Alarm extends utils.Adapter {
|
|
|
1059
1096
|
this.speechOutput(ele.name_id, message, ele.speech_delay);
|
|
1060
1097
|
}
|
|
1061
1098
|
break;
|
|
1099
|
+
case 14:
|
|
1100
|
+
if (ele.opt_say_aborted) {
|
|
1101
|
+
this.speechOutput(ele.name_id, message, ele.speech_delay);
|
|
1102
|
+
}
|
|
1103
|
+
break;
|
|
1062
1104
|
default:
|
|
1063
1105
|
this.log.debug(`no speech output!`);
|
|
1064
1106
|
}
|
|
@@ -1071,6 +1113,22 @@ class Alarm extends utils.Adapter {
|
|
|
1071
1113
|
|
|
1072
1114
|
//################# HELPERS ####################################################
|
|
1073
1115
|
|
|
1116
|
+
zone(id) {
|
|
1117
|
+
if (id === this.namespace + '.zone.one') {
|
|
1118
|
+
if (opt_one) return true;
|
|
1119
|
+
else return false;
|
|
1120
|
+
}
|
|
1121
|
+
if (id === this.namespace + '.zone.two') {
|
|
1122
|
+
if (opt_two) return true;
|
|
1123
|
+
else return false;
|
|
1124
|
+
}
|
|
1125
|
+
if (id === this.namespace + '.zone.three') {
|
|
1126
|
+
if (opt_three) return true;
|
|
1127
|
+
else return false;
|
|
1128
|
+
}
|
|
1129
|
+
return true;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1074
1132
|
alarmSiren() {
|
|
1075
1133
|
this.setState('status.siren', true, true);
|
|
1076
1134
|
siren_timer = setTimeout(() => {
|
|
@@ -1652,6 +1710,8 @@ class Alarm extends utils.Adapter {
|
|
|
1652
1710
|
this.setState('status.activation_countdown', null, true);
|
|
1653
1711
|
this.setState('status.gets_activated', false, true);
|
|
1654
1712
|
this.setState('status.state_list', 7, true);
|
|
1713
|
+
this.sayit(this.config.text_aborted, 14);
|
|
1714
|
+
if (log) this.log.info(`${this.config.log_aborted}`);
|
|
1655
1715
|
}
|
|
1656
1716
|
this.disableSystem();
|
|
1657
1717
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.alarm",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Your own lttle alarm system",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "misanorot",
|
|
@@ -26,28 +26,28 @@
|
|
|
26
26
|
"suncalc2": "^1.8.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@alcalzone/release-script": "^3.
|
|
29
|
+
"@alcalzone/release-script": "^3.7.0",
|
|
30
30
|
"@alcalzone/release-script-plugin-iobroker": "^3.6.0",
|
|
31
|
-
"@alcalzone/release-script-plugin-license": "^3.
|
|
32
|
-
"@alcalzone/release-script-plugin-manual-review": "^3.
|
|
31
|
+
"@alcalzone/release-script-plugin-license": "^3.7.0",
|
|
32
|
+
"@alcalzone/release-script-plugin-manual-review": "^3.7.0",
|
|
33
33
|
"@iobroker/adapter-dev": "^1.2.0",
|
|
34
34
|
"@iobroker/testing": "^4.1.0",
|
|
35
35
|
"@tsconfig/node16": "^16.1.1",
|
|
36
36
|
"@types/chai": "^4.3.6",
|
|
37
37
|
"@types/chai-as-promised": "^7.1.7",
|
|
38
38
|
"@types/mocha": "^10.0.1",
|
|
39
|
-
"@types/node": "^20.
|
|
40
|
-
"@types/proxyquire": "^1.3.
|
|
39
|
+
"@types/node": "^20.10.6",
|
|
40
|
+
"@types/proxyquire": "^1.3.31",
|
|
41
41
|
"@types/sinon": "^10.0.15",
|
|
42
|
-
"@types/sinon-chai": "^3.2.
|
|
42
|
+
"@types/sinon-chai": "^3.2.12",
|
|
43
43
|
"chai": "^4.3.10",
|
|
44
44
|
"chai-as-promised": "^7.1.1",
|
|
45
|
-
"eslint": "^8.
|
|
45
|
+
"eslint": "^8.56.0",
|
|
46
46
|
"mocha": "^10.2.0",
|
|
47
47
|
"proxyquire": "^2.1.3",
|
|
48
48
|
"sinon": "^15.2.0",
|
|
49
49
|
"sinon-chai": "^3.7.0",
|
|
50
|
-
"typescript": "~5.
|
|
50
|
+
"typescript": "~5.3.3"
|
|
51
51
|
},
|
|
52
52
|
"main": "main.js",
|
|
53
53
|
"files": [
|