zigbee-herdsman-converters 14.0.691 → 14.0.692
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 +30 -2
- package/converters/toZigbee.js +1 -1
- package/devices/bosch.js +35 -7
- package/devices/develco.js +1 -0
- package/devices/ledvance.js +1 -1
- package/devices/legrand.js +5 -5
- package/devices/lidl.js +1 -1
- package/devices/namron.js +22 -0
- package/devices/sinope.js +27 -0
- package/devices/tuya.js +1 -0
- package/devices/xiaomi.js +55 -9
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -750,6 +750,7 @@ const converters = {
|
|
|
750
750
|
{key: 'activePower', name: 'power', factor: 'acPower'},
|
|
751
751
|
{key: 'activePowerPhB', name: 'power_phase_b', factor: 'acPower'},
|
|
752
752
|
{key: 'activePowerPhC', name: 'power_phase_c', factor: 'acPower'},
|
|
753
|
+
{key: 'apparentPower', name: 'power_apparent', factor: 'acPower'},
|
|
753
754
|
{key: 'rmsCurrent', name: 'current', factor: 'acCurrent'},
|
|
754
755
|
{key: 'rmsCurrentPhB', name: 'current_phase_b', factor: 'acCurrent'},
|
|
755
756
|
{key: 'rmsCurrentPhC', name: 'current_phase_c', factor: 'acCurrent'},
|
|
@@ -5448,6 +5449,9 @@ const converters = {
|
|
|
5448
5449
|
61: 'all',
|
|
5449
5450
|
};
|
|
5450
5451
|
}
|
|
5452
|
+
if (['WS-USC02'].includes(model.model)) {
|
|
5453
|
+
buttonLookup = {41: 'top', 42: 'bottom', 51: 'both'};
|
|
5454
|
+
}
|
|
5451
5455
|
|
|
5452
5456
|
const action = actionLookup[msg.data['presentValue']];
|
|
5453
5457
|
if (buttonLookup) {
|
|
@@ -5724,8 +5728,9 @@ const converters = {
|
|
|
5724
5728
|
type: ['attributeReport', 'readResponse'],
|
|
5725
5729
|
options: [exposes.options.invert_cover()],
|
|
5726
5730
|
convert: (model, msg, publish, options, meta) => {
|
|
5727
|
-
if (model.model === 'ZNCLDJ12LM'
|
|
5728
|
-
|
|
5731
|
+
if ((model.model === 'ZNCLDJ12LM' || model.model === 'ZNCLDJ14LM') &&
|
|
5732
|
+
msg.type === 'attributeReport' && [0, 2].includes(msg.data['presentValue'])) {
|
|
5733
|
+
// Incorrect reports from the device, ignore (re-read by onEvent of ZNCLDJ12LM and ZNCLDJ14LM)
|
|
5729
5734
|
// https://github.com/Koenkk/zigbee-herdsman-converters/pull/1427#issuecomment-663862724
|
|
5730
5735
|
return;
|
|
5731
5736
|
}
|
|
@@ -5779,6 +5784,29 @@ const converters = {
|
|
|
5779
5784
|
}
|
|
5780
5785
|
},
|
|
5781
5786
|
},
|
|
5787
|
+
xiaomi_curtain_hagl07_status: {
|
|
5788
|
+
cluster: 'genMultistateOutput',
|
|
5789
|
+
type: ['attributeReport'],
|
|
5790
|
+
convert: (model, msg, publish, options, meta) => {
|
|
5791
|
+
let running = false;
|
|
5792
|
+
const data = msg.data;
|
|
5793
|
+
const lookup = {
|
|
5794
|
+
0: 'closing',
|
|
5795
|
+
1: 'opening',
|
|
5796
|
+
2: 'stop',
|
|
5797
|
+
};
|
|
5798
|
+
if (data && data.hasOwnProperty('presentValue')) {
|
|
5799
|
+
const value = data['presentValue'];
|
|
5800
|
+
if (value < 2) {
|
|
5801
|
+
running = true;
|
|
5802
|
+
}
|
|
5803
|
+
return {
|
|
5804
|
+
motor_state: lookup[value],
|
|
5805
|
+
running: running,
|
|
5806
|
+
};
|
|
5807
|
+
}
|
|
5808
|
+
},
|
|
5809
|
+
},
|
|
5782
5810
|
xiaomi_curtain_acn002_status: {
|
|
5783
5811
|
cluster: 'genMultistateOutput',
|
|
5784
5812
|
type: ['attributeReport'],
|
package/converters/toZigbee.js
CHANGED
|
@@ -2503,7 +2503,7 @@ const converters = {
|
|
|
2503
2503
|
if (value.hasOwnProperty('auto_close')) opts.hand_open = value.auto_close;
|
|
2504
2504
|
if (value.hasOwnProperty('reset_move')) opts.reset_limits = value.reset_move;
|
|
2505
2505
|
|
|
2506
|
-
if (meta.mapped.model === 'ZNCLDJ12LM') {
|
|
2506
|
+
if (meta.mapped.model === 'ZNCLDJ12LM' || meta.mapped.model === 'ZNCLDJ14LM') {
|
|
2507
2507
|
await entity.write('genBasic', {0xff28: {value: opts.reverse_direction, type: 0x10}}, manufacturerOptions.xiaomi);
|
|
2508
2508
|
await entity.write('genBasic', {0xff29: {value: !opts.hand_open, type: 0x10}}, manufacturerOptions.xiaomi);
|
|
2509
2509
|
|
package/devices/bosch.js
CHANGED
|
@@ -4,6 +4,7 @@ const fz = require('../converters/fromZigbee');
|
|
|
4
4
|
const tz = require('../converters/toZigbee');
|
|
5
5
|
const reporting = require('../lib/reporting');
|
|
6
6
|
const utils = require('../lib/utils');
|
|
7
|
+
const constants = require('../lib/constants');
|
|
7
8
|
const e = exposes.presets;
|
|
8
9
|
const ea = exposes.access;
|
|
9
10
|
|
|
@@ -57,7 +58,7 @@ const tzLocal = {
|
|
|
57
58
|
if (value=='off') {
|
|
58
59
|
opMode = operatingModes.pause; // OperatingMode 5 = Pause
|
|
59
60
|
} else if (value == 'auto') {
|
|
60
|
-
opMode = operatingModes.automatic; //
|
|
61
|
+
opMode = operatingModes.automatic; // OperatingMode 0 = Automatic
|
|
61
62
|
}
|
|
62
63
|
await entity.write('hvacThermostat', {0x4007: {value: opMode, type: herdsman.Zcl.DataType.enum8}}, boschManufacturer);
|
|
63
64
|
return {state: {system_mode: value}};
|
|
@@ -139,9 +140,12 @@ const fzLocal = {
|
|
|
139
140
|
result.boost = (Object.keys(stateOffOn)[data[0x4043]]);
|
|
140
141
|
}
|
|
141
142
|
if (data.hasOwnProperty(0x4007)) {
|
|
142
|
-
const opModes = {0: 'auto', 1: 'heat', 2: '
|
|
143
|
+
const opModes = {0: 'auto', 1: 'heat', 2: 'unknown_2', 3: 'unknown_3', 4: 'unknown_4', 5: 'off'};
|
|
143
144
|
result.system_mode = opModes[data[0x4007]];
|
|
144
145
|
}
|
|
146
|
+
if (data.hasOwnProperty(0x4020)) {
|
|
147
|
+
result.pi_heating_demand = data[0x4020];
|
|
148
|
+
}
|
|
145
149
|
|
|
146
150
|
return result;
|
|
147
151
|
},
|
|
@@ -214,16 +218,17 @@ const definition = [
|
|
|
214
218
|
toZigbee: [
|
|
215
219
|
tz.thermostat_occupied_heating_setpoint,
|
|
216
220
|
tz.thermostat_local_temperature_calibration,
|
|
217
|
-
tz.thermostat_local_temperature,
|
|
218
221
|
tz.thermostat_keypad_lockout,
|
|
219
222
|
tzLocal.bosch_thermostat,
|
|
220
|
-
tzLocal.bosch_userInterface
|
|
223
|
+
tzLocal.bosch_userInterface,
|
|
224
|
+
],
|
|
221
225
|
exposes: [
|
|
222
226
|
exposes.climate()
|
|
223
|
-
.withLocalTemperature()
|
|
227
|
+
.withLocalTemperature(ea.STATE)
|
|
224
228
|
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5)
|
|
225
229
|
.withLocalTemperatureCalibration(-12, 12, 0.5)
|
|
226
|
-
.withSystemMode(['off', 'heat', 'auto'])
|
|
230
|
+
.withSystemMode(['off', 'heat', 'auto'])
|
|
231
|
+
.withPiHeatingDemand(ea.STATE),
|
|
227
232
|
exposes.binary('boost', ea.ALL, 'ON', 'OFF')
|
|
228
233
|
.withDescription('Activate Boost heating'),
|
|
229
234
|
exposes.binary('window_open', ea.ALL, 'ON', 'OFF')
|
|
@@ -246,10 +251,33 @@ const definition = [
|
|
|
246
251
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'hvacThermostat', 'hvacUserInterfaceCfg']);
|
|
247
252
|
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
248
253
|
await reporting.thermostatTemperature(endpoint);
|
|
254
|
+
await reporting.thermostatKeypadLockMode(endpoint);
|
|
249
255
|
await reporting.batteryPercentageRemaining(endpoint);
|
|
250
256
|
|
|
257
|
+
// report operating_mode (system_mode)
|
|
258
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
259
|
+
attribute: {ID: 0x4007, type: herdsman.Zcl.DataType.enum8},
|
|
260
|
+
minimumReportInterval: 0,
|
|
261
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
262
|
+
reportableChange: 1,
|
|
263
|
+
}], boschManufacturer);
|
|
264
|
+
// report pi_heating_demand (valve opening)
|
|
265
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
266
|
+
attribute: {ID: 0x4020, type: herdsman.Zcl.DataType.enum8},
|
|
267
|
+
minimumReportInterval: 0,
|
|
268
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
269
|
+
reportableChange: 1,
|
|
270
|
+
}], boschManufacturer);
|
|
271
|
+
// report window_open
|
|
272
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
273
|
+
attribute: {ID: 0x4042, type: herdsman.Zcl.DataType.enum8},
|
|
274
|
+
minimumReportInterval: 0,
|
|
275
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
276
|
+
reportableChange: 1,
|
|
277
|
+
}], boschManufacturer);
|
|
278
|
+
|
|
251
279
|
await endpoint.read('hvacThermostat', ['localTemperatureCalibration']);
|
|
252
|
-
await endpoint.read('hvacThermostat', [0x4007, 0x4042, 0x4043], boschManufacturer);
|
|
280
|
+
await endpoint.read('hvacThermostat', [0x4007, 0x4020, 0x4042, 0x4043], boschManufacturer);
|
|
253
281
|
|
|
254
282
|
await endpoint.read('hvacUserInterfaceCfg', ['keypadLockout']);
|
|
255
283
|
await endpoint.read('hvacUserInterfaceCfg', [0x400b, 0x403a, 0x403b], boschManufacturer);
|
package/devices/develco.js
CHANGED
package/devices/ledvance.js
CHANGED
|
@@ -48,7 +48,7 @@ module.exports = [
|
|
|
48
48
|
model: 'AC25697',
|
|
49
49
|
vendor: 'LEDVANCE',
|
|
50
50
|
description: 'SMART+ CLASSIC MULTICOLOUR 60 10W E27',
|
|
51
|
-
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
51
|
+
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], disablePowerOnBehavior: true}),
|
|
52
52
|
ota: ota.ledvance,
|
|
53
53
|
},
|
|
54
54
|
{
|
package/devices/legrand.js
CHANGED
|
@@ -209,8 +209,8 @@ module.exports = [
|
|
|
209
209
|
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
210
210
|
.withDescription('Specifies the maximum brightness value'),
|
|
211
211
|
exposes.binary('device_mode', ea.ALL, 'dimmer_on', 'dimmer_off').withDescription('Allow the device to change brightness'),
|
|
212
|
-
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to
|
|
213
|
-
see the switch in the dark`),
|
|
212
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` +
|
|
213
|
+
` see the switch in the dark`),
|
|
214
214
|
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on'),
|
|
215
215
|
e.power_on_behavior()],
|
|
216
216
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -231,7 +231,7 @@ module.exports = [
|
|
|
231
231
|
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.power_on_behavior],
|
|
232
232
|
toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.legrand_settingEnableLedIfOn,
|
|
233
233
|
tz.power_on_behavior],
|
|
234
|
-
exposes: [e.switch(), e.action(['identify']), e.power(),
|
|
234
|
+
exposes: [e.switch(), e.action(['identify']), e.power(), e.power_apparent(),
|
|
235
235
|
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the power socket is turned off,
|
|
236
236
|
allowing to see it in the dark`),
|
|
237
237
|
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the device is turned on'),
|
|
@@ -383,8 +383,8 @@ module.exports = [
|
|
|
383
383
|
toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn],
|
|
384
384
|
exposes: [e.switch().withEndpoint('left'),
|
|
385
385
|
e.switch().withEndpoint('right'),
|
|
386
|
-
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to
|
|
387
|
-
see the switch in the dark`),
|
|
386
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` +
|
|
387
|
+
` see the switch in the dark`),
|
|
388
388
|
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on')],
|
|
389
389
|
meta: {multiEndpoint: true},
|
|
390
390
|
configure: async (device, coordinatorEndpoint, logger) => {
|
package/devices/lidl.js
CHANGED
|
@@ -671,7 +671,7 @@ module.exports = [
|
|
|
671
671
|
model: 'HG06106C',
|
|
672
672
|
vendor: 'Lidl',
|
|
673
673
|
description: 'Livarno Lux E27 bulb RGB',
|
|
674
|
-
...extend.light_onoff_brightness_colortemp_color({disableColorTempStartup: true}),
|
|
674
|
+
...extend.light_onoff_brightness_colortemp_color({disableColorTempStartup: true, disablePowerOnBehavior: true}),
|
|
675
675
|
meta: {applyRedFix: true, enhancedHue: false},
|
|
676
676
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
677
677
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
package/devices/namron.js
CHANGED
|
@@ -590,6 +590,28 @@ module.exports = [
|
|
|
590
590
|
await endpoint.read('hvacThermostat', [0x2001, 0x2002], options);
|
|
591
591
|
},
|
|
592
592
|
},
|
|
593
|
+
{
|
|
594
|
+
zigbeeModel: ['4512735'],
|
|
595
|
+
model: '4512735',
|
|
596
|
+
vendor: 'Namron',
|
|
597
|
+
description: 'Multiprise with 4 AC outlets and 2 USB super charging ports (16A)',
|
|
598
|
+
fromZigbee: [fz.on_off],
|
|
599
|
+
toZigbee: [tz.on_off],
|
|
600
|
+
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
|
|
601
|
+
e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5')],
|
|
602
|
+
endpoint: (device) => {
|
|
603
|
+
return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5};
|
|
604
|
+
},
|
|
605
|
+
meta: {multiEndpoint: true},
|
|
606
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
607
|
+
for (const ID of [1, 2, 3, 4, 5]) {
|
|
608
|
+
const endpoint = device.getEndpoint(ID);
|
|
609
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
610
|
+
}
|
|
611
|
+
device.powerSource = 'Mains (single phase)';
|
|
612
|
+
device.save();
|
|
613
|
+
},
|
|
614
|
+
},
|
|
593
615
|
{
|
|
594
616
|
zigbeeModel: ['5401392', '5401396', '5401393', '5401397', '5401394', '5401398', '5401395', '5401399', '5401395'],
|
|
595
617
|
model: '540139X',
|
package/devices/sinope.js
CHANGED
|
@@ -990,4 +990,31 @@ module.exports = [
|
|
|
990
990
|
await reporting.brightness(endpoint); // valve position
|
|
991
991
|
},
|
|
992
992
|
},
|
|
993
|
+
{
|
|
994
|
+
zigbeeModel: ['VA4220ZB'],
|
|
995
|
+
model: 'VA4220ZB',
|
|
996
|
+
vendor: 'Sinopé',
|
|
997
|
+
description: 'Sedna smart water valve',
|
|
998
|
+
fromZigbee: [fz.ignore_iaszone_statuschange, fz.cover_position_via_brightness, fz.cover_state_via_onoff,
|
|
999
|
+
fz.battery, fz.metering],
|
|
1000
|
+
toZigbee: [tz.cover_via_brightness],
|
|
1001
|
+
meta: {battery: {voltageToPercentage: {min: 5400, max: 6800}}},
|
|
1002
|
+
exposes: [e.valve_switch(), e.valve_position(), e.battery_low(), e.battery(), e.battery_voltage()],
|
|
1003
|
+
configure: async (device, coordinatorEndpoint) => {
|
|
1004
|
+
const endpoint = device.getEndpoint(1);
|
|
1005
|
+
const binds = [
|
|
1006
|
+
'genBasic', 'genGroups', 'genOnOff', 'ssIasZone', 'genLevelCtrl',
|
|
1007
|
+
'genPowerCfg', 'seMetering', 'manuSpecificSinope'];
|
|
1008
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
1009
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
1010
|
+
await reporting.onOff(endpoint);
|
|
1011
|
+
await reporting.brightness(endpoint); // valve position
|
|
1012
|
+
try {
|
|
1013
|
+
await reporting.batteryVoltage(endpoint);
|
|
1014
|
+
} catch (error) {/* Do Nothing */}
|
|
1015
|
+
try {
|
|
1016
|
+
await reporting.batteryAlarmState(endpoint);
|
|
1017
|
+
} catch (error) {/* Do Nothing */}
|
|
1018
|
+
},
|
|
1019
|
+
},
|
|
993
1020
|
];
|
package/devices/tuya.js
CHANGED
|
@@ -1207,6 +1207,7 @@ module.exports = [
|
|
|
1207
1207
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ojzhk75b'},
|
|
1208
1208
|
{modelID: 'TS0601', manufacturerName: '_TZE200_swaamsoy'},
|
|
1209
1209
|
{modelID: 'TS0601', manufacturerName: '_TZE200_3p5ydos3'},
|
|
1210
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_p0gzbqct'},
|
|
1210
1211
|
],
|
|
1211
1212
|
model: 'TS0601_dimmer',
|
|
1212
1213
|
vendor: 'TuYa',
|
package/devices/xiaomi.js
CHANGED
|
@@ -441,6 +441,7 @@ module.exports = [
|
|
|
441
441
|
fromZigbee: [fz.temperature, fz.humidity, fzLocal.aqara_s1_pm25, fzLocal.aqara_s1_co2],
|
|
442
442
|
toZigbee: [],
|
|
443
443
|
exposes: [e.temperature(), e.humidity(), e.pm25(), e.co2()],
|
|
444
|
+
ota: ota.zigbeeOTA,
|
|
444
445
|
},
|
|
445
446
|
{
|
|
446
447
|
zigbeeModel: ['lumi.magnet.acn001'],
|
|
@@ -693,7 +694,8 @@ module.exports = [
|
|
|
693
694
|
exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled']).withDescription('Decoupled mode'),
|
|
694
695
|
exposes.enum('mode_switch', ea.ALL, ['anti_flicker_mode', 'quick_mode'])
|
|
695
696
|
.withDescription('Anti flicker mode can be used to solve blinking issues of some lights.' +
|
|
696
|
-
'Quick mode makes the device respond faster.')
|
|
697
|
+
'Quick mode makes the device respond faster.'),
|
|
698
|
+
e.power_outage_count(), e.device_temperature().withAccess(ea.STATE)],
|
|
697
699
|
onEvent: preventReset,
|
|
698
700
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
699
701
|
const endpoint1 = device.getEndpoint(1);
|
|
@@ -707,19 +709,35 @@ module.exports = [
|
|
|
707
709
|
model: 'WS-USC02',
|
|
708
710
|
vendor: 'Xiaomi',
|
|
709
711
|
description: 'Aqara smart wall switch (no neutral, double rocker)',
|
|
710
|
-
|
|
711
|
-
|
|
712
|
+
fromZigbee: [fz.on_off, fz.xiaomi_multistate_action, fz.aqara_opple],
|
|
713
|
+
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_flip_indicator_light, tz.aqara_switch_mode_switch],
|
|
714
|
+
exposes: [
|
|
715
|
+
e.switch().withEndpoint('top'),
|
|
716
|
+
e.switch().withEndpoint('bottom'),
|
|
717
|
+
exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
|
|
718
|
+
.withDescription('Decoupled mode for top button')
|
|
719
|
+
.withEndpoint('top'),
|
|
720
|
+
exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
|
|
721
|
+
.withDescription('Decoupled mode for bottom button')
|
|
722
|
+
.withEndpoint('bottom'),
|
|
723
|
+
exposes.enum('mode_switch', ea.ALL, ['anti_flicker_mode', 'quick_mode'])
|
|
724
|
+
.withDescription(
|
|
725
|
+
'Anti flicker mode can be used to solve blinking issues of some lights.' +
|
|
726
|
+
'Quick mode makes the device respond faster.',
|
|
727
|
+
),
|
|
728
|
+
e.power_outage_count(),
|
|
729
|
+
e.device_temperature().withAccess(ea.STATE),
|
|
730
|
+
e.flip_indicator_light(),
|
|
731
|
+
e.action(['single_top', 'single_bottom', 'single_both', 'double_top', 'double_bottom', 'double_both'])],
|
|
712
732
|
meta: {multiEndpoint: true},
|
|
713
733
|
endpoint: (device) => {
|
|
714
734
|
return {'top': 1, 'bottom': 2};
|
|
715
735
|
},
|
|
736
|
+
onEvent: preventReset,
|
|
716
737
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
const endpoint2 = device.getEndpoint(2);
|
|
721
|
-
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
|
|
722
|
-
await reporting.onOff(endpoint2);
|
|
738
|
+
await device.getEndpoint(1).write(
|
|
739
|
+
'aqaraOpple', {mode: 1}, {manufacturerCode: 0x115f, disableResponse: true},
|
|
740
|
+
);
|
|
723
741
|
},
|
|
724
742
|
ota: ota.zigbeeOTA,
|
|
725
743
|
},
|
|
@@ -1862,6 +1880,27 @@ module.exports = [
|
|
|
1862
1880
|
.withDescription('The current state of the motor.'), e.power_outage_count()],
|
|
1863
1881
|
ota: ota.zigbeeOTA,
|
|
1864
1882
|
},
|
|
1883
|
+
{
|
|
1884
|
+
zigbeeModel: ['lumi.curtain.hagl07'],
|
|
1885
|
+
model: 'ZNCLDJ14LM',
|
|
1886
|
+
vendor: 'Xiaomi',
|
|
1887
|
+
description: 'Aqara C2 curtain motor',
|
|
1888
|
+
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_curtain_position, fz.xiaomi_curtain_position_tilt, fz.xiaomi_curtain_hagl07_status],
|
|
1889
|
+
toZigbee: [tz.xiaomi_curtain_position_state, tz.xiaomi_curtain_options],
|
|
1890
|
+
onEvent: async (type, data, device) => {
|
|
1891
|
+
// The position (genAnalogOutput.presentValue) reported via an attribute contains an invaid value
|
|
1892
|
+
// however when reading it will provide the correct value.
|
|
1893
|
+
if (data.type === 'attributeReport' && data.cluster === 'genAnalogOutput') {
|
|
1894
|
+
await device.endpoints[0].read('genAnalogOutput', ['presentValue']);
|
|
1895
|
+
}
|
|
1896
|
+
},
|
|
1897
|
+
exposes: [e.cover_position().setAccess('state', ea.ALL),
|
|
1898
|
+
exposes.binary('running', ea.STATE, true, false)
|
|
1899
|
+
.withDescription('Whether the motor is moving or not'),
|
|
1900
|
+
exposes.enum('motor_state', ea.STATE, ['closing', 'opening', 'stop'])
|
|
1901
|
+
.withDescription('The current state of the motor.'), e.power_outage_count()],
|
|
1902
|
+
ota: ota.zigbeeOTA,
|
|
1903
|
+
},
|
|
1865
1904
|
{
|
|
1866
1905
|
zigbeeModel: ['lumi.curtain.acn002'],
|
|
1867
1906
|
model: 'ZNJLBL01LM',
|
|
@@ -1944,6 +1983,10 @@ module.exports = [
|
|
|
1944
1983
|
.withDescription('Enabling prevents both relais being on at the same time'),
|
|
1945
1984
|
],
|
|
1946
1985
|
ota: ota.zigbeeOTA,
|
|
1986
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1987
|
+
device.powerSource = 'Mains (single phase)';
|
|
1988
|
+
device.save();
|
|
1989
|
+
},
|
|
1947
1990
|
},
|
|
1948
1991
|
{
|
|
1949
1992
|
zigbeeModel: ['lumi.lock.acn02'],
|
|
@@ -2165,6 +2208,8 @@ module.exports = [
|
|
|
2165
2208
|
e.voltage().withAccess(ea.STATE), e.power_outage_memory(), e.led_disabled_night(), e.switch_type()],
|
|
2166
2209
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2167
2210
|
await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
2211
|
+
device.powerSource = 'Mains (single phase)';
|
|
2212
|
+
device.save();
|
|
2168
2213
|
},
|
|
2169
2214
|
ota: ota.zigbeeOTA,
|
|
2170
2215
|
},
|
|
@@ -2441,6 +2486,7 @@ module.exports = [
|
|
|
2441
2486
|
const endpoint1 = device.getEndpoint(1);
|
|
2442
2487
|
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
2443
2488
|
},
|
|
2489
|
+
ota: ota.zigbeeOTA,
|
|
2444
2490
|
},
|
|
2445
2491
|
{
|
|
2446
2492
|
zigbeeModel: ['lumi.sen_ill.agl01'],
|