@willieee802/zigbee-herdsman-converters 15.0.8-4.1
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/LICENSE +21 -0
- package/README.md +7 -0
- package/converters/fromZigbee.js +8439 -0
- package/converters/toZigbee.js +7162 -0
- package/devices/ITCommander.js +37 -0
- package/devices/RMC002.js +20 -0
- package/devices/acova.js +101 -0
- package/devices/acuity_brands_lighting.js +11 -0
- package/devices/adeo.js +256 -0
- package/devices/adurosmart.js +130 -0
- package/devices/aeotec.js +13 -0
- package/devices/airam.js +59 -0
- package/devices/ajax_online.js +49 -0
- package/devices/akuvox.js +28 -0
- package/devices/alchemy.js +18 -0
- package/devices/aldi.js +53 -0
- package/devices/alecto.js +98 -0
- package/devices/anchor.js +17 -0
- package/devices/atlantic.js +110 -0
- package/devices/atsmart.js +28 -0
- package/devices/aubess.js +21 -0
- package/devices/aurora_lighting.js +292 -0
- package/devices/automaton.js +44 -0
- package/devices/awox.js +184 -0
- package/devices/axis.js +22 -0
- package/devices/bankamp.js +11 -0
- package/devices/bega.js +22 -0
- package/devices/belkin.js +11 -0
- package/devices/bitron.js +334 -0
- package/devices/blaupunkt.js +27 -0
- package/devices/blitzwolf.js +47 -0
- package/devices/bosch.js +702 -0
- package/devices/brimate.js +15 -0
- package/devices/bseed.js +17 -0
- package/devices/bticino.js +118 -0
- package/devices/busch-jaeger.js +140 -0
- package/devices/byun.js +24 -0
- package/devices/calex.js +37 -0
- package/devices/candeo.js +49 -0
- package/devices/casaia.js +52 -0
- package/devices/centralite.js +359 -0
- package/devices/cleode.js +20 -0
- package/devices/cleverio.js +36 -0
- package/devices/climax.js +138 -0
- package/devices/commercial_electric.js +16 -0
- package/devices/connecte.js +46 -0
- package/devices/cree.js +11 -0
- package/devices/ctm.js +999 -0
- package/devices/current_products_corp.js +24 -0
- package/devices/custom_devices_diy.js +850 -0
- package/devices/cy-lighting.js +11 -0
- package/devices/danalock.js +26 -0
- package/devices/danfoss.js +340 -0
- package/devices/databyte.ch.js +55 -0
- package/devices/datek.js +246 -0
- package/devices/dawon_dns.js +338 -0
- package/devices/develco.js +868 -0
- package/devices/digi.js +14 -0
- package/devices/diyruz.js +305 -0
- package/devices/dlink.js +37 -0
- package/devices/dnake.js +11 -0
- package/devices/dresden_elektronik.js +47 -0
- package/devices/easyaccess.js +27 -0
- package/devices/eatonhalo_led.js +11 -0
- package/devices/echostar.js +25 -0
- package/devices/ecodim.js +145 -0
- package/devices/ecolink.js +21 -0
- package/devices/ecosmart.js +64 -0
- package/devices/ecozy.js +31 -0
- package/devices/edp.js +39 -0
- package/devices/eglo.js +25 -0
- package/devices/elko.js +176 -0
- package/devices/enbrighten.js +163 -0
- package/devices/enocean.js +52 -0
- package/devices/envilar.js +73 -0
- package/devices/essentialb.js +87 -0
- package/devices/eurotronic.js +48 -0
- package/devices/evanell.js +29 -0
- package/devices/evn.js +31 -0
- package/devices/evology.js +24 -0
- package/devices/evvr.js +17 -0
- package/devices/ewelink.js +184 -0
- package/devices/ezex.js +24 -0
- package/devices/fantem.js +77 -0
- package/devices/feibit.js +172 -0
- package/devices/fireangel.js +15 -0
- package/devices/frankever.js +23 -0
- package/devices/garza.js +11 -0
- package/devices/ge.js +111 -0
- package/devices/gewiss.js +48 -0
- package/devices/gidealed.js +11 -0
- package/devices/giderwel.js +11 -0
- package/devices/giex.js +222 -0
- package/devices/girier.js +19 -0
- package/devices/gledopto.js +756 -0
- package/devices/gmy.js +11 -0
- package/devices/gs.js +29 -0
- package/devices/halemeier.js +18 -0
- package/devices/hampton_bay.js +37 -0
- package/devices/heiman.js +805 -0
- package/devices/hej.js +107 -0
- package/devices/hfh.js +11 -0
- package/devices/hgkg.js +54 -0
- package/devices/hilux.js +11 -0
- package/devices/hive.js +524 -0
- package/devices/home_control_as.js +27 -0
- package/devices/hommyn.js +24 -0
- package/devices/honyar.js +29 -0
- package/devices/hornbach.js +53 -0
- package/devices/hzc.js +21 -0
- package/devices/hzc_electric.js +42 -0
- package/devices/icasa.js +121 -0
- package/devices/idinio.js +19 -0
- package/devices/ihorn.js +61 -0
- package/devices/ikea.js +1168 -0
- package/devices/ilightsin.js +11 -0
- package/devices/iluminize.js +262 -0
- package/devices/ilux.js +11 -0
- package/devices/immax.js +203 -0
- package/devices/innr.js +705 -0
- package/devices/inovelli.js +1315 -0
- package/devices/insta.js +110 -0
- package/devices/iolloi.js +20 -0
- package/devices/iotperfect.js +20 -0
- package/devices/iris.js +180 -0
- package/devices/istar.js +20 -0
- package/devices/jasco.js +55 -0
- package/devices/javis.js +37 -0
- package/devices/jethome.js +48 -0
- package/devices/jiawen.js +18 -0
- package/devices/jumitech.js +18 -0
- package/devices/jxuan.js +49 -0
- package/devices/kami.js +15 -0
- package/devices/keen_home.js +80 -0
- package/devices/klikaanklikuit.js +17 -0
- package/devices/kmpcil.js +148 -0
- package/devices/konke.js +141 -0
- package/devices/ksentry.js +17 -0
- package/devices/kurvia.js +17 -0
- package/devices/kwikset.js +120 -0
- package/devices/lanesto.js +11 -0
- package/devices/lds.js +11 -0
- package/devices/led_trading.js +69 -0
- package/devices/ledvance.js +353 -0
- package/devices/leedarson.js +130 -0
- package/devices/legrand.js +554 -0
- package/devices/lellki.js +146 -0
- package/devices/letsled.js +11 -0
- package/devices/letv.js +18 -0
- package/devices/leviton.js +142 -0
- package/devices/lg.js +18 -0
- package/devices/lidl.js +1000 -0
- package/devices/lifecontrol.js +92 -0
- package/devices/lightsolutions.js +37 -0
- package/devices/linkind.js +205 -0
- package/devices/livingwise.js +59 -0
- package/devices/livolo.js +286 -0
- package/devices/lixee.js +779 -0
- package/devices/lonsonho.js +218 -0
- package/devices/lubeez.js +18 -0
- package/devices/lupus.js +74 -0
- package/devices/lutron.js +32 -0
- package/devices/lux.js +40 -0
- package/devices/m-elec.js +18 -0
- package/devices/makegood.js +51 -0
- package/devices/matcall_bv.js +18 -0
- package/devices/meazon.js +47 -0
- package/devices/mercator.js +225 -0
- package/devices/miboxer.js +72 -0
- package/devices/micromatic.js +29 -0
- package/devices/moes.js +400 -0
- package/devices/mycket.js +11 -0
- package/devices/m/303/274ller_licht.js +220 -0
- package/devices/namron.js +774 -0
- package/devices/nanoleaf.js +11 -0
- package/devices/neo.js +86 -0
- package/devices/net2grid.js +29 -0
- package/devices/netvox.js +35 -0
- package/devices/niko.js +314 -0
- package/devices/ninja_blocks.js +24 -0
- package/devices/niviss.js +11 -0
- package/devices/nodon.js +109 -0
- package/devices/nordtronic.js +30 -0
- package/devices/nous.js +88 -0
- package/devices/novo.js +17 -0
- package/devices/nue_3a.js +417 -0
- package/devices/nyce.js +67 -0
- package/devices/onesti.js +59 -0
- package/devices/openlumi.js +22 -0
- package/devices/orvibo.js +515 -0
- package/devices/osram.js +519 -0
- package/devices/oujiabao.js +15 -0
- package/devices/owon.js +352 -0
- package/devices/ozsmartthings.js +11 -0
- package/devices/paul_neuhaus.js +96 -0
- package/devices/paulmann.js +158 -0
- package/devices/peq.js +24 -0
- package/devices/perenio.js +413 -0
- package/devices/philips.js +3118 -0
- package/devices/plaid.js +25 -0
- package/devices/plugwise.js +173 -0
- package/devices/popp.js +10 -0
- package/devices/profalux.js +47 -0
- package/devices/prolight.js +54 -0
- package/devices/qmotion.js +33 -0
- package/devices/qoto.js +113 -0
- package/devices/quotra.js +18 -0
- package/devices/rademacher.js +18 -0
- package/devices/rgb_genie.js +119 -0
- package/devices/robb.js +335 -0
- package/devices/roome.js +15 -0
- package/devices/rtx.js +90 -0
- package/devices/salus_controls.js +137 -0
- package/devices/samotech.js +93 -0
- package/devices/saswell.js +58 -0
- package/devices/scanproducts.js +32 -0
- package/devices/schlage.js +24 -0
- package/devices/schneider_electric.js +1039 -0
- package/devices/schwaiger.js +62 -0
- package/devices/seastar_intelligence.js +16 -0
- package/devices/securifi.js +39 -0
- package/devices/sengled.js +332 -0
- package/devices/sercomm.js +140 -0
- package/devices/shenzhen_homa.js +53 -0
- package/devices/shinasystem.js +686 -0
- package/devices/siglis.js +440 -0
- package/devices/sinope.js +1257 -0
- package/devices/siterwell.js +46 -0
- package/devices/skydance.js +112 -0
- package/devices/slv.js +27 -0
- package/devices/smart9.js +27 -0
- package/devices/smart_home_pty.js +18 -0
- package/devices/smartenit.js +42 -0
- package/devices/smartthings.js +495 -0
- package/devices/smartwings.js +24 -0
- package/devices/sohan_electric.js +13 -0
- package/devices/solaredge.js +11 -0
- package/devices/somgoms.js +47 -0
- package/devices/sonoff.js +262 -0
- package/devices/spotmau.js +36 -0
- package/devices/sprut.js +317 -0
- package/devices/stelpro.js +216 -0
- package/devices/sunricher.js +625 -0
- package/devices/swann.js +33 -0
- package/devices/sylvania.js +200 -0
- package/devices/tci.js +25 -0
- package/devices/technicolor.js +47 -0
- package/devices/terncy.js +64 -0
- package/devices/the_light_group.js +70 -0
- package/devices/third_reality.js +195 -0
- package/devices/titan_products.js +22 -0
- package/devices/tplink.js +42 -0
- package/devices/trust.js +114 -0
- package/devices/tubeszb.js +20 -0
- package/devices/tuya.js +4215 -0
- package/devices/ubisys.js +938 -0
- package/devices/uhome.js +25 -0
- package/devices/universal_electronics_inc.js +119 -0
- package/devices/urlighting.js +12 -0
- package/devices/useelink.js +52 -0
- package/devices/vbled.js +18 -0
- package/devices/vesternet.js +188 -0
- package/devices/viessmann.js +51 -0
- package/devices/villeroy_boch.js +18 -0
- package/devices/vimar.js +78 -0
- package/devices/visonic.js +80 -0
- package/devices/vrey.js +18 -0
- package/devices/wally.js +25 -0
- package/devices/waxman.js +45 -0
- package/devices/weiser.js +67 -0
- package/devices/weten.js +13 -0
- package/devices/wisdom.js +11 -0
- package/devices/woox.js +177 -0
- package/devices/wyze.js +23 -0
- package/devices/xiaomi.js +3223 -0
- package/devices/xinghuoyuan.js +11 -0
- package/devices/yale.js +227 -0
- package/devices/ynoa.js +68 -0
- package/devices/yookee.js +23 -0
- package/devices/ysrsai.js +26 -0
- package/devices/zemismart.js +254 -0
- package/devices/zen.js +34 -0
- package/devices/zipato.js +11 -0
- package/index.js +242 -0
- package/lib/color.js +784 -0
- package/lib/configureKey.js +944 -0
- package/lib/constants.js +316 -0
- package/lib/exposes.js +677 -0
- package/lib/extend.js +180 -0
- package/lib/kelvinToXy.js +1912 -0
- package/lib/legacy.js +2223 -0
- package/lib/light.js +111 -0
- package/lib/ota/OTA_URLs.md +119 -0
- package/lib/ota/common.js +476 -0
- package/lib/ota/index.js +10 -0
- package/lib/ota/inovelli.js +72 -0
- package/lib/ota/ledvance.js +52 -0
- package/lib/ota/lixee.js +57 -0
- package/lib/ota/salus.js +82 -0
- package/lib/ota/securifi.js +25 -0
- package/lib/ota/tradfri.js +45 -0
- package/lib/ota/ubisys.js +61 -0
- package/lib/ota/zigbeeOTA.js +161 -0
- package/lib/philips.js +667 -0
- package/lib/reporting.js +234 -0
- package/lib/store.js +57 -0
- package/lib/tuya.js +2027 -0
- package/lib/utils.js +527 -0
- package/lib/xiaomi.d.ts +11 -0
- package/lib/xiaomi.js +1288 -0
- package/lib/zosung.js +243 -0
- package/package.json +39 -0
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
const exposes = require('../lib/exposes');
|
|
2
|
+
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
|
+
const tz = require('../converters/toZigbee');
|
|
4
|
+
const reporting = require('../lib/reporting');
|
|
5
|
+
const extend = require('../lib/extend');
|
|
6
|
+
const e = exposes.presets;
|
|
7
|
+
const ea = exposes.access;
|
|
8
|
+
const ota = require('../lib/ota');
|
|
9
|
+
|
|
10
|
+
const readInitialBatteryState = async (type, data, device) => {
|
|
11
|
+
if (['deviceAnnounce'].includes(type)) {
|
|
12
|
+
const endpoint = device.getEndpoint(1);
|
|
13
|
+
const options = {manufacturerCode: 0x1021, disableDefaultResponse: true};
|
|
14
|
+
await endpoint.read('genPowerCfg', ['batteryVoltage'], options);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const tzLocal = {
|
|
19
|
+
auto_mode: {
|
|
20
|
+
key: ['auto_mode'],
|
|
21
|
+
convertSet: async (entity, key, value, meta) => {
|
|
22
|
+
const mode = {'off': 0x00, 'auto': 0x02, 'on_override': 0x03};
|
|
23
|
+
const payload = {data: Buffer.from([mode[value]])};
|
|
24
|
+
await entity.command('manuSpecificLegrandDevices3', 'command0', payload);
|
|
25
|
+
return {state: {'auto_mode': value}};
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
module.exports = [
|
|
31
|
+
{
|
|
32
|
+
zigbeeModel: [' Pocket remote\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'+
|
|
33
|
+
'\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
34
|
+
model: '067755',
|
|
35
|
+
vendor: 'Legrand',
|
|
36
|
+
description: 'Wireless and batteryless 4 scenes control',
|
|
37
|
+
fromZigbee: [fz.identify, fz.battery, fz.command_recall],
|
|
38
|
+
exposes: [e.battery(), e.action(['identify', 'recall_1_1'])],
|
|
39
|
+
toZigbee: [],
|
|
40
|
+
meta: {multiEndpoint: true, battery: {voltageToPercentage: '3V_2500'}, publishDuplicateTransaction: true},
|
|
41
|
+
onEvent: readInitialBatteryState,
|
|
42
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
43
|
+
const endpoint = device.getEndpoint(1);
|
|
44
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'genOnOff', 'genLevelCtrl']);
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
zigbeeModel: [' Dry contact\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'+
|
|
49
|
+
'\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
50
|
+
model: '412173',
|
|
51
|
+
description: 'DIN dry contactor module',
|
|
52
|
+
vendor: 'Legrand',
|
|
53
|
+
extend: extend.switch(),
|
|
54
|
+
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.legrand_cluster_fc01, fz.ignore_basic_report, fz.ignore_genOta],
|
|
55
|
+
toZigbee: [tz.legrand_deviceMode, tz.on_off, tz.legrand_identify, tz.electrical_measurement_power],
|
|
56
|
+
exposes: [exposes.switch().withState('state', true, 'On/off (works only if device is in "switch" mode)'),
|
|
57
|
+
e.power().withAccess(ea.STATE_GET), exposes.enum('device_mode', ea.ALL, ['switch', 'auto'])
|
|
58
|
+
.withDescription('switch: allow on/off, auto will use wired action via C1/C2 on contactor for example with HC/HP')],
|
|
59
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
60
|
+
const endpoint = device.getEndpoint(1);
|
|
61
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'haElectricalMeasurement']);
|
|
62
|
+
await reporting.onOff(endpoint);
|
|
63
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
64
|
+
await reporting.activePower(endpoint);
|
|
65
|
+
// Read configuration values that are not sent periodically as well as current power (activePower).
|
|
66
|
+
await endpoint.read('haElectricalMeasurement', ['activePower', 0xf000, 0xf001, 0xf002]);
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
zigbeeModel: [' Contactor\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'+
|
|
71
|
+
'\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
72
|
+
model: '412171',
|
|
73
|
+
description: 'DIN contactor module (BTicino FC80CC )',
|
|
74
|
+
vendor: 'Legrand',
|
|
75
|
+
extend: extend.switch(),
|
|
76
|
+
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.legrand_cluster_fc01, fz.ignore_basic_report, fz.ignore_genOta],
|
|
77
|
+
toZigbee: [tz.legrand_deviceMode, tz.on_off, tz.legrand_identify, tz.electrical_measurement_power, tzLocal.auto_mode],
|
|
78
|
+
exposes: [exposes.switch().withState('state', true, 'On/off (works only if device is in "switch" mode)'),
|
|
79
|
+
e.power().withAccess(ea.STATE_GET),
|
|
80
|
+
exposes.enum('device_mode', ea.ALL, ['switch', 'auto'])
|
|
81
|
+
.withDescription('Switch: allow manual on/off, auto uses contact\'s C1/C2 wired actions for Peak/Off-Peak ' +
|
|
82
|
+
'electricity rates'),
|
|
83
|
+
exposes.enum('auto_mode', ea.STATE_SET, ['off', 'auto', 'on_override'])
|
|
84
|
+
.withDescription('Off/auto/on (override) (works only if device is set to "auto" mode)')],
|
|
85
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
86
|
+
const endpoint = device.getEndpoint(1);
|
|
87
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'haElectricalMeasurement']);
|
|
88
|
+
await reporting.onOff(endpoint);
|
|
89
|
+
await reporting.activePower(endpoint);
|
|
90
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
zigbeeModel: [' Teleruptor\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'+
|
|
95
|
+
'\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
96
|
+
model: '412170',
|
|
97
|
+
description: 'DIN smart relay for light control (BTicino FC80RC ) ',
|
|
98
|
+
vendor: 'Legrand',
|
|
99
|
+
extend: extend.switch(),
|
|
100
|
+
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.legrand_cluster_fc01, fz.ignore_basic_report, fz.ignore_genOta],
|
|
101
|
+
toZigbee: [tz.legrand_deviceMode, tz.on_off, tz.legrand_identify, tz.electrical_measurement_power],
|
|
102
|
+
exposes: [exposes.switch().withState('state', true, 'On/off (works only if device is in "switch" mode)'),
|
|
103
|
+
e.power().withAccess(ea.STATE_GET), exposes.enum('device_mode', ea.ALL, ['switch', 'auto'])
|
|
104
|
+
.withDescription('switch: allow on/off, auto will use wired action via C1/C2 on teleruptor with buttons')],
|
|
105
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
106
|
+
const endpoint = device.getEndpoint(1);
|
|
107
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'haElectricalMeasurement']);
|
|
108
|
+
await reporting.onOff(endpoint);
|
|
109
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
110
|
+
await reporting.activePower(endpoint);
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
zigbeeModel: [' Shutters central remote switch'],
|
|
115
|
+
model: '067646',
|
|
116
|
+
vendor: 'Legrand',
|
|
117
|
+
description: 'Wireless shutter switch',
|
|
118
|
+
fromZigbee: [fz.identify, fz.ignore_basic_report, fz.command_cover_open, fz.command_cover_close, fz.command_cover_stop, fz.battery,
|
|
119
|
+
fz.legrand_binary_input_moving],
|
|
120
|
+
toZigbee: [],
|
|
121
|
+
ota: ota.zigbeeOTA,
|
|
122
|
+
exposes: [e.battery(), e.action(['identify', 'open', 'close', 'stop', 'moving', 'stopped'])],
|
|
123
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
124
|
+
const endpoint = device.getEndpoint(1);
|
|
125
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'genBinaryInput', 'closuresWindowCovering', 'genIdentify']);
|
|
126
|
+
},
|
|
127
|
+
onEvent: async (type, data, device, options) => {
|
|
128
|
+
await readInitialBatteryState(type, data, device);
|
|
129
|
+
|
|
130
|
+
if (data.type === 'commandCheckin' && data.cluster === 'genPollCtrl') {
|
|
131
|
+
const endpoint = device.getEndpoint(1);
|
|
132
|
+
const options = {manufacturerCode: 0x1021, disableDefaultResponse: true};
|
|
133
|
+
await endpoint.command('genPollCtrl', 'fastPollStop', {}, options);
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
zigbeeModel: [' Shutter switch with neutral\u0000\u0000\u0000'],
|
|
139
|
+
model: '067776',
|
|
140
|
+
vendor: 'Legrand',
|
|
141
|
+
description: 'Netatmo wired shutter switch',
|
|
142
|
+
fromZigbee: [fz.identify, fz.ignore_basic_report, fz.legrand_binary_input_moving, fz.cover_position_tilt],
|
|
143
|
+
toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.legrand_identify, tz.legrand_settingEnableLedInDark],
|
|
144
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
145
|
+
const endpoint = device.getEndpoint(1);
|
|
146
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genBinaryInput', 'closuresWindowCovering', 'genIdentify']);
|
|
147
|
+
await reporting.currentPositionLiftPercentage(endpoint);
|
|
148
|
+
},
|
|
149
|
+
exposes: [e.cover_position(),
|
|
150
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the power socket is turned off,
|
|
151
|
+
allowing to see it in the dark`)],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
// Some require coverInverted:
|
|
155
|
+
// - https://github.com/Koenkk/zigbee2mqtt/issues/15101#issuecomment-1356787490
|
|
156
|
+
// - https://github.com/Koenkk/zigbee2mqtt/issues/16090
|
|
157
|
+
fingerprint: [
|
|
158
|
+
{modelID: ' Shutter switch with neutral\u0000\u0000\u0000', softwareBuildID: '001a'},
|
|
159
|
+
{modelID: ' Shutter switch with neutral\u0000\u0000\u0000', softwareBuildID:
|
|
160
|
+
'00d\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u00000\u0012\u0002\u0000' +
|
|
161
|
+
'\t\u0007\u0000\u0018\u0002\u0003\b\u0000 \u00132\u0000\u0000\u0000\u0000X\u0002\n\u0000\u0000\u0000\u0000d' +
|
|
162
|
+
'\u0017\u0000\u0018\u0000'},
|
|
163
|
+
],
|
|
164
|
+
model: '067776_inverted',
|
|
165
|
+
vendor: 'Legrand',
|
|
166
|
+
description: 'Netatmo wired shutter switch',
|
|
167
|
+
fromZigbee: [fz.identify, fz.ignore_basic_report, fz.legrand_binary_input_moving, fz.cover_position_tilt],
|
|
168
|
+
toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.legrand_identify, tz.legrand_settingEnableLedInDark],
|
|
169
|
+
meta: {coverInverted: true},
|
|
170
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
171
|
+
const endpoint = device.getEndpoint(1);
|
|
172
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genBinaryInput', 'closuresWindowCovering', 'genIdentify']);
|
|
173
|
+
await reporting.currentPositionLiftPercentage(endpoint);
|
|
174
|
+
},
|
|
175
|
+
exposes: [e.cover_position()],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
zigbeeModel: [
|
|
179
|
+
' Remote switch\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
180
|
+
model: '067773',
|
|
181
|
+
vendor: 'Legrand',
|
|
182
|
+
// led blink RED when battery is low
|
|
183
|
+
description: 'Wireless remote switch',
|
|
184
|
+
fromZigbee: [fz.identify, fz.command_on, fz.command_off, fz.command_toggle, fz.legacy.cmd_move, fz.legacy.cmd_stop,
|
|
185
|
+
fz.battery],
|
|
186
|
+
exposes: [e.battery(), e.action(['identify', 'on', 'off', 'toggle', 'brightness_move_up',
|
|
187
|
+
'brightness_move_down', 'brightness_stop'])],
|
|
188
|
+
toZigbee: [],
|
|
189
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}, publishDuplicateTransaction: true},
|
|
190
|
+
onEvent: readInitialBatteryState,
|
|
191
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
192
|
+
const endpoint = device.getEndpoint(1);
|
|
193
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'genOnOff', 'genLevelCtrl']);
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
zigbeeModel: [' Double gangs remote switch\u0000\u0000\u0000\u0000'],
|
|
198
|
+
model: '067774',
|
|
199
|
+
vendor: 'Legrand',
|
|
200
|
+
description: 'Wireless double remote switch',
|
|
201
|
+
fromZigbee: [fz.identify, fz.command_on, fz.command_off, fz.command_toggle, fz.command_move, fz.command_stop, fz.battery],
|
|
202
|
+
exposes: [e.battery(),
|
|
203
|
+
e.action(['identify', 'on', 'off', 'toggle', 'brightness_move_up', 'brightness_move_down', 'brightness_stop'])],
|
|
204
|
+
toZigbee: [],
|
|
205
|
+
meta: {multiEndpoint: true, battery: {voltageToPercentage: '3V_2500'}, publishDuplicateTransaction: true},
|
|
206
|
+
onEvent: readInitialBatteryState,
|
|
207
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
208
|
+
const endpoint = device.getEndpoint(1);
|
|
209
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'genOnOff', 'genLevelCtrl']);
|
|
210
|
+
const endpoint2 = device.getEndpoint(2);
|
|
211
|
+
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
212
|
+
},
|
|
213
|
+
endpoint: (device) => {
|
|
214
|
+
return {left: 1, right: 2};
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
zigbeeModel: [' Remote toggle switch\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
219
|
+
model: '067694',
|
|
220
|
+
vendor: 'Legrand',
|
|
221
|
+
description: 'Remote toggle switch',
|
|
222
|
+
fromZigbee: [fz.identify, fz.command_on, fz.command_off, fz.command_toggle, fz.battery],
|
|
223
|
+
exposes: [e.battery(), e.action(['identify', 'on', 'off', 'toggle'])],
|
|
224
|
+
toZigbee: [],
|
|
225
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
226
|
+
const endpoint = device.getEndpoint(1);
|
|
227
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'genOnOff']);
|
|
228
|
+
},
|
|
229
|
+
onEvent: readInitialBatteryState,
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
zigbeeModel: [' Dimmer switch w/o neutral\u0000\u0000\u0000\u0000\u0000'],
|
|
233
|
+
model: '067771',
|
|
234
|
+
vendor: 'Legrand',
|
|
235
|
+
description: 'Wired switch without neutral',
|
|
236
|
+
extend: extend.light_onoff_brightness({noConfigure: true}),
|
|
237
|
+
fromZigbee: [fz.brightness, fz.identify, fz.on_off, fz.lighting_ballast_configuration, fz.legrand_cluster_fc01,
|
|
238
|
+
fz.power_on_behavior],
|
|
239
|
+
toZigbee: [tz.light_onoff_brightness, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn,
|
|
240
|
+
tz.legrand_deviceMode, tz.legrand_identify, tz.ballast_config, tz.power_on_behavior],
|
|
241
|
+
exposes: [e.light_brightness(),
|
|
242
|
+
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
243
|
+
.withDescription('Specifies the minimum brightness value'),
|
|
244
|
+
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
245
|
+
.withDescription('Specifies the maximum brightness value'),
|
|
246
|
+
exposes.binary('device_mode', ea.ALL, 'dimmer_on', 'dimmer_off').withDescription('Allow the device to change brightness'),
|
|
247
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` +
|
|
248
|
+
` see the switch in the dark`),
|
|
249
|
+
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on'),
|
|
250
|
+
e.power_on_behavior()],
|
|
251
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
252
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
253
|
+
const endpoint = device.getEndpoint(1);
|
|
254
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'genLevelCtrl',
|
|
255
|
+
'genBinaryInput', 'lightingBallastCfg']);
|
|
256
|
+
await reporting.onOff(endpoint);
|
|
257
|
+
await reporting.brightness(endpoint);
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
zigbeeModel: [' Connected outlet\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
262
|
+
model: '067775/741811',
|
|
263
|
+
vendor: 'Legrand',
|
|
264
|
+
ota: ota.zigbeeOTA,
|
|
265
|
+
description: 'Power socket with power consumption monitoring',
|
|
266
|
+
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.power_on_behavior],
|
|
267
|
+
toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.legrand_settingEnableLedIfOn,
|
|
268
|
+
tz.power_on_behavior],
|
|
269
|
+
exposes: [e.switch(), e.action(['identify']), e.power(), e.power_apparent(),
|
|
270
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the power socket is turned off,
|
|
271
|
+
allowing to see it in the dark`),
|
|
272
|
+
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the device is turned on'),
|
|
273
|
+
e.power_on_behavior()],
|
|
274
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
275
|
+
const endpoint = device.getEndpoint(1);
|
|
276
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'haElectricalMeasurement']);
|
|
277
|
+
await reporting.onOff(endpoint);
|
|
278
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
279
|
+
await reporting.activePower(endpoint);
|
|
280
|
+
try {
|
|
281
|
+
await reporting.apparentPower(endpoint);
|
|
282
|
+
} catch (e) {
|
|
283
|
+
// Some version/firmware don't seem to support this.
|
|
284
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/16732
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
zigbeeModel: [' Micromodule switch\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
290
|
+
model: '064888',
|
|
291
|
+
vendor: 'Legrand',
|
|
292
|
+
description: 'Wired micromodule switch',
|
|
293
|
+
extend: extend.switch(),
|
|
294
|
+
ota: ota.zigbeeOTA,
|
|
295
|
+
fromZigbee: [...extend.switch().fromZigbee, fz.identify],
|
|
296
|
+
toZigbee: [...extend.switch().toZigbee, tz.legrand_identify],
|
|
297
|
+
whiteLabel: [{vendor: 'BTicino', model: '3584C'}],
|
|
298
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
299
|
+
const endpoint = device.getEndpoint(1);
|
|
300
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genBinaryInput']);
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
zigbeeModel: [' Master remote SW Home / Away\u0000\u0000'],
|
|
305
|
+
model: '064873',
|
|
306
|
+
vendor: 'Legrand',
|
|
307
|
+
// led blink RED when battery is low
|
|
308
|
+
description: 'Home & away switch / master switch',
|
|
309
|
+
fromZigbee: [fz.legrand_scenes, fz.legrand_master_switch_center, fz.ignore_poll_ctrl, fz.battery],
|
|
310
|
+
exposes: [e.battery(), e.action(['enter', 'leave', 'sleep', 'wakeup', 'center'])],
|
|
311
|
+
toZigbee: [],
|
|
312
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}},
|
|
313
|
+
whiteLabel: [{vendor: 'BTicino', model: 'LN4570CWI'}],
|
|
314
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
315
|
+
const endpoint = device.getEndpoint(1);
|
|
316
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genPowerCfg']);
|
|
317
|
+
},
|
|
318
|
+
onEvent: async (type, data, device) => {
|
|
319
|
+
await readInitialBatteryState(type, data, device);
|
|
320
|
+
|
|
321
|
+
if (data.type === 'commandCheckin' && data.cluster === 'genPollCtrl') {
|
|
322
|
+
// TODO current solution is a work around, it would be cleaner to answer to the request
|
|
323
|
+
const endpoint = device.getEndpoint(1);
|
|
324
|
+
const options = {manufacturerCode: 0x1021, disableDefaultResponse: true};
|
|
325
|
+
await endpoint.command('genPollCtrl', 'fastPollStop', {}, options);
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
zigbeeModel: [' DIN power consumption module\u0000\u0000', ' DIN power consumption module'],
|
|
331
|
+
model: '412015',
|
|
332
|
+
vendor: 'Legrand',
|
|
333
|
+
description: 'DIN power consumption module',
|
|
334
|
+
fromZigbee: [fz.identify, fz.metering, fz.electrical_measurement, fz.ignore_basic_report, fz.ignore_genOta, fz.legrand_power_alarm],
|
|
335
|
+
toZigbee: [tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.electrical_measurement_power, tz.legrand_powerAlarm],
|
|
336
|
+
exposes: [e.power().withAccess(ea.STATE_GET), e.power_apparent(), exposes.binary('power_alarm_active', ea.STATE, true, false),
|
|
337
|
+
exposes.binary('power_alarm', ea.ALL, true, false).withDescription('Enable/disable the power alarm')],
|
|
338
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
339
|
+
const endpoint = device.getEndpoint(1);
|
|
340
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'genIdentify']);
|
|
341
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
342
|
+
await reporting.activePower(endpoint);
|
|
343
|
+
await endpoint.read('haElectricalMeasurement', ['activePower']);
|
|
344
|
+
try {
|
|
345
|
+
await reporting.apparentPower(endpoint);
|
|
346
|
+
await endpoint.read('haElectricalMeasurement', ['apparentPower']);
|
|
347
|
+
} catch (e) {
|
|
348
|
+
// Some version/firmware don't seem to support this.
|
|
349
|
+
}
|
|
350
|
+
// Read configuration values that are not sent periodically.
|
|
351
|
+
await endpoint.read('haElectricalMeasurement', [0xf000, 0xf001, 0xf002]);
|
|
352
|
+
},
|
|
353
|
+
onEvent: async (type, data, device, options, state) => {
|
|
354
|
+
/**
|
|
355
|
+
* The DIN power consumption module loses the configure reporting
|
|
356
|
+
* after device restart/powerloss.
|
|
357
|
+
*
|
|
358
|
+
* We reconfigure the reporting at deviceAnnounce.
|
|
359
|
+
*/
|
|
360
|
+
if (type === 'deviceAnnounce') {
|
|
361
|
+
for (const endpoint of device.endpoints) {
|
|
362
|
+
for (const c of endpoint.configuredReportings) {
|
|
363
|
+
await endpoint.configureReporting(c.cluster.name, [{
|
|
364
|
+
attribute: c.attribute.name, minimumReportInterval: c.minimumReportInterval,
|
|
365
|
+
maximumReportInterval: c.maximumReportInterval, reportableChange: c.reportableChange,
|
|
366
|
+
}]);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
zigbeeModel: ['Remote switch Wake up / Sleep'],
|
|
374
|
+
model: '752189',
|
|
375
|
+
vendor: 'Legrand',
|
|
376
|
+
description: 'Night/day wireless switch',
|
|
377
|
+
fromZigbee: [fz.legrand_scenes, fz.battery, fz.ignore_poll_ctrl, fz.legrand_master_switch_center],
|
|
378
|
+
toZigbee: [],
|
|
379
|
+
exposes: [e.battery(), e.action(['enter', 'leave', 'sleep', 'wakeup', 'center'])],
|
|
380
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}},
|
|
381
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
382
|
+
const endpoint = device.getEndpoint(1);
|
|
383
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genPowerCfg']);
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
fingerprint: [{modelID: 'GreenPower_254', ieeeAddr: /^0x00000000005.....$/}],
|
|
388
|
+
model: 'ZLGP15',
|
|
389
|
+
vendor: 'Legrand',
|
|
390
|
+
description: 'Wireless and batteryless 4 scenes control',
|
|
391
|
+
fromZigbee: [fz.legrand_zlgp15],
|
|
392
|
+
toZigbee: [],
|
|
393
|
+
exposes: [e.action(['press_1', 'press_2', 'press_3', 'press_4'])],
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
fingerprint: [{modelID: 'GreenPower_2', ieeeAddr: /^0x00000000005.....$/}],
|
|
397
|
+
model: 'ZLGP17/ZLGP18',
|
|
398
|
+
vendor: 'Legrand',
|
|
399
|
+
description: 'Wireless and batteryless (double) lighting control',
|
|
400
|
+
fromZigbee: [fz.legrand_zlgp17_zlgp18],
|
|
401
|
+
toZigbee: [],
|
|
402
|
+
exposes: [e.action(['press_once', 'press_twice'])],
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
zigbeeModel: [' Cable outlet\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000' +
|
|
406
|
+
'\u0000\u0000'],
|
|
407
|
+
model: '064882',
|
|
408
|
+
vendor: 'Legrand',
|
|
409
|
+
description: 'Cable outlet with pilot wire and consumption measurement',
|
|
410
|
+
ota: ota.zigbeeOTA,
|
|
411
|
+
fromZigbee: [fz.legrand_cluster_fc01, fz.legrand_cable_outlet_mode, fz.on_off, fz.electrical_measurement, fz.power_on_behavior],
|
|
412
|
+
toZigbee: [tz.legrand_deviceMode, tz.legrand_cableOutletMode, tz.on_off, tz.electrical_measurement_power, tz.power_on_behavior],
|
|
413
|
+
exposes: [exposes.binary('device_mode', ea.ALL, 'pilot_on', 'pilot_off'),
|
|
414
|
+
exposes.enum('cable_outlet_mode', ea.ALL, ['comfort', 'comfort-1', 'comfort-2', 'eco', 'frost_protection', 'off']),
|
|
415
|
+
exposes.switch().withState('state', true, 'Works only when the pilot wire is deactivated'),
|
|
416
|
+
e.power().withAccess(ea.STATE_GET),
|
|
417
|
+
e.power_apparent(),
|
|
418
|
+
e.power_on_behavior().withDescription(`Controls the behavior when the device is powered on. Works only when the pilot wire is
|
|
419
|
+
deactivated`)],
|
|
420
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
421
|
+
const endpoint = device.getEndpoint(1);
|
|
422
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'manuSpecificLegrandDevices2']);
|
|
423
|
+
await reporting.onOff(endpoint);
|
|
424
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
425
|
+
await reporting.activePower(endpoint);
|
|
426
|
+
await reporting.apparentPower(endpoint);
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
zigbeeModel: [' NLIS - Double light switch\u0000\u0000\u0000\u0000'],
|
|
431
|
+
model: '067772',
|
|
432
|
+
vendor: 'Legrand',
|
|
433
|
+
description: 'Double wired switch with neutral',
|
|
434
|
+
fromZigbee: [fz.on_off, fz.legrand_binary_input_on_off, fz.legrand_cluster_fc01],
|
|
435
|
+
toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn],
|
|
436
|
+
exposes: [e.switch().withEndpoint('left'),
|
|
437
|
+
e.switch().withEndpoint('right'),
|
|
438
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` +
|
|
439
|
+
` see the switch in the dark`),
|
|
440
|
+
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on')],
|
|
441
|
+
meta: {multiEndpoint: true},
|
|
442
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
443
|
+
const endpointLeft = device.getEndpoint(2);
|
|
444
|
+
await reporting.bind(endpointLeft, coordinatorEndpoint, ['genOnOff', 'genBinaryInput']);
|
|
445
|
+
const endpointRight = device.getEndpoint(1);
|
|
446
|
+
await reporting.bind(endpointRight, coordinatorEndpoint, ['genOnOff', 'genBinaryInput']);
|
|
447
|
+
},
|
|
448
|
+
endpoint: (device) => {
|
|
449
|
+
return {left: 2, right: 1};
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
zigbeeModel: [' Mobile outlet\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'+
|
|
454
|
+
'\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
455
|
+
model: 'WNRR15/WNRR20',
|
|
456
|
+
vendor: 'Legrand',
|
|
457
|
+
ota: ota.zigbeeOTA,
|
|
458
|
+
description: 'Outlet with power consumption monitoring',
|
|
459
|
+
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement],
|
|
460
|
+
toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify],
|
|
461
|
+
exposes: [e.switch(), e.action(['identify']), e.power()],
|
|
462
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
463
|
+
const endpoint = device.getEndpoint(1);
|
|
464
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'haElectricalMeasurement']);
|
|
465
|
+
await reporting.onOff(endpoint);
|
|
466
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
467
|
+
await reporting.activePower(endpoint);
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
zigbeeModel: ['Hospitality on off switch'],
|
|
472
|
+
model: 'WNAL10/WNRL10',
|
|
473
|
+
vendor: 'Legrand',
|
|
474
|
+
description: 'Smart switch with Netatmo',
|
|
475
|
+
fromZigbee: [fz.on_off, fz.legrand_binary_input_on_off, fz.legrand_cluster_fc01],
|
|
476
|
+
toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn],
|
|
477
|
+
exposes: [e.switch(),
|
|
478
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` +
|
|
479
|
+
` see the switch in the dark`),
|
|
480
|
+
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on')],
|
|
481
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
482
|
+
const endpoint = device.getEndpoint(1);
|
|
483
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
484
|
+
await reporting.onOff(endpoint);
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
zigbeeModel: ['Hospitality dimmer switch'],
|
|
489
|
+
model: 'WNAL50/WNRL50',
|
|
490
|
+
vendor: 'Legrand',
|
|
491
|
+
description: 'Smart dimmer switch with Netatmo',
|
|
492
|
+
extend: extend.light_onoff_brightness({noConfigure: true}),
|
|
493
|
+
fromZigbee: [fz.brightness, fz.identify, fz.on_off, fz.lighting_ballast_configuration, fz.legrand_cluster_fc01,
|
|
494
|
+
fz.power_on_behavior],
|
|
495
|
+
toZigbee: [tz.light_onoff_brightness, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn,
|
|
496
|
+
tz.legrand_deviceMode, tz.legrand_identify, tz.ballast_config, tz.power_on_behavior],
|
|
497
|
+
exposes: [e.light_brightness(),
|
|
498
|
+
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
499
|
+
.withDescription('Specifies the minimum brightness value'),
|
|
500
|
+
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
501
|
+
.withDescription('Specifies the maximum brightness value'),
|
|
502
|
+
exposes.binary('device_mode', ea.ALL, 'dimmer_on', 'dimmer_off').withDescription('Allow the device to change brightness'),
|
|
503
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` +
|
|
504
|
+
` see the switch in the dark`),
|
|
505
|
+
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on'),
|
|
506
|
+
e.power_on_behavior()],
|
|
507
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
508
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
509
|
+
const endpoint = device.getEndpoint(1);
|
|
510
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'genLevelCtrl',
|
|
511
|
+
'genBinaryInput', 'lightingBallastCfg']);
|
|
512
|
+
await reporting.onOff(endpoint);
|
|
513
|
+
await reporting.brightness(endpoint);
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
zigbeeModel: ['Remote dimmer switch'],
|
|
518
|
+
model: 'WNAL63',
|
|
519
|
+
vendor: 'Legrand',
|
|
520
|
+
// led blink RED when battery is low
|
|
521
|
+
description: 'Remote dimmer switch',
|
|
522
|
+
fromZigbee: [fz.identify, fz.command_on, fz.command_off, fz.command_toggle, fz.legacy.cmd_move, fz.legacy.cmd_stop,
|
|
523
|
+
fz.battery],
|
|
524
|
+
exposes: [e.battery(), e.action(['identify', 'on', 'off', 'toggle', 'brightness_move_up',
|
|
525
|
+
'brightness_move_down', 'brightness_stop'])],
|
|
526
|
+
toZigbee: [],
|
|
527
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}, publishDuplicateTransaction: true},
|
|
528
|
+
onEvent: readInitialBatteryState,
|
|
529
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
530
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
531
|
+
const endpoint = device.getEndpoint(1);
|
|
532
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'genLevelCtrl']);
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
zigbeeModel: [' Centralized ventilation SW', ' Centralized ventilation SW\u0000\u0000\u0000\u0000'],
|
|
537
|
+
model: '067766',
|
|
538
|
+
vendor: 'Legrand',
|
|
539
|
+
description: 'Centralized ventilation switch',
|
|
540
|
+
fromZigbee: [fz.identify, fz.on_off, fz.power_on_behavior],
|
|
541
|
+
toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.legrand_settingEnableLedIfOn,
|
|
542
|
+
tz.power_on_behavior],
|
|
543
|
+
exposes: [e.switch(), e.action(['identify']),
|
|
544
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the power socket is turned off,
|
|
545
|
+
allowing to see it in the dark`),
|
|
546
|
+
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the device is turned on'),
|
|
547
|
+
e.power_on_behavior()],
|
|
548
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
549
|
+
const endpoint = device.getEndpoint(1);
|
|
550
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff']);
|
|
551
|
+
await reporting.onOff(endpoint);
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
];
|