zigbee-herdsman-converters 14.0.657 → 14.0.658

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.
@@ -338,9 +338,24 @@ const converters = {
338
338
  }
339
339
 
340
340
  if (msg.data.hasOwnProperty('batteryAlarmState')) {
341
- const battery1Low = (msg.data.batteryAlarmState & 1<<0) > 0;
342
- const battery2Low = (msg.data.batteryAlarmState & 1<<9) > 0;
343
- const battery3Low = (msg.data.batteryAlarmState & 1<<19) > 0;
341
+ const battery1Low = (
342
+ msg.data.batteryAlarmState & 1<<0 ||
343
+ msg.data.batteryAlarmState & 1<<1 ||
344
+ msg.data.batteryAlarmState & 1<<2 ||
345
+ msg.data.batteryAlarmState & 1<<3
346
+ ) > 0;
347
+ const battery2Low = (
348
+ msg.data.batteryAlarmState & 1<<9 ||
349
+ msg.data.batteryAlarmState & 1<<10 ||
350
+ msg.data.batteryAlarmState & 1<<11 ||
351
+ msg.data.batteryAlarmState & 1<<12
352
+ ) > 0;
353
+ const battery3Low = (
354
+ msg.data.batteryAlarmState & 1<<19 ||
355
+ msg.data.batteryAlarmState & 1<<20 ||
356
+ msg.data.batteryAlarmState & 1<<21 ||
357
+ msg.data.batteryAlarmState & 1<<22
358
+ ) > 0;
344
359
  payload.battery_low = battery1Low || battery2Low || battery3Low;
345
360
  }
346
361
 
@@ -10,6 +10,16 @@ const {calibrateAndPrecisionRoundOptions} = require('../lib/utils');
10
10
 
11
11
 
12
12
  const tzLocal = {
13
+ tirouter: {
14
+ key: ['transmit_power'],
15
+ convertSet: async (entity, key, value, meta) => {
16
+ await entity.write('genBasic', {0x1337: {value, type: 0x28}});
17
+ return {state: {[key]: value}};
18
+ },
19
+ convertGet: async (entity, key, meta) => {
20
+ await entity.read('genBasic', [0x1337]);
21
+ },
22
+ },
13
23
  node_config: {
14
24
  key: ['report_delay'],
15
25
  convertSet: async (entity, key, rawValue, meta) => {
@@ -133,6 +143,15 @@ const tzLocal = {
133
143
  };
134
144
 
135
145
  const fzLocal = {
146
+ tirouter: {
147
+ cluster: 'genBasic',
148
+ type: ['attributeReport', 'readResponse'],
149
+ convert: (model, msg, publish, options, meta) => {
150
+ const result = {linkquality: msg.linkquality};
151
+ if (msg.data['4919']) result['transmit_power'] = msg.data['4919'] + 1;
152
+ return result;
153
+ },
154
+ },
136
155
  node_config: {
137
156
  cluster: 'genPowerCfg',
138
157
  type: ['attributeReport', 'readResponse'],
@@ -267,9 +286,11 @@ module.exports = [
267
286
  model: 'ti.router',
268
287
  vendor: 'Custom devices (DiY)',
269
288
  description: 'Texas Instruments router',
270
- fromZigbee: [fz.linkquality_from_basic],
271
- toZigbee: [],
272
- exposes: [],
289
+ fromZigbee: [fzLocal.tirouter],
290
+ toZigbee: [tzLocal.tirouter],
291
+ exposes: [exposes.numeric('transmit_power', ea.ALL).withValueMin(-20).withValueMax(20).withValueStep(1).withUnit('dBm')
292
+ .withDescription('Transmit power, supported from firmware 20221102. The max for CC1352 is 20 dBm and 5 dBm for CC2652' +
293
+ ' (any higher value is converted to 5dBm)')],
273
294
  configure: async (device, coordinatorEndpoint, logger) => {
274
295
  const endpoint = device.getEndpoint(8);
275
296
  const payload = [{attribute: 'zclVersion', minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
@@ -600,7 +600,8 @@ module.exports = [
600
600
  await reporting.bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'msRelativeHumidity', 'genPowerCfg']);
601
601
  await reporting.temperature(endpoint, {min: constants.repInterval.MINUTE, max: constants.repInterval.MINUTES_10, change: 10});
602
602
  await reporting.humidity(endpoint, {min: constants.repInterval.MINUTE, max: constants.repInterval.MINUTES_10, change: 300});
603
- await reporting.batteryVoltage(endpoint);
603
+ await reporting.batteryVoltage(endpoint, {min: constants.repInterval.HOUR, max: 43200, change: 100});
604
+ await develco.configure.read_sw_hw_version(device, logger);
604
605
  },
605
606
  },
606
607
  {
@@ -0,0 +1,11 @@
1
+ const extend = require('../lib/extend');
2
+
3
+ module.exports = [
4
+ {
5
+ zigbeeModel: ['EBF_RGB_Zm'],
6
+ model: '900091',
7
+ vendor: 'EGLO',
8
+ description: 'ROVITO-Z ceiling light',
9
+ extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
10
+ },
11
+ ];
package/devices/hive.js CHANGED
@@ -344,7 +344,7 @@ module.exports = [
344
344
  },
345
345
  exposes: [
346
346
  exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 32, 0.5).withLocalTemperature()
347
- .withSystemMode(['off', 'auto', 'heat', 'emergency_heating']).withRunningState(['idle', 'heat']).withEndpoint('heat'),
347
+ .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat']).withEndpoint('heat'),
348
348
  exposes.binary('temperature_setpoint_hold', ea.ALL, true, false)
349
349
  .withDescription('Prevent changes. `false` = run normally. `true` = prevent from making changes.' +
350
350
  ' Must be set to `false` when system_mode = off or `true` for heat').withEndpoint('heat'),
@@ -396,7 +396,7 @@ module.exports = [
396
396
  },
397
397
  exposes: [
398
398
  exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 32, 0.5).withLocalTemperature()
399
- .withSystemMode(['off', 'auto', 'heat', 'emergency_heating']).withRunningState(['idle', 'heat']).withEndpoint('heat'),
399
+ .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat']).withEndpoint('heat'),
400
400
  exposes.binary('temperature_setpoint_hold', ea.ALL, true, false)
401
401
  .withDescription('Prevent changes. `false` = run normally. `true` = prevent from making changes.' +
402
402
  ' Must be set to `false` when system_mode = off or `true` for heat').withEndpoint('heat'),
package/devices/moes.js CHANGED
@@ -125,7 +125,7 @@ module.exports = [
125
125
  tz.moes_thermostat_deadzone_temperature, tz.moes_thermostat_max_temperature_limit, tz.moes_thermostat_min_temperature_limit,
126
126
  tz.moes_thermostat_program_schedule],
127
127
  exposes: [e.child_lock(), e.deadzone_temperature(), e.max_temperature_limit(), e.min_temperature_limit(),
128
- exposes.climate().withSetpoint('current_heating_setpoint', 5, 30, 1, ea.STATE_SET)
128
+ exposes.climate().withSetpoint('current_heating_setpoint', 5, 35, 1, ea.STATE_SET)
129
129
  .withLocalTemperature(ea.STATE).withLocalTemperatureCalibration(-30, 30, 0.1, ea.STATE_SET)
130
130
  .withSystemMode(['off', 'heat'], ea.STATE_SET).withRunningState(['idle', 'heat', 'cool'], ea.STATE)
131
131
  .withPreset(['hold', 'program']),
@@ -64,7 +64,7 @@ module.exports = [
64
64
  toZigbee: extend.light_onoff_brightness().toZigbee.concat([tz.tint_scene]),
65
65
  },
66
66
  {
67
- zigbeeModel: ['ZBT-ExtendedColor'],
67
+ zigbeeModel: ['ZBT-ExtendedColor', 'Bulb white+color'],
68
68
  model: '404000/404005/404012/404019',
69
69
  vendor: 'Müller Licht',
70
70
  description: 'Tint LED bulb GU10/E14/E27 350/470/806 lumen, dimmable, color, opal white',
package/devices/orvibo.js CHANGED
@@ -29,7 +29,8 @@ module.exports = [
29
29
  // https://github.com/Koenkk/zigbee2mqtt/issues/13123#issuecomment-1198793749
30
30
  meta: {disableDefaultResponse: true},
31
31
  toZigbee: [tz.on_off, tzLocal.DD10Z_brightness, tz.light_colortemp, tz.effect],
32
- extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370], disableColorTempStartup: true}),
32
+ extend: extend.light_onoff_brightness_colortemp(
33
+ {colorTempRange: [153, 370], disableColorTempStartup: true, disablePowerOnBehavior: true}),
33
34
  },
34
35
  {
35
36
  zigbeeModel: ['4a33f5ea766a4c96a962b371ffde9943'],
@@ -13,11 +13,24 @@ module.exports = [
13
13
  await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genOnOff']);
14
14
  },
15
15
  },
16
+ {
17
+ zigbeeModel: ['SM309-S'],
18
+ model: 'SM309-S',
19
+ vendor: 'Samotech',
20
+ description: 'Zigbee dimmer 400W',
21
+ extend: extend.light_onoff_brightness({noConfigure: true}),
22
+ configure: async (device, coordinatorEndpoint, logger) => {
23
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
24
+ const endpoint = device.getEndpoint(1);
25
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
26
+ await reporting.onOff(endpoint);
27
+ },
28
+ },
16
29
  {
17
30
  zigbeeModel: ['SM309'],
18
31
  model: 'SM309',
19
32
  vendor: 'Samotech',
20
- description: 'ZigBee dimmer 400W',
33
+ description: 'Zigbee dimmer 400W',
21
34
  extend: extend.light_onoff_brightness({noConfigure: true}),
22
35
  configure: async (device, coordinatorEndpoint, logger) => {
23
36
  await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
package/devices/tuya.js CHANGED
@@ -1044,6 +1044,7 @@ module.exports = [
1044
1044
  {modelID: 'TS0202', manufacturerName: '_TZE200_bq5c8xfe'},
1045
1045
  {modelID: 'TS0202', manufacturerName: '_TYZB01_dl7cejts'},
1046
1046
  {modelID: 'TS0202', manufacturerName: '_TYZB01_qjqgmqxr'},
1047
+ {modelID: 'TS0202', manufacturerName: '_TZ3000_nss8amz9'},
1047
1048
  {modelID: 'TS0202', manufacturerName: '_TZ3000_mmtwjmaq'},
1048
1049
  {modelID: 'TS0202', manufacturerName: '_TYZB01_zwvaj5wy'},
1049
1050
  {modelID: 'TS0202', manufacturerName: '_TZ3000_bsvqrxru'},
@@ -1787,8 +1788,8 @@ module.exports = [
1787
1788
  model: 'TS0001_power',
1788
1789
  description: 'Switch with power monitoring',
1789
1790
  vendor: 'TuYa',
1790
- fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report],
1791
- toZigbee: [tz.on_off],
1791
+ fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory],
1792
+ toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
1792
1793
  configure: async (device, coordinatorEndpoint, logger) => {
1793
1794
  const endpoint = device.getEndpoint(1);
1794
1795
  await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
@@ -1801,7 +1802,8 @@ module.exports = [
1801
1802
  endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
1802
1803
  device.save();
1803
1804
  },
1804
- exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE), e.energy()],
1805
+ exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE), e.energy(),
1806
+ exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore']).withDescription('Recover state after power outage')],
1805
1807
  },
1806
1808
  {
1807
1809
  zigbeeModel: ['TS0001'],
@@ -2685,6 +2687,7 @@ module.exports = [
2685
2687
  },
2686
2688
  meta: {multiEndpoint: true},
2687
2689
  configure: async (device, coordinatorEndpoint, logger) => {
2690
+ await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
2688
2691
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
2689
2692
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
2690
2693
  device.powerSource = 'Mains (single phase)';
package/lib/exposes.js CHANGED
@@ -598,7 +598,7 @@ module.exports = {
598
598
  power: () => new Numeric('power', access.STATE).withUnit('W').withDescription('Instantaneous measured power'),
599
599
  power_factor: () => new Numeric('power_factor', access.STATE).withUnit('%').withDescription('Instantaneous measured power factor'),
600
600
  power_apparent: () => new Numeric('power_apparent', access.STATE).withUnit('VA').withDescription('Instantaneous measured apparent power'),
601
- power_on_behavior: () => new Enum('power_on_behavior', access.ALL, ['off', 'previous', 'on']).withDescription('Controls the behavior when the device is powered on'),
601
+ power_on_behavior: (values=['off', 'previous', 'on']) => new Enum('power_on_behavior', access.ALL, values).withDescription('Controls the behavior when the device is powered on after power loss'),
602
602
  power_outage_count: (resetsWhenPairing = true) => new Numeric('power_outage_count', access.STATE).withDescription('Number of power outages' + (resetsWhenPairing ? ' (since last pairing)' : '')),
603
603
  power_outage_memory: () => new Binary('power_outage_memory', access.ALL, true, false).withDescription('Enable/disable the power outage memory, this recovers the on/off mode after power failure'),
604
604
  presence: () => new Binary('presence', access.STATE, true, false).withDescription('Indicates whether the device detected presence'),
package/lib/extend.js CHANGED
@@ -19,6 +19,7 @@ const extend = {
19
19
  tz.light_brightness_step, tz.level_config, ...(!options.disableEffect ? [tz.effect] : [])];
20
20
 
21
21
  if (!options.disablePowerOnBehavior) {
22
+ exposes.push(e.power_on_behavior(['off', 'on', 'toggle', 'previous']));
22
23
  fromZigbee.push(fz.power_on_behavior);
23
24
  toZigbee.push(tz.power_on_behavior);
24
25
  }
@@ -46,6 +47,7 @@ const extend = {
46
47
  }
47
48
 
48
49
  if (!options.disablePowerOnBehavior) {
50
+ exposes.push(e.power_on_behavior(['off', 'on', 'toggle', 'previous']));
49
51
  fromZigbee.push(fz.power_on_behavior);
50
52
  toZigbee.push(tz.power_on_behavior);
51
53
  }
@@ -69,6 +71,7 @@ const extend = {
69
71
  tz.light_hue_saturation_step, tz.light_color_options, tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : [])];
70
72
 
71
73
  if (!options.disablePowerOnBehavior) {
74
+ exposes.push(e.power_on_behavior(['off', 'on', 'toggle', 'previous']));
72
75
  fromZigbee.push(fz.power_on_behavior);
73
76
  toZigbee.push(tz.power_on_behavior);
74
77
  }
@@ -105,6 +108,7 @@ const extend = {
105
108
  }
106
109
 
107
110
  if (!options.disablePowerOnBehavior) {
111
+ exposes.push(e.power_on_behavior(['off', 'on', 'toggle', 'previous']));
108
112
  fromZigbee.push(fz.power_on_behavior);
109
113
  toZigbee.push(tz.power_on_behavior);
110
114
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.657",
3
+ "version": "14.0.658",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [