zigbee-herdsman-converters 14.0.538 → 14.0.541
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/lellki.js +3 -0
- package/devices/lonsonho.js +1 -1
- package/devices/niko.js +6 -0
- package/devices/owon.js +108 -0
- package/devices/paulmann.js +5 -5
- package/devices/philips.js +11 -2
- package/devices/sengled.js +0 -1
- package/devices/sunricher.js +43 -0
- package/devices/tuya.js +4 -10
- package/devices/zemismart.js +3 -0
- package/lib/ota/inovelli.js +3 -3
- 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/lellki.js
CHANGED
|
@@ -23,6 +23,9 @@ module.exports = [
|
|
|
23
23
|
return {l1: 1, l2: 2, l3: 3, l4: 4, l5: 5};
|
|
24
24
|
},
|
|
25
25
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
26
|
+
await device.getEndpoint(1).read('genBasic', [
|
|
27
|
+
'manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
|
|
28
|
+
|
|
26
29
|
for (const ID of [1, 2, 3, 4, 5]) {
|
|
27
30
|
await reporting.bind(device.getEndpoint(ID), coordinatorEndpoint, ['genOnOff']);
|
|
28
31
|
}
|
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/niko.js
CHANGED
|
@@ -227,5 +227,11 @@ module.exports = [
|
|
|
227
227
|
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.command_move, fz.command_stop],
|
|
228
228
|
toZigbee: [tz.light_onoff_brightness, tz.level_config],
|
|
229
229
|
exposes: [e.light_brightness().withLevelConfig()],
|
|
230
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
231
|
+
const endpoint = device.getEndpoint(1);
|
|
232
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
233
|
+
await reporting.onOff(endpoint);
|
|
234
|
+
await reporting.brightness(endpoint);
|
|
235
|
+
},
|
|
230
236
|
},
|
|
231
237
|
];
|
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/sengled.js
CHANGED
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/tuya.js
CHANGED
|
@@ -14,7 +14,7 @@ const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak',
|
|
|
14
14
|
'_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc',
|
|
15
15
|
'_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_kx0pris5', '_TZ3000_amdymr7l', '_TZ3000_z1pnpsdo', '_TZ3000_ksw8qtmt',
|
|
16
16
|
'_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw', '_TZ3000_ko6v90pg', '_TZ3000_f1bapcit',
|
|
17
|
-
'_TZ3000_cjrngdr3', '_TZ3000_zloso4jk', '_TZ3000_r6buo8ba'];
|
|
17
|
+
'_TZ3000_cjrngdr3', '_TZ3000_zloso4jk', '_TZ3000_r6buo8ba', '_TZ3000_iksasdbv', '_TZ3000_dd8wwzcy'];
|
|
18
18
|
|
|
19
19
|
const tzLocal = {
|
|
20
20
|
TS0504B_color: {
|
|
@@ -247,7 +247,7 @@ const fzLocal = {
|
|
|
247
247
|
case 116: // report confirmation
|
|
248
248
|
break;
|
|
249
249
|
case 121: // running state
|
|
250
|
-
result.
|
|
250
|
+
result.motor_state = {0: 'OPENING', 1: 'STOPPED', 2: 'CLOSING'}[value];
|
|
251
251
|
result.running = (value !== 1) ? true : false;
|
|
252
252
|
break;
|
|
253
253
|
default: // Unknown code
|
|
@@ -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'],
|
|
@@ -2598,7 +2592,7 @@ module.exports = [
|
|
|
2598
2592
|
exposes: [
|
|
2599
2593
|
e.cover_position().setAccess('position', ea.STATE_SET),
|
|
2600
2594
|
exposes.enum('goto_positon', ea.SET, ['25', '50', '75', 'FAVORITE']),
|
|
2601
|
-
exposes.enum('
|
|
2595
|
+
exposes.enum('motor_state', ea.STATE, ['OPENING', 'CLOSING', 'STOPPED']),
|
|
2602
2596
|
exposes.numeric('active_power', ea.STATE).withDescription('Active power').withUnit('mWt'),
|
|
2603
2597
|
exposes.numeric('cycle_count', ea.STATE).withDescription('Cycle count'),
|
|
2604
2598
|
exposes.numeric('cycle_time', ea.STATE).withDescription('Cycle time').withUnit('ms'),
|
package/devices/zemismart.js
CHANGED
|
@@ -144,6 +144,9 @@ module.exports = [
|
|
|
144
144
|
},
|
|
145
145
|
meta: {multiEndpoint: true},
|
|
146
146
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
147
|
+
await device.getEndpoint(1).read('genBasic', [
|
|
148
|
+
'manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
|
|
149
|
+
|
|
147
150
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
148
151
|
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
149
152
|
await reporting.onOff(device.getEndpoint(1));
|
package/lib/ota/inovelli.js
CHANGED
|
@@ -18,8 +18,8 @@ async function getImageMeta(current, logger, device) {
|
|
|
18
18
|
.sort((a, b) => {
|
|
19
19
|
const aRadix = a.version.match(/[A-F]/) ? 16 : 10;
|
|
20
20
|
const bRadix = b.version.match(/[A-F]/) ? 16 : 10;
|
|
21
|
-
const aVersion =
|
|
22
|
-
const bVersion =
|
|
21
|
+
const aVersion = parseFloat(a.version, aRadix);
|
|
22
|
+
const bVersion = parseFloat(b.version, bRadix);
|
|
23
23
|
// doesn't matter which order they are in
|
|
24
24
|
if (aVersion < bVersion) {
|
|
25
25
|
return -1;
|
|
@@ -37,7 +37,7 @@ async function getImageMeta(current, logger, device) {
|
|
|
37
37
|
}
|
|
38
38
|
// version in the firmare removes the zero padding and support hex versioning
|
|
39
39
|
return {
|
|
40
|
-
fileVersion:
|
|
40
|
+
fileVersion: parseFloat(image.version, image.version.match(/[A-F]/) ? 16 : 10),
|
|
41
41
|
url: image.firmware,
|
|
42
42
|
};
|
|
43
43
|
}
|