zigbee-herdsman-converters 14.0.616 → 14.0.617

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.
@@ -79,6 +79,13 @@ const batteryRotaryDimmer = (...endpointsIds) => ({
79
79
  });
80
80
 
81
81
  module.exports = [
82
+ {
83
+ zigbeeModel: ['RGBCXStrip50AU'],
84
+ model: 'AU-A1ZBSCRGBCX',
85
+ vendor: 'Aurora',
86
+ description: 'RGBW LED strip controller',
87
+ extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [166, 400]}),
88
+ },
82
89
  {
83
90
  zigbeeModel: ['TWGU10Bulb50AU'],
84
91
  model: 'AU-A1GUZBCX5',
package/devices/ikea.js CHANGED
@@ -924,6 +924,7 @@ module.exports = [
924
924
 
925
925
  await endpoint.read('manuSpecificIkeaAirPurifier', ['controlPanelLight', 'childLock', 'filterRunTime']);
926
926
  },
927
+ ota: ota.tradfri,
927
928
  },
928
929
  {
929
930
  zigbeeModel: ['TRADFRIbulbE14WScandleopal470lm', 'TRADFRIbulbE12WScandleopal450lm'],
@@ -61,8 +61,22 @@ module.exports = [
61
61
  model: 'E12-N1E',
62
62
  vendor: 'Sengled',
63
63
  description: 'Smart LED multicolor (BR30)',
64
- extend: sengledExtend.light_onoff_brightness_colortemp_color(),
64
+ fromZigbee: sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).fromZigbee.concat([fz.metering]),
65
+ toZigbee: sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).toZigbee,
66
+ exposes: sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).exposes.concat([e.power(), e.energy()]),
65
67
  ota: ota.zigbeeOTA,
68
+ configure: async (device, coordinatorEndpoint, logger) => {
69
+ await sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]})
70
+ .configure(device, coordinatorEndpoint, logger);
71
+ device.powerSource = 'Mains (single phase)';
72
+ device.save();
73
+
74
+ const endpoint = device.getEndpoint(1);
75
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
76
+ await reporting.readMeteringMultiplierDivisor(endpoint);
77
+ await reporting.currentSummDelivered(endpoint);
78
+ await reporting.instantaneousDemand(endpoint);
79
+ },
66
80
  },
67
81
  {
68
82
  zigbeeModel: ['E1G-G8E'],
package/devices/sonoff.js CHANGED
@@ -5,6 +5,7 @@ const constants = require('../lib/constants');
5
5
  const reporting = require('../lib/reporting');
6
6
  const extend = require('../lib/extend');
7
7
  const e = exposes.presets;
8
+ const ea = exposes.access;
8
9
  const ota = require('../lib/ota');
9
10
 
10
11
  const fzLocal = {
@@ -18,6 +19,16 @@ const fzLocal = {
18
19
  }
19
20
  },
20
21
  },
22
+ router_config: {
23
+ cluster: 'genLevelCtrl',
24
+ type: ['attributeReport', 'readResponse'],
25
+ convert: (model, msg, publish, options, meta) => {
26
+ const result = {};
27
+ if (msg.data.hasOwnProperty('currentLevel')) {
28
+ result.light_indicator_level = msg.data['currentLevel'];
29
+ }
30
+ },
31
+ },
21
32
  };
22
33
 
23
34
  module.exports = [
@@ -189,4 +200,17 @@ module.exports = [
189
200
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
190
201
  },
191
202
  },
203
+ {
204
+ zigbeeModel: ['DONGLE-E_R'],
205
+ model: 'ZBDongle-E',
206
+ vendor: 'SONOFF',
207
+ description: 'Sonoff Zigbee 3.0 USB Dongle Plus (EFR32MG21) with router firmware',
208
+ fromZigbee: [fz.linkquality_from_basic, fzLocal.router_config],
209
+ toZigbee: [],
210
+ exposes: [exposes.numeric('light_indicator_level').withDescription('Brightness of the indicator light').withAccess(ea.STATE)],
211
+ configure: async (device, coordinatorEndpoint, logger) => {
212
+ device.powerSource = 'Mains (single phase)';
213
+ device.save();
214
+ },
215
+ },
192
216
  ];
package/devices/tuya.js CHANGED
@@ -277,6 +277,28 @@ const tzLocal = {
277
277
  };
278
278
 
279
279
  const fzLocal = {
280
+ tuya_dinrail_switch2: {
281
+ cluster: 'manuSpecificTuya',
282
+ type: ['commandDataReport', 'commandDataResponse', 'commandActiveStatusReport'],
283
+ convert: (model, msg, publish, options, meta) => {
284
+ const dpValue = tuya.firstDpValue(msg, meta, 'tuya_dinrail_switch2');
285
+ const dp = dpValue.dp;
286
+ const value = tuya.getDataValue(dpValue);
287
+ const state = value ? 'ON' : 'OFF';
288
+
289
+ switch (dp) {
290
+ case tuya.dataPoints.state: // DPID that we added to common
291
+ return {state: state};
292
+ case tuya.dataPoints.dinrailPowerMeterTotalEnergy2:
293
+ return {energy: value/100};
294
+ case tuya.dataPoints.dinrailPowerMeterPower2:
295
+ return {power: value};
296
+ default:
297
+ meta.logger.warn(`zigbee-herdsman-converters:TuyaDinRailSwitch: NOT RECOGNIZED DP ` +
298
+ `#${dp} with data ${JSON.stringify(dpValue)}`);
299
+ }
300
+ },
301
+ },
280
302
  hpsz: {
281
303
  cluster: 'manuSpecificTuya',
282
304
  type: ['commandDataResponse', 'commandDataReport'],
@@ -918,7 +940,12 @@ module.exports = [
918
940
  // Requires alarm_1_with_timeout https://github.com/Koenkk/zigbee2mqtt/issues/2818#issuecomment-776119586
919
941
  fromZigbee: [fz.ias_occupancy_alarm_1_with_timeout, fz.battery, fz.ignore_basic_report],
920
942
  toZigbee: [],
921
- exposes: [e.occupancy(), e.battery_low(), e.linkquality()],
943
+ exposes: [e.occupancy(), e.battery_low(), e.linkquality(), e.battery(), e.battery_voltage()],
944
+ configure: async (device, coordinatorEndpoint, logger) => {
945
+ const endpoint = device.getEndpoint(1);
946
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
947
+ await reporting.batteryPercentageRemaining(endpoint);
948
+ },
922
949
  },
923
950
  {
924
951
  fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_dr6sduka'},
@@ -987,6 +1014,7 @@ module.exports = [
987
1014
  fingerprint: [{modelID: 'TS0207', manufacturerName: '_TZ3000_m0vaazab'},
988
1015
  {modelID: 'TS0207', manufacturerName: '_TZ3000_ufttklsz'},
989
1016
  {modelID: 'TS0207', manufacturerName: '_TZ3000_nkkl7uzv'},
1017
+ {modelID: 'TS0207', manufacturerName: '_TZ3000_gszjt2xx'},
990
1018
  {modelID: 'TS0207', manufacturerName: '_TZ3000_5k5vh43t'}],
991
1019
  model: 'TS0207_repeater',
992
1020
  vendor: 'TuYa',
@@ -2104,6 +2132,19 @@ module.exports = [
2104
2132
  },
2105
2133
  exposes: [e.switch().setAccess('state', ea.STATE_SET), e.voltage(), e.power(), e.current(), e.energy()],
2106
2134
  },
2135
+ {
2136
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_bkkmqmyo'}],
2137
+ model: 'DDS238-2',
2138
+ vendor: 'TuYa',
2139
+ description: 'Zigbee smart energy meter',
2140
+ fromZigbee: [fzLocal.tuya_dinrail_switch2],
2141
+ toZigbee: [tz.tuya_switch_state],
2142
+ configure: async (device, coordinatorEndpoint, logger) => {
2143
+ const endpoint = device.getEndpoint(1);
2144
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
2145
+ },
2146
+ exposes: [e.switch().setAccess('state', ea.STATE_SET), e.energy(), e.power()],
2147
+ },
2107
2148
  {
2108
2149
  fingerprint: [{modelID: 'TS1101', manufacturerName: '_TZ3000_xfs39dbf'}],
2109
2150
  model: 'TS1101_dimmer_module_1ch',
@@ -3028,7 +3069,8 @@ module.exports = [
3028
3069
  ],
3029
3070
  },
3030
3071
  {
3031
- fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_qoy0ekbd'}],
3072
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_qoy0ekbd'},
3073
+ {modelID: 'TS0601', manufacturerName: '_TZE200_znbl8dj5'}],
3032
3074
  model: 'CX-0726',
3033
3075
  vendor: 'TuYa',
3034
3076
  description: 'Temperature & humidity LCD sensor',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.616",
3
+ "version": "14.0.617",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [