zigbee-herdsman-converters 15.0.33 → 15.0.34

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.
package/devices/bosch.js CHANGED
@@ -202,8 +202,22 @@ const tzLocal = {
202
202
  };
203
203
 
204
204
 
205
- // Radiator Thermostat II
206
205
  const fzLocal = {
206
+ bosch_contact: {
207
+ cluster: 'ssIasZone',
208
+ type: 'commandStatusChangeNotification',
209
+ convert: (model, msg, publish, options, meta) => {
210
+ const zoneStatus = msg.data.zonestatus;
211
+ const lookup = {0: 'none', 1: 'single', 2: 'long'};
212
+ const result = {
213
+ contact: !((zoneStatus & 1) > 0),
214
+ battery_low: (zoneStatus & 1<<3) > 0,
215
+ action: lookup[(zoneStatus >> 11) & 3],
216
+ };
217
+ if (result.action === 'none') delete result.action;
218
+ return result;
219
+ },
220
+ },
207
221
  bosch_thermostat: {
208
222
  cluster: 'hvacThermostat',
209
223
  type: ['attributeReport', 'readResponse'],
@@ -528,6 +542,15 @@ const definition = [
528
542
  },
529
543
  exposes: [e.switch(), e.power_on_behavior(), e.power(), e.energy()],
530
544
  },
545
+ {
546
+ zigbeeModel: ['RBSH-SWD-ZB'],
547
+ model: 'BSEN-C2',
548
+ vendor: 'Bosch',
549
+ description: 'Door/window contact II',
550
+ fromZigbee: [fzLocal.bosch_contact],
551
+ toZigbee: [],
552
+ exposes: [e.battery_low(), e.contact(), e.action(['single', 'long'])],
553
+ },
531
554
  {
532
555
  zigbeeModel: ['RBSH-SP-ZB-FR'],
533
556
  model: 'BSP-EZ2',
@@ -7,7 +7,8 @@ const ea = exposes.access;
7
7
  module.exports = [
8
8
  {
9
9
  fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_wt9agwf3'},
10
- {modelID: 'TS0601', manufacturerName: '_TZE200_5uodvhgc'}],
10
+ {modelID: 'TS0601', manufacturerName: '_TZE200_5uodvhgc'},
11
+ {modelID: 'TS0601', manufacturerName: '_TZE200_1n2zev06'}],
11
12
  model: 'FK_V02',
12
13
  vendor: 'FrankEver',
13
14
  description: 'Zigbee smart water valve',
package/devices/heiman.js CHANGED
@@ -475,6 +475,25 @@ module.exports = [
475
475
  await reporting.batteryPercentageRemaining(endpoint, {min: constants.repInterval.MINUTES_5, max: constants.repInterval.HOUR});
476
476
  },
477
477
  },
478
+ {
479
+ zigbeeModel: ['HS3HT-EFA-3.0'],
480
+ model: 'HS3HT',
481
+ vendor: 'HEIMAN',
482
+ description: 'Temperature & humidity sensor with display',
483
+ fromZigbee: [fz.temperature, fz.humidity, fz.battery],
484
+ toZigbee: [],
485
+ configure: async (device, coordinatorEndpoint, logger) => {
486
+ const endpoint1 = device.getEndpoint(1);
487
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
488
+ await reporting.temperature(endpoint1);
489
+ await reporting.batteryPercentageRemaining(endpoint1);
490
+ await endpoint1.read('genPowerCfg', ['batteryPercentageRemaining']);
491
+ const endpoint2 = device.getEndpoint(2);
492
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['msRelativeHumidity']);
493
+ await reporting.humidity(endpoint2);
494
+ },
495
+ exposes: [e.battery(), e.temperature(), e.humidity()],
496
+ },
478
497
  {
479
498
  zigbeeModel: ['GASSensor-EM', '358e4e3e03c644709905034dae81433e'],
480
499
  model: 'HS1CG-E',
@@ -139,7 +139,7 @@ module.exports = [
139
139
  },
140
140
  },
141
141
  {
142
- fingerprint: [{modelID: 'TS110F', manufacturerName: '_TZ3000_92chsky7'}, {modelID: 'TS110E', manufacturerName: '_TZ3210_4ubylghk'}],
142
+ fingerprint: [{modelID: 'TS110F', manufacturerName: '_TZ3000_92chsky7'}],
143
143
  model: 'QS-Zigbee-D02-TRIAC-2C-L',
144
144
  vendor: 'Lonsonho',
145
145
  description: '2 gang smart dimmer switch module without neutral',
@@ -815,7 +815,7 @@ module.exports = [
815
815
  model: '8718699688882',
816
816
  vendor: 'Philips',
817
817
  description: 'Hue white Filament bulb G93 E27 bluetooth',
818
- extend: philips.extend.light_onoff_brightness(),
818
+ extend: philips.extend.light_onoff_brightness({disableHueEffects: false}),
819
819
  },
820
820
  {
821
821
  zigbeeModel: ['LST001'],
@@ -15,7 +15,12 @@ module.exports = [
15
15
  ota: ota.zigbeeOTA,
16
16
  fromZigbee: [fz.on_off, fz.battery],
17
17
  toZigbee: [tz.on_off, tz.ignore_transition],
18
- exposes: [e.switch(), e.battery_voltage()],
18
+ meta: {battery: {dontDividePercentage: true}},
19
+ exposes: [e.switch(), e.battery(), e.battery_voltage()],
20
+ configure: async (device, coordinatorEndpoint, logger) => {
21
+ device.powerSource = 'Battery';
22
+ device.save();
23
+ },
19
24
  },
20
25
  {
21
26
  zigbeeModel: ['3RSS008Z'],
package/devices/tuya.js CHANGED
@@ -3912,7 +3912,7 @@ module.exports = [
3912
3912
  },
3913
3913
  },
3914
3914
  {
3915
- fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_pagajpog']),
3915
+ fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_pagajpog', '_TZ3210_4ubylghk']),
3916
3916
  model: 'TS110E_2gang_2',
3917
3917
  vendor: 'TuYa',
3918
3918
  description: '2 channel dimmer',
package/lib/zosung.js CHANGED
@@ -10,8 +10,9 @@ function nextSeq(entity) {
10
10
 
11
11
  function messagesGet(entity, seq) {
12
12
  const info = entity.irMessageInfo;
13
- if (info.seq!=seq) {
14
- throw new Error(`Unexpected sequence value (expected: ${info.seq} current: ${seq}).`);
13
+ const expected = (info&&info.seq) || 0;
14
+ if (expected!==seq) {
15
+ throw new Error(`Unexpected sequence value (expected: ${expected} current: ${seq}).`);
15
16
  }
16
17
  return info.data;
17
18
  }
@@ -21,18 +22,19 @@ function messagesSet(entity, seq, data) {
21
22
 
22
23
  function messagesClear(entity, seq) {
23
24
  const info = entity.irMessageInfo;
24
- if (info.seq!=seq) {
25
- throw new Error(`Unexpected sequence value (expected: ${info.seq} current: ${seq}).`);
25
+ const expected = (info&&info.seq) || 0;
26
+ if (expected!==seq) {
27
+ throw new Error(`Unexpected sequence value (expected: ${expected} current: ${seq}).`);
26
28
  }
27
29
  delete entity.irMessageInfo;
28
30
  }
29
31
 
30
32
  function calcArrayCrc(values) {
31
- return Array.from(values.values()).reduce((a, b)=>a+b)%0x100;
33
+ return Array.from(values.values()).reduce((a, b)=>a+b, 0)%0x100;
32
34
  }
33
35
 
34
36
  function calcStringCrc(str) {
35
- return str.split('').map((x)=>x.charCodeAt(0)).reduce((a, b)=>a+b)%0x100;
37
+ return str.split('').map((x)=>x.charCodeAt(0)).reduce((a, b)=>a+b, 0)%0x100;
36
38
  }
37
39
 
38
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "15.0.33",
3
+ "version": "15.0.34",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "homepage": "https://github.com/Koenkk/zigbee-herdsman-converters",
36
36
  "dependencies": {
37
- "axios": "^1.2.3",
37
+ "axios": "^1.2.6",
38
38
  "buffer-crc32": "^0.2.13",
39
39
  "https-proxy-agent": "^5.0.1",
40
40
  "tar-stream": "^3.0.0",