zigbee-herdsman-converters 14.0.489 → 14.0.492

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/devices/ikea.js CHANGED
@@ -706,6 +706,23 @@ module.exports = [
706
706
  },
707
707
  exposes: [e.cover_position(), e.battery()],
708
708
  },
709
+ {
710
+ zigbeeModel: ['PRAKTLYSING cellular blind'],
711
+ model: 'E2102',
712
+ vendor: 'IKEA',
713
+ description: 'PRAKTLYSING cellular blind',
714
+ fromZigbee: [fz.cover_position_tilt, fz.battery],
715
+ toZigbee: [tz.cover_state, tz.cover_position_tilt],
716
+ meta: {battery: {dontDividePercentage: true}},
717
+ ota: ota.tradfri,
718
+ configure: async (device, coordinatorEndpoint, logger) => {
719
+ const endpoint = device.getEndpoint(1);
720
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'closuresWindowCovering']);
721
+ await reporting.batteryPercentageRemaining(endpoint);
722
+ await reporting.currentPositionLiftPercentage(endpoint);
723
+ },
724
+ exposes: [e.cover_position(), e.battery()],
725
+ },
709
726
  {
710
727
  zigbeeModel: ['TREDANSEN block-out cellul blind'],
711
728
  model: 'E2103',
package/devices/lellki.js CHANGED
@@ -99,7 +99,7 @@ module.exports = [
99
99
  device.save();
100
100
  },
101
101
  options: [exposes.options.measurement_poll_interval()],
102
- exposes: [e.switch().withEndpoint('l1'), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
102
+ exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
103
103
  e.energy(), exposes.enum('power_outage_memory', ea.STATE_SET, ['on', 'off', 'restore'])
104
104
  .withDescription('Recover state after power outage')],
105
105
  onEvent: tuya.onEventMeasurementPoll,
package/devices/namron.js CHANGED
@@ -259,8 +259,8 @@ module.exports = [
259
259
  extend: extend.light_onoff_brightness_colortemp_color(),
260
260
  },
261
261
  {
262
- zigbeeModel: ['4512737'],
263
- model: '4512737',
262
+ zigbeeModel: ['4512737', '4512738'],
263
+ model: '4512737/4512738',
264
264
  vendor: 'Namron',
265
265
  description: 'Touch termostat',
266
266
  fromZigbee: [fz.thermostat, fz.metering, fz.electrical_measurement, fz.hvac_user_interface],
@@ -447,7 +447,7 @@ module.exports = [
447
447
  ota: ota.zigbeeOTA,
448
448
  },
449
449
  {
450
- zigbeeModel: ['LCT026', '7602031P7'],
450
+ zigbeeModel: ['LCT026', '7602031P7', '7602031U7'],
451
451
  model: '7602031P7',
452
452
  vendor: 'Philips',
453
453
  description: 'Hue Go with Bluetooth',
@@ -34,19 +34,111 @@ const fzLocal = {
34
34
  const ret = {};
35
35
 
36
36
  switch (commandID) {
37
- case 0xA1:
38
- Object.entries(msg.data.commandFrame.attributes).forEach(([attr, val]) => {
39
- switch (attr) {
40
- case 'totalActivePower':
41
- ret['power'] = val;
42
- break;
43
- case 'currentSummDelivered':
44
- ret['energy'] = ((parseInt(val[0]) << 32) + parseInt(val[1])) / 1000.0;
45
- break;
37
+ case 0xA1: {
38
+ const attr = msg.data.commandFrame.attributes;
39
+ const clusterID = msg.data.commandFrame.clusterID;
40
+
41
+ switch (clusterID) {
42
+ case 2820: { // haElectricalMeasurement
43
+ const acCurrentDivisor = attr['acCurrentDivisor'];
44
+ const acVoltageDivisor = attr['acVoltageDivisor'];
45
+ const acFrequencyDivisor = attr['acFrequencyDivisor'];
46
+ const powerDivisor = attr['powerDivisor'];
47
+
48
+ if (attr.hasOwnProperty('rmsVoltage')) {
49
+ ret['voltage_phase_a'] = attr['rmsVoltage'] / acVoltageDivisor;
50
+ }
51
+
52
+ if (attr.hasOwnProperty('rmsVoltagePhB')) {
53
+ ret['voltage_phase_b'] = attr['rmsVoltagePhB'] / acVoltageDivisor;
54
+ }
55
+
56
+ if (attr.hasOwnProperty('rmsVoltagePhC')) {
57
+ ret['voltage_phase_c'] = attr['rmsVoltagePhC'] / acVoltageDivisor;
58
+ }
59
+
60
+ if (attr.hasOwnProperty('19200')) {
61
+ ret['voltage_phase_ab'] = attr['19200'] / acVoltageDivisor;
62
+ }
63
+
64
+ if (attr.hasOwnProperty('19456')) {
65
+ ret['voltage_phase_bc'] = attr['19456'] / acVoltageDivisor;
66
+ }
67
+
68
+ if (attr.hasOwnProperty('19712')) {
69
+ ret['voltage_phase_ca'] = attr['19712'] / acVoltageDivisor;
70
+ }
71
+
72
+ if (attr.hasOwnProperty('rmsCurrent')) {
73
+ ret['current_phase_a'] = attr['rmsCurrent'] / acCurrentDivisor;
74
+ }
75
+
76
+ if (attr.hasOwnProperty('rmsCurrentPhB')) {
77
+ ret['current_phase_b'] = attr['rmsCurrentPhB'] / acCurrentDivisor;
78
+ }
79
+
80
+ if (attr.hasOwnProperty('rmsCurrentPhC')) {
81
+ ret['current_phase_c'] = attr['rmsCurrentPhC'] / acCurrentDivisor;
82
+ }
83
+
84
+ if (attr.hasOwnProperty('totalActivePower')) {
85
+ ret['power'] = attr['totalActivePower'] * 1000 / powerDivisor;
86
+ }
87
+
88
+ if (attr.hasOwnProperty('totalApparentPower')) {
89
+ ret['power_apparent'] = attr['totalApparentPower'] * 1000 / powerDivisor;
46
90
  }
47
- });
91
+
92
+ if (attr.hasOwnProperty('acFrequency')) {
93
+ ret['ac_frequency'] = attr['acFrequency'] / acFrequencyDivisor;
94
+ }
95
+
96
+ if (attr.hasOwnProperty('activePower')) {
97
+ ret['power_phase_a'] = attr['activePower'] * 1000 / powerDivisor;
98
+ }
99
+
100
+ if (attr.hasOwnProperty('activePowerPhB')) {
101
+ ret['power_phase_b'] = attr['activePowerPhB'] * 1000 / powerDivisor;
102
+ }
103
+
104
+ if (attr.hasOwnProperty('activePowerPhC')) {
105
+ ret['power_phase_c'] = attr['activePowerPhC'] * 1000 / powerDivisor;
106
+ }
107
+ break;
108
+ }
109
+ case 1794: { // seMetering
110
+ const divisor = attr['divisor'];
111
+
112
+ if (attr.hasOwnProperty('currentSummDelivered')) {
113
+ const val = attr['currentSummDelivered'];
114
+ ret['energy'] = ((parseInt(val[0]) << 32) + parseInt(val[1])) / divisor;
115
+ }
116
+
117
+ if (attr.hasOwnProperty('16652')) {
118
+ const val = attr['16652'];
119
+ ret['energy_phase_a'] = ((parseInt(val[0]) << 32) + parseInt(val[1])) / divisor;
120
+ }
121
+
122
+ if (attr.hasOwnProperty('16908')) {
123
+ const val = attr['16908'];
124
+ ret['energy_phase_b'] = ((parseInt(val[0]) << 32) + parseInt(val[1])) / divisor;
125
+ }
126
+
127
+ if (attr.hasOwnProperty('17164')) {
128
+ const val = attr['17164'];
129
+ ret['energy_phase_c'] = ((parseInt(val[0]) << 32) + parseInt(val[1])) / divisor;
130
+ }
131
+
132
+ if (attr.hasOwnProperty('powerFactor')) {
133
+ ret['power_factor'] = attr['powerFactor'];
134
+ }
135
+
136
+ break;
137
+ }
138
+ }
48
139
 
49
140
  break;
141
+ }
50
142
  case 0xA3:
51
143
  // Should handle this cluster as well
52
144
  break;
@@ -792,6 +884,33 @@ module.exports = [
792
884
  description: 'PowerTag power sensor',
793
885
  fromZigbee: [fzLocal.schneider_powertag],
794
886
  toZigbee: [],
795
- exposes: [e.power(), e.energy()],
887
+ exposes: [
888
+ e.power(),
889
+ e.power_apparent(),
890
+ exposes.numeric('power_phase_a', ea.STATE).withUnit('W').withDescription('Instantaneous measured power on phase A'),
891
+ exposes.numeric('power_phase_b', ea.STATE).withUnit('W').withDescription('Instantaneous measured power on phase B'),
892
+ exposes.numeric('power_phase_c', ea.STATE).withUnit('W').withDescription('Instantaneous measured power on phase C'),
893
+ e.power_factor(),
894
+ e.energy(),
895
+ exposes.numeric('energy_phase_a', ea.STATE).withUnit('kWh').withDescription('Sum of consumed energy on phase A'),
896
+ exposes.numeric('energy_phase_b', ea.STATE).withUnit('kWh').withDescription('Sum of consumed energy on phase B'),
897
+ exposes.numeric('energy_phase_c', ea.STATE).withUnit('kWh').withDescription('Sum of consumed energy on phase C'),
898
+ e.ac_frequency(),
899
+ exposes.numeric('voltage_phase_a', ea.STATE).withUnit('V').withDescription('Measured electrical potential value on phase A'),
900
+ exposes.numeric('voltage_phase_b', ea.STATE).withUnit('V').withDescription('Measured electrical potential value on phase B'),
901
+ exposes.numeric('voltage_phase_c', ea.STATE).withUnit('V').withDescription('Measured electrical potential value on phase C'),
902
+ exposes.numeric('voltage_phase_ab', ea.STATE)
903
+ .withUnit('V').withDescription('Measured electrical potential value between phase A and B'),
904
+ exposes.numeric('voltage_phase_bc', ea.STATE)
905
+ .withUnit('V').withDescription('Measured electrical potential value between phase B and C'),
906
+ exposes.numeric('voltage_phase_ca', ea.STATE)
907
+ .withUnit('V').withDescription('Measured electrical potential value between phase C and A'),
908
+ exposes.numeric('current_phase_a', ea.STATE)
909
+ .withUnit('A').withDescription('Instantaneous measured electrical current on phase A'),
910
+ exposes.numeric('current_phase_b', ea.STATE)
911
+ .withUnit('A').withDescription('Instantaneous measured electrical current on phase B'),
912
+ exposes.numeric('current_phase_c', ea.STATE)
913
+ .withUnit('A').withDescription('Instantaneous measured electrical current on phase C'),
914
+ ],
796
915
  },
797
916
  ];
package/devices/tuya.js CHANGED
@@ -279,6 +279,7 @@ module.exports = [
279
279
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_tza2vjxx'},
280
280
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_it1u8ahz'},
281
281
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_k1pe6ibm'},
282
+ {modelID: 'TS0505B', manufacturerName: '_TZB210_1ecortg6'},
282
283
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_bfwvfyx1'},
283
284
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_leyz4rju'},
284
285
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_jd3z4yig'},
package/lib/exposes.js CHANGED
@@ -588,6 +588,8 @@ module.exports = {
588
588
  pm25: () => new Numeric('pm25', access.STATE).withUnit('µg/m³').withDescription('Measured PM2.5 (particulate matter) concentration'),
589
589
  position: () => new Numeric('position', access.STATE).withUnit('%').withDescription('Position'),
590
590
  power: () => new Numeric('power', access.STATE).withUnit('W').withDescription('Instantaneous measured power'),
591
+ power_factor: () => new Numeric('power_factor', access.STATE).withUnit('%').withDescription('Instantaneous measured power factor'),
592
+ power_apparent: () => new Numeric('power_apparent', access.STATE).withUnit('VA').withDescription('Instantaneous measured apparent power'),
591
593
  power_on_behavior: () => new Enum('power_on_behavior', access.ALL, ['off', 'previous', 'on']).withDescription('Controls the behavior when the device is powered on'),
592
594
  power_outage_count: (resetsWhenPairing = true) => new Numeric('power_outage_count', access.STATE).withDescription('Number of power outages' + (resetsWhenPairing ? ' (since last pairing)' : '')),
593
595
  power_outage_memory: () => new Binary('power_outage_memory', access.ALL, true, false).withDescription('Enable/disable the power outage memory, this recovers the on/off mode after power failure'),
package/lib/xiaomi.js CHANGED
@@ -293,7 +293,9 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
293
293
  payload.consumption = payload.energy;
294
294
  break;
295
295
  case '150':
296
- payload.voltage = precisionRound(value * 0.1, 1); // 0x96
296
+ if (!['JTYJ-GD-01LM/BW'].includes(model.model)) {
297
+ payload.voltage = precisionRound(value * 0.1, 1); // 0x96
298
+ }
297
299
  break;
298
300
  case '151':
299
301
  if (['LLKZMK11LM'].includes(model.model)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.489",
3
+ "version": "14.0.492",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -36,9 +36,9 @@
36
36
  "dependencies": {
37
37
  "axios": "^0.26.1",
38
38
  "buffer-crc32": "^0.2.13",
39
- "https-proxy-agent": "^5.0.0",
39
+ "https-proxy-agent": "^5.0.1",
40
40
  "tar-stream": "^2.2.0",
41
- "zigbee-herdsman": "^0.14.24"
41
+ "zigbee-herdsman": "^0.14.26"
42
42
  },
43
43
  "devDependencies": {
44
44
  "eslint": "*",