zigbee-herdsman-converters 14.0.314 → 14.0.315

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.
@@ -5962,6 +5962,11 @@ const converters = {
5962
5962
  };
5963
5963
 
5964
5964
  const data = utf8FromStr(msg['data']['16896']);
5965
+
5966
+ clearTimeout(globalStore.getValue(msg.endpoint, 'timer'));
5967
+ const timer = setTimeout(() => publish({action: 'lock', state: 'LOCK'}), 2 * 1000);
5968
+ globalStore.putValue(msg.endpoint, 'timer', timer);
5969
+
5965
5970
  return {
5966
5971
  action: 'unlock',
5967
5972
  action_user: data[3],
@@ -5970,6 +5975,77 @@ const converters = {
5970
5975
  };
5971
5976
  },
5972
5977
  },
5978
+ javis_microwave_sensor: {
5979
+ cluster: 'manuSpecificTuya',
5980
+ type: ['commandSetDataResponse', 'commandGetData'],
5981
+ convert: (model, msg, publish, options, meta) => {
5982
+ const dp = msg.data.dp;
5983
+ const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
5984
+ const lookup = {
5985
+ 0: 'no_motion',
5986
+ 1: 'big_motion',
5987
+ 2: 'minor_motion',
5988
+ 3: 'breathing',
5989
+ 4: 'abnormal_state',
5990
+ 5: 'initializing',
5991
+ 6: 'initialization_completed',
5992
+ };
5993
+ switch (dp) {
5994
+ case 1:
5995
+ return {
5996
+ states: lookup[value],
5997
+ occupancy: (0 < value && value < 5) ? true: false,
5998
+ };
5999
+ case 2:
6000
+ return {
6001
+ sensitivity: value,
6002
+ };
6003
+ case 101:
6004
+ return {
6005
+ illuminance_lux: value,
6006
+ };
6007
+ case 102:
6008
+ if (meta.device.manufacturerName === '_TZE200_kagkgk0i') {
6009
+ return {
6010
+ illuminance_calibration: value,
6011
+ };
6012
+ } else {
6013
+ return {
6014
+ keep_time: value,
6015
+ };
6016
+ }
6017
+ case 103:
6018
+ return {
6019
+ led_enable: value == 1 ? true : false,
6020
+ };
6021
+ case 104:
6022
+ return {illuminance_lux: value};
6023
+ case 105:
6024
+ return {
6025
+ illuminance_calibration: value,
6026
+ };
6027
+ case 106:
6028
+ if (meta.device.manufacturerName === '_TZE200_kagkgk0i') {
6029
+ return {
6030
+ keep_time: value,
6031
+ };
6032
+ } else {
6033
+ break;
6034
+ }
6035
+ case 107:
6036
+ if (meta.device.manufacturerName === '_TZE200_kagkgk0i') {
6037
+ return {
6038
+ led_enable: value == 1 ? true : false,
6039
+ };
6040
+ } else {
6041
+ break;
6042
+ }
6043
+ default:
6044
+ meta.logger.warn(`zigbee-herdsman-converters:javis_microwave_sensor: NOT RECOGNIZED ` +
6045
+ `DP #${dp} with data ${JSON.stringify(msg.data)}`);
6046
+ }
6047
+ },
6048
+ },
5973
6049
  diyruz_freepad_config: {
5974
6050
  cluster: 'genOnOffSwitchCfg',
5975
6051
  type: ['readResponse'],
@@ -6108,6 +6108,46 @@ const converters = {
6108
6108
  }
6109
6109
  },
6110
6110
  },
6111
+ javis_microwave_sensor: {
6112
+ key: [
6113
+ 'illuminance_calibration', 'led_enable',
6114
+ 'sensitivity', 'keep_time',
6115
+ ],
6116
+ convertSet: async (entity, key, value, meta) => {
6117
+ switch (key) {
6118
+ case 'illuminance_calibration':// (10--100) sensor illuminance sensitivity
6119
+ if (meta.device.manufacturerName === '_TZE200_kagkgk0i') {
6120
+ await tuya.sendDataPointRaw(entity, 102, [value]);
6121
+ break;
6122
+ } else {
6123
+ tuya.sendDataPointRaw(entity, 105, [value]);
6124
+ break;
6125
+ }
6126
+ case 'led_enable':// OK (value true/false or 1/0)
6127
+ if (meta.device.manufacturerName === '_TZE200_kagkgk0i') {
6128
+ await tuya.sendDataPointRaw(entity, 107, [value ? 1 : 0]);
6129
+ break;
6130
+ } else {
6131
+ await tuya.sendDataPointRaw(entity, 103, [value ? 1 : 0]);
6132
+ break;
6133
+ }
6134
+
6135
+ case 'sensitivity':// value: 25, 50, 75, 100
6136
+ await tuya.sendDataPointRaw(entity, 2, [value]);
6137
+ break;
6138
+ case 'keep_time': // value 0 --> 7 corresponding 5s, 30s, 1, 3, 5, 10, 20, 30 min
6139
+ if (meta.device.manufacturerName === '_TZE200_kagkgk0i') {
6140
+ await tuya.sendDataPointRaw(entity, 106, [value]);
6141
+ break;
6142
+ } else {
6143
+ await tuya.sendDataPointRaw(entity, 102, [value]);
6144
+ break;
6145
+ }
6146
+ default: // Unknown key
6147
+ throw new Error(`Unhandled key ${key}`);
6148
+ }
6149
+ },
6150
+ },
6111
6151
  moes_thermostat_tv: {
6112
6152
  key: [
6113
6153
  'system_mode', 'window_detection', 'frost_detection', 'child_lock',
package/devices/hive.js CHANGED
@@ -465,6 +465,57 @@ module.exports = [
465
465
  .withDescription('Period in minutes for which the setpoint hold will be active. 65535 = attribute not' +
466
466
  ' used. 0 to 360 to match the remote display').withEndpoint('water')],
467
467
  },
468
+ {
469
+ zigbeeModel: ['SLR2c'],
470
+ model: 'SLR2c',
471
+ vendor: 'Hive',
472
+ description: 'Dual channel heating and hot water thermostat',
473
+ fromZigbee: [fz.thermostat, fz.thermostat_weekly_schedule],
474
+ toZigbee: [tz.thermostat_local_temperature, tz.thermostat_system_mode, tz.thermostat_running_state,
475
+ tz.thermostat_occupied_heating_setpoint, tz.thermostat_control_sequence_of_operation, tz.thermostat_weekly_schedule,
476
+ tz.thermostat_clear_weekly_schedule, tz.thermostat_temperature_setpoint_hold, tz.thermostat_temperature_setpoint_hold_duration],
477
+ endpoint: (device) => {
478
+ return {'heat': 5, 'water': 6};
479
+ },
480
+ meta: {disableDefaultResponse: true, multiEndpoint: true},
481
+ configure: async (device, coordinatorEndpoint, logger) => {
482
+ const heatEndpoint = device.getEndpoint(5);
483
+ const waterEndpoint = device.getEndpoint(6);
484
+ const binds = [
485
+ 'genBasic', 'genIdentify', 'genAlarms', 'genTime', 'hvacThermostat',
486
+ ];
487
+ await reporting.bind(heatEndpoint, coordinatorEndpoint, binds);
488
+ await reporting.thermostatTemperature(heatEndpoint);
489
+ await reporting.thermostatRunningState(heatEndpoint);
490
+ await reporting.thermostatSystemMode(heatEndpoint);
491
+ await reporting.thermostatOccupiedHeatingSetpoint(heatEndpoint);
492
+ await reporting.thermostatTemperatureSetpointHold(heatEndpoint);
493
+ await reporting.thermostatTemperatureSetpointHoldDuration(heatEndpoint);
494
+ await reporting.bind(waterEndpoint, coordinatorEndpoint, binds);
495
+ await reporting.thermostatRunningState(waterEndpoint);
496
+ await reporting.thermostatSystemMode(waterEndpoint);
497
+ await reporting.thermostatOccupiedHeatingSetpoint(waterEndpoint);
498
+ await reporting.thermostatTemperatureSetpointHold(waterEndpoint);
499
+ await reporting.thermostatTemperatureSetpointHoldDuration(waterEndpoint);
500
+ },
501
+ exposes: [
502
+ exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 32, 0.5).withLocalTemperature()
503
+ .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat']).withEndpoint('heat'),
504
+ exposes.binary('temperature_setpoint_hold', ea.ALL, true, false)
505
+ .withDescription('Prevent changes. `false` = run normally. `true` = prevent from making changes.' +
506
+ ' Must be set to `false` when system_mode = off or `true` for heat').withEndpoint('heat'),
507
+ exposes.numeric('temperature_setpoint_hold_duration', ea.ALL).withValueMin(0).withValueMax(65535)
508
+ .withDescription('Period in minutes for which the setpoint hold will be active. 65535 = attribute not' +
509
+ ' used. 0 to 360 to match the remote display').withEndpoint('heat'),
510
+ exposes.climate().withSetpoint('occupied_heating_setpoint', 22, 22, 1).withLocalTemperature()
511
+ .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat']).withEndpoint('water'),
512
+ exposes.binary('temperature_setpoint_hold', ea.ALL, true, false)
513
+ .withDescription('Prevent changes. `false` = run normally. `true` = prevent from making changes.' +
514
+ ' Must be set to `false` when system_mode = off or `true` for heat').withEndpoint('water'),
515
+ exposes.numeric('temperature_setpoint_hold_duration', ea.ALL).withValueMin(0).withValueMax(65535)
516
+ .withDescription('Period in minutes for which the setpoint hold will be active. 65535 = attribute not' +
517
+ ' used. 0 to 360 to match the remote display').withEndpoint('water')],
518
+ },
468
519
  {
469
520
  zigbeeModel: ['WPT1'],
470
521
  model: 'WPT1',
package/devices/javis.js CHANGED
@@ -1,11 +1,14 @@
1
1
  const exposes = require('../lib/exposes');
2
2
  const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
3
+ const tz = require('../converters/toZigbee');
3
4
  const e = exposes.presets;
5
+ const ea = exposes.access;
4
6
 
5
7
  module.exports = [
6
8
  {
7
9
  zigbeeModel: ['JAVISLOCK'],
8
- fingerprint: [{modelID: 'doorlock_5001', manufacturerName: 'Lmiot'}],
10
+ fingerprint: [{modelID: 'doorlock_5001', manufacturerName: 'Lmiot'},
11
+ {modelID: 'E321V000A03', manufacturerName: 'Vensi'}],
9
12
  model: 'JS-SLK2-ZB',
10
13
  vendor: 'JAVIS',
11
14
  description: 'Intelligent biometric digital lock',
@@ -13,4 +16,21 @@ module.exports = [
13
16
  toZigbee: [],
14
17
  exposes: [e.battery(), e.action(['unlock'])],
15
18
  },
19
+ {
20
+ zigbeeModel: ['JAVISSENSOR'],
21
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_lgstepha'},
22
+ {modelID: 'TS0601', manufacturerName: '_TZE200_kagkgk0i'},
23
+ {modelID: 'TS0601', manufacturerName: '_TZE200_i0b1dbqu'}],
24
+ model: 'JS-MC-SENSOR-ZB',
25
+ vendor: 'JAVIS',
26
+ description: 'Microwave sensor',
27
+ fromZigbee: [fz.javis_microwave_sensor, fz.ignore_basic_report],
28
+ toZigbee: [tz.javis_microwave_sensor],
29
+ exposes: [e.occupancy(), e.illuminance_lux(),
30
+ exposes.binary('led_enable', ea.STATE_SET, true, false).withDescription('Enabled LED'),
31
+ exposes.enum('keep_time', ea.STATE_SET, ['0', '1', '2', '3', '4', '5', '6', '7'])
32
+ .withDescription('PIR keep time 0:5s|1:30s|2:60s|3:180s|4:300s|5:600s|6:1200s|7:1800s'),
33
+ exposes.enum('sensitivity', ea.STATE_SET, ['25', '50', '75', '100']),
34
+ exposes.numeric('illuminance_calibration', ea.STATE_SET).withDescription('Illuminance calibration')],
35
+ },
16
36
  ];
@@ -10,7 +10,7 @@ module.exports = [
10
10
  model: 'ZM350STW1TCF',
11
11
  vendor: 'Leedarson',
12
12
  description: 'LED PAR16 50 GU10 tunable white',
13
- extend: extend.light_onoff_brightness_colortemp(),
13
+ extend: extend.light_onoff_brightness_colortemp({disableColorTempStartup: true}),
14
14
  },
15
15
  {
16
16
  zigbeeModel: ['M350ST-W1R-01', 'A470S-A7R-04'],
package/devices/lidl.js CHANGED
@@ -133,6 +133,17 @@ module.exports = [
133
133
  device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
134
134
  },
135
135
  },
136
+ {
137
+ fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_quqaeew6'}],
138
+ model: 'HG07834A',
139
+ vendor: 'Lidl',
140
+ description: 'Livarno Lux GU10 spot RGB',
141
+ ...extend.light_onoff_brightness_colortemp_color({disableColorTempStartup: true, colorTempRange: [153, 500]}),
142
+ meta: {applyRedFix: true, enhancedHue: false},
143
+ configure: async (device, coordinatorEndpoint, logger) => {
144
+ device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
145
+ },
146
+ },
136
147
  {
137
148
  fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_th6zqqy6'}],
138
149
  model: 'HG07834B',
package/devices/tuya.js CHANGED
@@ -1075,7 +1075,8 @@ module.exports = [
1075
1075
  exposes: [e.switch().setAccess('state', ea.STATE_SET), e.voltage(), e.power(), e.current(), e.energy()],
1076
1076
  },
1077
1077
  {
1078
- fingerprint: [{modelID: 'TS1101', manufacturerName: '_TZ3000_7ysdnebc'}],
1078
+ fingerprint: [{modelID: 'TS1101', manufacturerName: '_TZ3000_7ysdnebc'},
1079
+ {modelID: 'TS1101', manufacturerName: '_TZ3000_xfs39dbf'}],
1079
1080
  model: 'TS1101_dimmer_module',
1080
1081
  vendor: 'TuYa',
1081
1082
  description: '2CH Zigbee dimmer module',
@@ -1166,7 +1167,9 @@ module.exports = [
1166
1167
  model: 'TS0011',
1167
1168
  vendor: 'TuYa',
1168
1169
  description: 'Smart light switch - 1 gang',
1169
- extend: extend.switch(),
1170
+ toZigbee: extend.switch().toZigbee.concat([tz.tuya_switch_type]),
1171
+ fromZigbee: extend.switch().fromZigbee.concat([fz.tuya_switch_type]),
1172
+ exposes: [e.switch(), exposes.presets.switch_type_2()],
1170
1173
  whiteLabel: [
1171
1174
  {vendor: 'Vrey', model: 'VR-X712U-0013'},
1172
1175
  {vendor: 'TUYATEC', model: 'GDKES-01TZXD'},
@@ -1187,8 +1190,9 @@ module.exports = [
1187
1190
  description: 'Smart light switch - 2 gang',
1188
1191
  whiteLabel: [{vendor: 'Vrey', model: 'VR-X712U-0013'}, {vendor: 'TUYATEC', model: 'GDKES-02TZXD'},
1189
1192
  {vendor: 'Earda', model: 'ESW-2ZAA-EU'}],
1190
- extend: extend.switch(),
1191
- exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
1193
+ toZigbee: extend.switch().toZigbee.concat([tz.tuya_switch_type]),
1194
+ fromZigbee: extend.switch().fromZigbee.concat([fz.tuya_switch_type]),
1195
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right'), exposes.presets.switch_type_2()],
1192
1196
  endpoint: (device) => {
1193
1197
  return {'left': 1, 'right': 2};
1194
1198
  },
@@ -1205,8 +1209,10 @@ module.exports = [
1205
1209
  model: 'TS0013',
1206
1210
  vendor: 'TuYa',
1207
1211
  description: 'Smart light switch - 3 gang without neutral wire',
1208
- extend: extend.switch(),
1209
- exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
1212
+ toZigbee: extend.switch().toZigbee.concat([tz.tuya_switch_type]),
1213
+ fromZigbee: extend.switch().fromZigbee.concat([fz.tuya_switch_type]),
1214
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right'),
1215
+ exposes.presets.switch_type_2()],
1210
1216
  endpoint: (device) => {
1211
1217
  return {'left': 1, 'center': 2, 'right': 3};
1212
1218
  },
@@ -1232,9 +1238,10 @@ module.exports = [
1232
1238
  model: 'TS0014',
1233
1239
  vendor: 'TuYa',
1234
1240
  description: 'Smart light switch - 4 gang without neutral wire',
1235
- extend: extend.switch(),
1241
+ toZigbee: extend.switch().toZigbee.concat([tz.tuya_switch_type]),
1242
+ fromZigbee: extend.switch().fromZigbee.concat([fz.tuya_switch_type]),
1236
1243
  exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
1237
- e.switch().withEndpoint('l4')],
1244
+ e.switch().withEndpoint('l4'), exposes.presets.switch_type_2()],
1238
1245
  endpoint: (device) => {
1239
1246
  return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4};
1240
1247
  },
package/devices/zen.js CHANGED
@@ -16,7 +16,7 @@ module.exports = [
16
16
  tz.thermostat_remote_sensing, tz.thermostat_control_sequence_of_operation, tz.thermostat_system_mode,
17
17
  tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_relay_status_log],
18
18
  exposes: [exposes.climate().withSetpoint('occupied_heating_setpoint', 10, 30, 0.5).withLocalTemperature()
19
- .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat', 'cool'])
19
+ .withSystemMode(['off', 'auto', 'heat', 'cool']).withRunningState(['idle', 'heat', 'cool'])
20
20
  .withLocalTemperatureCalibration().withPiHeatingDemand()],
21
21
  configure: async (device, coordinatorEndpoint, logger) => {
22
22
  const endpoint = device.getEndpoint(3) || device.getEndpoint(1);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.314",
3
+ "version": "14.0.315",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.314",
3
+ "version": "14.0.315",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [