zigbee-herdsman-converters 14.0.406 → 14.0.407
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/converters/fromZigbee.js +6 -2
- package/converters/toZigbee.js +10 -0
- package/devices/danfoss.js +5 -1
- package/devices/legrand.js +4 -1
- package/devices/m/303/274ller_licht.js +8 -0
- package/devices/orvibo.js +178 -0
- package/devices/philips.js +1 -1
- package/devices/shinasystem.js +21 -0
- package/devices/sinope.js +32 -0
- package/devices/stelpro.js +30 -0
- package/devices/tplink.js +16 -0
- package/devices/tuya.js +5 -2
- package/lib/exposes.js +2 -0
- package/lib/reporting.js +4 -0
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -2522,8 +2522,8 @@ const converters = {
|
|
|
2522
2522
|
return {battpercentage: value};
|
|
2523
2523
|
case tuya.dataPoints.neoAOMelody: // 0x21 [5] Melody
|
|
2524
2524
|
return {melody: value};
|
|
2525
|
-
case tuya.dataPoints.neoAOVolume: // 0x5 [0]/[1]/[2] Volume 0-
|
|
2526
|
-
return {volume: {
|
|
2525
|
+
case tuya.dataPoints.neoAOVolume: // 0x5 [0]/[1]/[2] Volume 0-low, 2-max
|
|
2526
|
+
return {volume: {0: 'low', 1: 'medium', 2: 'high'}[value]};
|
|
2527
2527
|
default: // Unknown code
|
|
2528
2528
|
meta.logger.warn(`Unhandled DP #${dp}: ${JSON.stringify(msg.data)}`);
|
|
2529
2529
|
}
|
|
@@ -3211,6 +3211,10 @@ const converters = {
|
|
|
3211
3211
|
result[postfixWithEndpointName('pi_heating_demand', msg, model)] =
|
|
3212
3212
|
precisionRound(msg.data['pIHeatingDemand'], 0);
|
|
3213
3213
|
}
|
|
3214
|
+
if (msg.data.hasOwnProperty('danfossWindowOpenFeatureEnable')) {
|
|
3215
|
+
result[postfixWithEndpointName('window_open_feature', msg, model)] =
|
|
3216
|
+
(msg.data['danfossWindowOpenFeatureEnable'] === 1);
|
|
3217
|
+
}
|
|
3214
3218
|
if (msg.data.hasOwnProperty('danfossWindowOpenInternal')) {
|
|
3215
3219
|
result[postfixWithEndpointName('window_open_internal', msg, model)] =
|
|
3216
3220
|
constants.danfossWindowOpen.hasOwnProperty(msg.data['danfossWindowOpenInternal']) ?
|
package/converters/toZigbee.js
CHANGED
|
@@ -2752,6 +2752,16 @@ const converters = {
|
|
|
2752
2752
|
await entity.read('hvacThermostat', ['danfossTriggerTime'], manufacturerOptions.danfoss);
|
|
2753
2753
|
},
|
|
2754
2754
|
},
|
|
2755
|
+
danfoss_window_open_feature: {
|
|
2756
|
+
key: ['window_open_feature'],
|
|
2757
|
+
convertSet: async (entity, key, value, meta) => {
|
|
2758
|
+
await entity.write('hvacThermostat', {'danfossWindowOpenFeatureEnable': value}, manufacturerOptions.danfoss);
|
|
2759
|
+
return {readAfterWriteTime: 200, state: {'window_open_feature': value}};
|
|
2760
|
+
},
|
|
2761
|
+
convertGet: async (entity, key, meta) => {
|
|
2762
|
+
await entity.read('hvacThermostat', ['danfossWindowOpenFeatureEnable'], manufacturerOptions.danfoss);
|
|
2763
|
+
},
|
|
2764
|
+
},
|
|
2755
2765
|
danfoss_window_open_internal: {
|
|
2756
2766
|
key: ['window_open_internal'],
|
|
2757
2767
|
convertGet: async (entity, key, meta) => {
|
package/devices/danfoss.js
CHANGED
|
@@ -22,7 +22,8 @@ module.exports = [
|
|
|
22
22
|
tz.danfoss_window_open_internal, tz.danfoss_window_open_external, tz.danfoss_load_estimate,
|
|
23
23
|
tz.danfoss_viewing_direction, tz.danfoss_external_measured_room_sensor, tz.danfoss_radiator_covered,
|
|
24
24
|
tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.danfoss_load_balancing_enable, tz.danfoss_load_room_mean,
|
|
25
|
-
tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_programming_operation_mode
|
|
25
|
+
tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_programming_operation_mode,
|
|
26
|
+
tz.danfoss_window_open_feature],
|
|
26
27
|
exposes: [e.battery(), e.keypad_lockout(), e.programming_operation_mode(),
|
|
27
28
|
exposes.binary('mounted_mode_active', ea.STATE_GET, true, false)
|
|
28
29
|
.withDescription('Is the unit in mounting mode. This is set to `false` for mounted (already on ' +
|
|
@@ -53,6 +54,8 @@ module.exports = [
|
|
|
53
54
|
exposes.binary('radiator_covered', ea.ALL, true, false)
|
|
54
55
|
.withDescription('Set if the TRV should solely rely on external_measured_room_sensor or operate in offset mode. ' +
|
|
55
56
|
'`false` = Auto Offset Mode or `true` = Room Sensor Mode'),
|
|
57
|
+
exposes.binary('window_open_feature', ea.ALL, true, false)
|
|
58
|
+
.withDescription('Whether or not the window open feature is enabled'),
|
|
56
59
|
exposes.numeric('window_open_internal', ea.STATE_GET).withValueMin(0).withValueMax(4)
|
|
57
60
|
.withDescription('0=Quarantine, 1=Windows are closed, 2=Hold - Windows are maybe about to open, ' +
|
|
58
61
|
'3=Open window detected, 4=In window open state from external but detected closed locally'),
|
|
@@ -114,6 +117,7 @@ module.exports = [
|
|
|
114
117
|
}], options);
|
|
115
118
|
|
|
116
119
|
await endpoint.read('hvacThermostat', [
|
|
120
|
+
'danfossWindowOpenFeatureEnable',
|
|
117
121
|
'danfossWindowOpenExternal',
|
|
118
122
|
'danfossDayOfWeek',
|
|
119
123
|
'danfossTriggerTime',
|
package/devices/legrand.js
CHANGED
|
@@ -6,6 +6,7 @@ const extend = require('../lib/extend');
|
|
|
6
6
|
const e = exposes.presets;
|
|
7
7
|
const ea = exposes.access;
|
|
8
8
|
const ota = require('../lib/ota');
|
|
9
|
+
const utils = require('../lib/utils');
|
|
9
10
|
|
|
10
11
|
const readInitialBatteryState = async (type, data, device) => {
|
|
11
12
|
if (['deviceAnnounce'].includes(type)) {
|
|
@@ -20,7 +21,9 @@ const fzLocal = {
|
|
|
20
21
|
cluster: 'genOnOff',
|
|
21
22
|
type: 'commandOff',
|
|
22
23
|
convert: (model, msg, publish, options, meta) => {
|
|
23
|
-
|
|
24
|
+
const payload = {action: utils.postfixWithEndpointName('off', msg, model)};
|
|
25
|
+
utils.addActionGroup(payload, msg, model);
|
|
26
|
+
return payload;
|
|
24
27
|
},
|
|
25
28
|
},
|
|
26
29
|
};
|
|
@@ -87,6 +87,14 @@ module.exports = [
|
|
|
87
87
|
extend: extend.light_onoff_brightness_colortemp_color(),
|
|
88
88
|
toZigbee: extend.light_onoff_brightness_colortemp_color().toZigbee.concat([tz.tint_scene]),
|
|
89
89
|
},
|
|
90
|
+
{
|
|
91
|
+
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3210_mntza0sw'}],
|
|
92
|
+
model: '404062',
|
|
93
|
+
vendor: 'Müller Licht',
|
|
94
|
+
description: 'Kea RGB+CCT',
|
|
95
|
+
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
96
|
+
toZigbee: extend.light_onoff_brightness_colortemp_color().toZigbee.concat([tz.tint_scene]),
|
|
97
|
+
},
|
|
90
98
|
{
|
|
91
99
|
zigbeeModel: ['ZBT-Remote-ALL-RGBW'],
|
|
92
100
|
model: 'MLI-404011',
|
package/devices/orvibo.js
CHANGED
|
@@ -292,4 +292,182 @@ module.exports = [
|
|
|
292
292
|
},
|
|
293
293
|
exposes: [e.cover_position(), e.battery()],
|
|
294
294
|
},
|
|
295
|
+
{
|
|
296
|
+
zigbeeModel: ['2ae011fb6d0542f58705d6861064eb5f'],
|
|
297
|
+
model: 'T40W1Z',
|
|
298
|
+
vendor: 'ORVIBO',
|
|
299
|
+
description: 'MixSwitch 1 gang',
|
|
300
|
+
extend: extend.switch(),
|
|
301
|
+
exposes: [e.switch()],
|
|
302
|
+
|
|
303
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
304
|
+
const endpoint = device.getEndpoint(1);
|
|
305
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
306
|
+
await reporting.onOff(endpoint);
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
zigbeeModel: ['2e13af8e17434961be98f055d68c2166'],
|
|
311
|
+
model: 'T40W2Z',
|
|
312
|
+
vendor: 'ORVIBO',
|
|
313
|
+
description: 'MixSwitch 2 gangs',
|
|
314
|
+
extend: extend.switch(),
|
|
315
|
+
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
|
|
316
|
+
endpoint: (device) => {
|
|
317
|
+
return {'left': 1, 'right': 2};
|
|
318
|
+
},
|
|
319
|
+
meta: {multiEndpoint: true},
|
|
320
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
321
|
+
const endpoint1 = device.getEndpoint(1);
|
|
322
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
|
|
323
|
+
await reporting.onOff(endpoint1);
|
|
324
|
+
const endpoint2 = device.getEndpoint(2);
|
|
325
|
+
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
|
|
326
|
+
await reporting.onOff(endpoint2);
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
zigbeeModel: ['e8d667cb184b4a2880dd886c23d00976'],
|
|
331
|
+
model: 'T40W3Z',
|
|
332
|
+
vendor: 'ORVIBO',
|
|
333
|
+
description: 'MixSwitch 3 gangs',
|
|
334
|
+
extend: extend.switch(),
|
|
335
|
+
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
|
|
336
|
+
endpoint: (device) => {
|
|
337
|
+
return {'left': 1, 'center': 2, 'right': 3};
|
|
338
|
+
},
|
|
339
|
+
meta: {multiEndpoint: true},
|
|
340
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
341
|
+
const endpoint1 = device.getEndpoint(1);
|
|
342
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
|
|
343
|
+
await reporting.onOff(endpoint1);
|
|
344
|
+
const endpoint2 = device.getEndpoint(2);
|
|
345
|
+
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
|
|
346
|
+
await reporting.onOff(endpoint2);
|
|
347
|
+
const endpoint3 = device.getEndpoint(3);
|
|
348
|
+
await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
|
|
349
|
+
await reporting.onOff(endpoint3);
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
zigbeeModel: ['20513b10079f4cc68cffb8b0dc6d3277'],
|
|
354
|
+
model: 'T40W4Z',
|
|
355
|
+
vendor: 'ORVIBO',
|
|
356
|
+
description: 'MixSwitch 4 gangs',
|
|
357
|
+
extend: extend.switch(),
|
|
358
|
+
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
|
|
359
|
+
e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5'), e.switch().withEndpoint('l6')],
|
|
360
|
+
endpoint: (device) => {
|
|
361
|
+
return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5, 'l6': 6};
|
|
362
|
+
},
|
|
363
|
+
meta: {multiEndpoint: true},
|
|
364
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
365
|
+
const endpoint1 = device.getEndpoint(1);
|
|
366
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
|
|
367
|
+
await reporting.onOff(endpoint1);
|
|
368
|
+
const endpoint2 = device.getEndpoint(2);
|
|
369
|
+
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
|
|
370
|
+
await reporting.onOff(endpoint2);
|
|
371
|
+
const endpoint3 = device.getEndpoint(3);
|
|
372
|
+
await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
|
|
373
|
+
await reporting.onOff(endpoint3);
|
|
374
|
+
const endpoint4 = device.getEndpoint(4);
|
|
375
|
+
await reporting.bind(endpoint4, coordinatorEndpoint, ['genOnOff']);
|
|
376
|
+
await reporting.onOff(endpoint4);
|
|
377
|
+
const endpoint5 = device.getEndpoint(5);
|
|
378
|
+
await reporting.bind(endpoint5, coordinatorEndpoint, ['genOnOff']);
|
|
379
|
+
await reporting.onOff(endpoint5);
|
|
380
|
+
const endpoint6 = device.getEndpoint(6);
|
|
381
|
+
await reporting.bind(endpoint6, coordinatorEndpoint, ['genOnOff']);
|
|
382
|
+
await reporting.onOff(endpoint6);
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
zigbeeModel: ['bcb949e87e8c4ea6bc2803052dd8fbf5'],
|
|
387
|
+
model: 'T40S6Z',
|
|
388
|
+
vendor: 'ORVIBO',
|
|
389
|
+
description: 'MixSwitch 6 gangs',
|
|
390
|
+
fromZigbee: [fz.orvibo_raw_2],
|
|
391
|
+
toZigbee: [],
|
|
392
|
+
exposes: [e.action(['button_1_click', 'button_2_click', 'button_3_click', 'button_4_click', 'button_5_click', 'button_6_click'])],
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
zigbeeModel: ['ba8120ad03f744ecb6a973672369e80d'],
|
|
396
|
+
model: 'T41W1Z',
|
|
397
|
+
vendor: 'ORVIBO',
|
|
398
|
+
description: 'MixSwitch 1 gang (without neutral wire)',
|
|
399
|
+
extend: extend.switch(),
|
|
400
|
+
exposes: [e.switch()],
|
|
401
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
402
|
+
const endpoint = device.getEndpoint(1);
|
|
403
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
404
|
+
await reporting.onOff(endpoint);
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
zigbeeModel: ['7c8f476a0f764cd4b994bc73d07c906d'],
|
|
409
|
+
model: 'T41W2Z',
|
|
410
|
+
vendor: 'ORVIBO',
|
|
411
|
+
description: 'MixSwitch 2 gang (without neutral wire)',
|
|
412
|
+
extend: extend.switch(),
|
|
413
|
+
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
|
|
414
|
+
endpoint: (device) => {
|
|
415
|
+
return {'left': 1, 'right': 2};
|
|
416
|
+
},
|
|
417
|
+
meta: {multiEndpoint: true},
|
|
418
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
419
|
+
const endpoint1 = device.getEndpoint(1);
|
|
420
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
|
|
421
|
+
await reporting.onOff(endpoint1);
|
|
422
|
+
const endpoint2 = device.getEndpoint(2);
|
|
423
|
+
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
|
|
424
|
+
await reporting.onOff(endpoint2);
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
zigbeeModel: ['cb7ce9fe2cb147e69c5ea700b39b3d5b'],
|
|
429
|
+
model: 'DM10ZW',
|
|
430
|
+
vendor: 'ORVIBO',
|
|
431
|
+
description: '0-10v dimmer',
|
|
432
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 371]}),
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
zigbeeModel: ['1a20628504bf48c88ed698fe96b7867c'],
|
|
436
|
+
model: 'DTZ09039',
|
|
437
|
+
vendor: 'ORVIBO',
|
|
438
|
+
description: 'Downlight (Q series)',
|
|
439
|
+
extend: extend.light_onoff_brightness(),
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
zigbeeModel: ['bbfed49c738948b989911f9f9f73d759'],
|
|
443
|
+
model: 'R30W3Z',
|
|
444
|
+
vendor: 'ORVIBO',
|
|
445
|
+
description: 'In-wall switch 3 gang',
|
|
446
|
+
extend: extend.switch(),
|
|
447
|
+
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
|
|
448
|
+
endpoint: (device) => {
|
|
449
|
+
return {'left': 1, 'center': 2, 'right': 3};
|
|
450
|
+
},
|
|
451
|
+
meta: {multiEndpoint: true},
|
|
452
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
453
|
+
const endpoint1 = device.getEndpoint(1);
|
|
454
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
|
|
455
|
+
await reporting.onOff(endpoint1);
|
|
456
|
+
const endpoint2 = device.getEndpoint(2);
|
|
457
|
+
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
|
|
458
|
+
await reporting.onOff(endpoint2);
|
|
459
|
+
const endpoint3 = device.getEndpoint(3);
|
|
460
|
+
await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
|
|
461
|
+
await reporting.onOff(endpoint3);
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
zigbeeModel: ['0e93fa9c36bb417a90ad5d8a184b683a'],
|
|
466
|
+
model: 'SM20',
|
|
467
|
+
vendor: 'ORVIBO',
|
|
468
|
+
description: 'Door or window contact switch',
|
|
469
|
+
fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
|
|
470
|
+
toZigbee: [],
|
|
471
|
+
exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery()],
|
|
472
|
+
},
|
|
295
473
|
];
|
package/devices/philips.js
CHANGED
|
@@ -1613,7 +1613,7 @@ module.exports = [
|
|
|
1613
1613
|
ota: ota.zigbeeOTA,
|
|
1614
1614
|
},
|
|
1615
1615
|
{
|
|
1616
|
-
zigbeeModel: ['4080248U9'],
|
|
1616
|
+
zigbeeModel: ['4080248U9', '915005987201'],
|
|
1617
1617
|
model: '4080248U9',
|
|
1618
1618
|
vendor: 'Philips',
|
|
1619
1619
|
description: 'Hue White and color ambiance Signe floor light',
|
package/devices/shinasystem.js
CHANGED
|
@@ -341,4 +341,25 @@ module.exports = [
|
|
|
341
341
|
}]);
|
|
342
342
|
},
|
|
343
343
|
},
|
|
344
|
+
{
|
|
345
|
+
zigbeeModel: ['DLM-300Z'],
|
|
346
|
+
model: 'DLM-300Z',
|
|
347
|
+
vendor: 'ShinaSystem',
|
|
348
|
+
description: 'Sihas door lock',
|
|
349
|
+
fromZigbee: [fz.lock, fz.battery, fz.lock_operation_event, fz.lock_programming_event, fz.lock_pin_code_response],
|
|
350
|
+
toZigbee: [tz.lock, tz.pincode_lock],
|
|
351
|
+
meta: {pinCodeCount: 4},
|
|
352
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
353
|
+
const endpoint = device.getEndpoint(1);
|
|
354
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
355
|
+
await reporting.lockState(endpoint, {min: 0, max: 3600, change: 0});
|
|
356
|
+
await reporting.batteryPercentageRemaining(endpoint, {min: 600, max: 21600, change: 1});
|
|
357
|
+
await reporting.doorState(endpoint);
|
|
358
|
+
},
|
|
359
|
+
exposes: [e.battery(), e.lock(), exposes.enum('door_state', ea.STATE, ['open', 'closed']).withDescription('Door status'),
|
|
360
|
+
exposes.composite('pin_code', 'pin_code')
|
|
361
|
+
.withFeature(exposes.numeric('user', ea.SET).withDescription('User ID can only number 1'))
|
|
362
|
+
.withFeature(exposes.numeric('pin_code', ea.SET).withDescription('Pincode to set, set pincode(4 digit) to null to clear')),
|
|
363
|
+
],
|
|
364
|
+
},
|
|
344
365
|
];
|
package/devices/sinope.js
CHANGED
|
@@ -331,4 +331,36 @@ module.exports = [
|
|
|
331
331
|
},
|
|
332
332
|
exposes: [e.water_leak(), e.battery_low(), e.temperature(), e.battery()],
|
|
333
333
|
},
|
|
334
|
+
{
|
|
335
|
+
zigbeeModel: ['VA4200WZ'],
|
|
336
|
+
model: 'VA4200WZ',
|
|
337
|
+
vendor: 'Sinopé',
|
|
338
|
+
description: 'Zigbee smart water valve (3/4")',
|
|
339
|
+
fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff, fz.battery],
|
|
340
|
+
toZigbee: [tz.cover_via_brightness],
|
|
341
|
+
configure: async (device, coordinatorEndpoint) => {
|
|
342
|
+
const endpoint = device.getEndpoint(1);
|
|
343
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'genPowerCfg']);
|
|
344
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
345
|
+
await reporting.onOff(endpoint);
|
|
346
|
+
await reporting.brightness(endpoint); // valve position
|
|
347
|
+
},
|
|
348
|
+
exposes: [e.valve_switch(), e.valve_position(), e.battery_low(), e.battery()],
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
zigbeeModel: ['VA4201WZ'],
|
|
352
|
+
model: 'VA4201WZ',
|
|
353
|
+
vendor: 'Sinopé',
|
|
354
|
+
description: 'Zigbee smart water valve (1")',
|
|
355
|
+
fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff, fz.battery],
|
|
356
|
+
toZigbee: [tz.cover_via_brightness],
|
|
357
|
+
configure: async (device, coordinatorEndpoint) => {
|
|
358
|
+
const endpoint = device.getEndpoint(1);
|
|
359
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'genPowerCfg']);
|
|
360
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
361
|
+
await reporting.onOff(endpoint);
|
|
362
|
+
await reporting.brightness(endpoint); // valve position
|
|
363
|
+
},
|
|
364
|
+
exposes: [e.valve_switch(), e.valve_position(), e.battery_low(), e.battery()],
|
|
365
|
+
},
|
|
334
366
|
];
|
package/devices/stelpro.js
CHANGED
|
@@ -103,6 +103,36 @@ module.exports = [
|
|
|
103
103
|
reportableChange: 1}]);
|
|
104
104
|
},
|
|
105
105
|
},
|
|
106
|
+
{
|
|
107
|
+
zigbeeModel: ['SORB'],
|
|
108
|
+
model: 'SORB',
|
|
109
|
+
vendor: 'Stelpro',
|
|
110
|
+
description: 'ORLÉANS fan heater',
|
|
111
|
+
fromZigbee: [fz.stelpro_thermostat, fz.hvac_user_interface],
|
|
112
|
+
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint,
|
|
113
|
+
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.thermostat_running_state],
|
|
114
|
+
exposes: [e.local_temperature(), e.keypad_lockout(),
|
|
115
|
+
exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
|
|
116
|
+
.withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat'])],
|
|
117
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
118
|
+
const endpoint = device.getEndpoint(25);
|
|
119
|
+
const binds = ['genBasic', 'genIdentify', 'genGroups', 'hvacThermostat', 'hvacUserInterfaceCfg', 'msTemperatureMeasurement'];
|
|
120
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
121
|
+
|
|
122
|
+
// Those exact parameters (min/max/change) are required for reporting to work with Stelpro SORB
|
|
123
|
+
await reporting.thermostatTemperature(endpoint);
|
|
124
|
+
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
125
|
+
await reporting.thermostatSystemMode(endpoint);
|
|
126
|
+
await reporting.thermostatPIHeatingDemand(endpoint);
|
|
127
|
+
await reporting.thermostatKeypadLockMode(endpoint);
|
|
128
|
+
// cluster 0x0201 attribute 0x401c
|
|
129
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
130
|
+
attribute: 'StelproSystemMode',
|
|
131
|
+
minimumReportInterval: constants.repInterval.MINUTE,
|
|
132
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
133
|
+
reportableChange: 1}]);
|
|
134
|
+
},
|
|
135
|
+
},
|
|
106
136
|
{
|
|
107
137
|
zigbeeModel: ['SMT402AD'],
|
|
108
138
|
model: 'SMT402AD',
|
package/devices/tplink.js
CHANGED
|
@@ -23,4 +23,20 @@ module.exports = [
|
|
|
23
23
|
device.save();
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
zigbeeModel: ['CS100'],
|
|
28
|
+
model: 'CS100',
|
|
29
|
+
vendor: 'TP-Link',
|
|
30
|
+
description: 'Contact sensor',
|
|
31
|
+
fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
|
|
32
|
+
toZigbee: [],
|
|
33
|
+
exposes: [e.contact(), e.battery_low(), e.battery()],
|
|
34
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
35
|
+
const endpoint = device.getEndpoint(1);
|
|
36
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
37
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
38
|
+
device.powerSource = 'Battery';
|
|
39
|
+
device.save();
|
|
40
|
+
},
|
|
41
|
+
},
|
|
26
42
|
];
|
package/devices/tuya.js
CHANGED
|
@@ -109,7 +109,8 @@ module.exports = [
|
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
fingerprint: [{modelID: 'TS0001', manufacturerName: '_TZ3000_hktqahrq'}, {manufacturerName: '_TZ3000_hktqahrq'},
|
|
112
|
-
{manufacturerName: '_TZ3000_q6a3tepg'}, {modelID: 'TS000F', manufacturerName: '_TZ3000_m9af2l6g'}
|
|
112
|
+
{manufacturerName: '_TZ3000_q6a3tepg'}, {modelID: 'TS000F', manufacturerName: '_TZ3000_m9af2l6g'},
|
|
113
|
+
{modelID: 'TS0001', manufacturerName: '_TZ3000_npzfdcof'}],
|
|
113
114
|
model: 'WHD02',
|
|
114
115
|
vendor: 'TuYa',
|
|
115
116
|
description: 'Wall switch module',
|
|
@@ -1119,7 +1120,9 @@ module.exports = [
|
|
|
1119
1120
|
acVoltageMultiplier: 1, acVoltageDivisor: 1, acCurrentMultiplier: 1, acCurrentDivisor: 1000, acPowerMultiplier: 1,
|
|
1120
1121
|
acPowerDivisor: 1,
|
|
1121
1122
|
});
|
|
1122
|
-
|
|
1123
|
+
try {
|
|
1124
|
+
await reporting.currentSummDelivered(endpoint);
|
|
1125
|
+
} catch (error) {/* fails for some https://github.com/Koenkk/zigbee2mqtt/issues/11179 */}
|
|
1123
1126
|
},
|
|
1124
1127
|
options: [exposes.options.measurement_poll_interval()],
|
|
1125
1128
|
// This device doesn't support reporting correctly.
|
package/lib/exposes.js
CHANGED
|
@@ -589,6 +589,8 @@ module.exports = {
|
|
|
589
589
|
tamper: () => new Binary('tamper', access.STATE, true, false).withDescription('Indicates whether the device is tampered'),
|
|
590
590
|
temperature: () => new Numeric('temperature', access.STATE).withUnit('°C').withDescription('Measured temperature value'),
|
|
591
591
|
test: () => new Binary('test', access.STATE, true, false).withDescription('Indicates whether the device is being tested'),
|
|
592
|
+
valve_position: () => new Numeric('position', access.ALL).withValueMin(0).withValueMax(100).withDescription('Position of the valve'),
|
|
593
|
+
valve_switch: () => new Binary('state', access.ALL, 'OPEN', 'CLOSE').withDescription('Valve state if open or closed'),
|
|
592
594
|
valve_state: () => new Binary('valve_state', access.STATE, 'OPEN', 'CLOSED').withDescription('Valve state if open or closed'),
|
|
593
595
|
valve_detection: () => new Switch().withState('valve_detection', true).setAccess('state', access.STATE_SET),
|
|
594
596
|
vibration: () => new Binary('vibration', access.STATE, true, false).withDescription('Indicates whether the device detected vibration'),
|
package/lib/reporting.js
CHANGED
|
@@ -71,6 +71,10 @@ module.exports = {
|
|
|
71
71
|
const p = payload('lockState', 0, repInterval.HOUR, 0, overrides);
|
|
72
72
|
await endpoint.configureReporting('closuresDoorLock', p);
|
|
73
73
|
},
|
|
74
|
+
doorState: async (endpoint, overrides) => {
|
|
75
|
+
const p = payload('doorState', 0, repInterval.HOUR, 0, overrides);
|
|
76
|
+
await endpoint.configureReporting('closuresDoorLock', p);
|
|
77
|
+
},
|
|
74
78
|
brightness: async (endpoint, overrides) => {
|
|
75
79
|
const p = payload('currentLevel', 0, repInterval.HOUR, 1, overrides);
|
|
76
80
|
await endpoint.configureReporting('genLevelCtrl', p);
|
package/npm-shrinkwrap.json
CHANGED