zigbee-herdsman-converters 14.0.475 → 14.0.478

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.
@@ -7565,11 +7565,11 @@ const converters = {
7565
7565
  if (0x8000 in msg.data) {
7566
7566
  const firmware = msg.data[0x8000].join('.');
7567
7567
  result.current_firmware = firmware;
7568
- msg.device.zhDevice.softwareBuildID = firmware;
7568
+ meta.device.softwareBuildID = firmware;
7569
7569
  }
7570
7570
 
7571
7571
  if (0x8020 in msg.data) {
7572
- msg.device.zhDevice.hardwareVersion = msg.data[0x8020].join('.');
7572
+ meta.device.hardwareVersion = msg.data[0x8020].join('.');
7573
7573
  }
7574
7574
 
7575
7575
  return result;
@@ -6311,16 +6311,13 @@ const converters = {
6311
6311
  convertSet: async (entity, key, value, meta) => {
6312
6312
  switch (key) {
6313
6313
  case 'ext_switch_type':
6314
- meta.logger.debug(`toZigbee.ZB006X_settings: Send key/value [${key}|${value}]`);
6315
6314
  await tuya.sendDataPointEnum(entity, 103, {'unknown': 0, 'toggle_sw': 1,
6316
6315
  'momentary_sw': 2, 'rotary_sw': 3, 'auto_config': 4}[value]);
6317
6316
  break;
6318
6317
  case 'load_detection_mode':
6319
- meta.logger.debug(`toZigbee.ZB006X_settings: Send key/value [${key}|${value}]`);
6320
6318
  await tuya.sendDataPointEnum(entity, 105, {'none': 0, 'first_power_on': 1, 'every_power_on': 2}[value]);
6321
6319
  break;
6322
6320
  case 'control_mode':
6323
- meta.logger.debug(`toZigbee.ZB006X_settings: Send key/value [${key}|${value}]`);
6324
6321
  await tuya.sendDataPointEnum(entity, 109, {'local': 0, 'remote': 1, 'both': 2}[value]);
6325
6322
  break;
6326
6323
  default: // Unknown key
package/devices/adeo.js CHANGED
@@ -27,6 +27,13 @@ module.exports = [
27
27
  description: 'ENKI LEXMAN E27 LED white',
28
28
  extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
29
29
  },
30
+ {
31
+ zigbeeModel: ['ZBEK-5'],
32
+ model: 'IST-CDZFB2AS007NA-MZN-01',
33
+ vendor: 'ADEO',
34
+ description: 'ENKI LEXMAN E27 LED white',
35
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
36
+ },
30
37
  {
31
38
  zigbeeModel: ['ZBEK-3'],
32
39
  model: 'IP-CDZOTAAP005JA-MAN',
@@ -46,7 +46,8 @@ module.exports = [
46
46
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering', 'genDeviceTempCfg']);
47
47
  await reporting.onOff(endpoint);
48
48
  await reporting.deviceTemperature(endpoint);
49
- await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
49
+ // Set to true, to access the acFrequencyDivisor and acFrequencyMultiplier attribute. Not all devices support this.
50
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint, true);
50
51
  await reporting.activePower(endpoint, {change: 10}); // Power reports with every 10W change
51
52
  await reporting.rmsCurrent(endpoint, {change: 20}); // Current reports with every 20mA change
52
53
  await reporting.rmsVoltage(endpoint, {min: constants.repInterval.MINUTES_5, change: 400}); // Limit reports to every 5m, or 4V
package/devices/fantem.js CHANGED
@@ -13,15 +13,18 @@ module.exports = [
13
13
  vendor: 'Fantem',
14
14
  description: 'Smart dimmer module without neutral',
15
15
  extend: extend.light_onoff_brightness({noConfigure: true}),
16
- fromZigbee: [...extend.light_onoff_brightness({noConfigure: true}).fromZigbee, fz.ZB006X_settings],
16
+ fromZigbee: [...extend.light_onoff_brightness({noConfigure: true}).fromZigbee, fz.command_on, fz.command_off,
17
+ fz.command_move, fz.command_stop, fz.ZB006X_settings],
17
18
  toZigbee: [...extend.light_onoff_brightness({noConfigure: true}).toZigbee, tz.ZB006X_settings],
18
19
  exposes: [e.light_brightness(),
20
+ e.action(['on', 'off', 'brightness_move_down', 'brightness_move_up', 'brightness_stop']),
19
21
  exposes.enum('ext_switch_type', ea.STATE_SET, ['unknown', 'toggle_sw', 'momentary_sw', 'rotary_sw', 'auto_config'])
20
22
  .withDescription('External switch type'),
21
23
  exposes.enum('load_detection_mode', ea.STATE_SET, ['none', 'first_power_on', 'every_power_on'])
22
24
  .withDescription('Load detection mode'),
23
25
  exposes.enum('control_mode', ea.STATE_SET, ['local', 'remote', 'both']).withDescription('Control mode'),
24
26
  ],
27
+ meta: {disableActionGroup: true},
25
28
  configure: async (device, coordinatorEndpoint, logger) => {
26
29
  await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
27
30
  const endpoint = device.getEndpoint(1);
package/devices/feibit.js CHANGED
@@ -93,7 +93,7 @@ module.exports = [
93
93
  description: 'Combustible gas sensor',
94
94
  fromZigbee: [fz.ias_gas_alarm_2],
95
95
  toZigbee: [],
96
- exposes: [e.gas(), e.battery_low(), e.tamper()],
96
+ exposes: [e.gas()],
97
97
  },
98
98
  {
99
99
  zigbeeModel: ['FNB56-WTS05FB2.0'],
package/devices/heiman.js CHANGED
@@ -287,7 +287,7 @@ module.exports = [
287
287
  description: 'Smart motion sensor',
288
288
  fromZigbee: [fz.ias_occupancy_alarm_1],
289
289
  toZigbee: [],
290
- exposes: [e.occupancy(), e.battery_low(), e.tamper()],
290
+ exposes: [e.occupancy(), e.battery_low()],
291
291
  },
292
292
  {
293
293
  zigbeeModel: ['HT-EM', 'TH-EM', 'TH-T_V14'],
package/devices/innr.js CHANGED
@@ -47,6 +47,14 @@ module.exports = [
47
47
  extend: extend.light_onoff_brightness(),
48
48
  meta: {turnsOffAtBrightness1: true},
49
49
  },
50
+ {
51
+ zigbeeModel: ['OGL 130 C'],
52
+ model: 'OGL 130 C',
53
+ vendor: 'Innr',
54
+ description: 'Outdoor smart globe lights',
55
+ extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [100, 1000], supportsHS: true}),
56
+ meta: {applyRedFix: true, turnsOffAtBrightness1: true},
57
+ },
50
58
  {
51
59
  zigbeeModel: ['OPL 130 C'],
52
60
  model: 'OPL 130 C',
package/devices/orvibo.js CHANGED
@@ -7,7 +7,7 @@ const e = exposes.presets;
7
7
 
8
8
  module.exports = [
9
9
  {
10
- zigbeeModel: ['ORVIBO Socket'],
10
+ zigbeeModel: ['ORVIBO Socket', '93e29b89b2ee45bea5bdbb7679d75d24'],
11
11
  model: 'OR-ZB-S010-3C',
12
12
  vendor: 'ORVIBO',
13
13
  description: 'Smart socket',
@@ -4,6 +4,7 @@ const tz = require('../converters/toZigbee');
4
4
  const constants = require('../lib/constants');
5
5
  const reporting = require('../lib/reporting');
6
6
  const extend = require('../lib/extend');
7
+ const utils = require('../lib/utils');
7
8
  const e = exposes.presets;
8
9
  const ea = exposes.access;
9
10
 
@@ -17,6 +18,67 @@ const tzLocal = {
17
18
  },
18
19
  };
19
20
 
21
+ const fzLocal = {
22
+ schneider_powertag: {
23
+ cluster: 'greenPower',
24
+ type: ['commandNotification', 'commandCommisioningNotification'],
25
+ convert: async (model, msg, publish, options, meta) => {
26
+ if (msg.type !== 'commandNotification') {
27
+ return;
28
+ }
29
+
30
+ const commandID = msg.data.commandID;
31
+ if (utils.hasAlreadyProcessedMessage(msg, msg.data.frameCounter, `${msg.device.ieeeAddr}_${commandID}`)) return;
32
+
33
+ const rxAfterTx = (msg.data.options & (1<<11));
34
+ const ret = {};
35
+
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;
46
+ }
47
+ });
48
+
49
+ break;
50
+ case 0xA3:
51
+ // Should handle this cluster as well
52
+ break;
53
+ }
54
+
55
+ if (rxAfterTx) {
56
+ // Send Schneider specific ACK to make PowerTag happy
57
+ const networkParameters = await msg.device.zh.getNetworkParameters();
58
+ const payload = {
59
+ options: 0b000,
60
+ tempMaster: msg.data.gppNwkAddr,
61
+ tempMasterTx: networkParameters.channel - 11,
62
+ srcID: msg.data.srcID,
63
+ gpdCmd: 0xFE,
64
+ gpdPayload: {
65
+ commandID: 0xFE,
66
+ buffer: Buffer.alloc(1), // I hope it's zero initialised
67
+ },
68
+ };
69
+
70
+ await msg.endpoint.commandResponse('greenPower', 'response', payload,
71
+ {
72
+ srcEndpoint: 242,
73
+ disableDefaultResponse: true,
74
+ });
75
+ }
76
+
77
+ return ret;
78
+ },
79
+ },
80
+ };
81
+
20
82
  module.exports = [
21
83
  {
22
84
  zigbeeModel: ['PUCK/SHUTTER/1'],
@@ -714,4 +776,13 @@ module.exports = [
714
776
  await reporting.onOff(endpoint2);
715
777
  },
716
778
  },
779
+ {
780
+ fingerprint: [{modelID: 'GreenPower_254', ieeeAddr: /^0x00000000e.......$/}],
781
+ model: 'A9MEM1570',
782
+ vendor: 'Schneider Electric',
783
+ description: 'PowerTag power sensor',
784
+ fromZigbee: [fzLocal.schneider_powertag],
785
+ toZigbee: [],
786
+ exposes: [e.power(), e.energy()],
787
+ },
717
788
  ];
@@ -73,17 +73,30 @@ module.exports = [
73
73
  model: '3321-S',
74
74
  vendor: 'SmartThings',
75
75
  description: 'Multi Sensor (2015 model)',
76
- fromZigbee: [fz.temperature, fz.ias_contact_alarm_1_report, fz.ias_contact_alarm_1, fz.battery],
76
+ fromZigbee: [fz.temperature, fz.ias_contact_alarm_1_report, fz.ias_contact_alarm_1, fz.battery, fz.smartthings_acceleration],
77
77
  toZigbee: [],
78
78
  meta: {battery: {voltageToPercentage: '3V_2100'}},
79
79
  configure: async (device, coordinatorEndpoint, logger) => {
80
80
  const endpoint = device.getEndpoint(1);
81
- await reporting.bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement']);
82
- await endpoint.read('genPowerCfg', ['batteryVoltage']);
81
+ const options = {manufacturerCode: 0x104E};
82
+ await reporting.bind(endpoint, coordinatorEndpoint,
83
+ ['msTemperatureMeasurement', 'genPowerCfg', 'manuSpecificSamsungAccelerometer']);
83
84
  await reporting.temperature(endpoint);
84
85
  await reporting.batteryVoltage(endpoint);
86
+ const payloadA = reporting.payload('acceleration', 10, constants.repInterval.MINUTE, 1);
87
+ await endpoint.configureReporting('manuSpecificSamsungAccelerometer', payloadA, options);
88
+ const payloadX = reporting.payload('x_axis', 10, constants.repInterval.MINUTE, 1);
89
+ await endpoint.configureReporting('manuSpecificSamsungAccelerometer', payloadX, options);
90
+ const payloadY = reporting.payload('y_axis', 10, constants.repInterval.MINUTE, 1);
91
+ await endpoint.configureReporting('manuSpecificSamsungAccelerometer', payloadY, options);
92
+ const payloadZ = reporting.payload('z_axis', 10, constants.repInterval.MINUTE, 1);
93
+ await endpoint.configureReporting('manuSpecificSamsungAccelerometer', payloadZ, options);
94
+ // Has Unknown power source, force it.
95
+ device.powerSource = 'Battery';
96
+ device.save();
85
97
  },
86
- exposes: [e.temperature(), e.contact(), e.battery_low(), e.tamper(), e.battery()],
98
+ exposes: [e.temperature(), e.contact(), e.battery_low(), e.tamper(), e.battery(),
99
+ e.moving(), e.x_axis(), e.y_axis(), e.z_axis()],
87
100
  },
88
101
  {
89
102
  zigbeeModel: ['3200-Sgb'],
package/devices/tuya.js CHANGED
@@ -682,6 +682,7 @@ module.exports = [
682
682
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_rm0hthdo'},
683
683
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_zwqnazkb'},
684
684
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_ijsj2evj'},
685
+ {modelID: 'TS0502B', manufacturerName: '_TZ3210_pgq2qvyv'},
685
686
  ],
686
687
  model: 'TS0502B',
687
688
  vendor: 'TuYa',
@@ -728,7 +729,10 @@ module.exports = [
728
729
  },
729
730
  },
730
731
  {
731
- fingerprint: [{modelID: 'TS0201', manufacturerName: '_TZ3000_bguser20'}],
732
+ fingerprint: [
733
+ {modelID: 'TS0201', manufacturerName: '_TZ3000_bguser20'},
734
+ {modelID: 'TS0201', manufacturerName: '_TZ3000_fllyghyj'},
735
+ ],
732
736
  model: 'WSD500A',
733
737
  vendor: 'TuYa',
734
738
  description: 'Temperature & humidity sensor',
package/lib/reporting.js CHANGED
@@ -18,11 +18,17 @@ function payload(attribute, min, max, change, overrides) {
18
18
  return [payload];
19
19
  }
20
20
 
21
- async function readEletricalMeasurementMultiplierDivisors(endpoint) {
21
+ // Fix the problem that commit #3839 introduced.
22
+ // You can set readFrequencyAttrs = true if the device support acFrequencyDivisor and acFrequencyMultiplier
23
+ // See Develco.js SPLZB-132 for example
24
+ async function readEletricalMeasurementMultiplierDivisors(endpoint, readFrequencyAttrs = false) {
22
25
  // Split into three chunks, some devices fail to respond when reading too much attributes at once.
23
26
  await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier']);
24
27
  await endpoint.read('haElectricalMeasurement', ['acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor']);
25
- await endpoint.read('haElectricalMeasurement', ['acFrequencyDivisor', 'acFrequencyMultiplier']);
28
+ // Only read frequency multiplier/devisor when enabled as not all devices support this.
29
+ if (readFrequencyAttrs) {
30
+ await endpoint.read('haElectricalMeasurement', ['acFrequencyDivisor', 'acFrequencyMultiplier']);
31
+ }
26
32
  }
27
33
 
28
34
  async function readMeteringMultiplierDivisor(endpoint) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.475",
3
+ "version": "14.0.478",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [