zigbee-herdsman-converters 14.0.539 → 14.0.542
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 +3 -5
- package/devices/lonsonho.js +1 -1
- package/devices/owon.js +108 -0
- package/devices/paulmann.js +5 -5
- package/devices/philips.js +11 -2
- package/devices/sunricher.js +43 -0
- package/devices/trust.js +14 -0
- package/devices/tuya.js +1 -7
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -2257,11 +2257,9 @@ const converters = {
|
|
|
2257
2257
|
const value = tuya.getDataValue(dpValue);
|
|
2258
2258
|
|
|
2259
2259
|
switch (dp) {
|
|
2260
|
-
case tuya.dataPoints.coverPosition:
|
|
2261
|
-
return {running: true};
|
|
2262
|
-
}
|
|
2260
|
+
case tuya.dataPoints.coverPosition: // Started moving to position (triggered from Zigbee)
|
|
2263
2261
|
case tuya.dataPoints.coverArrived: { // Arrived at position
|
|
2264
|
-
const running = dp === tuya.dataPoints.
|
|
2262
|
+
const running = dp === tuya.dataPoints.coverPosition;
|
|
2265
2263
|
const invert = tuya.isCoverInverted(meta.device.manufacturerName) ? !options.invert_cover : options.invert_cover;
|
|
2266
2264
|
const position = invert ? 100 - (value & 0xFF) : (value & 0xFF);
|
|
2267
2265
|
|
|
@@ -7308,7 +7306,7 @@ const converters = {
|
|
|
7308
7306
|
case 4:
|
|
7309
7307
|
return {battery: value};
|
|
7310
7308
|
case 1:
|
|
7311
|
-
return {battery_low: value
|
|
7309
|
+
return {battery_low: value === 1};
|
|
7312
7310
|
default:
|
|
7313
7311
|
meta.logger.warn(`s_lux_zb_illuminance: NOT RECOGNIZED DP #${dp} with data ${JSON.stringify(dpValue)}`);
|
|
7314
7312
|
}
|
package/devices/lonsonho.js
CHANGED
|
@@ -109,7 +109,7 @@ module.exports = [
|
|
|
109
109
|
extend: extend.light_onoff_brightness(),
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
|
-
fingerprint: [{modelID: 'TS110F', manufacturerName: '_TYZB01_v8gtiaed'}],
|
|
112
|
+
fingerprint: [{modelID: 'TS110F', manufacturerName: '_TYZB01_v8gtiaed'}, {modelID: 'TS110E', manufacturerName: '_TZ3210_pagajpog'}],
|
|
113
113
|
model: 'QS-Zigbee-D02-TRIAC-2C-LN',
|
|
114
114
|
vendor: 'Lonsonho',
|
|
115
115
|
description: '2 gang smart dimmer switch module with neutral',
|
package/devices/owon.js
CHANGED
|
@@ -4,7 +4,78 @@ const tz = require('../converters/toZigbee');
|
|
|
4
4
|
const constants = require('../lib/constants');
|
|
5
5
|
const reporting = require('../lib/reporting');
|
|
6
6
|
const e = exposes.presets;
|
|
7
|
+
const ea = exposes.access;
|
|
7
8
|
|
|
9
|
+
const fzLocal = {
|
|
10
|
+
PC321_metering: {
|
|
11
|
+
cluster: 'seMetering',
|
|
12
|
+
type: ['attributeReport', 'readResponse'],
|
|
13
|
+
convert: (model, msg, publish, options, meta) => {
|
|
14
|
+
const payload = {};
|
|
15
|
+
if (msg.data.hasOwnProperty('owonL1Energy')) {
|
|
16
|
+
payload.energy_l1 = msg.data['owonL1Energy'][1] / 1000.0;
|
|
17
|
+
}
|
|
18
|
+
if (msg.data.hasOwnProperty('owonL2Energy')) {
|
|
19
|
+
payload.energy_l2 = msg.data['owonL2Energy'][1] / 1000.0;
|
|
20
|
+
}
|
|
21
|
+
if (msg.data.hasOwnProperty('owonL3Energy')) {
|
|
22
|
+
payload.energy_l3 = msg.data['owonL3Energy'][1] / 1000.0;
|
|
23
|
+
}
|
|
24
|
+
if (msg.data.hasOwnProperty('owonL1ReactiveEnergy')) {
|
|
25
|
+
payload.reactive_energy_l1 = msg.data['owonL1ReactiveEnergy'][1] / 1000.0;
|
|
26
|
+
}
|
|
27
|
+
if (msg.data.hasOwnProperty('owonL2ReactiveEnergy')) {
|
|
28
|
+
payload.reactive_energy_l2 = msg.data['owonL2ReactiveEnergy'][1] / 1000.0;
|
|
29
|
+
}
|
|
30
|
+
if (msg.data.hasOwnProperty('owonL3ReactiveEnergy')) {
|
|
31
|
+
payload.reactive_energy_l3 = msg.data['owonL3ReactiveEnergy'][1] / 1000.0;
|
|
32
|
+
}
|
|
33
|
+
if (msg.data.hasOwnProperty('owonL1PhasePower')) {
|
|
34
|
+
payload.power_l1 = msg.data['owonL1PhasePower'];
|
|
35
|
+
}
|
|
36
|
+
if (msg.data.hasOwnProperty('owonL2PhasePower')) {
|
|
37
|
+
payload.power_l2 = msg.data['owonL2PhasePower'];
|
|
38
|
+
}
|
|
39
|
+
if (msg.data.hasOwnProperty('owonL3PhasePower')) {
|
|
40
|
+
payload.power_l3 = msg.data['owonL3PhasePower'];
|
|
41
|
+
}
|
|
42
|
+
if (msg.data.hasOwnProperty('owonL1PhaseReactivePower')) {
|
|
43
|
+
payload.reactive_power_l1 = msg.data['owonL1PhaseReactivePower'];
|
|
44
|
+
}
|
|
45
|
+
if (msg.data.hasOwnProperty('owonL2PhaseReactivePower')) {
|
|
46
|
+
payload.reactive_power_l2 = msg.data['owonL2PhaseReactivePower'];
|
|
47
|
+
}
|
|
48
|
+
if (msg.data.hasOwnProperty('owonL3PhaseReactivePower')) {
|
|
49
|
+
payload.reactive_power_l3 = msg.data['owonL3PhaseReactivePower'];
|
|
50
|
+
}
|
|
51
|
+
if (msg.data.hasOwnProperty('owonL1PhaseVoltage')) {
|
|
52
|
+
payload.voltage_l1 = msg.data['owonL1PhaseVoltage'] / 10.0;
|
|
53
|
+
}
|
|
54
|
+
if (msg.data.hasOwnProperty('owonL2PhaseVoltage')) {
|
|
55
|
+
payload.voltage_l2 = msg.data['owonL2PhaseVoltage'] / 10.0;
|
|
56
|
+
}
|
|
57
|
+
if (msg.data.hasOwnProperty('owonL3PhaseVoltage')) {
|
|
58
|
+
payload.voltage_l3 = msg.data['owonL3PhaseVoltage'] / 10.0;
|
|
59
|
+
}
|
|
60
|
+
if (msg.data.hasOwnProperty('owonL1PhaseCurrent')) {
|
|
61
|
+
payload.current_l1 = msg.data['owonL1PhaseCurrent'] / 1000.0;
|
|
62
|
+
}
|
|
63
|
+
if (msg.data.hasOwnProperty('owonL2PhaseCurrent')) {
|
|
64
|
+
payload.current_l2 = msg.data['owonL2PhaseCurrent'] / 1000.0;
|
|
65
|
+
}
|
|
66
|
+
if (msg.data.hasOwnProperty('owonL3PhaseCurrent')) {
|
|
67
|
+
payload.current_l3 = msg.data['owonL3PhaseCurrent'] / 1000.0;
|
|
68
|
+
}
|
|
69
|
+
if (msg.data.hasOwnProperty('owonFrequency')) {
|
|
70
|
+
payload.frequency = msg.data['owonFrequency'];
|
|
71
|
+
}
|
|
72
|
+
if (msg.data.hasOwnProperty('owonReactiveEnergySum')) {
|
|
73
|
+
payload.reactive_energy_sum = msg.data['owonReactiveEnergySum'];
|
|
74
|
+
}
|
|
75
|
+
return payload;
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
8
79
|
module.exports = [
|
|
9
80
|
{
|
|
10
81
|
zigbeeModel: ['WSP404'],
|
|
@@ -119,4 +190,41 @@ module.exports = [
|
|
|
119
190
|
device.save();
|
|
120
191
|
},
|
|
121
192
|
},
|
|
193
|
+
{
|
|
194
|
+
zigbeeModel: ['PC321'],
|
|
195
|
+
model: 'PC321',
|
|
196
|
+
vendor: 'OWON',
|
|
197
|
+
description: '3-Phase clamp power meter',
|
|
198
|
+
fromZigbee: [fz.metering, fzLocal.PC321_metering],
|
|
199
|
+
toZigbee: [],
|
|
200
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
201
|
+
const endpoint = device.getEndpoint(1);
|
|
202
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['seMetering']);
|
|
203
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
204
|
+
if (device.powerSource === 'Unknown') {
|
|
205
|
+
device.powerSource = 'Mains (single phase)';
|
|
206
|
+
device.save();
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
exposes: [e.energy(),
|
|
210
|
+
exposes.numeric('voltage_l1', ea.STATE).withUnit('V').withDescription('Phase 1 voltage'),
|
|
211
|
+
exposes.numeric('voltage_l2', ea.STATE).withUnit('V').withDescription('Phase 2 voltage'),
|
|
212
|
+
exposes.numeric('voltage_l3', ea.STATE).withUnit('V').withDescription('Phase 3 voltage'),
|
|
213
|
+
exposes.numeric('current_l1', ea.STATE).withUnit('A').withDescription('Phase 1 current'),
|
|
214
|
+
exposes.numeric('current_l2', ea.STATE).withUnit('A').withDescription('Phase 2 current'),
|
|
215
|
+
exposes.numeric('current_l3', ea.STATE).withUnit('A').withDescription('Phase 3 current'),
|
|
216
|
+
exposes.numeric('energy_l1', ea.STATE).withUnit('kWh').withDescription('Phase 1 energy'),
|
|
217
|
+
exposes.numeric('energy_l2', ea.STATE).withUnit('kWh').withDescription('Phase 2 energy'),
|
|
218
|
+
exposes.numeric('energy_l3', ea.STATE).withUnit('kWh').withDescription('Phase 3 energy'),
|
|
219
|
+
exposes.numeric('reactive_energy_l1', ea.STATE).withUnit('kVArh').withDescription('Phase 1 reactive energy'),
|
|
220
|
+
exposes.numeric('reactive_energy_l2', ea.STATE).withUnit('kVArh').withDescription('Phase 2 reactive energy'),
|
|
221
|
+
exposes.numeric('reactive_energy_l3', ea.STATE).withUnit('kVArh').withDescription('Phase 3 reactive energy'),
|
|
222
|
+
exposes.numeric('power_l1', ea.STATE).withUnit('W').withDescription('Phase 1 power'),
|
|
223
|
+
exposes.numeric('power_l2', ea.STATE).withUnit('W').withDescription('Phase 2 power'),
|
|
224
|
+
exposes.numeric('power_l3', ea.STATE).withUnit('W').withDescription('Phase 3 power'),
|
|
225
|
+
exposes.numeric('reactive_power_l1', ea.STATE).withUnit('VAr').withDescription('Phase 1 reactive power'),
|
|
226
|
+
exposes.numeric('reactive_power_l2', ea.STATE).withUnit('VAr').withDescription('Phase 2 reactive power'),
|
|
227
|
+
exposes.numeric('reactive_power_l3', ea.STATE).withUnit('VAr').withDescription('Phase 3 reactive power'),
|
|
228
|
+
],
|
|
229
|
+
},
|
|
122
230
|
];
|
package/devices/paulmann.js
CHANGED
|
@@ -22,7 +22,7 @@ module.exports = [
|
|
|
22
22
|
extend: extend.light_onoff_brightness_colortemp_color(),
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
zigbeeModel: ['Switch Controller
|
|
25
|
+
zigbeeModel: ['Switch Controller'],
|
|
26
26
|
model: '50043',
|
|
27
27
|
vendor: 'Paulmann',
|
|
28
28
|
description: 'SmartHome Zigbee Cephei Switch Controller',
|
|
@@ -36,7 +36,7 @@ module.exports = [
|
|
|
36
36
|
extend: extend.switch(),
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
zigbeeModel: ['Dimmablelight
|
|
39
|
+
zigbeeModel: ['Dimmablelight'],
|
|
40
40
|
model: '50044/50045',
|
|
41
41
|
vendor: 'Paulmann',
|
|
42
42
|
description: 'SmartHome Zigbee Dimmer or LED-stripe',
|
|
@@ -50,7 +50,7 @@ module.exports = [
|
|
|
50
50
|
extend: extend.light_onoff_brightness_colortemp_color(),
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
zigbeeModel: ['RGBW light', '500.49'],
|
|
53
|
+
zigbeeModel: ['RGBW light', '500.49', 'RGBW_light'],
|
|
54
54
|
model: '50049/500.63',
|
|
55
55
|
vendor: 'Paulmann',
|
|
56
56
|
description: 'Smart Home Zigbee YourLED RGB Controller max. 60W / Smart Home Zigbee LED Reflektor 3,5W GU10 RGBW dimmbar',
|
|
@@ -64,7 +64,7 @@ module.exports = [
|
|
|
64
64
|
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
zigbeeModel: ['CCT light'],
|
|
67
|
+
zigbeeModel: ['CCT light', 'CCT_light'],
|
|
68
68
|
model: '50064',
|
|
69
69
|
vendor: 'Paulmann',
|
|
70
70
|
description: 'SmartHome led spot',
|
|
@@ -127,7 +127,7 @@ module.exports = [
|
|
|
127
127
|
extend: extend.light_onoff_brightness(),
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
|
-
zigbeeModel: ['RemoteControl
|
|
130
|
+
zigbeeModel: ['RemoteControl'],
|
|
131
131
|
model: '500.67',
|
|
132
132
|
vendor: 'Paulmann',
|
|
133
133
|
description: 'RGB remote control',
|
package/devices/philips.js
CHANGED
|
@@ -1671,9 +1671,9 @@ module.exports = [
|
|
|
1671
1671
|
zigbeeModel: ['929002376801'],
|
|
1672
1672
|
model: '929002376801',
|
|
1673
1673
|
vendor: 'Philips',
|
|
1674
|
-
description: 'Hue Iris (generation 4)',
|
|
1674
|
+
description: 'Hue Iris kobber limited edition (generation 4)',
|
|
1675
1675
|
meta: {turnsOffAtBrightness1: true},
|
|
1676
|
-
extend: hueExtend.
|
|
1676
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
1677
1677
|
ota: ota.zigbeeOTA,
|
|
1678
1678
|
},
|
|
1679
1679
|
{
|
|
@@ -3042,4 +3042,13 @@ module.exports = [
|
|
|
3042
3042
|
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [222, 454]}),
|
|
3043
3043
|
ota: ota.zigbeeOTA,
|
|
3044
3044
|
},
|
|
3045
|
+
{
|
|
3046
|
+
zigbeeModel: ['LWB016'],
|
|
3047
|
+
model: '9290018609',
|
|
3048
|
+
vendor: 'Philips',
|
|
3049
|
+
description: 'Hue White E26 806 lumen',
|
|
3050
|
+
meta: {turnsOffAtBrightness1: true},
|
|
3051
|
+
extend: hueExtend.light_onoff_brightness(),
|
|
3052
|
+
ota: ota.zigbeeOTA,
|
|
3053
|
+
},
|
|
3045
3054
|
];
|
package/devices/sunricher.js
CHANGED
|
@@ -3,8 +3,41 @@ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/lega
|
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
|
+
const utils = require('../lib/utils');
|
|
6
7
|
const e = exposes.presets;
|
|
7
8
|
|
|
9
|
+
const fzLocal = {
|
|
10
|
+
sunricher_SRZGP2801K45C: {
|
|
11
|
+
cluster: 'greenPower',
|
|
12
|
+
type: ['commandNotification', 'commandCommisioningNotification'],
|
|
13
|
+
convert: (model, msg, publish, options, meta) => {
|
|
14
|
+
const commandID = msg.data.commandID;
|
|
15
|
+
if (utils.hasAlreadyProcessedMessage(msg, msg.data.frameCounter, `${msg.device.ieeeAddr}_${commandID}`)) return;
|
|
16
|
+
if (commandID === 224) return;
|
|
17
|
+
const lookup = {
|
|
18
|
+
0x21: 'press_on',
|
|
19
|
+
0x20: 'press_off',
|
|
20
|
+
0x37: 'press_high',
|
|
21
|
+
0x38: 'press_low',
|
|
22
|
+
0x35: 'hold_high',
|
|
23
|
+
0x36: 'hold_low',
|
|
24
|
+
0x34: 'high_low_release',
|
|
25
|
+
0x63: 'cw_ww_release',
|
|
26
|
+
0x62: 'cw_dec_ww_inc',
|
|
27
|
+
0x64: 'ww_inc_cw_dec',
|
|
28
|
+
0x41: 'r_g_b',
|
|
29
|
+
0x42: 'b_g_r',
|
|
30
|
+
0x40: 'rgb_release',
|
|
31
|
+
};
|
|
32
|
+
if (!lookup.hasOwnProperty(commandID)) {
|
|
33
|
+
meta.logger.error(`Sunricher: missing command '0x${commandID.toString(16)}'`);
|
|
34
|
+
} else {
|
|
35
|
+
return {action: lookup[commandID]};
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
8
41
|
module.exports = [
|
|
9
42
|
{
|
|
10
43
|
zigbeeModel: ['SR-ZG9023A-EU'],
|
|
@@ -300,4 +333,14 @@ module.exports = [
|
|
|
300
333
|
toZigbee: [],
|
|
301
334
|
exposes: [e.action(['press_on', 'press_off', 'press_high', 'press_low', 'hold_high', 'hold_low', 'release'])],
|
|
302
335
|
},
|
|
336
|
+
{
|
|
337
|
+
fingerprint: [{modelID: 'GreenPower_2', ieeeAddr: /^0x00000000aaf.....$/}],
|
|
338
|
+
model: 'SR-ZGP2801K-5C',
|
|
339
|
+
vendor: 'Sunricher',
|
|
340
|
+
description: 'Pushbutton transmitter module',
|
|
341
|
+
fromZigbee: [fzLocal.sunricher_SRZGP2801K45C],
|
|
342
|
+
toZigbee: [],
|
|
343
|
+
exposes: [e.action(['press_on', 'press_off', 'press_high', 'press_low', 'hold_high', 'hold_low', 'high_low_release',
|
|
344
|
+
'cw_ww_release', 'cw_dec_ww_inc', 'ww_inc_cw_dec', 'r_g_b', 'b_g_r', 'rgb_release'])],
|
|
345
|
+
},
|
|
303
346
|
];
|
package/devices/trust.js
CHANGED
|
@@ -5,6 +5,20 @@ const extend = require('../lib/extend');
|
|
|
5
5
|
const e = exposes.presets;
|
|
6
6
|
|
|
7
7
|
module.exports = [
|
|
8
|
+
{
|
|
9
|
+
fingerprint: [{modelID: 'SmokeSensor-EM', manufacturerName: 'Trust'}],
|
|
10
|
+
model: 'ZSDR-850',
|
|
11
|
+
vendor: 'Trust',
|
|
12
|
+
description: 'Smoke detector',
|
|
13
|
+
fromZigbee: [fz.ias_smoke_alarm_1, fz.battery],
|
|
14
|
+
toZigbee: [],
|
|
15
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
16
|
+
const endpoint = device.getEndpoint(1);
|
|
17
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
18
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
19
|
+
},
|
|
20
|
+
exposes: [e.smoke(), e.battery_low(), e.battery()],
|
|
21
|
+
},
|
|
8
22
|
{
|
|
9
23
|
zigbeeModel: ['WATER_TPV14'],
|
|
10
24
|
model: 'ZWLD-100',
|
package/devices/tuya.js
CHANGED
|
@@ -716,13 +716,7 @@ module.exports = [
|
|
|
716
716
|
const endpoint = device.getEndpoint(1);
|
|
717
717
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
|
|
718
718
|
},
|
|
719
|
-
exposes: (
|
|
720
|
-
if (device && device.manufacturerName === '_TZE200_pisltm67') {
|
|
721
|
-
return [e.illuminance_lux(), e.linkquality()];
|
|
722
|
-
} else {
|
|
723
|
-
return [e.battery(), e.illuminance_lux(), e.battery_low(), e.linkquality()];
|
|
724
|
-
}
|
|
725
|
-
},
|
|
719
|
+
exposes: [e.battery(), e.illuminance_lux(), e.battery_low(), e.linkquality()],
|
|
726
720
|
},
|
|
727
721
|
{
|
|
728
722
|
zigbeeModel: ['TS130F'],
|