iobroker.alarm 3.3.5 → 3.3.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019-2022 misanorot <audi16v@gmx.de>
3
+ Copyright (c) 2019-2023 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
@@ -27,22 +27,10 @@
27
27
  Placeholder for the next version (at the beginning of the line):
28
28
  ### **WORK IN PROGRESS**
29
29
  -->
30
- ### 3.3.5 (2022-12-24)
31
- * (misanorot) fixed issues at log today
32
-
33
- ### 3.3.1 (2022-12-22)
34
- * (misanorot) update files to last creator pattern
35
- * (misanorot) fixed zones
36
- * (misanorot) translate states names and discription
37
- * (misanorot) added password state for deactivation
38
-
39
- #### 3.2.0 (15.10.2022)
40
- * (misanorot) fixed enableable
41
- * (misanorot) added presence simulation
42
- * (misanorot) added zones
43
- * (misanorot) fixed set number states
30
+ ### 3.3.7 (2023-01-02)
31
+ * (misanorot) fixed issues at presence light trigger
44
32
 
45
33
  ## License
46
34
  MIT License
47
35
 
48
- Copyright (c) 2019-2022 misanorot <audi16v@gmx.de>
36
+ Copyright (c) 2019-2023 misanorot <audi16v@gmx.de>
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "alarm",
4
- "version": "3.3.5",
4
+ "version": "3.3.7",
5
5
  "news": {
6
+ "3.3.7": {
7
+ "en": "fixed issues at presence light trigger",
8
+ "de": "feste probleme bei präsenzlichtauslöser",
9
+ "ru": "фиксированные проблемы при наличии светового триггера",
10
+ "pt": "problemas fixos no gatilho de luz de presença",
11
+ "nl": "vertaling:",
12
+ "fr": "problèmes fixes à la lumière de présence",
13
+ "it": "problemi fissi alla presenza di trigger leggero",
14
+ "es": "problemas fijos en el gatillo de luz presencial",
15
+ "pl": "rzeczywiste problemy w obecności światła spustowego",
16
+ "uk": "виправлені проблеми при наявності світлового запуску",
17
+ "zh-cn": "b. 存在轻易事件的固定问题"
18
+ },
19
+ "3.3.6": {
20
+ "en": "fixed issues at night rest logs\nadded more logs during burglary",
21
+ "de": "feste probleme bei nachtruhe logs\nweitere protokolle beim einbruch hinzugefügt",
22
+ "ru": "фиксированные вопросы в ночных журналах отдыха\nдобавил больше логов во время burglary",
23
+ "pt": "problemas fixos em registros de descanso noturnos\nadicionou mais toras durante o roubo",
24
+ "nl": "'s nachts rustgegevens\nvoegde meer logboeken toe tijdens inbraak",
25
+ "fr": "problèmes fixes dans les registres de repos de nuit\najouté plus de logs pendant le cambriolage",
26
+ "it": "problemi fissi nei registri di riposo notturno\naggiunto più registri durante il furto",
27
+ "es": "problemas fijos en los registros de descanso nocturno\nañadido más registros durante el robo",
28
+ "pl": "prawidłowe problemy w nocnym spoczynku\ndodano więcej logów podczas burglarii",
29
+ "uk": "виправлені питання в журналах нічного відпочинку\nдодано більше журналів при burglary",
30
+ "zh-cn": "夜间固定问题取决于逻辑\n在汉堡期间增加更多的伐木"
31
+ },
6
32
  "3.3.5": {
7
33
  "en": "fixed issues at log today",
8
34
  "de": "feste probleme bei der anmeldung heute",
@@ -67,32 +93,6 @@
67
93
  "pl": "- aktualizacje plików do ostatniego wzoru twórcy\n* strefa stała\n* tłumaczenie nazw stanów i poboru\n* dodano stan przepustowości do dezaktywacji\n\n###3.2.0 (15.10.2022) (ang.)\n* able to be ustabilizowane\n* dodano symulację obecności\n* dodano strefy\n* fixed set number state",
68
94
  "uk": "* оновлення файлів до останнього шаблону творця\n* фіксовані зони\n* перевести імена держав і оригінал\n* додано стан пароля для деактивації\n\n#### 3.2.0 (15.10.2022)\n* фіксована можливість\n* додано моделювання наявності\n* додані зони\n* фіксована кількість штатів",
69
95
  "zh-cn": "* 最新档案,供最后创作者使用。\n* 固定区\n* 翻译国名和国名\n* 增加启动前言。\n\n第3.2号行动(15.1022)\n* 固定可兑换\n* 增加存在模拟\n* 新增区域\n* 固定国家"
70
- },
71
- "3.3.0": {
72
- "en": "* update files to last creator pattern\n* fixed zones\n* translate states names and discription\n* added password state for deactivation\n\n#### 3.2.0 (15.10.2022)\n* fixed enableable\n* added presence simulation\n* added zones\n* fixed set number states",
73
- "de": "* aktualisieren von dateien zum letzten schöpfermuster\n* festzonen\n* übersetzen namen und discription\n* passwort-zustand zur deaktivierung hinzugefügt\n\n3,2.0 (15.10.2022)\n* feststellbar\n* zusätzliche präsenzsimulation\n* zusätzliche zonen\n* feste set-nummern",
74
- "ru": "* обновление файлов для последнего шаблона создателя\n* фиксированные зоны\n* перевести имена государств и описание\n* добавлено состояние пароля для деактивации\n\n#### 3.2.0 (15.10.2022)\n* фиксированный включенный\n* добавлена симуляция присутствия\n* добавленные зоны\n* фиксированный номер состояния",
75
- "pt": "* atualizar arquivos para o último padrão criador\n* zonas fixas\n* traduzir nomes de estados e discription\n* estado de senha adicionado para desativação\n\n### 3.2.0 (15.10.2022)\n* habilitado fixo\n* simulação de presença adicionada\n* zonas adicionadas\n* estados de números fixos",
76
- "nl": "vertaling:\n♪ fixed zones ♪\nvertaling:\nvertaling:\n\n3.2.0 (15.10.2022)\n♪ fixed enable\n♪ toegevoegd aanwezigheid simulatie ♪\n♪ toegevoegde zones ♪\n♪ fixed set nummer states ♪",
77
- "fr": "* mettre à jour les fichiers de dernière création\n* zones fixes\n* traduire les noms d'états et la déscription\n* état de mot de passe ajouté pour la désactivation\n\n### 3.2.0 (15.10.2022)\n* fixe\n* simulation de présence ajoutée\n* zones ajoutées\n* nombre fixe",
78
- "it": "* aggiornare i file al modello ultimo creatore\n* zone fisse\n* tradurre i nomi degli stati e la descrizione\n* stato password aggiunto per disattivazione\n\n#### 3.2.0 (15.10.2022)\n* fissa abilitabile\n* simulazione aggiuntiva della presenza\n* zone aggiunte\n* stati di numero fisso",
79
- "es": "* actualizar archivos a último patrón creador\n* zonas fijas\n* traducir nombres de estados y discripción\n* estado de contraseña añadido para desactivación\n\n#### 3.2.0 (15.10.2022)\n* fija habilitable\n* simulación de presencia agregada\n* zonas agregadas\n* estados de número fijo",
80
- "pl": "- aktualizacje plików do ostatniego wzoru twórcy\n* strefa stała\n* tłumaczenie nazw stanów i poboru\n* dodano stan przepustowości do dezaktywacji\n\n###3.2.0 (15.10.2022) (ang.)\n* able to be ustabilizowane\n* dodano symulację obecności\n* dodano strefy\n* fixed set number state",
81
- "uk": "* оновлення файлів до останнього шаблону творця\n* фіксовані зони\n* перевести імена держав і оригінал\n* додано стан пароля для деактивації\n\n#### 3.2.0 (15.10.2022)\n* фіксована можливість\n* додано моделювання наявності\n* додані зони\n* фіксована кількість штатів",
82
- "zh-cn": "* 最新档案,供最后创作者使用。\n* 固定区\n* 翻译国名和国名\n* 增加启动前言。\n\n第3.2号行动(15.1022)\n* 固定可兑换\n* 增加存在模拟\n* 新增区域\n* 固定国家"
83
- },
84
- "3.2.0": {
85
- "en": "Added zones, Added presence simulation, Fixed set numbers, Fixed enableable",
86
- "de": "Zonen hinzugefügt, Präsenzsimulation hinzugefügt, Fixed Setzen von Zahlenwerten, Fixed aktivierbar",
87
- "ru": "Добавленные зоны, Добавлена симуляция присутствия, Фиксированные наборы, Фиксированные включительные",
88
- "pt": "Zonas adicionadas, Simulação de presença adicionada, números fixos, habilitado fixo",
89
- "nl": "Toegevoegd zones, Toegevoegd aanwezigheidssimulatie, gefixeerde setnummers",
90
- "fr": "Zones ajoutées, Ajout d'une simulation de présence, des nombres fixes",
91
- "it": "Zone aggiuntive, Aggiunta simulazione di presenza, Numeri fissi impostati, Fisso abilitabile",
92
- "es": "Zonas agregadas, simulación de presencia agregada, números fijos de conjunto, fijo",
93
- "pl": "Obszary dodane Fixed set number (ang.)",
94
- "uk": "Додані зони, Додано моделювання присутності, Фіксовані номери, Фіксовані ввімкнені",
95
- "zh-cn": "增加区, 增加存在模拟、固定数量、可预测的固定人数"
96
96
  }
97
97
  },
98
98
  "title": "Alarm",
package/main.js CHANGED
@@ -318,7 +318,11 @@ class Alarm extends utils.Adapter {
318
318
  //################# BURGALARY ####################################################
319
319
 
320
320
  burglary(id, _state, silent, indoor) {
321
- if (burgle) return;
321
+ if (burgle) {
322
+ this.setState('info.log', `${this.config.log_burgle} ${name}`, true);
323
+ if (log) this.log.info(`${this.config.log_burgle} ${name}`);
324
+ return;
325
+ }
322
326
  if (silent_timer && silent) return;
323
327
  let count = 0;
324
328
  const name = this.get_name(id);
@@ -1282,6 +1286,7 @@ class Alarm extends utils.Adapter {
1282
1286
  this.setState('info.notification_circuit_list', names_notification, true);
1283
1287
  this.setState('info.notification_circuit_list_html', this.get_name_html(ids), true);
1284
1288
  } else {
1289
+ is_notification = false;
1285
1290
  names_notification = '';
1286
1291
  this.setState('info.notification_circuit_list', '', true);
1287
1292
  this.setState('info.notification_circuit_list_html', '', true);
@@ -1733,7 +1738,7 @@ class Alarm extends utils.Adapter {
1733
1738
 
1734
1739
  is_changed(id, val) {
1735
1740
  if (change_ids[id] === val) {
1736
- this.log.debug(`No changes inside shortcuts!`);
1741
+ this.log.debug(`No changes inside shortcuts! ${id}`);
1737
1742
  return false;
1738
1743
  } else {
1739
1744
  change_ids[id] = val;
@@ -1749,7 +1754,6 @@ class Alarm extends utils.Adapter {
1749
1754
 
1750
1755
 
1751
1756
  async logging(content) {
1752
- this.log.warn(`LOGGING`);
1753
1757
  const state = await this.getStateAsync('info.log_today').catch((e) => this.log.warn(e));
1754
1758
  if (state == null) {
1755
1759
  log_list = '';
@@ -1821,7 +1825,7 @@ class Alarm extends utils.Adapter {
1821
1825
  }
1822
1826
 
1823
1827
 
1824
- checkPresence() {
1828
+ async checkPresence() {
1825
1829
  if (!activated || inside) {
1826
1830
  return;
1827
1831
  }
@@ -1897,7 +1901,7 @@ class Alarm extends utils.Adapter {
1897
1901
  break;
1898
1902
  case 'light':
1899
1903
  // eslint-disable-next-line no-case-declarations
1900
- const lightVal = this.getForeignStateAsync(presenceTimers[item].presence_trigger_light).catch((e) => {
1904
+ const lightVal = await this.getForeignStateAsync(presenceTimers[item].presence_trigger_light).catch((e) => {
1901
1905
  this.log.warn(`Check your light ID ${presenceTimers[item].name_id} in presence config! +++ ${e}`);
1902
1906
  return;
1903
1907
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.alarm",
3
- "version": "3.3.5",
3
+ "version": "3.3.7",
4
4
  "description": "Your own lttle alarm system",
5
5
  "author": {
6
6
  "name": "misanorot",
@@ -36,13 +36,13 @@
36
36
  "@types/chai": "^4.3.4",
37
37
  "@types/chai-as-promised": "^7.1.5",
38
38
  "@types/mocha": "^10.0.1",
39
- "@types/node": "^18.11.17",
39
+ "@types/node": "^18.11.18",
40
40
  "@types/proxyquire": "^1.3.28",
41
41
  "@types/sinon": "^10.0.13",
42
42
  "@types/sinon-chai": "^3.2.9",
43
43
  "chai": "^4.3.7",
44
44
  "chai-as-promised": "^7.1.1",
45
- "eslint": "^8.30.0",
45
+ "eslint": "^8.31.0",
46
46
  "mocha": "^10.2.0",
47
47
  "proxyquire": "^2.1.3",
48
48
  "sinon": "^15.0.1",