@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,80 @@
|
|
|
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 e = exposes.presets;
|
|
6
|
+
const ea = exposes.access;
|
|
7
|
+
|
|
8
|
+
module.exports = [
|
|
9
|
+
{
|
|
10
|
+
zigbeeModel: ['RS-THP-MP-1.0'],
|
|
11
|
+
model: 'RS-THP-MP-1.0',
|
|
12
|
+
vendor: 'Keen Home',
|
|
13
|
+
description: 'Temperature Sensor',
|
|
14
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
15
|
+
fromZigbee: [fz.battery, fz.xiaomi_temperature, fz.humidity, fz.keen_home_smart_vent_pressure],
|
|
16
|
+
toZigbee: [],
|
|
17
|
+
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.battery_voltage()],
|
|
18
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
19
|
+
device.powerSource = 'Battery';
|
|
20
|
+
device.save();
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
zigbeeModel: ['SV01-410-MP-1.0', 'SV01-410-MP-1.1', 'SV01-410-MP-1.4', 'SV01-410-MP-1.5', 'SV01-412-MP-1.0', 'SV01-612-MP-1.1',
|
|
25
|
+
'SV01-412-MP-1.1', 'SV01-412-MP-1.4', 'SV01-610-MP-1.0', 'SV01-610-MP-1.1', 'SV01-612-MP-1.0', 'SV01-612-MP-1.2',
|
|
26
|
+
'SV01-610-MP-1.4'],
|
|
27
|
+
model: 'SV01',
|
|
28
|
+
vendor: 'Keen Home',
|
|
29
|
+
description: 'Smart vent',
|
|
30
|
+
fromZigbee: [fz.cover_position_via_brightness, fz.temperature, fz.battery, fz.keen_home_smart_vent_pressure,
|
|
31
|
+
fz.ignore_onoff_report],
|
|
32
|
+
toZigbee: [tz.cover_via_brightness],
|
|
33
|
+
meta: {battery: {dontDividePercentage: true}},
|
|
34
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
35
|
+
const endpoint = device.getEndpoint(1);
|
|
36
|
+
const binds = ['genLevelCtrl', 'genPowerCfg', 'msTemperatureMeasurement', 'msPressureMeasurement'];
|
|
37
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
38
|
+
await reporting.temperature(endpoint);
|
|
39
|
+
await reporting.pressure(endpoint);
|
|
40
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
41
|
+
},
|
|
42
|
+
exposes: [e.cover_position().setAccess('state', ea.ALL), e.temperature(), e.battery(), e.pressure()],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
zigbeeModel: ['SV02-410-MP-1.3', 'SV02-412-MP-1.3', 'SV02-610-MP-1.0', 'SV02-610-MP-1.3', 'SV02-612-MP-1.2', 'SV02-612-MP-1.3',
|
|
46
|
+
'SV02-410-MP-1.0', 'SV02-410-MP-1.2', 'SV02-412-MP-1.2'],
|
|
47
|
+
model: 'SV02',
|
|
48
|
+
vendor: 'Keen Home',
|
|
49
|
+
description: 'Smart vent',
|
|
50
|
+
fromZigbee: [fz.cover_position_via_brightness, fz.temperature, fz.battery, fz.keen_home_smart_vent_pressure,
|
|
51
|
+
fz.ignore_onoff_report],
|
|
52
|
+
toZigbee: [tz.cover_via_brightness],
|
|
53
|
+
meta: {battery: {dontDividePercentage: true}},
|
|
54
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
55
|
+
const endpoint = device.getEndpoint(1);
|
|
56
|
+
const binds = ['genLevelCtrl', 'genPowerCfg', 'msTemperatureMeasurement', 'msPressureMeasurement'];
|
|
57
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
58
|
+
await reporting.temperature(endpoint);
|
|
59
|
+
await reporting.pressure(endpoint);
|
|
60
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
61
|
+
},
|
|
62
|
+
exposes: [e.cover_position().setAccess('state', ea.ALL), e.temperature(), e.battery(), e.pressure()],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
zigbeeModel: ['GW01-001-MP-1.0'],
|
|
66
|
+
model: 'GW01',
|
|
67
|
+
description: 'Signal repeater',
|
|
68
|
+
vendor: 'Keen Home',
|
|
69
|
+
fromZigbee: [fz.linkquality_from_basic],
|
|
70
|
+
toZigbee: [],
|
|
71
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
72
|
+
const endpoint = device.getEndpoint(1);
|
|
73
|
+
const payload = [{attribute: 'modelId', minimumReportInterval: 3600, maximumReportInterval: 14400}];
|
|
74
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
|
|
75
|
+
await endpoint.configureReporting('genBasic', payload);
|
|
76
|
+
device.powerSource = 'Mains (single phase)';
|
|
77
|
+
},
|
|
78
|
+
exposes: [],
|
|
79
|
+
},
|
|
80
|
+
];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const reporting = require('../lib/reporting');
|
|
2
|
+
const extend = require('../lib/extend');
|
|
3
|
+
|
|
4
|
+
module.exports = [
|
|
5
|
+
{
|
|
6
|
+
zigbeeModel: ['Socket Switch'],
|
|
7
|
+
model: 'ZCC-3500',
|
|
8
|
+
vendor: 'KlikAanKlikUit',
|
|
9
|
+
description: 'Zigbee socket switch',
|
|
10
|
+
extend: extend.switch(),
|
|
11
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
12
|
+
const endpoint = device.getEndpoint(1);
|
|
13
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
14
|
+
await reporting.onOff(endpoint);
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
];
|
|
@@ -0,0 +1,148 @@
|
|
|
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 constants = require('../lib/constants');
|
|
5
|
+
const reporting = require('../lib/reporting');
|
|
6
|
+
const globalStore = require('../lib/store');
|
|
7
|
+
const utils = require('../lib/utils');
|
|
8
|
+
const e = exposes.presets;
|
|
9
|
+
const ea = exposes.access;
|
|
10
|
+
|
|
11
|
+
const kmpcilOptions={
|
|
12
|
+
presence_timeout_dc: () => {
|
|
13
|
+
return exposes.numeric('presence_timeout_dc').withValueMin(60).withDescription(
|
|
14
|
+
'Time in seconds after which presence is cleared after detecting it (default 60 seconds) while in DC.');
|
|
15
|
+
},
|
|
16
|
+
presence_timeout_battery: () => {
|
|
17
|
+
return exposes.numeric('presence_timeout_battery').withValueMin(120).withDescription(
|
|
18
|
+
'Time in seconds after which presence is cleared after detecting it (default 420 seconds) while in Battery.');
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function handleKmpcilPresence(model, msg, publish, options, meta) {
|
|
23
|
+
const useOptionsTimeoutBattery = options && options.hasOwnProperty('presence_timeout_battery');
|
|
24
|
+
const timeoutBattery = useOptionsTimeoutBattery ? options.presence_timeout_battery : 420; // 100 seconds by default
|
|
25
|
+
|
|
26
|
+
const useOptionsTimeoutDc = options && options.hasOwnProperty('presence_timeout_dc');
|
|
27
|
+
const timeoutDc = useOptionsTimeoutDc ? options.presence_timeout_dc : 60;
|
|
28
|
+
|
|
29
|
+
const mode = meta.state? meta.state['power_state'] : false;
|
|
30
|
+
|
|
31
|
+
const timeout = mode ? timeoutDc : timeoutBattery;
|
|
32
|
+
// Stop existing timer because motion is detected and set a new one.
|
|
33
|
+
clearTimeout(globalStore.getValue(msg.endpoint, 'timer'));
|
|
34
|
+
const timer = setTimeout(() => publish({presence: false}), timeout * 1000);
|
|
35
|
+
globalStore.putValue(msg.endpoint, 'timer', timer);
|
|
36
|
+
|
|
37
|
+
return {presence: true};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const kmpcilConverters = {
|
|
41
|
+
presence_binary_input: {
|
|
42
|
+
cluster: 'genBinaryInput',
|
|
43
|
+
type: ['attributeReport', 'readResponse'],
|
|
44
|
+
convert: (model, msg, publish, options, meta) => {
|
|
45
|
+
const payload = handleKmpcilPresence(model, msg, publish, options, meta);
|
|
46
|
+
if (msg.data.hasOwnProperty('presentValue')) {
|
|
47
|
+
const presentValue = msg.data['presentValue'];
|
|
48
|
+
payload.power_state = (presentValue & 0x01)> 0;
|
|
49
|
+
payload.occupancy = (presentValue & 0x04) > 0;
|
|
50
|
+
payload.vibration = (presentValue & 0x02) > 0;
|
|
51
|
+
}
|
|
52
|
+
return payload;
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
presence_power: {
|
|
56
|
+
cluster: 'genPowerCfg',
|
|
57
|
+
type: ['attributeReport', 'readResponse'],
|
|
58
|
+
options: [kmpcilOptions.presence_timeout_dc(), kmpcilOptions.presence_timeout_battery()],
|
|
59
|
+
convert: (model, msg, publish, options, meta) => {
|
|
60
|
+
const payload = handleKmpcilPresence(model, msg, publish, options, meta);
|
|
61
|
+
if (msg.data.hasOwnProperty('batteryVoltage')) {
|
|
62
|
+
payload.voltage = msg.data['batteryVoltage'] * 100;
|
|
63
|
+
if (model.meta && model.meta.battery && model.meta.battery.voltageToPercentage) {
|
|
64
|
+
payload.battery = utils.batteryVoltageToPercentage(payload.voltage, model.meta.battery.voltageToPercentage);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return payload;
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
module.exports = [
|
|
73
|
+
{
|
|
74
|
+
zigbeeModel: ['RES005'],
|
|
75
|
+
model: 'KMPCIL_RES005',
|
|
76
|
+
vendor: 'KMPCIL',
|
|
77
|
+
description: 'Environment sensor',
|
|
78
|
+
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.illuminance().withAccess(ea.STATE_GET),
|
|
79
|
+
e.illuminance_lux().withAccess(ea.STATE_GET), e.occupancy(), e.switch()],
|
|
80
|
+
fromZigbee: [fz.battery, fz.temperature, fz.humidity, fz.pressure, fz.illuminance, fz.kmpcil_res005_occupancy,
|
|
81
|
+
fz.kmpcil_res005_on_off],
|
|
82
|
+
toZigbee: [tz.kmpcil_res005_on_off, tz.illuminance],
|
|
83
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
84
|
+
const endpoint = device.getEndpoint(8);
|
|
85
|
+
const binds = ['genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement',
|
|
86
|
+
'msIlluminanceMeasurement', 'genBinaryInput', 'genBinaryOutput'];
|
|
87
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
88
|
+
await reporting.temperature(endpoint);
|
|
89
|
+
await reporting.humidity(endpoint);
|
|
90
|
+
const payloadBattery = [{
|
|
91
|
+
attribute: 'batteryPercentageRemaining', minimumReportInterval: 1, maximumReportInterval: 120, reportableChange: 1}];
|
|
92
|
+
await endpoint.configureReporting('genPowerCfg', payloadBattery);
|
|
93
|
+
const payload = [{attribute: 'measuredValue', minimumReportInterval: 5, maximumReportInterval: constants.repInterval.HOUR,
|
|
94
|
+
reportableChange: 200}];
|
|
95
|
+
await endpoint.configureReporting('msIlluminanceMeasurement', payload);
|
|
96
|
+
const payloadPressure = [{
|
|
97
|
+
// 0 = measuredValue, override dataType from int16 to uint16
|
|
98
|
+
// https://github.com/Koenkk/zigbee-herdsman/pull/191/files?file-filters%5B%5D=.ts#r456569398
|
|
99
|
+
attribute: {ID: 0, type: 33}, minimumReportInterval: 2, maximumReportInterval: constants.repInterval.HOUR,
|
|
100
|
+
reportableChange: 3}];
|
|
101
|
+
await endpoint.configureReporting('msPressureMeasurement', payloadPressure);
|
|
102
|
+
const options = {disableDefaultResponse: true};
|
|
103
|
+
await endpoint.write('genBinaryInput', {0x0051: {value: 0x01, type: 0x10}}, options);
|
|
104
|
+
await endpoint.write('genBinaryInput', {0x0101: {value: 25, type: 0x23}}, options);
|
|
105
|
+
const payloadBinaryInput = [{
|
|
106
|
+
attribute: 'presentValue', minimumReportInterval: 0, maximumReportInterval: 30, reportableChange: 1}];
|
|
107
|
+
await endpoint.configureReporting('genBinaryInput', payloadBinaryInput);
|
|
108
|
+
await endpoint.write('genBinaryOutput', {0x0051: {value: 0x01, type: 0x10}}, options);
|
|
109
|
+
const payloadBinaryOutput = [{
|
|
110
|
+
attribute: 'presentValue', minimumReportInterval: 0, maximumReportInterval: 30, reportableChange: 1}];
|
|
111
|
+
await endpoint.configureReporting('genBinaryOutput', payloadBinaryOutput);
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
zigbeeModel: ['tagv1'],
|
|
116
|
+
model: 'KMPCIL-tag-001',
|
|
117
|
+
vendor: 'KMPCIL',
|
|
118
|
+
description: 'Arrival sensor',
|
|
119
|
+
fromZigbee: [kmpcilConverters.presence_binary_input, kmpcilConverters.presence_power, fz.temperature],
|
|
120
|
+
exposes: [e.battery(), e.presence(), exposes.binary('power_state', exposes.access.STATE, true, false),
|
|
121
|
+
e.occupancy(), e.vibration(), e.temperature()],
|
|
122
|
+
toZigbee: [],
|
|
123
|
+
meta: {battery: {voltageToPercentage: '3V_1500_2800'}},
|
|
124
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
125
|
+
const endpoint = device.getEndpoint(1);
|
|
126
|
+
for (const cluster of ['msTemperatureMeasurement', 'genPowerCfg', 'genBinaryInput']) {
|
|
127
|
+
// This sleep here(and the sleep) after is to allow the command to be
|
|
128
|
+
// fully sent to coordinator. In case repeater involved and the repeater
|
|
129
|
+
// is litted in resources, we may want to give some time so that the sequence of
|
|
130
|
+
// commands does not overwhelm the repeater.
|
|
131
|
+
await utils.sleep(2000);
|
|
132
|
+
await endpoint.bind(cluster, coordinatorEndpoint);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
await utils.sleep(1000);
|
|
136
|
+
const p = reporting.payload('batteryVoltage', 0, 10, 1);
|
|
137
|
+
await endpoint.configureReporting('genPowerCfg', p);
|
|
138
|
+
|
|
139
|
+
await utils.sleep(1000);
|
|
140
|
+
const p2 = reporting.payload('presentValue', 0, 300, 1);
|
|
141
|
+
await endpoint.configureReporting('genBinaryInput', p2);
|
|
142
|
+
|
|
143
|
+
await utils.sleep(1000);
|
|
144
|
+
await reporting.temperature(endpoint);
|
|
145
|
+
await endpoint.read('genBinaryInput', ['presentValue']);
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
];
|
package/devices/konke.js
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
const exposes = require('../lib/exposes');
|
|
2
|
+
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
|
+
const reporting = require('../lib/reporting');
|
|
4
|
+
const e = exposes.presets;
|
|
5
|
+
|
|
6
|
+
const fzLocal = {
|
|
7
|
+
command_recall_konke: {
|
|
8
|
+
cluster: 'genScenes',
|
|
9
|
+
type: 'commandRecall',
|
|
10
|
+
convert: (model, msg, publish, options, meta) => {
|
|
11
|
+
const payload = {
|
|
12
|
+
241: 'hexagon',
|
|
13
|
+
242: 'square',
|
|
14
|
+
243: 'triangle',
|
|
15
|
+
244: 'circle',
|
|
16
|
+
};
|
|
17
|
+
return {action: payload[msg.data.sceneid]};
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
module.exports = [
|
|
23
|
+
{
|
|
24
|
+
zigbeeModel: ['3AFE170100510001', '3AFE280100510001'],
|
|
25
|
+
model: '2AJZ4KPKEY',
|
|
26
|
+
vendor: 'Konke',
|
|
27
|
+
description: 'Multi-function button',
|
|
28
|
+
fromZigbee: [fz.konke_action, fz.battery, fz.legacy.konke_click],
|
|
29
|
+
toZigbee: [],
|
|
30
|
+
exposes: [e.battery_low(), e.battery(), e.action(['single', 'double', 'hold'])],
|
|
31
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}},
|
|
32
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
33
|
+
const endpoint = device.getEndpoint(1);
|
|
34
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
35
|
+
await reporting.batteryVoltage(endpoint);
|
|
36
|
+
// Has Unknown power source, force it.
|
|
37
|
+
device.powerSource = 'Battery';
|
|
38
|
+
device.save();
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
zigbeeModel: ['3AFE14010402000D', '3AFE27010402000D', '3AFE28010402000D'],
|
|
43
|
+
model: '2AJZ4KPBS',
|
|
44
|
+
vendor: 'Konke',
|
|
45
|
+
description: 'Motion sensor',
|
|
46
|
+
fromZigbee: [fz.ias_occupancy_alarm_1_with_timeout, fz.battery],
|
|
47
|
+
toZigbee: [],
|
|
48
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}},
|
|
49
|
+
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
zigbeeModel: ['3AFE140103020000', '3AFE220103020000'],
|
|
53
|
+
model: '2AJZ4KPFT',
|
|
54
|
+
vendor: 'Konke',
|
|
55
|
+
description: 'Temperature and humidity sensor',
|
|
56
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.battery],
|
|
57
|
+
toZigbee: [],
|
|
58
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}},
|
|
59
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
60
|
+
const endpoint = device.getEndpoint(1);
|
|
61
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'msTemperatureMeasurement']);
|
|
62
|
+
await reporting.batteryVoltage(endpoint);
|
|
63
|
+
await reporting.temperature(endpoint);
|
|
64
|
+
},
|
|
65
|
+
exposes: [e.temperature(), e.humidity(), e.battery()],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
zigbeeModel: ['3AFE010104020028'],
|
|
69
|
+
model: 'TW-S1',
|
|
70
|
+
description: 'Photoelectric smoke detector',
|
|
71
|
+
vendor: 'Konke',
|
|
72
|
+
fromZigbee: [fz.ias_smoke_alarm_1],
|
|
73
|
+
toZigbee: [],
|
|
74
|
+
exposes: [e.smoke(), e.battery_low()],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
zigbeeModel: ['3AFE130104020015', '3AFE270104020015', '3AFE280104020015'],
|
|
78
|
+
model: '2AJZ4KPDR',
|
|
79
|
+
vendor: 'Konke',
|
|
80
|
+
description: 'Contact sensor',
|
|
81
|
+
fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
|
|
82
|
+
toZigbee: [],
|
|
83
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}},
|
|
84
|
+
exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery()],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
zigbeeModel: ['LH07321'],
|
|
88
|
+
model: 'LH07321',
|
|
89
|
+
vendor: 'Konke',
|
|
90
|
+
description: 'Water detector',
|
|
91
|
+
fromZigbee: [fz.ias_water_leak_alarm_1],
|
|
92
|
+
toZigbee: [],
|
|
93
|
+
exposes: [e.water_leak(), e.battery_low(), e.tamper()],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
fingerprint: [{modelID: 'TS0222', manufacturerName: '_TYZB01_fi5yftwv'}, {modelID: '3AFE090103021000'}],
|
|
97
|
+
model: 'KK-ES-J01W',
|
|
98
|
+
vendor: 'Konke',
|
|
99
|
+
description: 'Temperature, relative humidity and illuminance sensor',
|
|
100
|
+
fromZigbee: [fz.battery, fz.illuminance, fz.humidity, fz.temperature],
|
|
101
|
+
toZigbee: [],
|
|
102
|
+
exposes: [e.battery(), e.battery_voltage(), e.illuminance(), e.illuminance_lux().withUnit('lx'), e.humidity(), e.temperature()],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
zigbeeModel: ['3AFE241000040002'],
|
|
106
|
+
model: 'KK-TQ-J01W',
|
|
107
|
+
vendor: 'Konke',
|
|
108
|
+
description: 'Smart 4 key scene switch',
|
|
109
|
+
fromZigbee: [fzLocal.command_recall_konke, fz.battery],
|
|
110
|
+
toZigbee: [],
|
|
111
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}},
|
|
112
|
+
exposes: [e.battery(), e.battery_voltage(), e.battery_low(), e.action(['hexagon', 'square', 'triangle', 'circle'])],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
zigbeeModel: ['3AFE07010402100D', '3AFE08010402100D'],
|
|
116
|
+
model: 'KK-BS-J01W',
|
|
117
|
+
vendor: 'Konke',
|
|
118
|
+
description: 'Occupancy sensor',
|
|
119
|
+
fromZigbee: [fz.ias_occupancy_alarm_1_with_timeout, fz.battery],
|
|
120
|
+
toZigbee: [],
|
|
121
|
+
exposes: [e.occupancy(), e.battery_voltage(), e.battery_low(), e.tamper(), e.battery()],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
zigbeeModel: ['3AFE21100402102A'],
|
|
125
|
+
model: 'KK-WA-J01W',
|
|
126
|
+
vendor: 'Konke',
|
|
127
|
+
description: 'Water detector',
|
|
128
|
+
fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
|
|
129
|
+
toZigbee: [],
|
|
130
|
+
exposes: [e.water_leak(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
zigbeeModel: ['3AFE221004021015'],
|
|
134
|
+
model: 'KK-DS-J01W',
|
|
135
|
+
vendor: 'Konke',
|
|
136
|
+
description: 'Contact sensor',
|
|
137
|
+
fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
|
|
138
|
+
toZigbee: [],
|
|
139
|
+
exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
|
|
140
|
+
},
|
|
141
|
+
];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const reporting = require('../lib/reporting');
|
|
2
|
+
const extend = require('../lib/extend');
|
|
3
|
+
|
|
4
|
+
module.exports = [
|
|
5
|
+
{
|
|
6
|
+
zigbeeModel: ['Lamp_01'],
|
|
7
|
+
model: 'KS-SM001',
|
|
8
|
+
vendor: 'Ksentry Electronics',
|
|
9
|
+
description: 'Zigbee on/off controller',
|
|
10
|
+
extend: extend.switch(),
|
|
11
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
12
|
+
const endpoint = device.getEndpoint(11);
|
|
13
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
14
|
+
await reporting.onOff(endpoint);
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const tz = require('../converters/toZigbee');
|
|
2
|
+
const extend = require('../lib/extend');
|
|
3
|
+
|
|
4
|
+
const extendData = extend.light_onoff_brightness_colortemp_color({colorTempRange: [250, 454]});
|
|
5
|
+
|
|
6
|
+
module.exports = [
|
|
7
|
+
{
|
|
8
|
+
zigbeeModel: ['ZB-CL01'],
|
|
9
|
+
model: 'ZB-CL01',
|
|
10
|
+
vendor: 'KURVIA',
|
|
11
|
+
description: 'GU10 GRBWC built from AliExpress',
|
|
12
|
+
extend: extendData,
|
|
13
|
+
toZigbee: [tz.on_off].concat(extendData.toZigbee),
|
|
14
|
+
meta: {applyRedFix: true, enhancedHue: false},
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
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 e = exposes.presets;
|
|
6
|
+
|
|
7
|
+
module.exports = [
|
|
8
|
+
{
|
|
9
|
+
zigbeeModel: ['SMARTCODE_CONVERT_GEN1', 'Smartcode'],
|
|
10
|
+
model: '66492-001',
|
|
11
|
+
vendor: 'Kwikset',
|
|
12
|
+
description: 'Home connect smart lock conversion kit',
|
|
13
|
+
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery],
|
|
14
|
+
toZigbee: [tz.lock],
|
|
15
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
16
|
+
const endpoint = device.getEndpoint(2);
|
|
17
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
18
|
+
await reporting.lockState(endpoint);
|
|
19
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
20
|
+
},
|
|
21
|
+
exposes: [e.lock(), e.battery(), e.lock_action(), e.lock_action_source_name(), e.lock_action_user()],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
zigbeeModel: ['SMARTCODE_CONVERT_GEN1_W3'],
|
|
25
|
+
model: '99140-139',
|
|
26
|
+
vendor: 'Kwikset',
|
|
27
|
+
description: 'Home connect smart lock conversion kit',
|
|
28
|
+
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery],
|
|
29
|
+
toZigbee: [tz.lock],
|
|
30
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
31
|
+
const endpoint = device.getEndpoint(2);
|
|
32
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
33
|
+
await reporting.lockState(endpoint);
|
|
34
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
35
|
+
},
|
|
36
|
+
exposes: [e.lock(), e.battery(), e.lock_action(), e.lock_action_source_name(), e.lock_action_user()],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
zigbeeModel: ['SMARTCODE_DEADBOLT_10_L'],
|
|
40
|
+
model: '99140-002',
|
|
41
|
+
vendor: 'Kwikset',
|
|
42
|
+
description: 'SmartCode traditional electronic deadbolt',
|
|
43
|
+
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery],
|
|
44
|
+
toZigbee: [tz.lock],
|
|
45
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
46
|
+
const endpoint = device.getEndpoint(2);
|
|
47
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
48
|
+
await reporting.lockState(endpoint);
|
|
49
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
50
|
+
},
|
|
51
|
+
exposes: [e.lock(), e.battery(), e.lock_action(), e.lock_action_source_name(), e.lock_action_user()],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
zigbeeModel: ['SMARTCODE_DEADBOLT_10_W3', 'SMARTCODE_DEADBOLT_10T_W3'],
|
|
55
|
+
model: '99140-031',
|
|
56
|
+
vendor: 'Kwikset',
|
|
57
|
+
description: 'SmartCode traditional electronic deadbolt',
|
|
58
|
+
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery, fz.lock_programming_event, fz.lock_pin_code_response],
|
|
59
|
+
toZigbee: [tz.lock, tz.pincode_lock],
|
|
60
|
+
meta: {pinCodeCount: 30},
|
|
61
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
62
|
+
const endpoint = device.getEndpoint(2);
|
|
63
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
64
|
+
await reporting.lockState(endpoint);
|
|
65
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
66
|
+
},
|
|
67
|
+
exposes: [e.lock(), e.battery(), e.pincode(), e.lock_action(), e.lock_action_source_name(), e.lock_action_user()],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
zigbeeModel: ['SMARTCODE_DEADBOLT_5'],
|
|
71
|
+
model: '99100-045',
|
|
72
|
+
vendor: 'Kwikset',
|
|
73
|
+
description: '910 SmartCode traditional electronic deadbolt',
|
|
74
|
+
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery, fz.lock_programming_event, fz.lock_pin_code_response],
|
|
75
|
+
toZigbee: [tz.lock, tz.pincode_lock],
|
|
76
|
+
meta: {pinCodeCount: 30},
|
|
77
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
78
|
+
const endpoint = device.getEndpoint(2);
|
|
79
|
+
console.log(device);
|
|
80
|
+
console.log(endpoint.clusters);
|
|
81
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
82
|
+
await reporting.lockState(endpoint);
|
|
83
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
84
|
+
},
|
|
85
|
+
exposes: [e.lock(), e.battery(), e.pincode(), e.lock_action(), e.lock_action_source_name(), e.lock_action_user()],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
zigbeeModel: ['SMARTCODE_DEADBOLT_5_L'],
|
|
89
|
+
model: '99100-006',
|
|
90
|
+
vendor: 'Kwikset',
|
|
91
|
+
description: '910 SmartCode traditional electronic deadbolt',
|
|
92
|
+
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery],
|
|
93
|
+
toZigbee: [tz.lock],
|
|
94
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
95
|
+
const endpoint = device.getEndpoint(2);
|
|
96
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
97
|
+
await reporting.lockState(endpoint);
|
|
98
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
99
|
+
},
|
|
100
|
+
exposes: [e.lock(), e.battery(), e.lock_action(), e.lock_action_source_name(), e.lock_action_user()],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
zigbeeModel: ['SMARTCODE_LEVER_5'],
|
|
104
|
+
model: '99120-021',
|
|
105
|
+
vendor: 'Kwikset',
|
|
106
|
+
description: '912 SmartCode traditional electronic lever',
|
|
107
|
+
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery, fz.lock_programming_event, fz.lock_pin_code_response],
|
|
108
|
+
toZigbee: [tz.lock, tz.pincode_lock],
|
|
109
|
+
meta: {pinCodeCount: 30},
|
|
110
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
111
|
+
const endpoint = device.getEndpoint(2);
|
|
112
|
+
console.log(device);
|
|
113
|
+
console.log(endpoint.clusters);
|
|
114
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
115
|
+
await reporting.lockState(endpoint);
|
|
116
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
117
|
+
},
|
|
118
|
+
exposes: [e.lock(), e.battery(), e.pincode(), e.lock_action(), e.lock_action_source_name(), e.lock_action_user()],
|
|
119
|
+
},
|
|
120
|
+
];
|
package/devices/lds.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const extend = require('../lib/extend');
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
zigbeeModel: ['ZBT-RGBWLight-A0000'],
|
|
6
|
+
model: 'ZBT-RGBWLight-A0000',
|
|
7
|
+
vendor: 'LDS',
|
|
8
|
+
description: 'Ynoa smart LED E27',
|
|
9
|
+
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 555]}),
|
|
10
|
+
},
|
|
11
|
+
];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const reporting = require('../lib/reporting');
|
|
2
|
+
const extend = require('../lib/extend');
|
|
3
|
+
const exposes = require('../lib/exposes');
|
|
4
|
+
const utils = require('../lib/utils');
|
|
5
|
+
const e = exposes.presets;
|
|
6
|
+
|
|
7
|
+
const fzLocal = {
|
|
8
|
+
led_trading_9133: {
|
|
9
|
+
cluster: 'greenPower',
|
|
10
|
+
type: ['commandNotification', 'commandCommisioningNotification'],
|
|
11
|
+
convert: (model, msg, publish, options, meta) => {
|
|
12
|
+
const commandID = msg.data.commandID;
|
|
13
|
+
if (utils.hasAlreadyProcessedMessage(msg, model, msg.data.frameCounter, `${msg.device.ieeeAddr}_${commandID}`)) return;
|
|
14
|
+
if (commandID === 224) return;
|
|
15
|
+
const lookup = {0x13: 'press_1', 0x14: 'press_2', 0x15: 'press_3', 0x16: 'press_4',
|
|
16
|
+
0x1B: 'hold_1', 0x1C: 'hold_2', 0x1D: 'hold_3', 0x1E: 'hold_4'};
|
|
17
|
+
if (!lookup.hasOwnProperty(commandID)) {
|
|
18
|
+
meta.logger.error(`led_trading_9133: missing command '${commandID}'`);
|
|
19
|
+
} else {
|
|
20
|
+
return {action: lookup[commandID]};
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
module.exports = [
|
|
27
|
+
{
|
|
28
|
+
fingerprint: [{modelID: 'GreenPower_2', ieeeAddr: /^0x00000000427.....$/}],
|
|
29
|
+
model: '9133',
|
|
30
|
+
vendor: 'Led Trading',
|
|
31
|
+
description: 'Pushbutton transmitter module',
|
|
32
|
+
fromZigbee: [fzLocal.led_trading_9133],
|
|
33
|
+
toZigbee: [],
|
|
34
|
+
exposes: [e.action(['press_1', 'hold_1', 'press_2', 'hold_2', 'press_3', 'hold_3', 'press_4', 'hold_4'])],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
zigbeeModel: ['HK-LN-DIM-A'],
|
|
38
|
+
model: 'HK-LN-DIM-A',
|
|
39
|
+
vendor: 'LED Trading',
|
|
40
|
+
description: 'ZigBee AC phase-cut dimmer',
|
|
41
|
+
extend: extend.light_onoff_brightness({noConfigure: true}),
|
|
42
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
43
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
44
|
+
const endpoint = device.getEndpoint(1);
|
|
45
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
46
|
+
await reporting.onOff(endpoint);
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
zigbeeModel: ['HK-LN-SOCKET-A'],
|
|
51
|
+
model: '9134',
|
|
52
|
+
vendor: 'LED Trading',
|
|
53
|
+
description: 'Powerstrip with 4 sockets and USB',
|
|
54
|
+
extend: extend.switch(),
|
|
55
|
+
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
|
|
56
|
+
e.switch().withEndpoint('l3'), e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5')],
|
|
57
|
+
meta: {multiEndpoint: true},
|
|
58
|
+
endpoint: (device) => {
|
|
59
|
+
return {l1: 1, l2: 2, l3: 3, l4: 4, l5: 5};
|
|
60
|
+
},
|
|
61
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
62
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
63
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
64
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
65
|
+
await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
|
|
66
|
+
await reporting.bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
];
|