iobroker.zigbee2mqtt 2.7.4 → 2.7.5

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
@@ -32,6 +32,10 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
32
32
  Placeholder for the next version (at the beginning of the line):
33
33
  ### **WORK IN PROGRESS**
34
34
  -->
35
+ ### 2.7.5 (2023-04-08)
36
+
37
+ - (o0shojo0o) added state `last_seen` contains date/time of last Zigbee message ([#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131))
38
+
35
39
  ### 2.7.4 (2023-03-05)
36
40
 
37
41
  - (o0shojo0o) fix for Aqara presence detector FP1 `reset_nopresence_status`
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee2mqtt",
4
- "version": "2.7.4",
4
+ "version": "2.7.5",
5
5
  "news": {
6
+ "2.7.5": {
7
+ "en": "added state `last_seen` contains date/time of last Zigbee message ([#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131))",
8
+ "de": "add state last_seen enthält Datum/Zeit der letzten Zigbee-Nachricht [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)",
9
+ "ru": "добавленное состояние last_seen содержит дату/время последнего сообщения Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131)",
10
+ "pt": "adicionado estado last_seen contém data/hora da última mensagem Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131)",
11
+ "nl": "vertaling:",
12
+ "fr": "add state last_seen contains date/time of last Zigbee message [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)",
13
+ "it": "aggiunto state last_seen contiene data/ora dell'ultimo messaggio Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)",
14
+ "es": "añadido state last_seen contiene fecha/hora del último mensaje de Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)",
15
+ "pl": "dodano stan ostatni_seen:/time of last Zigbee message #131(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131)",
16
+ "uk": "додано стан last_seen містить дату/час останнього повідомлення Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131)",
17
+ "zh-cn": "添加国家:见最后Zigbee信息的日期/时间[第131号](http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)"
18
+ },
6
19
  "2.7.4": {
7
20
  "en": "fix for Aqara presence detector FP1 `reset_nopresence_status`",
8
21
  "de": "fix für Aqara Präsenzmelder FP1 reset_nopresence_status",
@@ -80,19 +93,6 @@
80
93
  "pl": "dodano przejście stanowe na przepisanie -(1 disabled overwrite) #101(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nrezultatem tego opisu było stworzenie przyjaznej nazwy #105 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/105)\ndodano efekt stanowy dla grup #101 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nkontakt państwowy\nobsługa urządzeń dla osób niepełnosprawnych",
81
94
  "uk": "додано державний перехід для переходу перезапису -(1 вимкнено перезапис) #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nрозгляд опису при створенні дружньої назви #[105](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/products/105)\nдодано державний ефект для груп #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nфіксувати державний контакт\nдодана обробка для пристроїв відключення",
82
95
  "zh-cn": "此外,国家向过渡过渡的过渡——《残疾》第[101]号(http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/101)\n在建立友好名称编号(http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/105)时,审议说明\n第[101]号(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/101)\nfix 国家联络点\nd. 增加处理残疾装置"
83
- },
84
- "2.5.0": {
85
- "en": "added option `Brightness step should also turn the light on or off`\nadded handling of `brightness_step` ([#96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96))\nstates processing more flexible designed ([#94](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94))",
86
- "de": "zusätzliche Option `Brightness Schritt sollte auch das Licht ein- oder ausschalten `\nzusätzliches Handling der Helligkeit_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/96)\nzustände, die flexibler gestaltet sind #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/94)",
87
- "ru": "добавленная опция `Яркость шаг должен также повернуть свет на или вне`\nдобавлена обработка brightness_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\nсостояния обработки более гибкий дизайн #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
88
- "pt": "opção adicionada `A etapa de justiça também deve ligar ou desligar a luz`\nmanuseio adicionado de gloss_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\nestados processando mais flexível projetado #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
89
- "nl": "voegde optie 'Brightness step' ook het licht aan of uit'\nvoegde toegevoegd om te gaan met helderheid stegen cijfer 96\nhet verwerkt meer flexibele ontworpen 94: github.com/oshojoo/ioBroker",
90
- "fr": "option ajoutée `Brightness step should also turn the light on or off`\ngestion de la luminosité_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/96)\ndéclare que le traitement est plus souple, conçu #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/94)",
91
- "it": "opzione aggiunta `Brightness passo dovrebbe anche accendere o spegnere la luce `\n[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/96)\n(https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/94)",
92
- "es": "opción agregada `El paso de la rectitud también debe encender o apagar la luz &apos\nadicional handling of brightness_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\nestados procesan más flexiblemente diseñados #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
93
- "pl": "dodał również krok opcji 'Brightness'\ndodano obsługę jasności (stop #96) (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\nprzetwarzają bardziej elastyczne przetwory #94 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
94
- "uk": "доданий варіант `Бритальність кроку також повинен перетворювати світло або вимкнути`\nдодано обробка яскравості_кроку #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\n[94] (https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
95
- "zh-cn": "增加“权利步骤”的选择,也应该改变“或”的提法。\n增加光明处理:第[96]号(http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/96)\n国家处理较为灵活的第[94]号(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/94)"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/lib/exposes.js CHANGED
@@ -1032,6 +1032,7 @@ function createDeviceFromExposes(devicesMessag, config) {
1032
1032
 
1033
1033
  // Add default states
1034
1034
  pushToStates(statesDefs.available, z2mAccess.STATE);
1035
+ pushToStates(statesDefs.last_seen, z2mAccess.STATE);
1035
1036
 
1036
1037
  // Create buttons for scenes
1037
1038
  for (const scene of scenes) {
package/lib/states.js CHANGED
@@ -87,6 +87,21 @@ const states = {
87
87
  def: false,
88
88
  },
89
89
 
90
+ last_seen: {
91
+ id: 'last_seen',
92
+ prop: 'last_seen',
93
+ name: 'The date/time of last Zigbee message',
94
+ icon: undefined,
95
+ role: 'state',
96
+ write: false,
97
+ read: true,
98
+ type: 'string',
99
+ def: '',
100
+ getter: (payload) => {
101
+ return payload.last_seen.replace('T', ' ').split('+')[0];
102
+ },
103
+ },
104
+
90
105
  color_read: {
91
106
  id: 'color',
92
107
  prop: 'action',
package/main.js CHANGED
@@ -133,6 +133,7 @@ class Zigbee2mqtt extends core.Adapter {
133
133
 
134
134
  async messageParse(message) {
135
135
  const messageObj = JSON.parse(message);
136
+ //this.log.debug(JSON.stringify(messageObj));
136
137
 
137
138
  switch (messageObj.topic) {
138
139
  case 'bridge/config':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zigbee2mqtt",
3
- "version": "2.7.4",
3
+ "version": "2.7.5",
4
4
  "description": "Zigbee2MQTT adapter for ioBroker",
5
5
  "author": {
6
6
  "name": "Dennis Rathjen",
@@ -19,12 +19,12 @@
19
19
  "url": "https://github.com/o0shojo0o/ioBroker.zigbee2mqtt.git"
20
20
  },
21
21
  "dependencies": {
22
- "@iobroker/adapter-core": "^2.6.7",
22
+ "@iobroker/adapter-core": "^2.6.8",
23
23
  "aedes": "^0.49.0",
24
24
  "aedes-persistence-nedb": "^2.0.3",
25
25
  "mqtt": "^4.3.7",
26
26
  "net": "^1.0.2",
27
- "ws": "^8.12.1"
27
+ "ws": "^8.13.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@alcalzone/release-script-plugin-iobroker": "^3.5.9",
@@ -36,21 +36,21 @@
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.14.6",
39
+ "@types/node": "^18.15.11",
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.35.0",
46
- "eslint-config-prettier": "^8.6.0",
45
+ "eslint": "^8.37.0",
46
+ "eslint-config-prettier": "^8.8.0",
47
47
  "eslint-plugin-prettier": "^4.2.1",
48
48
  "mocha": "^10.2.0",
49
- "prettier": "^2.8.4",
49
+ "prettier": "^2.8.7",
50
50
  "proxyquire": "^2.1.3",
51
- "sinon": "^15.0.1",
51
+ "sinon": "^15.0.3",
52
52
  "sinon-chai": "^3.7.0",
53
- "typescript": "~4.9.5"
53
+ "typescript": "~5.0.3"
54
54
  },
55
55
  "main": "main.js",
56
56
  "files": [