zigbee-herdsman-converters 14.0.400 → 14.0.401

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.
@@ -719,6 +719,7 @@ const converters = {
719
719
  {key: 'rmsVoltage', name: 'voltage', factor: 'acVoltage'},
720
720
  {key: 'rmsVoltagePhB', name: 'voltage_phase_b', factor: 'acVoltage'},
721
721
  {key: 'rmsVoltagePhC', name: 'voltage_phase_c', factor: 'acVoltage'},
722
+ {key: 'acFrequency', name: 'ac_frequency', factor: 'acFrequency'},
722
723
  ];
723
724
 
724
725
  const payload = {};
@@ -730,6 +731,9 @@ const converters = {
730
731
  payload[property] = calibrateAndPrecisionRoundOptions(value, options, entry.name);
731
732
  }
732
733
  }
734
+ if (msg.data.hasOwnProperty('powerFactor')) {
735
+ payload.power_factor = precisionRound(msg.data['powerFactor'] / 100, 2);
736
+ }
733
737
  return payload;
734
738
  },
735
739
  },
@@ -1409,6 +1409,42 @@ const converters = {
1409
1409
  await entity.read('seMetering', ['instantaneousDemand']);
1410
1410
  },
1411
1411
  },
1412
+ currentsummdelivered: {
1413
+ key: ['energy'],
1414
+ convertGet: async (entity, key, meta) => {
1415
+ await entity.read('seMetering', ['currentSummDelivered']);
1416
+ },
1417
+ },
1418
+ frequency: {
1419
+ key: ['ac_frequency'],
1420
+ convertGet: async (entity, key, meta) => {
1421
+ await entity.read('haElectricalMeasurement', ['acFrequency']);
1422
+ },
1423
+ },
1424
+ powerfactor: {
1425
+ key: ['power_factor'],
1426
+ convertGet: async (entity, key, meta) => {
1427
+ await entity.read('haElectricalMeasurement', ['powerFactor']);
1428
+ },
1429
+ },
1430
+ acvoltage: {
1431
+ key: ['voltage'],
1432
+ convertGet: async (entity, key, meta) => {
1433
+ await entity.read('haElectricalMeasurement', ['rmsVoltage']);
1434
+ },
1435
+ },
1436
+ accurrent: {
1437
+ key: ['current'],
1438
+ convertGet: async (entity, key, meta) => {
1439
+ await entity.read('haElectricalMeasurement', ['rmsCurrent']);
1440
+ },
1441
+ },
1442
+ temperature: {
1443
+ key: ['temperature'],
1444
+ convertGet: async (entity, key, meta) => {
1445
+ await entity.read('msTemperatureMeasurement', ['measuredValue']);
1446
+ },
1447
+ },
1412
1448
  // #endregion
1413
1449
 
1414
1450
  // #region Non-generic converters
@@ -32,6 +32,26 @@ module.exports = [
32
32
  exposes.enum('backlight_mode', ea.ALL, ['LOW', 'MEDIUM', 'HIGH']),
33
33
  exposes.numeric('calibration_time', ea.STATE).withUnit('S').withDescription('Calibration time')],
34
34
  },
35
+ {
36
+ fingerprint: [{modelID: 'TS130F', manufacturerName: '_TZ3000_j1xl73iw'}],
37
+ model: 'TS130F_dual',
38
+ vendor: 'Lonsonho',
39
+ description: 'Dual curtain/blind module',
40
+ fromZigbee: [fz.cover_position_tilt, fz.tuya_cover_options],
41
+ toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.tuya_cover_calibration, tz.tuya_cover_reversal],
42
+ meta: {multiEndpoint: true},
43
+ endpoint: (device) => {
44
+ return {'left': 1, 'right': 2};
45
+ },
46
+ exposes: [
47
+ exposes.enum('moving', ea.STATE, ['UP', 'STOP', 'DOWN']),
48
+ exposes.numeric('calibration_time', ea.STATE).withUnit('S').withDescription('Calibration time'),
49
+ e.cover_position().withEndpoint('left'), exposes.binary('calibration', ea.ALL, 'ON', 'OFF')
50
+ .withEndpoint('left'), exposes.binary('motor_reversal', ea.ALL, 'ON', 'OFF').withEndpoint('left'),
51
+ e.cover_position().withEndpoint('right'), exposes.binary('calibration', ea.ALL, 'ON', 'OFF')
52
+ .withEndpoint('right'), exposes.binary('motor_reversal', ea.ALL, 'ON', 'OFF').withEndpoint('right'),
53
+ ],
54
+ },
35
55
  {
36
56
  fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_8vxj8khv'}, {modelID: 'TS0601', manufacturerName: '_TZE200_7tdtqgwv'}],
37
57
  model: 'X711A',
@@ -177,4 +197,28 @@ module.exports = [
177
197
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
178
198
  },
179
199
  },
200
+ {
201
+ fingerprint: [{modelID: 'TS110E', manufacturerName: '_TZ3210_zxbtub8r'}],
202
+ model: 'TS110E_1gang',
203
+ vendor: 'Lonsonho',
204
+ description: 'Zigbee smart dimmer module 1 gang with neutral',
205
+ extend: extend.light_onoff_brightness(),
206
+ },
207
+ {
208
+ fingerprint: [{modelID: 'TS110E', manufacturerName: '_TZ3210_wdexaypg'}],
209
+ model: 'TS110E_2gang',
210
+ vendor: 'Lonsonho',
211
+ description: 'Zigbee smart dimmer module 2 gang with neutral',
212
+ extend: extend.light_onoff_brightness({noConfigure: true}),
213
+ meta: {multiEndpoint: true},
214
+ exposes: [e.light_brightness().withEndpoint('l1'), e.light_brightness().withEndpoint('l2')],
215
+ configure: async (device, coordinatorEndpoint, logger) => {
216
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
217
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
218
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
219
+ },
220
+ endpoint: (device) => {
221
+ return {l1: 1, l2: 2};
222
+ },
223
+ },
180
224
  ];
package/devices/namron.js CHANGED
@@ -220,6 +220,13 @@ module.exports = [
220
220
  description: 'LED 5,3W CCT E14',
221
221
  extend: extend.light_onoff_brightness_colortemp(),
222
222
  },
223
+ {
224
+ zigbeeModel: ['3802965'],
225
+ model: '3802965',
226
+ vendor: 'Namron',
227
+ description: 'LED 4,8W DIM GU10',
228
+ extend: extend.light_onoff_brightness(),
229
+ },
223
230
  {
224
231
  zigbeeModel: ['3802966'],
225
232
  model: '3802966',
@@ -36,6 +36,15 @@ module.exports = [
36
36
  description: 'Hue white ambiance bathroom ceiling light Adore with Bluetooth',
37
37
  extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
38
38
  },
39
+ {
40
+ zigbeeModel: ['929003045301_01', '929003045301_02', '929003045301_03'],
41
+ model: '929003045301',
42
+ vendor: 'Philips',
43
+ description: 'Hue White and Color Ambiance GU10 (Centura)',
44
+ meta: {turnsOffAtBrightness1: true},
45
+ extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
46
+ ota: ota.zigbeeOTA,
47
+ },
39
48
  {
40
49
  zigbeeModel: ['929003056901'],
41
50
  model: '929003056901',
@@ -183,7 +183,7 @@ module.exports = [
183
183
  toZigbee: [],
184
184
  configure: async (device, coordinatorEndpoint, logger) => {
185
185
  const endpoint = device.getEndpoint(1);
186
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
186
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
187
187
  await reporting.batteryVoltage(endpoint);
188
188
  },
189
189
  exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'long'])],
@@ -230,11 +230,14 @@ module.exports = [
230
230
  toZigbee: [],
231
231
  exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long',
232
232
  '3_single', '3_double', '3_long', '4_single', '4_double', '4_long']), e.battery(), e.battery_voltage()],
233
- meta: {battery: {voltageToPercentage: '3V_2100'}},
233
+ meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
234
234
  configure: async (device, coordinatorEndpoint, logger) => {
235
235
  const endpoint = device.getEndpoint(1);
236
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
236
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
237
237
  await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
238
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
239
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
240
+ await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
238
241
  },
239
242
  },
240
243
  {
@@ -247,7 +250,7 @@ module.exports = [
247
250
  toZigbee: [],
248
251
  configure: async (device, coordinatorEndpoint, logger) => {
249
252
  const endpoint = device.getEndpoint(1);
250
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
253
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
251
254
  await reporting.batteryVoltage(endpoint);
252
255
  },
253
256
  exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'long'])],
@@ -260,12 +263,14 @@ module.exports = [
260
263
  fromZigbee: [fz.sihas_action, fz.battery],
261
264
  toZigbee: [],
262
265
  exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long']), e.battery(), e.battery_voltage()],
263
- meta: {battery: {voltageToPercentage: '3V_2100'}},
266
+ meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
264
267
  configure: async (device, coordinatorEndpoint, logger) => {
265
268
  const endpoint = device.getEndpoint(1);
266
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
269
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
267
270
  await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
271
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
268
272
  },
273
+
269
274
  },
270
275
  {
271
276
  zigbeeModel: ['SBM300ZB3'],
@@ -276,11 +281,13 @@ module.exports = [
276
281
  toZigbee: [],
277
282
  exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long',
278
283
  '3_single', '3_double', '3_long']), e.battery(), e.battery_voltage()],
279
- meta: {battery: {voltageToPercentage: '3V_2100'}},
284
+ meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
280
285
  configure: async (device, coordinatorEndpoint, logger) => {
281
286
  const endpoint = device.getEndpoint(1);
282
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
287
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
283
288
  await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
289
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
290
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
284
291
  },
285
292
  },
286
293
  {
@@ -300,4 +307,38 @@ module.exports = [
300
307
  await reporting.currentSummDelivered(endpoint, {min: 1, max: 600, change: 5});
301
308
  },
302
309
  },
310
+ {
311
+ zigbeeModel: ['PMM-300Z2'],
312
+ model: 'PMM-300Z2',
313
+ vendor: 'ShinaSystem',
314
+ description: 'SiHAS energy monitor',
315
+ fromZigbee: [fz.electrical_measurement, fz.metering, fz.temperature],
316
+ toZigbee: [tz.metering_power, tz.currentsummdelivered, tz.frequency, tz.powerfactor, tz.acvoltage, tz.accurrent, tz.temperature],
317
+ exposes: [e.power().withAccess(ea.STATE_GET), e.energy().withAccess(ea.STATE_GET),
318
+ e.current().withAccess(ea.STATE_GET), e.voltage().withAccess(ea.STATE_GET),
319
+ e.temperature().withAccess(ea.STATE_GET).withDescription('temperature of device internal mcu'),
320
+ exposes.numeric('power_factor', ea.STATE_GET).withDescription('Measured electrical power factor'),
321
+ exposes.numeric('ac_frequency', ea.STATE_GET).withUnit('Hz').withDescription('Measured electrical ac frequency')],
322
+ configure: async (device, coordinatorEndpoint, logger) => {
323
+ const endpoint = device.getEndpoint(1);
324
+ await reporting.bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering', 'msTemperatureMeasurement']);
325
+ await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
326
+ 'acCurrentDivisor']);
327
+ await endpoint.read('seMetering', ['multiplier', 'divisor']);
328
+ // await reporting.activePower(endpoint, {min: 1, max: 600, change: 5}); // no need, duplicate for power value.
329
+ await reporting.instantaneousDemand(endpoint, {min: 1, max: 600, change: 5});
330
+ await reporting.powerFactor(endpoint, {min: 10, max: 600, change: 1});
331
+ await reporting.rmsVoltage(endpoint, {min: 5, max: 600, change: 1});
332
+ await reporting.rmsCurrent(endpoint, {min: 5, max: 600, change: 1});
333
+ await reporting.currentSummDelivered(endpoint, {min: 1, max: 600, change: 5});
334
+ await reporting.temperature(endpoint, {min: 20, max: 300, change: 10});
335
+ endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acFrequencyMultiplier: 1, acFrequencyDivisor: 10});
336
+ await endpoint.configureReporting('haElectricalMeasurement', [{
337
+ attribute: 'acFrequency',
338
+ minimumReportInterval: 10,
339
+ maximumReportInterval: 600,
340
+ reportableChange: 3,
341
+ }]);
342
+ },
343
+ },
303
344
  ];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.400",
3
+ "version": "14.0.401",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.400",
3
+ "version": "14.0.401",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [