iobroker.zigbee 1.8.24 → 1.8.25

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/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee",
4
- "version": "1.8.24",
4
+ "version": "1.8.25",
5
5
  "news": {
6
+ "1.8.25": {
7
+ "en": "zhc 16.x \ncorr group from exclude dialog",
8
+ "de": "zhc 16.x\nkorr gruppe aus ausschluss dialog",
9
+ "ru": "жк 16.x\nгруппа корр от исключает диалог",
10
+ "pt": "zhc 16.x\ncorr grupo de excluir diálogo",
11
+ "nl": "zhc 16\ncorr groep uitgesloten dialog",
12
+ "fr": "zhc 16.x\ngroupe corr de l'exclusion du dialogue",
13
+ "it": "zhc 16.x\ngruppo corr da escludere finestra di dialogo",
14
+ "es": "zhc 16.x\ngrupo de corr de excluir diálogo",
15
+ "pl": "żc 16.x\ngrupa kor z wyłączeniem dialogu",
16
+ "uk": "жк 16.x\nгрупа з виключення діалогу",
17
+ "zh-cn": "页: 1\n集团排除了口号"
18
+ },
6
19
  "1.8.24": {
7
20
  "en": "switch to exposes tab for some Aqara Devices",
8
21
  "de": "schalter, um die Registerkarte für einige Aqara-Geräte freizusetzen",
@@ -80,19 +93,6 @@
80
93
  "pl": "naprawa occupancy_time\nodsetek baterii i napięcia",
81
94
  "uk": "фіксувати occupancy_timeout\nфіксувати відсоток акумулятора і напруга",
82
95
  "zh-cn": "fix 占用:时间假\nfix 电池百分比和火山"
83
- },
84
- "1.8.18": {
85
- "en": "little fix sentry and error log\n",
86
- "de": "kleines fix-sende- und fehlerprotokoll\n",
87
- "ru": "мало исправлена отправка и ошибка журнала\n",
88
- "pt": "pequena correção sentinela e log de erro\n",
89
- "nl": "kleine herstellende sentimentele logboek\n",
90
- "fr": "petit journal de réparation et d'erreur\n",
91
- "it": "piccolo fix registro di errore\n",
92
- "es": "pequeño solucion centry y error log\n",
93
- "pl": "wadliwość i błąd\n",
94
- "uk": "маленька фіксація відправлень і журнал помилок\n",
95
- "zh-cn": "很少发送过材料和错误逻辑\n"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/lib/developer.js CHANGED
@@ -100,17 +100,23 @@ class Developer {
100
100
  return;
101
101
  }
102
102
  const cfg = obj.message.hasOwnProperty('cfg') ? obj.message.cfg : null;
103
-
104
- const publishTarget = this.zbController.getDevice(devId) ? devId : this.zbController.getGroup(parseInt(devId));
105
- if (!publishTarget) {
106
- this.adapter.sendTo(obj.from, obj.command, {localErr: `Device or group ${devId} not found!`}, obj.callback);
107
- return;
103
+ let publishTarget;
104
+ try {
105
+ publishTarget = this.zbController.getDevice(devId) ? devId : this.zbController.getGroup(parseInt(devId));
106
+ if (!publishTarget) {
107
+ this.adapter.sendTo(obj.from, obj.command, {localErr: `Device or group ${devId} not found!`}, obj.callback);
108
+ return;
109
+ }
110
+ } catch (error) {
111
+ this.error(`SendToZigbee failed from publishTarget ${devId} (${error})`);
108
112
  }
113
+
109
114
  if (!cid || !cmd) {
110
115
  this.adapter.sendTo(obj.from, obj.command, {localErr: 'Incomplete data (cid or cmd)'}, obj.callback);
111
116
  return;
112
117
  }
113
118
  this.debug(`Ready to send (ep: ${ep}, cid: ${cid}, cmd ${cmd.name}, zcl: ${JSON.stringify(zclData)})`);
119
+
114
120
  try {
115
121
  await this.zbController.publish(publishTarget, cid, cmd.name, zclData, cfg, ep, cmdType, (err, msg) => {
116
122
  // map err and msg in one object for sendTo
package/lib/devices.js CHANGED
@@ -3041,6 +3041,10 @@ const devices = [
3041
3041
  },
3042
3042
 
3043
3043
  /* ------------ images only for admin ------------------- */
3044
+ {
3045
+ models: ['LED1923R5/LED1925G6'],
3046
+ icon: 'img/LED1923R5.png',
3047
+ },
3044
3048
  {
3045
3049
  models: ['E1812'],
3046
3050
  icon: 'img/ikea_E1812.png',
package/lib/exposes.js CHANGED
@@ -5,7 +5,7 @@ const statesDefs = require('./states.js').states;
5
5
  const rgb = require('./rgb.js');
6
6
  const utils = require('./utils.js');
7
7
  const colors = require('./colors.js');
8
- const ea = zigbeeHerdsmanConverters.exposes.access;
8
+ const ea = require('zigbee-herdsman-converters/lib/exposes.js').access;
9
9
 
10
10
  function genState(expose, role, name, desc) {
11
11
  let state;
@@ -8,7 +8,7 @@ const fs = require('fs');
8
8
  const request = require('request');
9
9
 
10
10
  let savedDeviceNames = {};
11
- let knownUndefinedDevices = {};
11
+ const knownUndefinedDevices = {};
12
12
 
13
13
  class StatesController extends EventEmitter {
14
14
  constructor(adapter) {
@@ -138,7 +138,7 @@ class StatesController extends EventEmitter {
138
138
  const result = {};
139
139
  // find model states for options and get it values
140
140
  const devStates = await this.getDevStates('0x' + devId, model);
141
- if (devStates == null || devStates == undefined) {
141
+ if (devStates == null || devStates == undefined || devStates.states == null || devStates.states == undefined) {
142
142
  callback(result);
143
143
  return;
144
144
  }
package/lib/utils.js CHANGED
@@ -108,7 +108,7 @@ function flatten(arr) {
108
108
 
109
109
  const forceEndDevice = flatten(
110
110
  ['QBKG03LM', 'QBKG04LM', 'ZNMS13LM', 'ZNMS12LM']
111
- .map(model => zigbeeHerdsmanConverters.devices.find((d) => d.model === model))
111
+ .map(model => zigbeeHerdsmanConverters.findByModel(model))
112
112
  .map(mappedModel => mappedModel.zigbeeModel));
113
113
 
114
114
  // Xiaomi uses 4151 and 4447 (lumi.plug) as manufacturer ID.
@@ -7,11 +7,11 @@ const utils = require('./utils');
7
7
  // Some EndDevices should be pinged
8
8
  // e.g. E11-G13 https://github.com/Koenkk/zigbee2mqtt/issues/775#issuecomment-453683846
9
9
  const forcedPingable = [
10
- zigbeeHerdsmanConverters.devices.find((d) => d.model === 'E11-G13'),
11
- zigbeeHerdsmanConverters.devices.find((d) => d.model === '53170161'),
12
- zigbeeHerdsmanConverters.devices.find((d) => d.model === 'V3-BTZB'),
13
- zigbeeHerdsmanConverters.devices.find((d) => d.model === 'SPZB0001'),
14
- zigbeeHerdsmanConverters.devices.find((d) => d.model === '014G2461')
10
+ zigbeeHerdsmanConverters.findByModel('E11-G13'),
11
+ zigbeeHerdsmanConverters.findByModel('53170161'),
12
+ zigbeeHerdsmanConverters.findByModel('V3-BTZB'),
13
+ zigbeeHerdsmanConverters.findByModel('SPZB0001'),
14
+ zigbeeHerdsmanConverters.findByModel('014G2461')
15
15
  ];
16
16
 
17
17
  // asgothian: 29.12.2020: Removed color and color_temp from readable
@@ -4,10 +4,10 @@ const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
4
4
  const BaseExtension = require('./zbBaseExtension');
5
5
 
6
6
  const forcedConfigureOnEachStart = [
7
- zigbeeHerdsmanConverters.devices.find((d) => d.model === 'V3-BTZB'),
8
- zigbeeHerdsmanConverters.devices.find((d) => d.model === '014G2461'),
9
- zigbeeHerdsmanConverters.devices.find((d) => d.model === 'SPZB0001'),
10
- zigbeeHerdsmanConverters.devices.find((d) => d.model === 'ZK03840')
7
+ zigbeeHerdsmanConverters.findByModel('V3-BTZB'),
8
+ zigbeeHerdsmanConverters.findByModel('014G2461'),
9
+ zigbeeHerdsmanConverters.findByModel('SPZB0001'),
10
+ zigbeeHerdsmanConverters.findByModel('ZK03840')
11
11
  ];
12
12
 
13
13
  class DeviceConfigure extends BaseExtension {
@@ -130,13 +130,15 @@ class DeviceConfigure extends BaseExtension {
130
130
  }
131
131
 
132
132
  async doConfigure(device, mappedDevice) {
133
- this.info(`Configuring ${device.ieeeAddr} ${device.modelID}`);
134
133
  const coordinatorEndpoint = await this.zigbee.getDevicesByType('Coordinator')[0].endpoints[0];
135
134
  try {
136
- await mappedDevice.configure(device, coordinatorEndpoint, this);
137
- device.meta.configured = zigbeeHerdsmanConverters.getConfigureKey(mappedDevice);
138
- device.save();
139
- this.info(`DeviceConfigure successful ${device.ieeeAddr} ${device.modelID}`);
135
+ if (mappedDevice !== undefined) {
136
+ this.info(`Configuring ${device.ieeeAddr} ${device.modelID}`);
137
+ await mappedDevice.configure(device, coordinatorEndpoint, this);
138
+ device.meta.configured = zigbeeHerdsmanConverters.getConfigureKey(mappedDevice);
139
+ device.save();
140
+ this.info(`DeviceConfigure successful ${device.ieeeAddr} ${device.modelID}`);
141
+ }
140
142
  } catch (error) {
141
143
  this.sendError(error);
142
144
  this.error(
@@ -3,6 +3,7 @@
3
3
  const pathLib = require('path');
4
4
  const ZigbeeHerdsman = require('zigbee-herdsman');
5
5
  const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
6
+ const zigbeeHerdsmanConvertersPhilips = require('zigbee-herdsman-converters/lib/philips');
6
7
  const EventEmitter = require('events').EventEmitter;
7
8
  const safeJsonStringify = require('./json');
8
9
  const DeviceAvailabilityExt = require('./zbDeviceAvailability');
@@ -11,7 +12,22 @@ const DeviceEventExt = require('./zbDeviceEvent');
11
12
  const DelayedActionExt = require('./zbDelayedAction');
12
13
  const utils = require('./utils');
13
14
  const groupConverters = [
14
- zigbeeHerdsmanConverters.toZigbeeConverters.light_onoff_brightness,
15
+ zigbeeHerdsmanConverters.toZigbee.light_onoff_brightness,
16
+ zigbeeHerdsmanConverters.toZigbee.light_color_colortemp,
17
+ zigbeeHerdsmanConvertersPhilips.tz.effect, // Support Hue effects for groups
18
+ zigbeeHerdsmanConverters.toZigbee.ignore_transition,
19
+ zigbeeHerdsmanConverters.toZigbee.cover_position_tilt,
20
+ zigbeeHerdsmanConverters.toZigbee.thermostat_occupied_heating_setpoint,
21
+ zigbeeHerdsmanConverters.toZigbee.tint_scene,
22
+ zigbeeHerdsmanConverters.toZigbee.light_brightness_move,
23
+ zigbeeHerdsmanConverters.toZigbee.light_brightness_step,
24
+ zigbeeHerdsmanConverters.toZigbee.light_colortemp_step,
25
+ zigbeeHerdsmanConverters.toZigbee.light_colortemp_move,
26
+ zigbeeHerdsmanConverters.toZigbee.light_hue_saturation_move,
27
+ zigbeeHerdsmanConverters.toZigbee.light_hue_saturation_step
28
+
29
+
30
+ /* zigbeeHerdsmanConverters.toZigbeeConverters.light_onoff_brightness,
15
31
  zigbeeHerdsmanConverters.toZigbeeConverters.light_colortemp,
16
32
  zigbeeHerdsmanConverters.toZigbeeConverters.light_color,
17
33
  zigbeeHerdsmanConverters.toZigbeeConverters.light_alert,
@@ -20,7 +36,8 @@ const groupConverters = [
20
36
  zigbeeHerdsmanConverters.toZigbeeConverters.light_brightness_step,
21
37
  zigbeeHerdsmanConverters.toZigbeeConverters.light_colortemp_move,
22
38
  zigbeeHerdsmanConverters.toZigbeeConverters.light_colortemp_step,
23
- zigbeeHerdsmanConverters.toZigbeeConverters.light_colortemp_startup
39
+ zigbeeHerdsmanConverters.toZigbeeConverters.light_colortemp_startup*/
40
+
24
41
  ];
25
42
 
26
43
  function isFunction(functionToCheck) {
@@ -70,6 +87,8 @@ class ZigbeeController extends EventEmitter {
70
87
  adapter: {
71
88
  forceStartWithInconsistentAdapterConfiguration: options.startWithInconsistent
72
89
  },
90
+ legacy : false,
91
+
73
92
  };
74
93
  // https://github.com/ioBroker/ioBroker.zigbee/issues/668
75
94
  if (!options.extPanIdFix) {
@@ -646,7 +665,8 @@ class ZigbeeController extends EventEmitter {
646
665
  `Device '${friendlyName}' with Zigbee model '${message.device.modelID}' is NOT supported, ` +
647
666
  `please follow https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html`
648
667
  );
649
- this.emit('pairing', 'Interview successful', {friendly_name: friendlyName, supported: false});
668
+ const frName = {friendly_name: friendlyName, supported: false};
669
+ this.emit('pairing', 'Interview successful', JSON.stringify(frName));
650
670
  entity.device.modelID = entity.device._modelID;
651
671
  this.emit('new', entity);
652
672
  }
@@ -817,7 +837,7 @@ class ZigbeeController extends EventEmitter {
817
837
  this.debug(`addDevFromGroup - entity: ${utils.getEntityInfo(entity)}`);
818
838
  // generate group debug info and display it
819
839
  const members = await this.getGroupMembersFromController(groupId);
820
- let memberIDs = [];
840
+ const memberIDs = [];
821
841
  for (const member of members) {
822
842
  memberIDs.push(member.ieee);
823
843
  }
@@ -867,7 +887,7 @@ class ZigbeeController extends EventEmitter {
867
887
  const group = await this.resolveEntity(groupId);
868
888
 
869
889
  const members = await this.getGroupMembersFromController(groupId);
870
- let memberIDs = [];
890
+ const memberIDs = [];
871
891
  for (const member of members) {
872
892
  memberIDs.push(member.ieee);
873
893
  }
package/main.js CHANGED
@@ -607,7 +607,7 @@ class Zigbee extends utils.Adapter {
607
607
  async publishFromState(deviceId, model, stateModel, stateList, options) {
608
608
  let isGroup = false;
609
609
 
610
- this.log.debug(`publishFromState : ${deviceId} ${model}`);
610
+ this.log.debug(`publishFromState : ${deviceId} ${model} ${safeJsonStringify(stateList)}`);
611
611
  if (model === 'group') {
612
612
  isGroup = true;
613
613
  deviceId = parseInt(deviceId);
@@ -704,7 +704,7 @@ class Zigbee extends utils.Adapter {
704
704
  }
705
705
 
706
706
  const epName = stateDesc.epname !== undefined ? stateDesc.epname : (stateDesc.prop || stateDesc.id);
707
- const key = stateDesc.setattr || stateDesc.prop || stateDesc.id;
707
+ const key = stateDesc.prop || stateDesc.id || stateDesc.setattr;
708
708
  this.log.debug(`convert ${key}, ${safeJsonStringify(preparedValue)}, ${safeJsonStringify(preparedOptions)}`);
709
709
 
710
710
  let target;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zigbee",
3
- "version": "1.8.24",
3
+ "version": "1.8.25",
4
4
  "author": {
5
5
  "name": "Kirov Ilya",
6
6
  "email": "kirovilya@gmail.com"
@@ -18,26 +18,26 @@
18
18
  "node": ">=16"
19
19
  },
20
20
  "optionalDependencies": {
21
- "serialport": "^11.0.1"
21
+ "serialport": "^12.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@iobroker/adapter-core": "^3.0.3",
25
- "tar": "^6.1.15",
26
- "typescript": "^5.2.2",
27
- "zigbee-herdsman": "0.18.7",
28
- "zigbee-herdsman-converters": "15.70.0"
24
+ "@iobroker/adapter-core": "^3.0.4",
25
+ "tar": "^6.2.0",
26
+ "typescript": "^5.3.2",
27
+ "zigbee-herdsman": "0.26.1",
28
+ "zigbee-herdsman-converters": "16.11.0"
29
29
  },
30
30
  "description": "Zigbee devices",
31
31
  "devDependencies": {
32
32
  "@alcalzone/release-script": "^3.6.0",
33
33
  "@alcalzone/release-script-plugin-iobroker": "^3.6.0",
34
- "@alcalzone/release-script-plugin-license": "^3.5.9",
35
- "@alcalzone/release-script-plugin-manual-review": "^3.5.9",
34
+ "@alcalzone/release-script-plugin-license": "^3.7.0",
35
+ "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
36
36
  "@iobroker/testing": "^4.1.0",
37
- "axios": "^1.5.0",
38
- "chai": "^4.3.8",
37
+ "axios": "^1.6.0",
38
+ "chai": "^4.3.10",
39
39
  "chai-as-promised": "^7.1.1",
40
- "eslint": "^8.46.0",
40
+ "eslint": "^8.52.0",
41
41
  "eslint-config-prettier": "^9.0.0",
42
42
  "eslint-plugin-prettier": "^5.0.0",
43
43
  "gulp": "^4.0.2",