zigbee-herdsman-converters 14.0.629 → 14.0.630

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.
@@ -785,6 +785,20 @@ const converters = {
785
785
  }
786
786
  },
787
787
  },
788
+ on_off_force_multiendpoint: {
789
+ cluster: 'genOnOff',
790
+ type: ['attributeReport', 'readResponse'],
791
+ convert: (model, msg, publish, options, meta) => {
792
+ // This converted is need instead of `fz.on_off` when no meta: {multiEndpoint: true} can be defined for this device
793
+ // but it is needed for the `state`. E.g. when a switch has 3 channels (state_l1, state_l2, state_l3) but
794
+ // has combined power measurements (power, energy))
795
+ if (msg.data.hasOwnProperty('onOff')) {
796
+ const endpointName = model.hasOwnProperty('endpoint') ?
797
+ utils.getKey(model.endpoint(meta.device), msg.endpoint.ID) : msg.endpoint.ID;
798
+ return {[`state_${endpointName}`]: msg.data['onOff'] === 1 ? 'ON' : 'OFF'};
799
+ }
800
+ },
801
+ },
788
802
  on_off_skip_duplicate_transaction: {
789
803
  cluster: 'genOnOff',
790
804
  type: ['attributeReport', 'readResponse'],
@@ -79,6 +79,13 @@ const batteryRotaryDimmer = (...endpointsIds) => ({
79
79
  });
80
80
 
81
81
  module.exports = [
82
+ {
83
+ zigbeeModel: ['TWBulb51AU'],
84
+ model: 'AU-A1GSZ9CX',
85
+ vendor: 'Aurora',
86
+ description: 'AOne GLS lamp 9w tunable dimmable 2200-5000K',
87
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [200, 454]}),
88
+ },
82
89
  {
83
90
  zigbeeModel: ['RGBCXStrip50AU'],
84
91
  model: 'AU-A1ZBSCRGBCX',
package/devices/insta.js CHANGED
@@ -83,7 +83,7 @@ module.exports = [
83
83
  {ID: 242, profileID: 41440, deviceID: 97},
84
84
  ]},
85
85
  ],
86
- zigbeeModel: ['57004000'],
86
+ zigbeeModel: ['NEXENTRO Pushbutton Interface', '57004000'],
87
87
  model: '57004000',
88
88
  vendor: 'Insta',
89
89
  description: 'Pushbutton Interface 2-gang 230V',
package/devices/lellki.js CHANGED
@@ -133,14 +133,16 @@ module.exports = [
133
133
  description: 'Power cord 4 sockets EU (with power monitoring)',
134
134
  vendor: 'LELLKI',
135
135
  extend: extend.switch(),
136
- fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory],
136
+ fromZigbee: [fz.on_off_force_multiendpoint, fz.electrical_measurement, fz.metering, fz.ignore_basic_report,
137
+ fz.tuya_switch_power_outage_memory],
137
138
  toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
138
139
  configure: async (device, coordinatorEndpoint, logger) => {
139
140
  const endpoint = device.getEndpoint(1);
140
141
  await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
141
- await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
142
- await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
143
- await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
142
+ for (const ep of [1, 2, 3]) {
143
+ await reporting.bind(device.getEndpoint(ep), coordinatorEndpoint, ['genOnOff']);
144
+ await reporting.onOff(device.getEndpoint(ep));
145
+ }
144
146
  endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor: 1000, acCurrentMultiplier: 1});
145
147
  endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
146
148
  device.save();
package/devices/niko.js CHANGED
@@ -131,6 +131,29 @@ module.exports = [
131
131
  exposes.binary('led_enable', ea.ALL, true, false).withDescription('Enable LED'),
132
132
  ],
133
133
  },
134
+ {
135
+ zigbeeModel: ['Smart plug Zigbee SE'],
136
+ model: '552-80698',
137
+ vendor: 'Niko',
138
+ description: 'Smart plug with side earthing pin',
139
+ fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.power_on_behavior],
140
+ toZigbee: [tz.on_off, tz.power_on_behavior, tz.electrical_measurement_power, tz.currentsummdelivered],
141
+ configure: async (device, coordinatorEndpoint, logger) => {
142
+ const endpoint = device.getEndpoint(1);
143
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
144
+ await reporting.onOff(endpoint);
145
+ // only activePower seems to be support, although compliance document states otherwise
146
+ await endpoint.read('haElectricalMeasurement', ['acPowerMultiplier', 'acPowerDivisor']);
147
+ await reporting.activePower(endpoint);
148
+ await reporting.readMeteringMultiplierDivisor(endpoint);
149
+ await reporting.currentSummDelivered(endpoint, {min: 60, change: 1});
150
+ },
151
+ exposes: [
152
+ e.switch(), e.power().withAccess(ea.STATE_GET), e.energy().withAccess(ea.STATE_GET),
153
+ exposes.enum('power_on_behavior', ea.ALL, ['off', 'previous', 'on'])
154
+ .withDescription('Controls the behaviour when the device is powered on'),
155
+ ],
156
+ },
134
157
  {
135
158
  zigbeeModel: ['Smart plug Zigbee PE'],
136
159
  model: '552-80699',
@@ -2701,6 +2701,13 @@ module.exports = [
2701
2701
  description: 'Akari downlight',
2702
2702
  extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
2703
2703
  },
2704
+ {
2705
+ zigbeeModel: ['LCD005'],
2706
+ model: '9290031345',
2707
+ vendor: 'Philips',
2708
+ description: 'Hue white and color ambiance 4" retrofit recessed downlight',
2709
+ extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
2710
+ },
2704
2711
  {
2705
2712
  zigbeeModel: ['LCD006'],
2706
2713
  model: '9290031346',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.629",
3
+ "version": "14.0.630",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -38,7 +38,7 @@
38
38
  "buffer-crc32": "^0.2.13",
39
39
  "https-proxy-agent": "^5.0.1",
40
40
  "tar-stream": "^2.2.0",
41
- "zigbee-herdsman": "^0.14.55"
41
+ "zigbee-herdsman": "^0.14.59"
42
42
  },
43
43
  "devDependencies": {
44
44
  "eslint": "*",