zigbee-herdsman-converters 14.0.625 → 14.0.626

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.
@@ -9,9 +9,9 @@ const e = exposes.presets;
9
9
  const ea = exposes.access;
10
10
 
11
11
  const fzLocal = {
12
- // SPLZB-134 reports strange values sometimes
12
+ // SPLZB-134 and SPLZB-131 reports strange values sometimes
13
13
  // https://github.com/Koenkk/zigbee2mqtt/issues/13329
14
- SPLZB134_electrical_measurement: {
14
+ develco_electrical_measurement: {
15
15
  ...fz.electrical_measurement,
16
16
  convert: (model, msg, publish, options, meta) => {
17
17
  if (msg.data.rmsVoltage !== 0xFFFF && msg.data.rmsCurrent !== 0xFFFF && msg.data.activePower !== -0x8000) {
@@ -19,7 +19,7 @@ const fzLocal = {
19
19
  }
20
20
  },
21
21
  },
22
- SPLZB134_device_temperature: {
22
+ develco_device_temperature: {
23
23
  ...fz.device_temperature,
24
24
  convert: (model, msg, publish, options, meta) => {
25
25
  if (msg.data.currentTemperature !== -0x8000) {
@@ -27,7 +27,7 @@ const fzLocal = {
27
27
  }
28
28
  },
29
29
  },
30
- SPLZB134_metering: {
30
+ develco_metering: {
31
31
  ...fz.metering,
32
32
  convert: (model, msg, publish, options, meta) => {
33
33
  if (msg.data.instantaneousDemand !== -0x800000) {
@@ -43,7 +43,7 @@ module.exports = [
43
43
  model: 'SPLZB-131',
44
44
  vendor: 'Develco',
45
45
  description: 'Power plug',
46
- fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering],
46
+ fromZigbee: [fz.on_off, fzLocal.develco_electrical_measurement, fzLocal.develco_metering],
47
47
  toZigbee: [tz.on_off],
48
48
  exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()],
49
49
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -94,7 +94,7 @@ module.exports = [
94
94
  model: 'SPLZB-134',
95
95
  vendor: 'Develco',
96
96
  description: 'Power plug (type G)',
97
- fromZigbee: [fz.on_off, fzLocal.SPLZB134_electrical_measurement, fzLocal.SPLZB134_metering, fzLocal.SPLZB134_device_temperature],
97
+ fromZigbee: [fz.on_off, fzLocal.develco_electrical_measurement, fzLocal.develco_metering, fzLocal.develco_device_temperature],
98
98
  toZigbee: [tz.on_off],
99
99
  exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy(), e.device_temperature()],
100
100
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -144,7 +144,7 @@ module.exports = [
144
144
  model: 'EMIZB-132',
145
145
  vendor: 'Develco',
146
146
  description: 'Wattle AMS HAN power-meter sensor',
147
- fromZigbee: [fzLocal.SPLZB134_metering, fzLocal.SPLZB134_electrical_measurement, fz.develco_fw],
147
+ fromZigbee: [fzLocal.develco_metering, fzLocal.develco_electrical_measurement, fz.develco_fw],
148
148
  toZigbee: [tz.EMIZB_132_mode],
149
149
  ota: ota.zigbeeOTA,
150
150
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -223,5 +223,30 @@ module.exports = [
223
223
  extend: extend.ledvance.light_onoff_brightness(),
224
224
  ota: ota.ledvance,
225
225
  },
226
-
226
+ {
227
+ zigbeeModel: ['PLUG COMPACT EU T'],
228
+ model: '4058075729322',
229
+ vendor: 'LEDVANCE',
230
+ description: 'SMART+ Compact Outdoor Plug EU',
231
+ extend: extend.switch(),
232
+ ota: ota.ledvance,
233
+ configure: async (device, coordinatorEndpoint, logger) => {
234
+ const endpoint = device.getEndpoint(1);
235
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
236
+ await reporting.onOff(endpoint);
237
+ },
238
+ },
239
+ {
240
+ zigbeeModel: ['PLUG OUTDOOR EU T'],
241
+ model: '4058075729308',
242
+ vendor: 'LEDVANCE',
243
+ description: 'SMART+ Outdoor Plug EU',
244
+ extend: extend.switch(),
245
+ ota: ota.ledvance,
246
+ configure: async (device, coordinatorEndpoint, logger) => {
247
+ const endpoint = device.getEndpoint(1);
248
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
249
+ await reporting.onOff(endpoint);
250
+ },
251
+ },
227
252
  ];
@@ -2756,8 +2756,8 @@ module.exports = [
2756
2756
  extend: hueExtend.light_onoff_brightness(),
2757
2757
  },
2758
2758
  {
2759
- zigbeeModel: ['3402931P7'],
2760
- model: '3402931P7',
2759
+ zigbeeModel: ['3402931P7', '3418231P6'],
2760
+ model: '8718696175798',
2761
2761
  vendor: 'Philips',
2762
2762
  description: 'Philips Hue Adore Bathroom Mirror Light',
2763
2763
  extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
@@ -16,10 +16,12 @@ const fzLocal = {
16
16
  convert: (model, msg, publish, options, meta) => {
17
17
  const occupancyIn = msg.data.occupancy;
18
18
  globalStore.putValue(msg.endpoint, 'occupancy_in', occupancyIn);
19
- const occupancy = occupancyIn | globalStore.getValue(msg.endpoint, 'occupancy_out', 0);
19
+ const occupancyOr = occupancyIn | globalStore.getValue(msg.endpoint, 'occupancy_out', 0);
20
+ const occupancyAnd = occupancyIn & globalStore.getValue(msg.endpoint, 'occupancy_out', 0);
20
21
  return {
21
22
  occupancy_in: (occupancyIn & 1) > 0,
22
- occupancy: (occupancy & 1) > 0,
23
+ occupancy_or: (occupancyOr & 1) > 0,
24
+ occupancy_and: (occupancyAnd & 1) > 0,
23
25
  };
24
26
  },
25
27
  },
@@ -29,15 +31,85 @@ const fzLocal = {
29
31
  convert: (model, msg, publish, options, meta) => {
30
32
  const occupancyOut = msg.data.zonestatus;
31
33
  globalStore.putValue(msg.endpoint, 'occupancy_out', occupancyOut);
32
- const occupancy = occupancyOut | globalStore.getValue(msg.endpoint, 'occupancy_in', 0);
34
+ const occupancyOr = occupancyOut | globalStore.getValue(msg.endpoint, 'occupancy_in', 0);
35
+ const occupancyAnd = occupancyOut & globalStore.getValue(msg.endpoint, 'occupancy_in', 0);
33
36
  return {
34
37
  occupancy_out: (occupancyOut & 1) > 0,
35
- occupancy: (occupancy & 1) > 0,
38
+ occupancy_or: (occupancyOr & 1) > 0,
39
+ occupancy_and: (occupancyAnd & 1) > 0,
36
40
  };
37
41
  },
38
42
  },
39
43
  };
40
44
 
45
+ const tzLocal = {
46
+ CSM300_SETUP: {
47
+ key: ['rf_pairing_on', 'counting_freeze', 'tof_init', 'led_state', 'rf_state', 'transation', 'fast_in', 'fast_out'],
48
+ convertSet: async (entity, key, value, meta) => {
49
+ let payload = null;
50
+ const endpoint = meta.device.endpoints.find((e) => e.supportsInputCluster('genAnalogInput'));
51
+ switch (key) {
52
+ case 'rf_pairing_on':
53
+ payload = {'presentValue': 81};
54
+ break;
55
+ case 'counting_freeze':
56
+ if (value.toLowerCase() === 'on') {
57
+ payload = {'presentValue': 82};
58
+ } else if (value.toLowerCase() === 'off') {
59
+ payload = {'presentValue': 84};
60
+ }
61
+ break;
62
+ case 'tof_init':
63
+ payload = {'presentValue': 83};
64
+ break;
65
+ case 'led_state':
66
+ if (value === 'enable') {
67
+ payload = {'presentValue': 86};
68
+ } else if (value === 'disable') {
69
+ payload = {'presentValue': 87};
70
+ }
71
+ break;
72
+ case 'rf_state':
73
+ if (value === 'enable') {
74
+ payload = {'presentValue': 88};
75
+ } else if (value === 'disable') {
76
+ payload = {'presentValue': 89};
77
+ }
78
+ break;
79
+ case 'transation':
80
+ if (value === '0ms') {
81
+ payload = {'presentValue': 90};
82
+ } else if (value === '200ms') {
83
+ payload = {'presentValue': 91};
84
+ } else if (value === '400ms') {
85
+ payload = {'presentValue': 92};
86
+ } else if (value === '600ms') {
87
+ payload = {'presentValue': 93};
88
+ } else if (value === '800ms') {
89
+ payload = {'presentValue': 94};
90
+ } else if (value === '1,000ms') {
91
+ payload = {'presentValue': 95};
92
+ }
93
+ break;
94
+ case 'fast_in':
95
+ if (value === 'enable') {
96
+ payload = {'presentValue': 96};
97
+ } else if (value === 'disable') {
98
+ payload = {'presentValue': 97};
99
+ }
100
+ break;
101
+ case 'fast_out':
102
+ if (value === 'enable') {
103
+ payload = {'presentValue': 98};
104
+ } else if (value === 'disable') {
105
+ payload = {'presentValue': 99};
106
+ }
107
+ break;
108
+ }
109
+ await endpoint.write('genAnalogInput', payload);
110
+ },
111
+ },
112
+ };
41
113
 
42
114
  module.exports = [
43
115
  {
@@ -73,7 +145,7 @@ module.exports = [
73
145
  description: 'SiHAS multipurpose ToF sensor',
74
146
  meta: {battery: {voltageToPercentage: 'Add_1V_42V_CSM300z2v2'}},
75
147
  fromZigbee: [fz.battery, fz.sihas_people_cnt],
76
- toZigbee: [tz.sihas_set_people],
148
+ toZigbee: [tz.sihas_set_people, tzLocal.CSM300_SETUP],
77
149
  configure: async (device, coordinatorEndpoint, logger) => {
78
150
  const endpoint = device.getEndpoint(1);
79
151
  const binds = ['genPowerCfg', 'genAnalogInput'];
@@ -84,7 +156,19 @@ module.exports = [
84
156
  },
85
157
  exposes: [e.battery(), e.battery_voltage(),
86
158
  exposes.enum('status', ea.STATE, ['idle', 'in', 'out']).withDescription('Currently status'),
87
- exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(100).withDescription('People count')],
159
+ exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(100).withDescription('People count'),
160
+ exposes.enum('rf_pairing_on', ea.SET, ['run']).withDescription('Run RF pairing mode'),
161
+ exposes.binary('counting_freeze', ea.SET, 'ON', 'OFF')
162
+ .withDescription('Counting Freeze ON/OFF, not reporting people value when is ON'),
163
+ exposes.enum('tof_init', ea.SET, ['initial']).withDescription('ToF sensor initial'),
164
+ exposes.binary('led_state', ea.SET, 'enable', 'disable').withDescription('Indicate LED enable/disable, default : enable'),
165
+ exposes.binary('rf_state', ea.SET, 'enable', 'disable').withDescription('RF function enable/disable, default : disable'),
166
+ exposes.enum('transation', ea.SET, ['0ms', '200ms', '400ms', '600ms', '800ms', '1,000ms'])
167
+ .withDescription('Transation interval, default : 400ms'),
168
+ exposes.binary('fast_in', ea.SET, 'enable', 'disable')
169
+ .withDescription('Fast process enable/disable when people 0 to 1. default : enable'),
170
+ exposes.binary('fast_out', ea.SET, 'enable', 'disable')
171
+ .withDescription('Fast process enable/disable when people 1 to 0. default : enable')],
88
172
  },
89
173
  {
90
174
  zigbeeModel: ['USM-300Z'],
@@ -447,8 +531,10 @@ module.exports = [
447
531
  .withDescription('Indicates whether "IN" Sensor of the device detected occupancy'),
448
532
  exposes.binary('occupancy_out', ea.STATE, true, false)
449
533
  .withDescription('Indicates whether "OUT" Sensor of the device detected occupancy'),
450
- exposes.binary('occupancy', ea.STATE, true, false)
534
+ exposes.binary('occupancy_or', ea.STATE, true, false)
451
535
  .withDescription('Indicates whether "IN or OUT" Sensor of the device detected occupancy'),
536
+ exposes.binary('occupancy_and', ea.STATE, true, false)
537
+ .withDescription('Indicates whether "IN and OUT" Sensor of the device detected occupancy'),
452
538
  exposes.numeric('occupancy_timeout', ea.ALL).withUnit('second').withValueMin(0).withValueMax(3600)],
453
539
  },
454
540
  {
package/devices/xiaomi.js CHANGED
@@ -550,6 +550,7 @@ module.exports = [
550
550
  // set "event" mode
551
551
  await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
552
552
  },
553
+ ota: ota.zigbeeOTA,
553
554
  },
554
555
  {
555
556
  zigbeeModel: ['lumi.switch.n2aeu1'],
@@ -1594,7 +1595,7 @@ module.exports = [
1594
1595
  e.battery_voltage().withAccess(ea.STATE_GET),
1595
1596
  e.device_temperature(),
1596
1597
  e.action(['manual_open', 'manual_close']),
1597
- exposes.enum('motor_state', ea.STATE, ['stopped', 'opening', 'closing'])
1598
+ exposes.enum('motor_state', ea.STATE, ['stopped', 'opening', 'closing', 'pause'])
1598
1599
  .withDescription('Motor state'),
1599
1600
  exposes.binary('running', ea.STATE, true, false)
1600
1601
  .withDescription('Whether the motor is moving or not'),
@@ -2258,13 +2259,18 @@ module.exports = [
2258
2259
  model: 'SRTS-A01',
2259
2260
  vendor: 'Xiaomi',
2260
2261
  description: 'Aqara Smart Radiator Thermostat E1',
2261
- fromZigbee: [fzLocal.aqara_trv, fz.thermostat],
2262
+ fromZigbee: [fzLocal.aqara_trv, fz.thermostat, fz.battery],
2262
2263
  toZigbee: [tzLocal.aqara_trv, tz.thermostat_occupied_heating_setpoint],
2263
2264
  exposes: [e.switch().setAccess('state', ea.STATE_SET),
2264
2265
  exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5)
2265
2266
  .withLocalTemperature(ea.STATE).withPreset(['manual', 'away', 'auto'], ea.STATE_SET),
2266
2267
  e.child_lock(), e.window_detection(), e.valve_detection(),
2267
- e.away_preset_temperature(),
2268
+ e.away_preset_temperature(), e.battery_voltage(), e.battery(),
2268
2269
  ],
2270
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2271
+ configure: async (device, coordinatorEndpoint, logger) => {
2272
+ const endpoint = device.getEndpoint(1);
2273
+ await endpoint.read('genPowerCfg', ['batteryVoltage']);
2274
+ },
2269
2275
  },
2270
2276
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.625",
3
+ "version": "14.0.626",
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.54"
41
+ "zigbee-herdsman": "^0.14.55"
42
42
  },
43
43
  "devDependencies": {
44
44
  "eslint": "*",