iobroker.alarm 3.3.12 → 3.4.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/README.md CHANGED
@@ -23,12 +23,18 @@
23
23
  **[English description](docs/en/alarm_en.md)**
24
24
 
25
25
  ******************************************************************************************
26
- ## CHANGELOG
26
+ ## Changelog
27
27
 
28
28
  <!--
29
29
  Placeholder for the next version (at the beginning of the line):
30
30
  ### **WORK IN PROGRESS**
31
31
  -->
32
+ ### 3.4.0 (2023-10-03)
33
+ * (misanorot) fixed #168
34
+
35
+ ### 3.3.13 (2023-09-19)
36
+ * (misanorot) fixed #147
37
+
32
38
  ### 3.3.12 (2023-06-23)
33
39
  * (misanorot) fixed select-id popup and little issues on setting pages
34
40
 
@@ -38,12 +44,6 @@
38
44
  ### 3.3.10 (2023-03-31)
39
45
  * (misanorot) fixed litle speech and presence bug
40
46
 
41
- ### 3.3.9 (2023-01-14)
42
- * (misanorot) fixed issues at burgle log
43
-
44
- ### 3.3.7 (2023-01-02)
45
- * (misanorot) fixed issues at presence light trigger
46
-
47
47
  ## License
48
48
  MIT License
49
49
 
@@ -1273,6 +1273,11 @@
1273
1273
  <textarea id="text_warning" class="materialize-textarea value"></textarea>
1274
1274
  <label for="text_warning" class="translate">text_warning</label>
1275
1275
  </div>
1276
+ <div class="input-field col s12">
1277
+ <i class="material-icons prefix">filter_5</i>
1278
+ <textarea id="text_changes" class="materialize-textarea value"></textarea>
1279
+ <label for="text_changes" class="translate">text_changes</label>
1280
+ </div>
1276
1281
  <div class="input-field col s8">
1277
1282
  <i class="material-icons prefix">filter_6</i>
1278
1283
  <textarea id="text_alarm" class="materialize-textarea value"></textarea>
package/admin/words.js CHANGED
@@ -362,7 +362,7 @@ systemDictionary = {
362
362
  'uk': 'Сек між Мсг',
363
363
  'zh-cn': '女士'
364
364
  },
365
- 'text_changes': { 'en': 'Phrase at changes sharp inside', 'de': 'Satz Veränderungen während SCHARF INTERN', 'ru': 'Фраза ночью меняется', 'pt': 'Frase no resto da noite muda', 'nl': 'Zin in nachtrust verandert', 'fr': 'Phrase au changement de repos nocturne', 'it': 'La frase durante il riposo notturno cambia', 'es': 'Frase en los cambios de descanso nocturno', 'pl': 'Zwrot w nocnym odpoczynku zmienia się', 'zh-cn': '夜间休息时的短语变化' },
365
+ 'text_changes': { 'en': 'Phrase at changes sharp and sharp inside', 'de': 'Satz Veränderungen während SCHARF und SCHARF INNEN', 'ru': 'Фраза ночью меняется', 'pt': 'Frase no resto da noite muda', 'nl': 'Zin in nachtrust verandert', 'fr': 'Phrase au changement de repos nocturne', 'it': 'La frase durante il riposo notturno cambia', 'es': 'Frase en los cambios de descanso nocturno', 'pl': 'Zwrot w nocnym odpoczynku zmienia się', 'zh-cn': '夜间休息时的短语变化' },
366
366
  'text_changes_night': { 'en': 'Phrase at changes during night rest', 'de': 'Satz bei Änderungen während der Nachtruhe', 'ru': 'Фраза при переменах во время ночного отдыха', 'pt': 'Frase com alterações durante o descanso noturno', 'nl': 'Zin bij veranderingen tijdens nachtrust', 'fr': 'Phrase aux changements pendant le repos nocturne', 'it': 'Frase ai cambiamenti durante il riposo notturno', 'es': 'Frase en los cambios durante el descanso nocturno', 'pl': 'Zwroty przy zmianach podczas nocnego odpoczynku', 'zh-cn': '夜间休息时的变化短语' },
367
367
  'text_countdown': {
368
368
  'en': 'Time to activation',
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "alarm",
4
- "version": "3.3.12",
4
+ "version": "3.4.0",
5
5
  "news": {
6
+ "3.4.0": {
7
+ "en": "fixed #168",
8
+ "de": "fest #168",
9
+ "ru": "исправлено #168",
10
+ "pt": "fixo #168",
11
+ "nl": "vertaling:",
12
+ "fr": "fixe #168",
13
+ "it": "fisso #168",
14
+ "es": "fijo #168",
15
+ "pl": "#168",
16
+ "uk": "фіксована #168",
17
+ "zh-cn": "固定编号168"
18
+ },
19
+ "3.3.13": {
20
+ "en": "fixed #147",
21
+ "de": "fest #147",
22
+ "ru": "фиксированный #147",
23
+ "pt": "fixo #147",
24
+ "nl": "vertaling:",
25
+ "fr": "fixe no 147",
26
+ "it": "fisso #147",
27
+ "es": "fijo #147",
28
+ "pl": "#147",
29
+ "uk": "фіксована #147",
30
+ "zh-cn": "固定行动147"
31
+ },
6
32
  "3.3.12": {
7
33
  "en": "fixed select-id popup and little issues on setting pages",
8
34
  "de": "feste ausgewählte popups und kleine probleme bei der einstellung von seiten",
@@ -67,32 +93,6 @@
67
93
  "pl": "prawidłowe problemy z burgle logiem",
68
94
  "uk": "виправлені питання в burgle log",
69
95
  "zh-cn": "堡固定问题"
70
- },
71
- "3.3.7": {
72
- "en": "fixed issues at presence light trigger",
73
- "de": "feste probleme bei präsenzlichtauslöser",
74
- "ru": "фиксированные проблемы при наличии светового триггера",
75
- "pt": "problemas fixos no gatilho de luz de presença",
76
- "nl": "vertaling:",
77
- "fr": "problèmes fixes à la lumière de présence",
78
- "it": "problemi fissi alla presenza di trigger leggero",
79
- "es": "problemas fijos en el gatillo de luz presencial",
80
- "pl": "rzeczywiste problemy w obecności światła spustowego",
81
- "uk": "виправлені проблеми при наявності світлового запуску",
82
- "zh-cn": "b. 存在轻易事件的固定问题"
83
- },
84
- "3.3.6": {
85
- "en": "fixed issues at night rest logs\nadded more logs during burglary",
86
- "de": "feste probleme bei nachtruhe logs\nweitere protokolle beim einbruch hinzugefügt",
87
- "ru": "фиксированные вопросы в ночных журналах отдыха\nдобавил больше логов во время burglary",
88
- "pt": "problemas fixos em registros de descanso noturnos\nadicionou mais toras durante o roubo",
89
- "nl": "'s nachts rustgegevens\nvoegde meer logboeken toe tijdens inbraak",
90
- "fr": "problèmes fixes dans les registres de repos de nuit\najouté plus de logs pendant le cambriolage",
91
- "it": "problemi fissi nei registri di riposo notturno\naggiunto più registri durante il furto",
92
- "es": "problemas fijos en los registros de descanso nocturno\nañadido más registros durante el robo",
93
- "pl": "prawidłowe problemy w nocnym spoczynku\ndodano więcej logów podczas burglarii",
94
- "uk": "виправлені питання в журналах нічного відпочинку\nдодано більше журналів при burglary",
95
- "zh-cn": "夜间固定问题取决于逻辑\n在汉堡期间增加更多的伐木"
96
96
  }
97
97
  },
98
98
  "title": "Alarm",
@@ -859,9 +859,10 @@
859
859
  "2": "sharp inside",
860
860
  "3": "burglary",
861
861
  "4": "night rest",
862
- "5": "gets_activated",
863
- "6": "activation_failed",
864
- "7": "activation_aborted"
862
+ "5": "gets activated",
863
+ "6": "activation failed",
864
+ "7": "activation aborted",
865
+ "8": "silent alarm"
865
866
  },
866
867
  "read": true,
867
868
  "write": false
package/main.js CHANGED
@@ -320,6 +320,10 @@ class Alarm extends utils.Adapter {
320
320
  burglary(id, _state, silent, indoor) {
321
321
  let count = 0;
322
322
  const name = this.get_name(id);
323
+ let say = this.config.text_alarm;
324
+ if (this.config.opt_say_names) {
325
+ say = say + ' ' + name;
326
+ }
323
327
  if (burgle) {
324
328
  this.setState('info.log', `${this.config.log_burgle} ${name}`, true);
325
329
  if (log) this.log.info(`${this.config.log_burgle} ${name}`);
@@ -331,6 +335,7 @@ class Alarm extends utils.Adapter {
331
335
  if (silent) {
332
336
  this.setState('status.silent_alarm', true, true);
333
337
  this.setState('status.state', 'silent alarm', true);
338
+ this.setState('status.state_list', 8, true);
334
339
  if (this.config.send_alarm_silent_inside && indoor) this.messages(`${this.config.log_burgle} ${name}`);
335
340
  if (this.config.send_alarm_silent && !indoor) this.messages(`${this.config.log_burgle} ${name}`);
336
341
  if (this.config.silent_flash > 0) {
@@ -359,10 +364,10 @@ class Alarm extends utils.Adapter {
359
364
  if (this.config.send_alarm) this.messages(`${this.config.log_burgle} ${name}`);
360
365
  clearTimeout(silent_timer);
361
366
  clearInterval(silent_interval);
362
- this.sayit(this.config.text_alarm, 6);
367
+ this.sayit(say, 6);
363
368
  text_alarm_interval = setInterval(() => {
364
369
  if (count < alarm_repeat) {
365
- this.sayit(this.config.text_alarm, 6);
370
+ this.sayit(say, 6);
366
371
  count++;
367
372
  } else {
368
373
  clearInterval(text_alarm_interval);
@@ -397,10 +402,10 @@ class Alarm extends utils.Adapter {
397
402
  this.clearAllPresenceTimer();
398
403
  if (this.config.send_alarm_inside && indoor) this.messages(`${this.config.log_burgle} ${name}`);
399
404
  if (this.config.send_alarm && !indoor) this.messages(`${this.config.log_burgle} ${name}`);
400
- this.sayit(this.config.text_alarm, 6);
405
+ this.sayit(say, 6);
401
406
  text_alarm_interval = setInterval(() => {
402
407
  if (count < alarm_repeat) {
403
- this.sayit(this.config.text_alarm, 6);
408
+ this.sayit(say, 6);
404
409
  count++;
405
410
  } else {
406
411
  clearInterval(text_alarm_interval);
@@ -820,8 +825,13 @@ class Alarm extends utils.Adapter {
820
825
  }
821
826
  this.sayit(say, 5);
822
827
  } else if (activated) {
828
+ let say = this.config.text_changes;
823
829
  if (log) this.log.info(`${this.config.log_warn} ${name}`);
824
830
  if (this.config.send_notification_changes) this.messages(`${this.config.log_warn} ${name}`);
831
+ if (this.config.opt_say_names) {
832
+ say = say + ' ' + name;
833
+ }
834
+ this.sayit(say, 5);
825
835
  }
826
836
  timer_notification_changes = setTimeout(() => {
827
837
  this.setState('info.notification_circuit_changes', false, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.alarm",
3
- "version": "3.3.12",
3
+ "version": "3.4.0",
4
4
  "description": "Your own lttle alarm system",
5
5
  "author": {
6
6
  "name": "misanorot",
@@ -21,33 +21,33 @@
21
21
  "node": ">= 16"
22
22
  },
23
23
  "dependencies": {
24
- "@iobroker/adapter-core": "^2.6.8",
24
+ "@iobroker/adapter-core": "^3.0.3",
25
25
  "node-schedule": "^2.1.1",
26
26
  "suncalc2": "^1.8.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@alcalzone/release-script": "^3.5.9",
30
- "@alcalzone/release-script-plugin-iobroker": "^3.5.9",
29
+ "@alcalzone/release-script": "^3.6.0",
30
+ "@alcalzone/release-script-plugin-iobroker": "^3.6.0",
31
31
  "@alcalzone/release-script-plugin-license": "^3.5.9",
32
32
  "@alcalzone/release-script-plugin-manual-review": "^3.5.9",
33
33
  "@iobroker/adapter-dev": "^1.2.0",
34
34
  "@iobroker/testing": "^4.1.0",
35
- "@tsconfig/node16": "^1.0.4",
36
- "@types/chai": "^4.3.5",
37
- "@types/chai-as-promised": "^7.1.5",
35
+ "@tsconfig/node16": "^16.1.1",
36
+ "@types/chai": "^4.3.6",
37
+ "@types/chai-as-promised": "^7.1.6",
38
38
  "@types/mocha": "^10.0.1",
39
- "@types/node": "^20.2.5",
40
- "@types/proxyquire": "^1.3.28",
41
- "@types/sinon": "^10.0.13",
39
+ "@types/node": "^20.8.0",
40
+ "@types/proxyquire": "^1.3.29",
41
+ "@types/sinon": "^10.0.15",
42
42
  "@types/sinon-chai": "^3.2.9",
43
- "chai": "^4.3.7",
43
+ "chai": "^4.3.10",
44
44
  "chai-as-promised": "^7.1.1",
45
- "eslint": "^8.41.0",
45
+ "eslint": "^8.50.0",
46
46
  "mocha": "^10.2.0",
47
47
  "proxyquire": "^2.1.3",
48
- "sinon": "^15.1.0",
48
+ "sinon": "^15.2.0",
49
49
  "sinon-chai": "^3.7.0",
50
- "typescript": "~5.0.4"
50
+ "typescript": "~5.2.2"
51
51
  },
52
52
  "main": "main.js",
53
53
  "files": [