@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,850 @@
|
|
|
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 constants = require('../lib/constants');
|
|
7
|
+
const e = exposes.presets;
|
|
8
|
+
const ea = exposes.access;
|
|
9
|
+
const {calibrateAndPrecisionRoundOptions} = require('../lib/utils');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const tzLocal = {
|
|
13
|
+
tirouter: {
|
|
14
|
+
key: ['transmit_power'],
|
|
15
|
+
convertSet: async (entity, key, value, meta) => {
|
|
16
|
+
await entity.write('genBasic', {0x1337: {value, type: 0x28}});
|
|
17
|
+
return {state: {[key]: value}};
|
|
18
|
+
},
|
|
19
|
+
convertGet: async (entity, key, meta) => {
|
|
20
|
+
await entity.read('genBasic', [0x1337]);
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
node_config: {
|
|
24
|
+
key: ['report_delay'],
|
|
25
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
26
|
+
const lookup = {'OFF': 0x00, 'ON': 0x01};
|
|
27
|
+
const value = lookup.hasOwnProperty(rawValue) ? lookup[rawValue] : parseInt(rawValue, 10);
|
|
28
|
+
const payloads = {
|
|
29
|
+
report_delay: ['genPowerCfg', {0x0201: {value, type: 0x21}}],
|
|
30
|
+
};
|
|
31
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
32
|
+
return {
|
|
33
|
+
state: {[key]: rawValue},
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
local_time: {
|
|
38
|
+
key: ['local_time'],
|
|
39
|
+
convertSet: async (entity, key, value, meta) => {
|
|
40
|
+
const firstEndpoint = meta.device.getEndpoint(1);
|
|
41
|
+
const time = Math.round(((new Date()).getTime() - constants.OneJanuary2000) / 1000 + ((new Date())
|
|
42
|
+
.getTimezoneOffset() * -1) * 60);
|
|
43
|
+
await firstEndpoint.write('genTime', {time: time});
|
|
44
|
+
return {state: {local_time: time}};
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
co2_config: {
|
|
48
|
+
key: ['auto_brightness', 'forced_recalibration', 'factory_reset_co2', 'long_chart_period', 'set_altitude',
|
|
49
|
+
'manual_forced_recalibration', 'light_indicator', 'light_indicator_level'],
|
|
50
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
51
|
+
const lookup = {'OFF': 0x00, 'ON': 0x01};
|
|
52
|
+
const value = lookup.hasOwnProperty(rawValue) ? lookup[rawValue] : parseInt(rawValue, 10);
|
|
53
|
+
const payloads = {
|
|
54
|
+
auto_brightness: ['msCO2', {0x0203: {value, type: 0x10}}],
|
|
55
|
+
forced_recalibration: ['msCO2', {0x0202: {value, type: 0x10}}],
|
|
56
|
+
factory_reset_co2: ['msCO2', {0x0206: {value, type: 0x10}}],
|
|
57
|
+
long_chart_period: ['msCO2', {0x0204: {value, type: 0x10}}],
|
|
58
|
+
set_altitude: ['msCO2', {0x0205: {value, type: 0x21}}],
|
|
59
|
+
manual_forced_recalibration: ['msCO2', {0x0207: {value, type: 0x21}}],
|
|
60
|
+
light_indicator: ['msCO2', {0x0211: {value, type: 0x10}}],
|
|
61
|
+
light_indicator_level: ['msCO2', {0x0209: {value, type: 0x20}}],
|
|
62
|
+
};
|
|
63
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
64
|
+
return {
|
|
65
|
+
state: {[key]: rawValue},
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
temperature_config: {
|
|
70
|
+
key: ['temperature_offset'],
|
|
71
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
72
|
+
const value = parseInt(rawValue, 10);
|
|
73
|
+
const payloads = {
|
|
74
|
+
temperature_offset: ['msTemperatureMeasurement', {0x0210: {value, type: 0x29}}],
|
|
75
|
+
};
|
|
76
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
77
|
+
return {
|
|
78
|
+
state: {[key]: rawValue},
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
humidity_config: {
|
|
83
|
+
key: ['humidity_offset'],
|
|
84
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
85
|
+
const value = parseInt(rawValue, 10);
|
|
86
|
+
const payloads = {
|
|
87
|
+
humidity_offset: ['msRelativeHumidity', {0x0210: {value, type: 0x29}}],
|
|
88
|
+
};
|
|
89
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
90
|
+
return {
|
|
91
|
+
state: {[key]: rawValue},
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
termostat_config: {
|
|
96
|
+
key: ['high_temperature', 'low_temperature', 'enable_temperature'],
|
|
97
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
98
|
+
const lookup = {'OFF': 0x00, 'ON': 0x01};
|
|
99
|
+
const value = lookup.hasOwnProperty(rawValue) ? lookup[rawValue] : parseInt(rawValue, 10);
|
|
100
|
+
const payloads = {
|
|
101
|
+
high_temperature: ['msTemperatureMeasurement', {0x0221: {value, type: 0x29}}],
|
|
102
|
+
low_temperature: ['msTemperatureMeasurement', {0x0222: {value, type: 0x29}}],
|
|
103
|
+
enable_temperature: ['msTemperatureMeasurement', {0x0220: {value, type: 0x10}}],
|
|
104
|
+
};
|
|
105
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
106
|
+
return {
|
|
107
|
+
state: {[key]: rawValue},
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
hydrostat_config: {
|
|
112
|
+
key: ['high_humidity', 'low_humidity', 'enable_humidity'],
|
|
113
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
114
|
+
const lookup = {'OFF': 0x00, 'ON': 0x01};
|
|
115
|
+
const value = lookup.hasOwnProperty(rawValue) ? lookup[rawValue] : parseInt(rawValue, 10);
|
|
116
|
+
const payloads = {
|
|
117
|
+
high_humidity: ['msRelativeHumidity', {0x0221: {value, type: 0x21}}],
|
|
118
|
+
low_humidity: ['msRelativeHumidity', {0x0222: {value, type: 0x21}}],
|
|
119
|
+
enable_humidity: ['msRelativeHumidity', {0x0220: {value, type: 0x10}}],
|
|
120
|
+
};
|
|
121
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
122
|
+
return {
|
|
123
|
+
state: {[key]: rawValue},
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
co2_gasstat_config: {
|
|
128
|
+
key: ['high_gas', 'low_gas', 'enable_gas'],
|
|
129
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
130
|
+
const lookup = {'OFF': 0x00, 'ON': 0x01};
|
|
131
|
+
const value = lookup.hasOwnProperty(rawValue) ? lookup[rawValue] : parseInt(rawValue, 10);
|
|
132
|
+
const payloads = {
|
|
133
|
+
high_gas: ['msCO2', {0x0221: {value, type: 0x21}}],
|
|
134
|
+
low_gas: ['msCO2', {0x0222: {value, type: 0x21}}],
|
|
135
|
+
enable_gas: ['msCO2', {0x0220: {value, type: 0x10}}],
|
|
136
|
+
};
|
|
137
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
138
|
+
return {
|
|
139
|
+
state: {[key]: rawValue},
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const fzLocal = {
|
|
146
|
+
tirouter: {
|
|
147
|
+
cluster: 'genBasic',
|
|
148
|
+
type: ['attributeReport', 'readResponse'],
|
|
149
|
+
convert: (model, msg, publish, options, meta) => {
|
|
150
|
+
const result = {linkquality: msg.linkquality};
|
|
151
|
+
if (msg.data['4919']) result['transmit_power'] = msg.data['4919'];
|
|
152
|
+
return result;
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
node_config: {
|
|
156
|
+
cluster: 'genPowerCfg',
|
|
157
|
+
type: ['attributeReport', 'readResponse'],
|
|
158
|
+
convert: (model, msg, publish, options, meta) => {
|
|
159
|
+
const result = {};
|
|
160
|
+
if (msg.data.hasOwnProperty(0x0201)) {
|
|
161
|
+
result.report_delay = msg.data[0x0201];
|
|
162
|
+
}
|
|
163
|
+
return result;
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
co2: {
|
|
167
|
+
cluster: 'msCO2',
|
|
168
|
+
type: ['attributeReport', 'readResponse'],
|
|
169
|
+
convert: (model, msg, publish, options, meta) => {
|
|
170
|
+
if (msg.data.hasOwnProperty('measuredValue')) {
|
|
171
|
+
const co2 = msg.data['measuredValue'];
|
|
172
|
+
return {co2: calibrateAndPrecisionRoundOptions(co2, options, 'co2')};
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
co2_config: {
|
|
177
|
+
cluster: 'msCO2',
|
|
178
|
+
type: ['attributeReport', 'readResponse'],
|
|
179
|
+
convert: (model, msg, publish, options, meta) => {
|
|
180
|
+
const result = {};
|
|
181
|
+
if (msg.data.hasOwnProperty(0x0203)) {
|
|
182
|
+
result.auto_brightness = ['OFF', 'ON'][msg.data[0x0203]];
|
|
183
|
+
}
|
|
184
|
+
if (msg.data.hasOwnProperty(0x0202)) {
|
|
185
|
+
result.forced_recalibration = ['OFF', 'ON'][msg.data[0x0202]];
|
|
186
|
+
}
|
|
187
|
+
if (msg.data.hasOwnProperty(0x0206)) {
|
|
188
|
+
result.factory_reset_co2 = ['OFF', 'ON'][msg.data[0x0206]];
|
|
189
|
+
}
|
|
190
|
+
if (msg.data.hasOwnProperty(0x0204)) {
|
|
191
|
+
result.long_chart_period = ['OFF', 'ON'][msg.data[0x0204]];
|
|
192
|
+
}
|
|
193
|
+
if (msg.data.hasOwnProperty(0x0205)) {
|
|
194
|
+
result.set_altitude = msg.data[0x0205];
|
|
195
|
+
}
|
|
196
|
+
if (msg.data.hasOwnProperty(0x0207)) {
|
|
197
|
+
result.manual_forced_recalibration = msg.data[0x0207];
|
|
198
|
+
}
|
|
199
|
+
if (msg.data.hasOwnProperty(0x0211)) {
|
|
200
|
+
result.light_indicator = ['OFF', 'ON'][msg.data[0x0211]];
|
|
201
|
+
}
|
|
202
|
+
if (msg.data.hasOwnProperty(0x0209)) {
|
|
203
|
+
result.light_indicator_level = msg.data[0x0209];
|
|
204
|
+
}
|
|
205
|
+
return result;
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
temperature_config: {
|
|
209
|
+
cluster: 'msTemperatureMeasurement',
|
|
210
|
+
type: 'readResponse',
|
|
211
|
+
convert: (model, msg, publish, options, meta) => {
|
|
212
|
+
const result = {};
|
|
213
|
+
if (msg.data.hasOwnProperty(0x0210)) {
|
|
214
|
+
result.temperature_offset = msg.data[0x0210];
|
|
215
|
+
}
|
|
216
|
+
return result;
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
humidity_config: {
|
|
220
|
+
cluster: 'msRelativeHumidity',
|
|
221
|
+
type: 'readResponse',
|
|
222
|
+
convert: (model, msg, publish, options, meta) => {
|
|
223
|
+
const result = {};
|
|
224
|
+
if (msg.data.hasOwnProperty(0x0210)) {
|
|
225
|
+
result.humidity_offset = msg.data[0x0210];
|
|
226
|
+
}
|
|
227
|
+
return result;
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
termostat_config: {
|
|
231
|
+
cluster: 'msTemperatureMeasurement',
|
|
232
|
+
type: ['attributeReport', 'readResponse'],
|
|
233
|
+
convert: (model, msg, publish, options, meta) => {
|
|
234
|
+
const result = {};
|
|
235
|
+
if (msg.data.hasOwnProperty(0x0221)) {
|
|
236
|
+
result.high_temperature = msg.data[0x0221];
|
|
237
|
+
}
|
|
238
|
+
if (msg.data.hasOwnProperty(0x0222)) {
|
|
239
|
+
result.low_temperature = msg.data[0x0222];
|
|
240
|
+
}
|
|
241
|
+
if (msg.data.hasOwnProperty(0x0220)) {
|
|
242
|
+
result.enable_temperature = ['OFF', 'ON'][msg.data[0x0220]];
|
|
243
|
+
}
|
|
244
|
+
return result;
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
hydrostat_config: {
|
|
248
|
+
cluster: 'msRelativeHumidity',
|
|
249
|
+
type: ['attributeReport', 'readResponse'],
|
|
250
|
+
convert: (model, msg, publish, options, meta) => {
|
|
251
|
+
const result = {};
|
|
252
|
+
if (msg.data.hasOwnProperty(0x0221)) {
|
|
253
|
+
result.high_humidity = msg.data[0x0221];
|
|
254
|
+
}
|
|
255
|
+
if (msg.data.hasOwnProperty(0x0222)) {
|
|
256
|
+
result.low_humidity = msg.data[0x0222];
|
|
257
|
+
}
|
|
258
|
+
if (msg.data.hasOwnProperty(0x0220)) {
|
|
259
|
+
result.enable_humidity = ['OFF', 'ON'][msg.data[0x0220]];
|
|
260
|
+
}
|
|
261
|
+
return result;
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
co2_gasstat_config: {
|
|
265
|
+
cluster: 'msCO2',
|
|
266
|
+
type: ['attributeReport', 'readResponse'],
|
|
267
|
+
convert: (model, msg, publish, options, meta) => {
|
|
268
|
+
const result = {};
|
|
269
|
+
if (msg.data.hasOwnProperty(0x0221)) {
|
|
270
|
+
result.high_gas = msg.data[0x0221];
|
|
271
|
+
}
|
|
272
|
+
if (msg.data.hasOwnProperty(0x0222)) {
|
|
273
|
+
result.low_gas = msg.data[0x0222];
|
|
274
|
+
}
|
|
275
|
+
if (msg.data.hasOwnProperty(0x0220)) {
|
|
276
|
+
result.enable_gas = ['OFF', 'ON'][msg.data[0x0220]];
|
|
277
|
+
}
|
|
278
|
+
return result;
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
module.exports = [
|
|
284
|
+
{
|
|
285
|
+
zigbeeModel: ['ti.router'],
|
|
286
|
+
model: 'ti.router',
|
|
287
|
+
vendor: 'Custom devices (DiY)',
|
|
288
|
+
description: 'Texas Instruments router',
|
|
289
|
+
fromZigbee: [fzLocal.tirouter],
|
|
290
|
+
toZigbee: [tzLocal.tirouter],
|
|
291
|
+
exposes: [exposes.numeric('transmit_power', ea.ALL).withValueMin(-20).withValueMax(20).withValueStep(1).withUnit('dBm')
|
|
292
|
+
.withDescription('Transmit power, supported from firmware 20221102. The max for CC1352 is 20 dBm and 5 dBm for CC2652' +
|
|
293
|
+
' (any higher value is converted to 5dBm)')],
|
|
294
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
295
|
+
const endpoint = device.getEndpoint(8);
|
|
296
|
+
const payload = [{attribute: 'zclVersion', minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
297
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
|
|
298
|
+
await endpoint.configureReporting('genBasic', payload);
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
zigbeeModel: ['lumi.router'],
|
|
303
|
+
model: 'CC2530.ROUTER',
|
|
304
|
+
vendor: 'Custom devices (DiY)',
|
|
305
|
+
description: '[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/)',
|
|
306
|
+
fromZigbee: [fz.CC2530ROUTER_led, fz.CC2530ROUTER_meta, fz.ignore_basic_report],
|
|
307
|
+
toZigbee: [tz.ptvo_switch_trigger],
|
|
308
|
+
exposes: [exposes.binary('led', ea.STATE, true, false)],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
zigbeeModel: ['cc2538.router.v1'],
|
|
312
|
+
model: 'CC2538.ROUTER.V1',
|
|
313
|
+
vendor: 'Custom devices (DiY)',
|
|
314
|
+
description: '[MODKAM stick СС2538 router](https://github.com/jethome-ru/zigbee-firmware/tree/master/ti/router/cc2538_cc2592)',
|
|
315
|
+
fromZigbee: [fz.ignore_basic_report],
|
|
316
|
+
toZigbee: [],
|
|
317
|
+
exposes: [],
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
zigbeeModel: ['cc2538.router.v2'],
|
|
321
|
+
model: 'CC2538.ROUTER.V2',
|
|
322
|
+
vendor: 'Custom devices (DiY)',
|
|
323
|
+
description: '[MODKAM stick СС2538 router with temperature sensor]' +
|
|
324
|
+
'(https://github.com/jethome-ru/zigbee-firmware/tree/master/ti/router/cc2538_cc2592)',
|
|
325
|
+
fromZigbee: [fz.ignore_basic_report, fz.device_temperature],
|
|
326
|
+
toZigbee: [],
|
|
327
|
+
exposes: [e.device_temperature()],
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
zigbeeModel: ['ptvo.switch'],
|
|
331
|
+
model: 'ptvo.switch',
|
|
332
|
+
vendor: 'Custom devices (DiY)',
|
|
333
|
+
description: '[Multi-channel relay switch](https://ptvo.info/zigbee-switch-configurable-firmware-router-199/)',
|
|
334
|
+
fromZigbee: [fz.on_off, fz.ptvo_multistate_action, fz.legacy.ptvo_switch_buttons, fz.ptvo_switch_uart,
|
|
335
|
+
fz.ptvo_switch_analog_input, fz.brightness, fz.ignore_basic_report],
|
|
336
|
+
toZigbee: [tz.ptvo_switch_trigger, tz.ptvo_switch_uart, tz.ptvo_switch_analog_input, tz.ptvo_switch_light_brightness, tz.on_off],
|
|
337
|
+
exposes: [exposes.text('action').withAccess(ea.STATE_SET)].concat(((enpoinsCount) => {
|
|
338
|
+
const features = [];
|
|
339
|
+
for (let i = 1; i <= enpoinsCount; i++) {
|
|
340
|
+
const epName = `l${i}`;
|
|
341
|
+
features.push(e.switch().withEndpoint(epName));
|
|
342
|
+
features.push(exposes.text(epName, ea.ALL).withEndpoint(epName)
|
|
343
|
+
.withProperty(epName).withDescription('State or sensor value'));
|
|
344
|
+
}
|
|
345
|
+
return features;
|
|
346
|
+
})(16)),
|
|
347
|
+
meta: {multiEndpoint: true, tuyaThermostatPreset: fz.legacy /* for subclassed custom converters */},
|
|
348
|
+
endpoint: (device) => {
|
|
349
|
+
return {
|
|
350
|
+
l1: 1, l2: 2, l3: 3, l4: 4, l5: 5, l6: 6, l7: 7, l8: 8,
|
|
351
|
+
l9: 9, l10: 10, l11: 11, l12: 12, l13: 13, l14: 14, l15: 15, l16: 16,
|
|
352
|
+
action: 1,
|
|
353
|
+
};
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
zigbeeModel: ['DNCKAT_D001'],
|
|
358
|
+
model: 'DNCKATSD001',
|
|
359
|
+
vendor: 'Custom devices (DiY)',
|
|
360
|
+
description: '[DNCKAT single key wired wall dimmable light switch](https://github.com/dzungpv/dnckatsw00x/)',
|
|
361
|
+
extend: extend.light_onoff_brightness(),
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
zigbeeModel: ['DNCKAT_S001'],
|
|
365
|
+
model: 'DNCKATSW001',
|
|
366
|
+
vendor: 'Custom devices (DiY)',
|
|
367
|
+
description: '[DNCKAT single key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)',
|
|
368
|
+
extend: extend.switch(),
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
zigbeeModel: ['DNCKAT_S002'],
|
|
372
|
+
model: 'DNCKATSW002',
|
|
373
|
+
vendor: 'Custom devices (DiY)',
|
|
374
|
+
description: '[DNCKAT double key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)',
|
|
375
|
+
fromZigbee: [fz.on_off, fz.DNCKAT_S00X_buttons],
|
|
376
|
+
meta: {multiEndpoint: true},
|
|
377
|
+
extend: extend.switch(),
|
|
378
|
+
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right'),
|
|
379
|
+
e.action(['release_left', 'hold_left', 'release_right', 'hold_right'])],
|
|
380
|
+
endpoint: (device) => {
|
|
381
|
+
return {'left': 1, 'right': 2};
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
zigbeeModel: ['DNCKAT_S003'],
|
|
386
|
+
model: 'DNCKATSW003',
|
|
387
|
+
vendor: 'Custom devices (DiY)',
|
|
388
|
+
description: '[DNCKAT triple key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)',
|
|
389
|
+
fromZigbee: [fz.on_off, fz.DNCKAT_S00X_buttons],
|
|
390
|
+
meta: {multiEndpoint: true},
|
|
391
|
+
extend: extend.switch(),
|
|
392
|
+
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right'), e.switch().withEndpoint('center'),
|
|
393
|
+
e.action(['release_left', 'hold_left', 'release_right', 'hold_right', 'release_center', 'hold_center'])],
|
|
394
|
+
endpoint: (device) => {
|
|
395
|
+
return {'left': 1, 'center': 2, 'right': 3};
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
zigbeeModel: ['DNCKAT_S004'],
|
|
400
|
+
model: 'DNCKATSW004',
|
|
401
|
+
vendor: 'Custom devices (DiY)',
|
|
402
|
+
description: '[DNCKAT quadruple key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)',
|
|
403
|
+
fromZigbee: [fz.on_off, fz.DNCKAT_S00X_buttons],
|
|
404
|
+
meta: {multiEndpoint: true},
|
|
405
|
+
extend: extend.switch(),
|
|
406
|
+
exposes: [e.switch().withEndpoint('bottom_left'), e.switch().withEndpoint('bottom_right'),
|
|
407
|
+
e.switch().withEndpoint('top_left'), e.switch().withEndpoint('top_right'),
|
|
408
|
+
e.action([
|
|
409
|
+
'release_bottom_left', 'hold_bottom_left', 'release_bottom_right', 'hold_bottom_right',
|
|
410
|
+
'release_top_left', 'hold_top_left', 'release_top_right', 'hold_top_right',
|
|
411
|
+
])],
|
|
412
|
+
endpoint: (device) => {
|
|
413
|
+
return {'bottom_left': 1, 'bottom_right': 2, 'top_left': 3, 'top_right': 4};
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
zigbeeModel: ['ZigUP'],
|
|
418
|
+
model: 'ZigUP',
|
|
419
|
+
vendor: 'Custom devices (DiY)',
|
|
420
|
+
description: '[CC2530 based ZigBee relais, switch, sensor and router](https://github.com/formtapez/ZigUP/)',
|
|
421
|
+
fromZigbee: [fz.ZigUP],
|
|
422
|
+
toZigbee: [tz.on_off, tz.light_color, tz.ZigUP_lock],
|
|
423
|
+
exposes: [e.switch()],
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
zigbeeModel: ['ZWallRemote0'],
|
|
427
|
+
model: 'ZWallRemote0',
|
|
428
|
+
vendor: 'Custom devices (DiY)',
|
|
429
|
+
description: '[Matts Wall Switch Remote](https://github.com/mattlokes/ZWallRemote)',
|
|
430
|
+
fromZigbee: [fz.command_toggle],
|
|
431
|
+
toZigbee: [],
|
|
432
|
+
exposes: [e.action(['toggle'])],
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
zigbeeModel: ['ZeeFlora'],
|
|
436
|
+
model: 'ZeeFlora',
|
|
437
|
+
vendor: 'Custom devices (DiY)',
|
|
438
|
+
description: 'Flower sensor with rechargeable battery',
|
|
439
|
+
fromZigbee: [fz.temperature, fz.illuminance, fz.soil_moisture, fz.battery],
|
|
440
|
+
toZigbee: [],
|
|
441
|
+
meta: {multiEndpoint: true},
|
|
442
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
443
|
+
const firstEndpoint = device.getEndpoint(1);
|
|
444
|
+
await reporting.bind(firstEndpoint, coordinatorEndpoint, [
|
|
445
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msIlluminanceMeasurement', 'msSoilMoisture']);
|
|
446
|
+
const overides = {min: 0, max: 3600, change: 0};
|
|
447
|
+
await reporting.batteryVoltage(firstEndpoint, overides);
|
|
448
|
+
await reporting.batteryPercentageRemaining(firstEndpoint, overides);
|
|
449
|
+
await reporting.temperature(firstEndpoint, overides);
|
|
450
|
+
await reporting.illuminance(firstEndpoint, overides);
|
|
451
|
+
await reporting.soil_moisture(firstEndpoint, overides);
|
|
452
|
+
},
|
|
453
|
+
exposes: [e.soil_moisture(), e.battery(), e.illuminance(), e.temperature()],
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
zigbeeModel: ['EFEKTA_PWS'],
|
|
457
|
+
model: 'EFEKTA_PWS',
|
|
458
|
+
vendor: 'Custom devices (DiY)',
|
|
459
|
+
description: '[Plant Wattering Sensor, CR2450, CR2477 batteries, temperature ]',
|
|
460
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.illuminance, fz.soil_moisture, fz.battery, fzLocal.node_config],
|
|
461
|
+
toZigbee: [tzLocal.node_config],
|
|
462
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
463
|
+
const firstEndpoint = device.getEndpoint(1);
|
|
464
|
+
await reporting.bind(firstEndpoint, coordinatorEndpoint, [
|
|
465
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msSoilMoisture']);
|
|
466
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
467
|
+
await reporting.batteryVoltage(firstEndpoint, overides);
|
|
468
|
+
await reporting.batteryPercentageRemaining(firstEndpoint, overides);
|
|
469
|
+
await reporting.temperature(firstEndpoint, overides);
|
|
470
|
+
await reporting.soil_moisture(firstEndpoint, overides);
|
|
471
|
+
const payload1 = [{attribute: {ID: 0x0201, type: 0x21},
|
|
472
|
+
minimumReportInterval: 0, maximumReportInterval: 21600, reportableChange: 0}];
|
|
473
|
+
await firstEndpoint.configureReporting('genPowerCfg', payload1);
|
|
474
|
+
},
|
|
475
|
+
exposes: [e.soil_moisture(), e.battery(), e.temperature(),
|
|
476
|
+
exposes.numeric('report_delay', ea.STATE_SET).withUnit('min').withValueMin(1).withValueMax(240)
|
|
477
|
+
.withDescription('Adjust Report Delay. Setting the time in minutes, by default 15 minutes')],
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
zigbeeModel: ['EFEKTA_THP_LR'],
|
|
481
|
+
model: 'EFEKTA_THP_LR',
|
|
482
|
+
vendor: 'Custom devices (DiY)',
|
|
483
|
+
description: 'DIY outdoor long-range sensor for temperature, humidity and atmospheric pressure',
|
|
484
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.pressure, fz.battery],
|
|
485
|
+
toZigbee: [],
|
|
486
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
487
|
+
const endpoint = device.getEndpoint(1);
|
|
488
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [
|
|
489
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement']);
|
|
490
|
+
const overides = {min: 0, max: 64800, change: 0};
|
|
491
|
+
await reporting.batteryVoltage(endpoint, overides);
|
|
492
|
+
await reporting.batteryPercentageRemaining(endpoint, overides);
|
|
493
|
+
await reporting.temperature(endpoint, overides);
|
|
494
|
+
await reporting.humidity(endpoint, overides);
|
|
495
|
+
await reporting.pressureExtended(endpoint, overides);
|
|
496
|
+
await endpoint.read('msPressureMeasurement', ['scale']);
|
|
497
|
+
},
|
|
498
|
+
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure()],
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
zigbeeModel: ['EFEKTA_ePWS'],
|
|
502
|
+
model: 'EFEKTA_ePWS',
|
|
503
|
+
vendor: 'Custom devices (DiY)',
|
|
504
|
+
description: '[Plant wattering sensor with e-ink display](https://efektalab.com/epws102)',
|
|
505
|
+
fromZigbee: [fz.temperature, fz.soil_moisture, fz.battery],
|
|
506
|
+
toZigbee: [],
|
|
507
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
508
|
+
const firstEndpoint = device.getEndpoint(1);
|
|
509
|
+
await reporting.bind(firstEndpoint, coordinatorEndpoint, ['genPowerCfg', 'msTemperatureMeasurement', 'msSoilMoisture']);
|
|
510
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
511
|
+
await reporting.batteryVoltage(firstEndpoint, overides);
|
|
512
|
+
await reporting.batteryPercentageRemaining(firstEndpoint, overides);
|
|
513
|
+
await reporting.temperature(firstEndpoint, overides);
|
|
514
|
+
await reporting.soil_moisture(firstEndpoint, overides);
|
|
515
|
+
},
|
|
516
|
+
exposes: [e.soil_moisture(), e.battery(), e.temperature()],
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
zigbeeModel: ['EFEKTA_eON213z'],
|
|
520
|
+
model: 'EFEKTA_eON213z',
|
|
521
|
+
vendor: 'Custom devices (DiY)',
|
|
522
|
+
description: '[Temperature and humidity sensor with e-ink2.13](http://efektalab.com/eON213z)',
|
|
523
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.battery],
|
|
524
|
+
toZigbee: [],
|
|
525
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
526
|
+
const endpoint = device.getEndpoint(1);
|
|
527
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [
|
|
528
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity']);
|
|
529
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
530
|
+
await reporting.batteryVoltage(endpoint, overides);
|
|
531
|
+
await reporting.batteryPercentageRemaining(endpoint, overides);
|
|
532
|
+
await reporting.temperature(endpoint, overides);
|
|
533
|
+
await reporting.humidity(endpoint, overides);
|
|
534
|
+
},
|
|
535
|
+
exposes: [e.battery(), e.temperature(), e.humidity()],
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
zigbeeModel: ['EFEKTA_miniPWS'],
|
|
539
|
+
model: 'EFEKTA_miniPWS',
|
|
540
|
+
vendor: 'Custom devices (DiY)',
|
|
541
|
+
description: '[Mini plant wattering sensor](http://efektalab.com/miniPWS)',
|
|
542
|
+
fromZigbee: [fz.soil_moisture, fz.battery, fzLocal.node_config],
|
|
543
|
+
toZigbee: [tzLocal.node_config],
|
|
544
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
545
|
+
const firstEndpoint = device.getEndpoint(1);
|
|
546
|
+
await reporting.bind(firstEndpoint, coordinatorEndpoint, ['genPowerCfg', 'msSoilMoisture']);
|
|
547
|
+
},
|
|
548
|
+
exposes: [e.soil_moisture(), e.battery(),
|
|
549
|
+
exposes.numeric('report_delay', ea.STATE_SET).withUnit('min').withDescription('Adjust Report Delay, by default 60 minutes')
|
|
550
|
+
.withValueMin(1).withValueMax(180)],
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
zigbeeModel: ['EFEKTA_eON213wz'],
|
|
554
|
+
model: 'EFEKTA_eON213wz',
|
|
555
|
+
vendor: 'Custom devices (DiY)',
|
|
556
|
+
description: '[Mini weather station, digital barometer, forecast, charts, temperature, humidity](http://efektalab.com/eON213wz)',
|
|
557
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.pressure, fz.battery],
|
|
558
|
+
toZigbee: [],
|
|
559
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
560
|
+
const endpoint = device.getEndpoint(1);
|
|
561
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [
|
|
562
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement']);
|
|
563
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
564
|
+
await reporting.batteryVoltage(endpoint, overides);
|
|
565
|
+
await reporting.batteryPercentageRemaining(endpoint, overides);
|
|
566
|
+
await reporting.temperature(endpoint, overides);
|
|
567
|
+
await reporting.humidity(endpoint, overides);
|
|
568
|
+
await reporting.pressureExtended(endpoint, overides);
|
|
569
|
+
await endpoint.read('msPressureMeasurement', ['scale']);
|
|
570
|
+
},
|
|
571
|
+
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure()],
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
zigbeeModel: ['EFEKTA_THP'],
|
|
575
|
+
model: 'EFEKTA_THP',
|
|
576
|
+
vendor: 'Custom devices (DiY)',
|
|
577
|
+
description: '[DIY temperature, humidity and atmospheric pressure sensor, long battery life](http://efektalab.com/eON_THP)',
|
|
578
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.pressure, fz.battery],
|
|
579
|
+
toZigbee: [],
|
|
580
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
581
|
+
const endpoint = device.getEndpoint(1);
|
|
582
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [
|
|
583
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement']);
|
|
584
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
585
|
+
await reporting.batteryVoltage(endpoint, overides);
|
|
586
|
+
await reporting.batteryPercentageRemaining(endpoint, overides);
|
|
587
|
+
await reporting.temperature(endpoint, overides);
|
|
588
|
+
await reporting.humidity(endpoint, overides);
|
|
589
|
+
await reporting.pressureExtended(endpoint, overides);
|
|
590
|
+
await endpoint.read('msPressureMeasurement', ['scale']);
|
|
591
|
+
},
|
|
592
|
+
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure()],
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
zigbeeModel: ['EFEKTA_PWS_Max'],
|
|
596
|
+
model: 'EFEKTA_PWS_Max',
|
|
597
|
+
vendor: 'Custom devices (DiY)',
|
|
598
|
+
description: '[Plant watering sensor EFEKTA PWS max](http://efektalab.com/PWS_Max)',
|
|
599
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.illuminance, fz.soil_moisture, fz.battery],
|
|
600
|
+
toZigbee: [],
|
|
601
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
602
|
+
const firstEndpoint = device.getEndpoint(1);
|
|
603
|
+
await reporting.bind(firstEndpoint, coordinatorEndpoint, [
|
|
604
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msIlluminanceMeasurement', 'msSoilMoisture']);
|
|
605
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
606
|
+
await reporting.batteryVoltage(firstEndpoint, overides);
|
|
607
|
+
await reporting.batteryPercentageRemaining(firstEndpoint, overides);
|
|
608
|
+
await reporting.temperature(firstEndpoint, overides);
|
|
609
|
+
await reporting.humidity(firstEndpoint, overides);
|
|
610
|
+
await reporting.illuminance(firstEndpoint, overides);
|
|
611
|
+
await reporting.soil_moisture(firstEndpoint, overides);
|
|
612
|
+
},
|
|
613
|
+
exposes: [e.soil_moisture(), e.battery(), e.illuminance(), e.temperature(), e.humidity()],
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
zigbeeModel: ['EFEKTA_PWS_MaxPro'],
|
|
617
|
+
model: 'EFEKTA_PWS_MaxPro',
|
|
618
|
+
vendor: 'Custom devices (DiY)',
|
|
619
|
+
description: '[Plant watering sensor EFEKTA PWS Max Pro, long battery life](http://efektalab.com/PWS_MaxPro)',
|
|
620
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.illuminance, fz.soil_moisture, fz.battery],
|
|
621
|
+
toZigbee: [],
|
|
622
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
623
|
+
const firstEndpoint = device.getEndpoint(1);
|
|
624
|
+
await reporting.bind(firstEndpoint, coordinatorEndpoint, [
|
|
625
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msIlluminanceMeasurement', 'msSoilMoisture']);
|
|
626
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
627
|
+
await reporting.batteryVoltage(firstEndpoint, overides);
|
|
628
|
+
await reporting.batteryPercentageRemaining(firstEndpoint, overides);
|
|
629
|
+
await reporting.temperature(firstEndpoint, overides);
|
|
630
|
+
await reporting.humidity(firstEndpoint, overides);
|
|
631
|
+
await reporting.illuminance(firstEndpoint, overides);
|
|
632
|
+
await reporting.soil_moisture(firstEndpoint, overides);
|
|
633
|
+
},
|
|
634
|
+
exposes: [e.soil_moisture(), e.battery(), e.illuminance(), e.temperature(), e.humidity()],
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
zigbeeModel: ['EFEKTA_eON29wz'],
|
|
638
|
+
model: 'EFEKTA_eON29wz',
|
|
639
|
+
vendor: 'Custom devices (DiY)',
|
|
640
|
+
description: '[Mini weather station, barometer, forecast, charts, temperature, humidity, light](http://efektalab.com/eON290wz)',
|
|
641
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.pressure, fz.illuminance, fz.battery],
|
|
642
|
+
toZigbee: [],
|
|
643
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
644
|
+
const endpoint = device.getEndpoint(1);
|
|
645
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [
|
|
646
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement', 'msIlluminanceMeasurement']);
|
|
647
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
648
|
+
await reporting.batteryVoltage(endpoint, overides);
|
|
649
|
+
await reporting.batteryPercentageRemaining(endpoint, overides);
|
|
650
|
+
await reporting.temperature(endpoint, overides);
|
|
651
|
+
await reporting.humidity(endpoint, overides);
|
|
652
|
+
await reporting.illuminance(endpoint, overides);
|
|
653
|
+
await reporting.pressureExtended(endpoint, overides);
|
|
654
|
+
await endpoint.read('msPressureMeasurement', ['scale']);
|
|
655
|
+
},
|
|
656
|
+
exposes: [e.battery(), e.illuminance(), e.temperature(), e.humidity(), e.pressure()],
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
zigbeeModel: ['EFEKTA_eFlower_Pro'],
|
|
660
|
+
model: 'EFEKTA_eFlower_Pro',
|
|
661
|
+
vendor: 'Custom devices (DiY)',
|
|
662
|
+
description: '[Plant Wattering Sensor with e-ink display 2.13](https://efektalab.com/eFlowerPro)',
|
|
663
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.illuminance, fz.soil_moisture, fz.battery],
|
|
664
|
+
toZigbee: [],
|
|
665
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
666
|
+
const firstEndpoint = device.getEndpoint(1);
|
|
667
|
+
await reporting.bind(firstEndpoint, coordinatorEndpoint, [
|
|
668
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msIlluminanceMeasurement', 'msSoilMoisture']);
|
|
669
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
670
|
+
await reporting.batteryVoltage(firstEndpoint, overides);
|
|
671
|
+
await reporting.batteryPercentageRemaining(firstEndpoint, overides);
|
|
672
|
+
await reporting.temperature(firstEndpoint, overides);
|
|
673
|
+
await reporting.humidity(firstEndpoint, overides);
|
|
674
|
+
await reporting.illuminance(firstEndpoint, overides);
|
|
675
|
+
await reporting.soil_moisture(firstEndpoint, overides);
|
|
676
|
+
},
|
|
677
|
+
exposes: [e.soil_moisture(), e.battery(), e.illuminance(), e.temperature(), e.humidity()],
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
zigbeeModel: ['EFEKTA_eTH102'],
|
|
681
|
+
model: 'EFEKTA_eTH102',
|
|
682
|
+
vendor: 'Custom devices (DiY)',
|
|
683
|
+
description: '[Mini digital thermometer & hygrometer with e-ink1.02](http://efektalab.com/eTH102)',
|
|
684
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.battery],
|
|
685
|
+
toZigbee: [],
|
|
686
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
687
|
+
const endpoint = device.getEndpoint(1);
|
|
688
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [
|
|
689
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity']);
|
|
690
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
691
|
+
await reporting.batteryVoltage(endpoint, overides);
|
|
692
|
+
await reporting.batteryPercentageRemaining(endpoint, overides);
|
|
693
|
+
await reporting.temperature(endpoint, overides);
|
|
694
|
+
await reporting.humidity(endpoint, overides);
|
|
695
|
+
},
|
|
696
|
+
exposes: [e.battery(), e.temperature(), e.humidity()],
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
zigbeeModel: ['EFEKTA_iAQ'],
|
|
700
|
+
model: 'EFEKTA_iAQ',
|
|
701
|
+
vendor: 'Custom devices (DiY)',
|
|
702
|
+
description: '[CO2 Monitor with IPS TFT Display, outdoor temperature and humidity, date and time](http://efektalab.com/iAQ)',
|
|
703
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.illuminance, fzLocal.co2, fzLocal.co2_config,
|
|
704
|
+
fzLocal.temperature_config, fzLocal.humidity_config],
|
|
705
|
+
toZigbee: [tzLocal.co2_config, tzLocal.temperature_config, tzLocal.humidity_config, tzLocal.local_time],
|
|
706
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
707
|
+
const endpoint = device.getEndpoint(1);
|
|
708
|
+
const clusters = ['msTemperatureMeasurement', 'msRelativeHumidity', 'msIlluminanceMeasurement', 'msCO2'];
|
|
709
|
+
await reporting.bind(endpoint, coordinatorEndpoint, clusters);
|
|
710
|
+
for (const cluster of clusters) {
|
|
711
|
+
await endpoint.configureReporting(cluster, [
|
|
712
|
+
{attribute: 'measuredValue', minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0},
|
|
713
|
+
]);
|
|
714
|
+
}
|
|
715
|
+
const payload1 = [{attribute: {ID: 0x0203, type: 0x10},
|
|
716
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
717
|
+
await endpoint.configureReporting('msCO2', payload1);
|
|
718
|
+
const payload2 = [{attribute: {ID: 0x0202, type: 0x10},
|
|
719
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
720
|
+
await endpoint.configureReporting('msCO2', payload2);
|
|
721
|
+
const payload3 = [{attribute: {ID: 0x0204, type: 0x10},
|
|
722
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
723
|
+
await endpoint.configureReporting('msCO2', payload3);
|
|
724
|
+
const payload4 = [{attribute: {ID: 0x0205, type: 0x21},
|
|
725
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
726
|
+
await endpoint.configureReporting('msCO2', payload4);
|
|
727
|
+
const payload5 = [{attribute: {ID: 0x0206, type: 0x10},
|
|
728
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
729
|
+
await endpoint.configureReporting('msCO2', payload5);
|
|
730
|
+
const payload6 = [{attribute: {ID: 0x0207, type: 0x21},
|
|
731
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
732
|
+
await endpoint.configureReporting('msCO2', payload6);
|
|
733
|
+
const time = Math.round(((new Date()).getTime() - constants.OneJanuary2000) / 1000 + ((new Date())
|
|
734
|
+
.getTimezoneOffset() * -1) * 60);
|
|
735
|
+
const values = {time: time};
|
|
736
|
+
endpoint.write('genTime', values);
|
|
737
|
+
},
|
|
738
|
+
exposes: [e.co2(), e.temperature(), e.humidity(), e.illuminance(),
|
|
739
|
+
exposes.binary('auto_brightness', ea.STATE_SET, 'ON', 'OFF')
|
|
740
|
+
.withDescription('Enable or Disable Auto Brightness of the Display'),
|
|
741
|
+
exposes.binary('long_chart_period', ea.STATE_SET, 'ON', 'OFF')
|
|
742
|
+
.withDescription('The period of plotting the CO2 level(OFF - 1H | ON - 24H)'),
|
|
743
|
+
exposes.numeric('set_altitude', ea.STATE_SET).withUnit('meters')
|
|
744
|
+
.withDescription('Setting the altitude above sea level (for high accuracy of the CO2 sensor)')
|
|
745
|
+
.withValueMin(0).withValueMax(3000),
|
|
746
|
+
exposes.enum('local_time', ea.STATE_SET, ['set']).withDescription('Set date and time'),
|
|
747
|
+
exposes.numeric('temperature_offset', ea.STATE_SET).withUnit('°C').withDescription('Adjust temperature')
|
|
748
|
+
.withValueMin(-30).withValueMax(60),
|
|
749
|
+
exposes.numeric('humidity_offset', ea.STATE_SET).withUnit('%').withDescription('Adjust humidity')
|
|
750
|
+
.withValueMin(0).withValueMax(99),
|
|
751
|
+
exposes.binary('forced_recalibration', ea.STATE_SET, 'ON', 'OFF')
|
|
752
|
+
.withDescription('Start FRC (Perform Forced Recalibration of the CO2 Sensor)'),
|
|
753
|
+
exposes.binary('factory_reset_co2', ea.STATE_SET, 'ON', 'OFF').withDescription('Factory Reset CO2 sensor'),
|
|
754
|
+
exposes.numeric('manual_forced_recalibration', ea.STATE_SET).withUnit('ppm')
|
|
755
|
+
.withDescription('Start Manual FRC (Perform Forced Recalibration of the CO2 Sensor)')
|
|
756
|
+
.withValueMin(0).withValueMax(5000)],
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
zigbeeModel: ['EFEKTA_CO2_Smart_Monitor'],
|
|
760
|
+
model: 'EFEKTA_CO2_Smart_Monitor',
|
|
761
|
+
vendor: 'Custom devices (DiY)',
|
|
762
|
+
description: '[EFEKTA CO2 Smart Monitor, ws2812b indicator, can control the relay, binding](https://efektalab.com/CO2_Monitor)',
|
|
763
|
+
fromZigbee: [fz.temperature, fz.humidity, fzLocal.co2, fzLocal.co2_config, fzLocal.temperature_config,
|
|
764
|
+
fzLocal.humidity_config, fzLocal.termostat_config, fzLocal.hydrostat_config, fzLocal.co2_gasstat_config],
|
|
765
|
+
toZigbee: [tzLocal.co2_config, tzLocal.temperature_config, tzLocal.humidity_config,
|
|
766
|
+
tzLocal.termostat_config, tzLocal.hydrostat_config, tzLocal.co2_gasstat_config],
|
|
767
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
768
|
+
const endpoint = device.getEndpoint(1);
|
|
769
|
+
const clusters = ['msTemperatureMeasurement', 'msRelativeHumidity', 'msCO2'];
|
|
770
|
+
await reporting.bind(endpoint, coordinatorEndpoint, clusters);
|
|
771
|
+
for (const cluster of clusters) {
|
|
772
|
+
await endpoint.configureReporting(cluster, [
|
|
773
|
+
{attribute: 'measuredValue', minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0},
|
|
774
|
+
]);
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
exposes: [e.co2(), e.temperature(), e.humidity(),
|
|
778
|
+
exposes.binary('light_indicator', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable or Disable light_indicator'),
|
|
779
|
+
exposes.numeric('light_indicator_level', ea.STATE_SET).withUnit('%').withDescription('light_indicator_level')
|
|
780
|
+
.withValueMin(0).withValueMax(100),
|
|
781
|
+
exposes.numeric('set_altitude', ea.STATE_SET).withUnit('meters')
|
|
782
|
+
.withDescription('Setting the altitude above sea level (for high accuracy of the CO2 sensor)')
|
|
783
|
+
.withValueMin(0).withValueMax(3000),
|
|
784
|
+
exposes.numeric('temperature_offset', ea.STATE_SET).withUnit('°C').withDescription('Adjust temperature')
|
|
785
|
+
.withValueMin(-30).withValueMax(60),
|
|
786
|
+
exposes.numeric('humidity_offset', ea.STATE_SET).withUnit('%').withDescription('Adjust humidity')
|
|
787
|
+
.withValueMin(0).withValueMax(99),
|
|
788
|
+
exposes.binary('forced_recalibration', ea.STATE_SET, 'ON', 'OFF')
|
|
789
|
+
.withDescription('Start FRC (Perform Forced Recalibration of the CO2 Sensor)'),
|
|
790
|
+
exposes.numeric('manual_forced_recalibration', ea.STATE_SET)
|
|
791
|
+
.withUnit('ppm').withDescription('Start Manual FRC (Perform Forced Recalibration of the CO2 Sensor)')
|
|
792
|
+
.withValueMin(0).withValueMax(5000),
|
|
793
|
+
exposes.binary('factory_reset_co2', ea.STATE_SET, 'ON', 'OFF').withDescription('Factory Reset CO2 sensor'),
|
|
794
|
+
exposes.binary('enable_gas', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable CO2 Gas Control'),
|
|
795
|
+
exposes.numeric('high_gas', ea.STATE_SET).withUnit('ppm').withDescription('Setting High CO2 Gas Border')
|
|
796
|
+
.withValueMin(400).withValueMax(2000),
|
|
797
|
+
exposes.numeric('low_gas', ea.STATE_SET).withUnit('ppm').withDescription('Setting Low CO2 Gas Border')
|
|
798
|
+
.withValueMin(400).withValueMax(2000),
|
|
799
|
+
exposes.binary('enable_temperature', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable Temperature Control'),
|
|
800
|
+
exposes.numeric('high_temperature', ea.STATE_SET).withUnit('C').withDescription('Setting High Temperature Border')
|
|
801
|
+
.withValueMin(-5).withValueMax(50),
|
|
802
|
+
exposes.numeric('low_temperature', ea.STATE_SET).withUnit('C').withDescription('Setting Low Temperature Border')
|
|
803
|
+
.withValueMin(-5).withValueMax(50),
|
|
804
|
+
exposes.binary('enable_humidity', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable Humidity Control'),
|
|
805
|
+
exposes.numeric('high_humidity', ea.STATE_SET).withUnit('C').withDescription('Setting High Humidity Border')
|
|
806
|
+
.withValueMin(0).withValueMax(99),
|
|
807
|
+
exposes.numeric('low_humidity', ea.STATE_SET).withUnit('C').withDescription('Setting Low Humidity Border')
|
|
808
|
+
.withValueMin(0).withValueMax(99)],
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
zigbeeModel: ['SNZB-02_EFEKTA'],
|
|
812
|
+
model: 'SNZB-02_EFEKTA',
|
|
813
|
+
vendor: 'Custom devices (DiY)',
|
|
814
|
+
description: 'Alternative firmware for the SONOFF SNZB-02 sensor from EfektaLab, DIY',
|
|
815
|
+
fromZigbee: [fz.SNZB02_temperature, fz.SNZB02_humidity, fz.battery, fzLocal.termostat_config,
|
|
816
|
+
fzLocal.hydrostat_config, fzLocal.node_config],
|
|
817
|
+
toZigbee: [tzLocal.termostat_config, tzLocal.hydrostat_config, tzLocal.node_config],
|
|
818
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
819
|
+
const endpoint = device.getEndpoint(1);
|
|
820
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [
|
|
821
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity']);
|
|
822
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
823
|
+
await reporting.batteryVoltage(endpoint, overides);
|
|
824
|
+
await reporting.batteryPercentageRemaining(endpoint, overides);
|
|
825
|
+
},
|
|
826
|
+
exposes: [e.battery(), e.temperature(), e.humidity(),
|
|
827
|
+
exposes.numeric('report_delay', ea.STATE_SET).withUnit('min')
|
|
828
|
+
.withDescription('Adjust Report Delay. Setting the time in minutes, by default 5 minutes')
|
|
829
|
+
.withValueMin(1).withValueMax(60),
|
|
830
|
+
exposes.binary('enable_temperature', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable Temperature Control'),
|
|
831
|
+
exposes.numeric('high_temperature', ea.STATE_SET).withUnit('C').withDescription('Setting High Temperature Border')
|
|
832
|
+
.withValueMin(-5).withValueMax(50),
|
|
833
|
+
exposes.numeric('low_temperature', ea.STATE_SET).withUnit('C').withDescription('Setting Low Temperature Border')
|
|
834
|
+
.withValueMin(-5).withValueMax(50),
|
|
835
|
+
exposes.binary('enable_humidity', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable Humidity Control'),
|
|
836
|
+
exposes.numeric('high_humidity', ea.STATE_SET).withUnit('C').withDescription('Setting High Humidity Border')
|
|
837
|
+
.withValueMin(0).withValueMax(99),
|
|
838
|
+
exposes.numeric('low_humidity', ea.STATE_SET).withUnit('C').withDescription('Setting Low Humidity Border')
|
|
839
|
+
.withValueMin(0).withValueMax(99)],
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
zigbeeModel: ['UT-02'],
|
|
843
|
+
model: 'EFR32MG21.Router',
|
|
844
|
+
vendor: 'Custom devices (DiY)',
|
|
845
|
+
description: 'EFR32MG21 router',
|
|
846
|
+
fromZigbee: [],
|
|
847
|
+
toZigbee: [],
|
|
848
|
+
exposes: [],
|
|
849
|
+
},
|
|
850
|
+
];
|