zigbee-herdsman-converters 14.0.636 → 14.0.637

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.
@@ -516,20 +516,23 @@ module.exports = [
516
516
  return {default: 35};
517
517
  },
518
518
  configure: async (device, coordinatorEndpoint, logger) => {
519
- const endpoint1 = device.getEndpoint(35);
520
- await reporting.bind(endpoint1, coordinatorEndpoint, ['genPowerCfg']);
521
- await reporting.batteryVoltage(endpoint1, {min: constants.repInterval.HOUR, max: 43200, change: 100});
522
- await endpoint1.read('genPowerCfg', ['batteryVoltage']);
523
- await endpoint1.read('genBasic', ['develcoLedControl'], manufacturerOptions);
524
- await endpoint1.read('ssIasZone', ['develcoAlarmOffDelay'], manufacturerOptions);
519
+ const endpoint35 = device.getEndpoint(35);
520
+ await reporting.bind(endpoint35, coordinatorEndpoint, ['genPowerCfg']);
521
+ await reporting.batteryVoltage(endpoint35, {min: constants.repInterval.HOUR, max: 43200, change: 100});
522
+ try {
523
+ await endpoint35.read('ssIasZone', ['develcoAlarmOffDelay'], manufacturerOptions);
524
+ await endpoint35.read('genBasic', ['develcoLedControl'], manufacturerOptions);
525
+ } catch (error) {/* some reports of timeouts on reading these */}
525
526
 
526
- const endpoint2 = device.getEndpoint(38);
527
- await reporting.bind(endpoint2, coordinatorEndpoint, ['msTemperatureMeasurement']);
528
- await reporting.temperature(endpoint2);
527
+ const endpoint38 = device.getEndpoint(38);
528
+ await reporting.bind(endpoint38, coordinatorEndpoint, ['msTemperatureMeasurement']);
529
+ await reporting.temperature(endpoint38,
530
+ {min: constants.repInterval.MINUTE, max: constants.repInterval.MINUTES_10, change: 100});
529
531
 
530
- const endpoint3 = device.getEndpoint(39);
531
- await reporting.bind(endpoint3, coordinatorEndpoint, ['msIlluminanceMeasurement']);
532
- await reporting.illuminance(endpoint3);
532
+ const endpoint39 = device.getEndpoint(39);
533
+ await reporting.bind(endpoint39, coordinatorEndpoint, ['msIlluminanceMeasurement']);
534
+ await reporting.illuminance(endpoint39,
535
+ {min: constants.repInterval.MINUTE, max: constants.repInterval.MINUTES_10, change: 500});
533
536
  },
534
537
  },
535
538
  {
@@ -687,7 +687,7 @@ module.exports = [
687
687
  extend: hueExtend.light_onoff_brightness_colortemp_color(),
688
688
  },
689
689
  {
690
- zigbeeModel: ['4090531P9', '929003053601'],
690
+ zigbeeModel: ['4090531P9', '929003053601', '929003053501'],
691
691
  model: '4090531P9',
692
692
  vendor: 'Philips',
693
693
  description: 'Hue Flourish white and color ambiance ceiling light with Bluetooth',
package/devices/tuya.js CHANGED
@@ -2229,6 +2229,23 @@ module.exports = [
2229
2229
  .withDescription('Plug LED indicator mode'), e.child_lock()],
2230
2230
  onEvent: tuya.onEventMeasurementPoll,
2231
2231
  },
2232
+ {
2233
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE200_ntcy3xu1']),
2234
+ model: 'TS0601_smoke_1',
2235
+ vendor: 'TuYa',
2236
+ description: 'Smoke sensor',
2237
+ fromZigbee: [tuya.fzDataPoints],
2238
+ toZigbee: [tuya.tzDataPoints],
2239
+ configure: tuya.configureMagicPacket,
2240
+ exposes: [e.smoke(), e.tamper(), e.battery_low()],
2241
+ meta: {
2242
+ tuyaDatapoints: [
2243
+ [1, 'smoke', tuya.valueConverter.true0ElseFalse],
2244
+ [4, 'tamper', tuya.valueConverter.raw],
2245
+ [14, 'battery_low', tuya.valueConverter.true0ElseFalse],
2246
+ ],
2247
+ },
2248
+ },
2232
2249
  {
2233
2250
  zigbeeModel: ['5p1vj8r'],
2234
2251
  fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_t5p1vj8r'}, {modelID: 'TS0601', manufacturerName: '_TZE200_uebojraa'}],
@@ -2240,7 +2257,7 @@ module.exports = [
2240
2257
  exposes: [e.smoke(), e.battery()],
2241
2258
  },
2242
2259
  {
2243
- fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_5d3vhjro'}, {modelID: 'TS0601', manufacturerName: '_TZE200_ntcy3xu1'}],
2260
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_5d3vhjro'}],
2244
2261
  model: 'SA12IZL',
2245
2262
  vendor: 'TuYa',
2246
2263
  description: 'Smart smoke alarm',
@@ -2255,7 +2272,7 @@ module.exports = [
2255
2272
  onEvent: tuya.onEventsetTime,
2256
2273
  },
2257
2274
  {
2258
- fingerprint: tuya.fingerprint('TS0601', ['_TZE200_lsanae15', '_TZE200_bkkmqmyo']),
2275
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE200_lsanae15', '_TZE200_bkkmqmyo', '_TZE200_eaac7dkw']),
2259
2276
  model: 'TS0601_din_1',
2260
2277
  vendor: 'TuYa',
2261
2278
  description: 'Zigbee DIN energy meter',
@@ -2266,9 +2283,9 @@ module.exports = [
2266
2283
  meta: {
2267
2284
  tuyaDatapoints: [
2268
2285
  [1, 'energy', tuya.valueConverter.divideBy100],
2269
- [6, null, tuya.valueConverterMultiProperty.phaseA], // voltage and current
2286
+ [6, null, tuya.valueConverter.phaseA], // voltage and current
2270
2287
  [16, 'state', tuya.valueConverter.onOff],
2271
- [103, 'power', tuya.valueConverterBasic.raw],
2288
+ [103, 'power', tuya.valueConverter.raw],
2272
2289
  [105, 'ac_frequency', tuya.valueConverter.divideBy100],
2273
2290
  [111, 'power_factor', tuya.valueConverter.divideBy10],
2274
2291
  // Ignored for now; we don't know what the values mean
package/devices/ynoa.js CHANGED
@@ -6,6 +6,13 @@ const e = exposes.presets;
6
6
  const extend = require('..//lib/extend');
7
7
 
8
8
  module.exports = [
9
+ {
10
+ zigbeeModel: ['ZBT-CCTLight-GU100001'],
11
+ model: '8718801528273',
12
+ vendor: 'Ynoa',
13
+ description: 'Smart LED GU10 CCT',
14
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
15
+ },
9
16
  {
10
17
  zigbeeModel: ['ZBT-DIMSwitch-D0000'],
11
18
  model: '8718801528334',
package/lib/tuya.js CHANGED
@@ -1183,7 +1183,9 @@ const valueConverterBasic = {
1183
1183
  scale: (min1, max1, min2, max2) => {
1184
1184
  return {to: (v) => utils.mapNumberRange(v, min1, max1, min2, max2), from: (v) => utils.mapNumberRange(v, min2, max2, min1, max1)};
1185
1185
  },
1186
- raw: {to: (v) => v, from: (v) => v},
1186
+ raw: () => {
1187
+ return {to: (v) => v, from: (v) => v};
1188
+ },
1187
1189
  divideBy: (value) => {
1188
1190
  return {to: (v) => v * value, from: (v) => v / value};
1189
1191
  },
@@ -1199,15 +1201,14 @@ const valueConverter = {
1199
1201
  scale0_1to0_1000: valueConverterBasic.scale(0, 1, 0, 1000),
1200
1202
  divideBy100: valueConverterBasic.divideBy(100),
1201
1203
  divideBy10: valueConverterBasic.divideBy(10),
1202
- };
1203
-
1204
- const valueConverterMultiProperty = {
1204
+ raw: valueConverterBasic.raw(),
1205
1205
  phaseA: {
1206
1206
  from: (v) => {
1207
1207
  const buffer = Buffer.from(v, 'base64');
1208
1208
  return {voltage: (buffer[14] | buffer[13] << 8) / 10, current: (buffer[12] | buffer[11] << 8) / 1000};
1209
1209
  },
1210
1210
  },
1211
+ true0ElseFalse: {from: (v) => v === 0},
1211
1212
  };
1212
1213
 
1213
1214
  const tzDataPoints = {
@@ -1270,9 +1271,8 @@ module.exports = {
1270
1271
  skip,
1271
1272
  configureMagicPacket,
1272
1273
  fingerprint,
1273
- valueConverterMultiProperty,
1274
- valueConverterBasic,
1275
1274
  valueConverter,
1275
+ valueConverterBasic,
1276
1276
  tzDataPoints,
1277
1277
  fzDataPoints,
1278
1278
  sendDataPoint,
package/lib/utils.js CHANGED
@@ -121,10 +121,12 @@ function postfixWithEndpointName(value, msg, definition, meta) {
121
121
  if (definition.meta && definition.meta.multiEndpoint) {
122
122
  const endpointName = definition.hasOwnProperty('endpoint') ?
123
123
  getKey(definition.endpoint(meta.device), msg.endpoint.ID) : msg.endpoint.ID;
124
- return `${value}_${endpointName}`;
125
- } else {
126
- return value;
124
+
125
+ // NOTE: endpointName can be undefined if we have a definition.endpoint and the endpoint is
126
+ // not listed.
127
+ if (endpointName) return `${value}_${endpointName}`;
127
128
  }
129
+ return value;
128
130
  }
129
131
 
130
132
  function getKey(object, value, fallback, convertTo) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.636",
3
+ "version": "14.0.637",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [