zigbee-herdsman-converters 14.0.460 → 14.0.461

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.
@@ -4823,6 +4823,7 @@ const converters = {
4823
4823
  0x1e: 'press_1_and_4', 0x1f: 'release_1_and_4', 0x1c: 'press_2_and_3', 0x1d: 'release_2_and_3', 0x1a: 'press_2_and_4',
4824
4824
  0x1b: 'release_2_and_4', 0x16: 'press_3_and_4', 0x17: 'release_3_and_4', 0x10: 'press_energy_bar',
4825
4825
  0x11: 'release_energy_bar', 0x0: 'press_or_release_all',
4826
+ 0x50: 'lock', 0x51: 'unlock', 0x52: 'half_open', 0x53: 'tilt',
4826
4827
  };
4827
4828
 
4828
4829
  if (!lookup.hasOwnProperty(commandID)) {
@@ -2446,10 +2446,7 @@ const converters = {
2446
2446
 
2447
2447
  value = typeof value === 'string' ? value.toLowerCase() : value;
2448
2448
  value = lookup.hasOwnProperty(value) ? lookup[value] : value;
2449
-
2450
- if (key === 'position') {
2451
- value = meta.options.invert_cover ? 100 - value : value;
2452
- }
2449
+ value = meta.options.invert_cover ? 100 - value : value;
2453
2450
 
2454
2451
  const payload = {0x0055: {value, type: 0x39}};
2455
2452
  await entity.write('genAnalogOutput', payload);
@@ -28,7 +28,8 @@ module.exports = [
28
28
  exposes: [e.action(['press_1', 'release_1', 'press_2', 'release_2', 'press_3', 'release_3', 'press_4', 'release_4',
29
29
  'press_1_and_2', 'release_1_and_2', 'press_1_and_3', 'release_1_and_3', 'press_1_and_4', 'release_1_and_4',
30
30
  'press_2_and_3', 'release_2_and_3', 'press_2_and_4', 'release_2_and_4', 'press_3_and_4', 'release_3_and_4',
31
- 'press_energy_bar', 'release_energy_bar', 'press_or_release_all'])],
31
+ 'press_energy_bar', 'release_energy_bar', 'press_or_release_all',
32
+ 'lock', 'unlock', 'half_open', 'tilt'])],
32
33
  whiteLabel: [
33
34
  {vendor: 'Easyfit by EnOcean', description: 'Wall switch for Zigbee', model: 'EWSxZ'},
34
35
  {vendor: 'Trio2sys', description: 'Zigbee Green Power complete switch', model: '20020002'},
@@ -22,7 +22,7 @@ module.exports = [
22
22
  },
23
23
  {
24
24
  zigbeeModel: ['SV01-410-MP-1.0', 'SV01-410-MP-1.1', 'SV01-410-MP-1.4', 'SV01-410-MP-1.5', 'SV01-412-MP-1.0',
25
- 'SV01-412-MP-1.4', 'SV01-610-MP-1.0', 'SV01-610-MP-1.1', 'SV01-612-MP-1.0', 'SV01-610-MP-1.4'],
25
+ 'SV01-412-MP-1.1', 'SV01-412-MP-1.4', 'SV01-610-MP-1.0', 'SV01-610-MP-1.1', 'SV01-612-MP-1.0', 'SV01-610-MP-1.4'],
26
26
  model: 'SV01',
27
27
  vendor: 'Keen Home',
28
28
  description: 'Smart vent',
package/devices/orvibo.js CHANGED
@@ -6,6 +6,13 @@ const extend = require('../lib/extend');
6
6
  const e = exposes.presets;
7
7
 
8
8
  module.exports = [
9
+ {
10
+ zigbeeModel: ['ORVIBO Socket'],
11
+ model: 'OR-ZB-S010-3C',
12
+ vendor: 'ORVIBO',
13
+ description: 'Smart Socket',
14
+ extend: extend.switch(),
15
+ },
9
16
  {
10
17
  zigbeeModel: ['3c4e4fc81ed442efaf69353effcdfc5f', '51725b7bcba945c8a595b325127461e9'],
11
18
  model: 'CR11S8UZ',
@@ -1513,6 +1513,15 @@ module.exports = [
1513
1513
  extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]}),
1514
1514
  ota: ota.zigbeeOTA,
1515
1515
  },
1516
+ {
1517
+ zigbeeModel: ['4023331P6'],
1518
+ model: '4023331P6',
1519
+ vendor: 'Philips',
1520
+ description: 'Hue white ambiance Amaze',
1521
+ meta: {turnsOffAtBrightness1: true},
1522
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]}),
1523
+ ota: ota.zigbeeOTA,
1524
+ },
1516
1525
  {
1517
1526
  zigbeeModel: ['929003054801'],
1518
1527
  model: '929003054801',
@@ -2732,6 +2741,15 @@ module.exports = [
2732
2741
  extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
2733
2742
  ota: ota.zigbeeOTA,
2734
2743
  },
2744
+ {
2745
+ zigbeeModel: ['1746530P7'],
2746
+ model: '1746530P7',
2747
+ vendor: 'Philips',
2748
+ description: 'Hue White and color ambiance Daylo outdoor wall lamp',
2749
+ meta: {turnsOffAtBrightness1: true},
2750
+ extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
2751
+ ota: ota.zigbeeOTA,
2752
+ },
2735
2753
  {
2736
2754
  zigbeeModel: ['1746547P7'],
2737
2755
  model: '1746547P7',
@@ -0,0 +1,33 @@
1
+ const exposes = require('../lib/exposes');
2
+ const reporting = require('../lib/reporting');
3
+ const extend = require('../lib/extend');
4
+ const e = exposes.presets;
5
+
6
+ module.exports = [
7
+ {
8
+ zigbeeModel: ['1719SP-PS1-02'],
9
+ model: 'SP-PS1-02',
10
+ vendor: 'Spotmau',
11
+ description: 'Smart wall switch - 1 gang',
12
+ extend: extend.switch(),
13
+ configure: async (device, coordinatorEndpoint, logger) => {
14
+ await reporting.bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff', 'genBasic']);
15
+ },
16
+ },
17
+ {
18
+ zigbeeModel: ['1719SP-PS2-02'],
19
+ model: 'SP-PS2-02',
20
+ vendor: 'Spotmau',
21
+ description: 'Smart wall switch - 2 gang',
22
+ extend: extend.switch(),
23
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
24
+ endpoint: (device) => {
25
+ return {'left': 16, 'right': 17};
26
+ },
27
+ meta: {multiEndpoint: true},
28
+ configure: async (device, coordinatorEndpoint, logger) => {
29
+ await reporting.bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff', 'genBasic']);
30
+ await reporting.bind(device.getEndpoint(17), coordinatorEndpoint, ['genOnOff', 'genBasic']);
31
+ },
32
+ },
33
+ ];
package/devices/tuya.js CHANGED
@@ -53,6 +53,29 @@ const fzLocal = {
53
53
  return fz.battery.convert(model, msg, publish, options, meta);
54
54
  },
55
55
  },
56
+ TS0222: {
57
+ cluster: 'manuSpecificTuya',
58
+ type: ['commandDataResponse', 'commandDataReport'],
59
+ convert: (model, msg, publish, options, meta) => {
60
+ const result = {};
61
+ for (const dpValue of msg.data.dpValues) {
62
+ const dp = dpValue.dp;
63
+ const value = tuya.getDataValue(dpValue);
64
+ switch (dp) {
65
+ case 2:
66
+ result.illuminance = value;
67
+ result.illuminance_lux = value;
68
+ break;
69
+ case 4:
70
+ result.battery = value;
71
+ break;
72
+ default:
73
+ meta.logger.warn(`zigbee-herdsman-converters:TS0222 Unrecognized DP #${dp} with data ${JSON.stringify(dpValue)}`);
74
+ }
75
+ }
76
+ return result;
77
+ },
78
+ },
56
79
  };
57
80
 
58
81
  module.exports = [
@@ -1804,9 +1827,13 @@ module.exports = [
1804
1827
  model: 'TS0222',
1805
1828
  vendor: 'TuYa',
1806
1829
  description: 'Light intensity sensor',
1807
- fromZigbee: [fz.battery, fz.illuminance],
1830
+ fromZigbee: [fz.battery, fz.illuminance, fzLocal.TS0222],
1808
1831
  toZigbee: [],
1809
1832
  exposes: [e.battery(), e.illuminance(), e.illuminance_lux()],
1833
+ configure: async (device, coordinatorEndpoint, logger) => {
1834
+ const endpoint = device.getEndpoint(1);
1835
+ await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
1836
+ },
1810
1837
  },
1811
1838
  {
1812
1839
  fingerprint: [{modelID: 'TS0210', manufacturerName: '_TYZB01_3zv6oleo'},
@@ -0,0 +1,11 @@
1
+ const extend = require('../lib/extend');
2
+
3
+ module.exports = [
4
+ {
5
+ zigbeeModel: ['X2SK11'],
6
+ model: 'X2SK11',
7
+ vendor: 'XingHuoYuan',
8
+ description: 'Smart socket',
9
+ extend: extend.switch(),
10
+ },
11
+ ];
package/lib/xiaomi.js CHANGED
@@ -416,7 +416,8 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
416
416
  break;
417
417
  case '1028':
418
418
  payload = {...payload,
419
- motor_state: {0: 'stopped', 1: 'opening', 2: 'closing'}[value],
419
+ motor_state: (options.invert_cover ? {0: 'stopped', 1: 'closing', 2: 'opening'} :
420
+ {0: 'stopped', 1: 'opening', 2: 'closing'})[value],
420
421
  running: !!value,
421
422
  };
422
423
  break;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.460",
3
+ "version": "14.0.461",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "zigbee-herdsman-converters",
9
- "version": "14.0.460",
9
+ "version": "14.0.461",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "axios": "^0.26.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.460",
3
+ "version": "14.0.461",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [