@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,686 @@
|
|
|
1
|
+
const exposes = require('../lib/exposes');
|
|
2
|
+
const utils = require('../lib/utils');
|
|
3
|
+
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
4
|
+
const tz = require('../converters/toZigbee');
|
|
5
|
+
const reporting = require('../lib/reporting');
|
|
6
|
+
const extend = require('../lib/extend');
|
|
7
|
+
const ota = require('../lib/ota');
|
|
8
|
+
const globalStore = require('../lib/store');
|
|
9
|
+
const e = exposes.presets;
|
|
10
|
+
const ea = exposes.access;
|
|
11
|
+
|
|
12
|
+
const fzLocal = {
|
|
13
|
+
DMS300_IN: {
|
|
14
|
+
cluster: 'msOccupancySensing',
|
|
15
|
+
type: ['attributeReport', 'readResponse'],
|
|
16
|
+
options: [exposes.options.no_occupancy_since_false()],
|
|
17
|
+
convert: (model, msg, publish, options, meta) => {
|
|
18
|
+
const occupancyIn = msg.data.occupancy;
|
|
19
|
+
globalStore.putValue(msg.endpoint, 'occupancy_in', occupancyIn);
|
|
20
|
+
const occupancyOr = occupancyIn | globalStore.getValue(msg.endpoint, 'occupancy_out', 0);
|
|
21
|
+
const occupancyAnd = occupancyIn & globalStore.getValue(msg.endpoint, 'occupancy_out', 0);
|
|
22
|
+
return {
|
|
23
|
+
occupancy_in: (occupancyIn & 1) > 0,
|
|
24
|
+
occupancy_or: (occupancyOr & 1) > 0,
|
|
25
|
+
occupancy_and: (occupancyAnd & 1) > 0,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
DMS300_OUT: {
|
|
30
|
+
cluster: 'ssIasZone',
|
|
31
|
+
type: 'commandStatusChangeNotification',
|
|
32
|
+
convert: (model, msg, publish, options, meta) => {
|
|
33
|
+
const occupancyOut = msg.data.zonestatus;
|
|
34
|
+
globalStore.putValue(msg.endpoint, 'occupancy_out', occupancyOut);
|
|
35
|
+
const occupancyOr = occupancyOut | globalStore.getValue(msg.endpoint, 'occupancy_in', 0);
|
|
36
|
+
const occupancyAnd = occupancyOut & globalStore.getValue(msg.endpoint, 'occupancy_in', 0);
|
|
37
|
+
return {
|
|
38
|
+
occupancy_out: (occupancyOut & 1) > 0,
|
|
39
|
+
occupancy_or: (occupancyOr & 1) > 0,
|
|
40
|
+
occupancy_and: (occupancyAnd & 1) > 0,
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
ISM300Z3_on_off: {
|
|
45
|
+
cluster: 'genOnOff',
|
|
46
|
+
type: ['attributeReport', 'readResponse'],
|
|
47
|
+
convert: (model, msg, publish, options, meta) => {
|
|
48
|
+
if (msg.data.hasOwnProperty('onOff')) {
|
|
49
|
+
const property = utils.postfixWithEndpointName('state', msg, model, meta);
|
|
50
|
+
return {[property]: msg.data['onOff'] === 1 ? 'ON' : 'OFF'};
|
|
51
|
+
} else if (msg.data.hasOwnProperty(0x9000)) {
|
|
52
|
+
const value = msg.data[0x9000];
|
|
53
|
+
const lookup = {0: 'auto', 1: 'push', 2: 'latch'};
|
|
54
|
+
return {operation_mode: lookup[value]};
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const tzLocal = {
|
|
61
|
+
CSM300_SETUP: {
|
|
62
|
+
key: ['rf_pairing_on', 'counting_freeze', 'tof_init', 'led_state', 'rf_state', 'transaction', 'fast_in', 'fast_out'],
|
|
63
|
+
convertSet: async (entity, key, value, meta) => {
|
|
64
|
+
let payload = null;
|
|
65
|
+
const endpoint = meta.device.endpoints.find((e) => e.supportsInputCluster('genAnalogInput'));
|
|
66
|
+
switch (key) {
|
|
67
|
+
case 'rf_pairing_on':
|
|
68
|
+
payload = {'presentValue': 81};
|
|
69
|
+
break;
|
|
70
|
+
case 'counting_freeze':
|
|
71
|
+
if (value.toLowerCase() === 'on') {
|
|
72
|
+
payload = {'presentValue': 82};
|
|
73
|
+
await endpoint.write('genAnalogInput', payload);
|
|
74
|
+
return {state: {counting_freeze: 'ON'}};
|
|
75
|
+
} else if (value.toLowerCase() === 'off') {
|
|
76
|
+
payload = {'presentValue': 84};
|
|
77
|
+
await endpoint.write('genAnalogInput', payload);
|
|
78
|
+
return {state: {counting_freeze: 'OFF'}};
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
case 'tof_init':
|
|
82
|
+
payload = {'presentValue': 83};
|
|
83
|
+
break;
|
|
84
|
+
case 'led_state':
|
|
85
|
+
if (value === 'enable') {
|
|
86
|
+
payload = {'presentValue': 86};
|
|
87
|
+
await endpoint.write('genAnalogInput', payload);
|
|
88
|
+
return {state: {led_state: 'enable'}};
|
|
89
|
+
} else if (value === 'disable') {
|
|
90
|
+
payload = {'presentValue': 87};
|
|
91
|
+
await endpoint.write('genAnalogInput', payload);
|
|
92
|
+
return {state: {led_state: 'disable'}};
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
case 'rf_state':
|
|
96
|
+
if (value === 'enable') {
|
|
97
|
+
payload = {'presentValue': 88};
|
|
98
|
+
await endpoint.write('genAnalogInput', payload);
|
|
99
|
+
return {state: {rf_state: 'enable'}};
|
|
100
|
+
} else if (value === 'disable') {
|
|
101
|
+
payload = {'presentValue': 89};
|
|
102
|
+
await endpoint.write('genAnalogInput', payload);
|
|
103
|
+
return {state: {rf_state: 'disable'}};
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case 'transaction':
|
|
107
|
+
if (value === '0ms') {
|
|
108
|
+
payload = {'presentValue': 90};
|
|
109
|
+
await endpoint.write('genAnalogInput', payload);
|
|
110
|
+
return {state: {transaction: '0ms'}};
|
|
111
|
+
} else if (value === '200ms') {
|
|
112
|
+
payload = {'presentValue': 91};
|
|
113
|
+
await endpoint.write('genAnalogInput', payload);
|
|
114
|
+
return {state: {transaction: '200ms'}};
|
|
115
|
+
} else if (value === '400ms') {
|
|
116
|
+
payload = {'presentValue': 92};
|
|
117
|
+
await endpoint.write('genAnalogInput', payload);
|
|
118
|
+
return {state: {transaction: '400ms'}};
|
|
119
|
+
} else if (value === '600ms') {
|
|
120
|
+
payload = {'presentValue': 93};
|
|
121
|
+
await endpoint.write('genAnalogInput', payload);
|
|
122
|
+
return {state: {transaction: '600ms'}};
|
|
123
|
+
} else if (value === '800ms') {
|
|
124
|
+
payload = {'presentValue': 94};
|
|
125
|
+
await endpoint.write('genAnalogInput', payload);
|
|
126
|
+
return {state: {transaction: '800ms'}};
|
|
127
|
+
} else if (value === '1,000ms') {
|
|
128
|
+
payload = {'presentValue': 95};
|
|
129
|
+
await endpoint.write('genAnalogInput', payload);
|
|
130
|
+
return {state: {transaction: '1,000ms'}};
|
|
131
|
+
}
|
|
132
|
+
break;
|
|
133
|
+
case 'fast_in':
|
|
134
|
+
if (value === 'enable') {
|
|
135
|
+
payload = {'presentValue': 96};
|
|
136
|
+
await endpoint.write('genAnalogInput', payload);
|
|
137
|
+
return {state: {fast_in: 'enable'}};
|
|
138
|
+
} else if (value === 'disable') {
|
|
139
|
+
payload = {'presentValue': 97};
|
|
140
|
+
await endpoint.write('genAnalogInput', payload);
|
|
141
|
+
return {state: {fast_in: 'disable'}};
|
|
142
|
+
}
|
|
143
|
+
break;
|
|
144
|
+
case 'fast_out':
|
|
145
|
+
if (value === 'enable') {
|
|
146
|
+
payload = {'presentValue': 98};
|
|
147
|
+
await endpoint.write('genAnalogInput', payload);
|
|
148
|
+
return {state: {fast_out: 'enable'}};
|
|
149
|
+
} else if (value === 'disable') {
|
|
150
|
+
payload = {'presentValue': 99};
|
|
151
|
+
await endpoint.write('genAnalogInput', payload);
|
|
152
|
+
return {state: {fast_out: 'disable'}};
|
|
153
|
+
}
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
await endpoint.write('genAnalogInput', payload);
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
ISM300Z3_on_off: {
|
|
160
|
+
key: ['state', 'operation_mode'],
|
|
161
|
+
convertSet: async (entity, key, value, meta) => {
|
|
162
|
+
const endpoint = meta.device.getEndpoint(1);
|
|
163
|
+
if (key === 'state') {
|
|
164
|
+
const state = meta.message.hasOwnProperty('state') ? meta.message.state.toLowerCase() : null;
|
|
165
|
+
utils.validateValue(state, ['toggle', 'off', 'on']);
|
|
166
|
+
await entity.command('genOnOff', state, {}, utils.getOptions(meta.mapped, entity));
|
|
167
|
+
if (state === 'toggle') {
|
|
168
|
+
const currentState = meta.state[`state${meta.endpoint_name ? `_${meta.endpoint_name}` : ''}`];
|
|
169
|
+
return currentState ? {state: {state: currentState === 'OFF' ? 'ON' : 'OFF'}} : {};
|
|
170
|
+
} else {
|
|
171
|
+
return {state: {state: state.toUpperCase()}};
|
|
172
|
+
}
|
|
173
|
+
} else if (key === 'operation_mode') {
|
|
174
|
+
const lookup = {'auto': 0, 'push': 1, 'latch': 2};
|
|
175
|
+
const payload = {0x9000: {value: lookup[value], type: 0x20}}; // INT8U
|
|
176
|
+
await entity.write('genOnOff', payload);
|
|
177
|
+
await endpoint.read('genOnOff', [0x9000]);
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
convertGet: async (entity, key, meta) => {
|
|
181
|
+
if (key === 'operation_mode') {
|
|
182
|
+
const endpoint = meta.device.getEndpoint(1);
|
|
183
|
+
await endpoint.read('genOnOff', [0x9000]);
|
|
184
|
+
} else {
|
|
185
|
+
await entity.read('genOnOff', ['onOff']);
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
ISM300Z3_rf_pairing: {
|
|
190
|
+
key: ['rf_pairing'],
|
|
191
|
+
convertSet: async (entity, key, value, meta) => {
|
|
192
|
+
const lookup = {'l1': 1, 'l2': 2, 'l3': 3};
|
|
193
|
+
const payload = {0x9001: {value: lookup[value], type: 0x20}}; // INT8U
|
|
194
|
+
await entity.write('genOnOff', payload);
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
module.exports = [
|
|
200
|
+
{
|
|
201
|
+
fingerprint: [
|
|
202
|
+
{modelID: 'CSM-300Z', applicationVersion: 1},
|
|
203
|
+
{modelID: 'CSM-300Z', applicationVersion: 2},
|
|
204
|
+
{modelID: 'CSM-300Z', applicationVersion: 3},
|
|
205
|
+
{modelID: 'CSM-300Z', applicationVersion: 4},
|
|
206
|
+
],
|
|
207
|
+
model: 'CSM-300ZB',
|
|
208
|
+
vendor: 'ShinaSystem',
|
|
209
|
+
description: 'SiHAS multipurpose sensor',
|
|
210
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
211
|
+
fromZigbee: [fz.battery, fz.sihas_people_cnt],
|
|
212
|
+
toZigbee: [tz.sihas_set_people],
|
|
213
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
214
|
+
const endpoint = device.getEndpoint(1);
|
|
215
|
+
const binds = ['genPowerCfg', 'genAnalogInput'];
|
|
216
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
217
|
+
await reporting.batteryVoltage(endpoint);
|
|
218
|
+
const payload = reporting.payload('presentValue', 1, 600, 0);
|
|
219
|
+
await endpoint.configureReporting('genAnalogInput', payload);
|
|
220
|
+
},
|
|
221
|
+
exposes: [e.battery(), e.battery_voltage(),
|
|
222
|
+
exposes.enum('status', ea.STATE, ['idle', 'in', 'out']).withDescription('Currently status'),
|
|
223
|
+
exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(50).withDescription('People count')],
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
zigbeeModel: ['CSM-300Z'],
|
|
227
|
+
model: 'CSM-300ZB_V2',
|
|
228
|
+
vendor: 'ShinaSystem',
|
|
229
|
+
ota: ota.zigbeeOTA,
|
|
230
|
+
description: 'SiHAS multipurpose ToF sensor',
|
|
231
|
+
meta: {battery: {voltageToPercentage: 'Add_1V_42V_CSM300z2v2'}},
|
|
232
|
+
fromZigbee: [fz.battery, fz.sihas_people_cnt],
|
|
233
|
+
toZigbee: [tz.sihas_set_people, tzLocal.CSM300_SETUP],
|
|
234
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
235
|
+
const endpoint = device.getEndpoint(1);
|
|
236
|
+
const binds = ['genPowerCfg', 'genAnalogInput'];
|
|
237
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
238
|
+
await reporting.batteryVoltage(endpoint);
|
|
239
|
+
const payload = reporting.payload('presentValue', 1, 600, 0);
|
|
240
|
+
await endpoint.configureReporting('genAnalogInput', payload);
|
|
241
|
+
},
|
|
242
|
+
exposes: [e.battery(), e.battery_voltage(),
|
|
243
|
+
exposes.enum('status', ea.STATE, ['idle', 'in', 'out']).withDescription('Currently status'),
|
|
244
|
+
exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(100).withDescription('People count'),
|
|
245
|
+
exposes.enum('rf_pairing_on', ea.SET, ['run']).withDescription('Run RF pairing mode'),
|
|
246
|
+
exposes.binary('counting_freeze', ea.SET, 'ON', 'OFF')
|
|
247
|
+
.withDescription('Counting Freeze ON/OFF, not reporting people value when is ON'),
|
|
248
|
+
exposes.enum('tof_init', ea.SET, ['initial']).withDescription('ToF sensor initial'),
|
|
249
|
+
exposes.binary('led_state', ea.SET, 'enable', 'disable').withDescription('Indicate LED enable/disable, default : enable'),
|
|
250
|
+
exposes.binary('rf_state', ea.SET, 'enable', 'disable').withDescription('RF function enable/disable, default : disable'),
|
|
251
|
+
exposes.enum('transaction', ea.SET, ['0ms', '200ms', '400ms', '600ms', '800ms', '1,000ms'])
|
|
252
|
+
.withDescription('Transaction interval, default : 400ms'),
|
|
253
|
+
exposes.binary('fast_in', ea.SET, 'enable', 'disable')
|
|
254
|
+
.withDescription('Fast process enable/disable when people 0 to 1. default : enable'),
|
|
255
|
+
exposes.binary('fast_out', ea.SET, 'enable', 'disable')
|
|
256
|
+
.withDescription('Fast process enable/disable when people 1 to 0. default : enable')],
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
zigbeeModel: ['USM-300Z'],
|
|
260
|
+
model: 'USM-300ZB',
|
|
261
|
+
vendor: 'ShinaSystem',
|
|
262
|
+
description: 'SiHAS multipurpose sensor',
|
|
263
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
264
|
+
fromZigbee: [fz.battery, fz.temperature, fz.humidity, fz.occupancy, fz.illuminance],
|
|
265
|
+
toZigbee: [],
|
|
266
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
267
|
+
const endpoint = device.getEndpoint(1);
|
|
268
|
+
const binds = ['genPowerCfg', 'msIlluminanceMeasurement', 'msTemperatureMeasurement', 'msOccupancySensing'];
|
|
269
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
270
|
+
await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
|
|
271
|
+
await reporting.occupancy(endpoint, {min: 1, max: 600, change: 1});
|
|
272
|
+
await reporting.temperature(endpoint, {min: 20, max: 300, change: 10});
|
|
273
|
+
await reporting.humidity(endpoint, {min: 20, max: 300, change: 40});
|
|
274
|
+
await reporting.illuminance(endpoint, {min: 20, max: 3600, change: 10});
|
|
275
|
+
},
|
|
276
|
+
exposes: [e.battery(), e.battery_voltage(), e.temperature(), e.humidity(), e.occupancy(),
|
|
277
|
+
e.illuminance_lux().withProperty('illuminance')],
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
zigbeeModel: ['SBM300Z1'],
|
|
281
|
+
model: 'SBM300Z1',
|
|
282
|
+
vendor: 'ShinaSystem',
|
|
283
|
+
description: 'SiHAS IOT smart switch 1 gang',
|
|
284
|
+
extend: extend.switch(),
|
|
285
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
286
|
+
const endpoint = device.getEndpoint(1);
|
|
287
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
288
|
+
await reporting.onOff(endpoint);
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
zigbeeModel: ['SBM300Z2'],
|
|
293
|
+
model: 'SBM300Z2',
|
|
294
|
+
vendor: 'ShinaSystem',
|
|
295
|
+
description: 'SiHAS IOT smart switch 2 gang',
|
|
296
|
+
extend: extend.switch(),
|
|
297
|
+
exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('bottom')],
|
|
298
|
+
endpoint: (device) => {
|
|
299
|
+
return {top: 1, bottom: 2};
|
|
300
|
+
},
|
|
301
|
+
meta: {multiEndpoint: true},
|
|
302
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
303
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
304
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
305
|
+
await reporting.onOff(device.getEndpoint(1));
|
|
306
|
+
await reporting.onOff(device.getEndpoint(2));
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
zigbeeModel: ['SBM300Z3'],
|
|
311
|
+
model: 'SBM300Z3',
|
|
312
|
+
vendor: 'ShinaSystem',
|
|
313
|
+
description: 'SiHAS IOT smart switch 3 gang',
|
|
314
|
+
extend: extend.switch(),
|
|
315
|
+
exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('center'), e.switch().withEndpoint('bottom')],
|
|
316
|
+
endpoint: (device) => {
|
|
317
|
+
return {top: 1, center: 2, bottom: 3};
|
|
318
|
+
},
|
|
319
|
+
meta: {multiEndpoint: true},
|
|
320
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
321
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
322
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
323
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
324
|
+
await reporting.onOff(device.getEndpoint(1));
|
|
325
|
+
await reporting.onOff(device.getEndpoint(2));
|
|
326
|
+
await reporting.onOff(device.getEndpoint(3));
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
zigbeeModel: ['SBM300Z4'],
|
|
331
|
+
model: 'SBM300Z4',
|
|
332
|
+
vendor: 'ShinaSystem',
|
|
333
|
+
description: 'SiHAS IOT smart switch 4 gang',
|
|
334
|
+
extend: extend.switch(),
|
|
335
|
+
exposes: [e.switch().withEndpoint('top_left'), e.switch().withEndpoint('bottom_left'),
|
|
336
|
+
e.switch().withEndpoint('top_right'), e.switch().withEndpoint('bottom_right')],
|
|
337
|
+
endpoint: (device) => {
|
|
338
|
+
return {'top_left': 1, 'bottom_left': 2, 'top_right': 3, 'bottom_right': 4};
|
|
339
|
+
},
|
|
340
|
+
meta: {multiEndpoint: true},
|
|
341
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
342
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
343
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
344
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
345
|
+
await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
|
|
346
|
+
await reporting.onOff(device.getEndpoint(1));
|
|
347
|
+
await reporting.onOff(device.getEndpoint(2));
|
|
348
|
+
await reporting.onOff(device.getEndpoint(3));
|
|
349
|
+
await reporting.onOff(device.getEndpoint(4));
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
zigbeeModel: ['SBM300Z5'],
|
|
354
|
+
model: 'SBM300Z5',
|
|
355
|
+
vendor: 'ShinaSystem',
|
|
356
|
+
description: 'SiHAS IOT smart switch 5 gang',
|
|
357
|
+
extend: extend.switch(),
|
|
358
|
+
exposes: [e.switch().withEndpoint('top_left'), e.switch().withEndpoint('top_right'), e.switch().withEndpoint('center_left'),
|
|
359
|
+
e.switch().withEndpoint('bottom_left'), e.switch().withEndpoint('bottom_right')],
|
|
360
|
+
endpoint: (device) => {
|
|
361
|
+
return {'top_left': 1, 'center_left': 2, 'bottom_left': 3, 'top_right': 4, 'bottom_right': 5};
|
|
362
|
+
},
|
|
363
|
+
meta: {multiEndpoint: true},
|
|
364
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
365
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
366
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
367
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
368
|
+
await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
|
|
369
|
+
await reporting.bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
|
|
370
|
+
await reporting.onOff(device.getEndpoint(1));
|
|
371
|
+
await reporting.onOff(device.getEndpoint(2));
|
|
372
|
+
await reporting.onOff(device.getEndpoint(3));
|
|
373
|
+
await reporting.onOff(device.getEndpoint(4));
|
|
374
|
+
await reporting.onOff(device.getEndpoint(5));
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
zigbeeModel: ['SBM300Z6'],
|
|
379
|
+
model: 'SBM300Z6',
|
|
380
|
+
vendor: 'ShinaSystem',
|
|
381
|
+
description: 'SiHAS IOT smart switch 6 gang',
|
|
382
|
+
extend: extend.switch(),
|
|
383
|
+
exposes: [e.switch().withEndpoint('top_left'), e.switch().withEndpoint('bottom_left'), e.switch().withEndpoint('center_left'),
|
|
384
|
+
e.switch().withEndpoint('center_right'), e.switch().withEndpoint('top_right'), e.switch().withEndpoint('bottom_right')],
|
|
385
|
+
endpoint: (device) => {
|
|
386
|
+
return {'top_left': 1, 'center_left': 2, 'bottom_left': 3, 'top_right': 4, 'center_right': 5, 'bottom_right': 6};
|
|
387
|
+
},
|
|
388
|
+
meta: {multiEndpoint: true},
|
|
389
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
390
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
391
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
392
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
393
|
+
await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
|
|
394
|
+
await reporting.bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
|
|
395
|
+
await reporting.bind(device.getEndpoint(6), coordinatorEndpoint, ['genOnOff']);
|
|
396
|
+
await reporting.onOff(device.getEndpoint(1));
|
|
397
|
+
await reporting.onOff(device.getEndpoint(2));
|
|
398
|
+
await reporting.onOff(device.getEndpoint(3));
|
|
399
|
+
await reporting.onOff(device.getEndpoint(4));
|
|
400
|
+
await reporting.onOff(device.getEndpoint(5));
|
|
401
|
+
await reporting.onOff(device.getEndpoint(6));
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
zigbeeModel: ['BSM-300Z'],
|
|
406
|
+
model: 'BSM-300ZB',
|
|
407
|
+
vendor: 'ShinaSystem',
|
|
408
|
+
description: 'SiHAS remote control',
|
|
409
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
410
|
+
fromZigbee: [fz.battery, fz.sihas_action],
|
|
411
|
+
toZigbee: [],
|
|
412
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
413
|
+
const endpoint = device.getEndpoint(1);
|
|
414
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
|
|
415
|
+
await reporting.batteryVoltage(endpoint);
|
|
416
|
+
},
|
|
417
|
+
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'long'])],
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
zigbeeModel: ['TSM-300Z'],
|
|
421
|
+
model: 'TSM-300ZB',
|
|
422
|
+
vendor: 'ShinaSystem',
|
|
423
|
+
description: 'SiHAS temperature/humidity sensor',
|
|
424
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
425
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.battery],
|
|
426
|
+
toZigbee: [],
|
|
427
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
428
|
+
const endpoint = device.getEndpoint(1);
|
|
429
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'msRelativeHumidity', 'genPowerCfg']);
|
|
430
|
+
await reporting.temperature(endpoint, {min: 30, max: 300, change: 30});
|
|
431
|
+
await reporting.humidity(endpoint, {min: 30, max: 3600, change: 50});
|
|
432
|
+
await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
|
|
433
|
+
},
|
|
434
|
+
exposes: [e.temperature(), e.humidity(), e.battery(), e.battery_voltage()],
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
zigbeeModel: ['DSM-300Z'],
|
|
438
|
+
model: 'DSM-300ZB',
|
|
439
|
+
vendor: 'ShinaSystem',
|
|
440
|
+
description: 'SiHAS contact sensor',
|
|
441
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
442
|
+
fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
|
|
443
|
+
toZigbee: [],
|
|
444
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
445
|
+
const endpoint = device.getEndpoint(1);
|
|
446
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['ssIasZone', 'genPowerCfg']);
|
|
447
|
+
await endpoint.read('ssIasZone', ['iasCieAddr', 'zoneState', 'zoneId']);
|
|
448
|
+
await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
|
|
449
|
+
},
|
|
450
|
+
exposes: [e.contact(), e.battery(), e.battery_voltage()],
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
zigbeeModel: ['MSM-300Z'],
|
|
454
|
+
model: 'MSM-300ZB',
|
|
455
|
+
vendor: 'ShinaSystem',
|
|
456
|
+
description: 'SiHAS remote control 4 button',
|
|
457
|
+
fromZigbee: [fz.sihas_action, fz.battery],
|
|
458
|
+
toZigbee: [],
|
|
459
|
+
exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long',
|
|
460
|
+
'3_single', '3_double', '3_long', '4_single', '4_double', '4_long']), e.battery(), e.battery_voltage()],
|
|
461
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
|
|
462
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
463
|
+
const endpoint = device.getEndpoint(1);
|
|
464
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
|
|
465
|
+
await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
|
|
466
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
467
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
468
|
+
await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
|
|
469
|
+
},
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
zigbeeModel: ['SBM300ZB1'],
|
|
473
|
+
model: 'SBM300ZB1',
|
|
474
|
+
vendor: 'ShinaSystem',
|
|
475
|
+
description: 'SiHAS remote control',
|
|
476
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
477
|
+
fromZigbee: [fz.battery, fz.sihas_action],
|
|
478
|
+
toZigbee: [],
|
|
479
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
480
|
+
const endpoint = device.getEndpoint(1);
|
|
481
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
|
|
482
|
+
await reporting.batteryVoltage(endpoint);
|
|
483
|
+
},
|
|
484
|
+
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'long'])],
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
zigbeeModel: ['SBM300ZB2'],
|
|
488
|
+
model: 'SBM300ZB2',
|
|
489
|
+
vendor: 'ShinaSystem',
|
|
490
|
+
description: 'SiHAS remote control 2 button',
|
|
491
|
+
fromZigbee: [fz.sihas_action, fz.battery],
|
|
492
|
+
toZigbee: [],
|
|
493
|
+
exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long']), e.battery(), e.battery_voltage()],
|
|
494
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
|
|
495
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
496
|
+
const endpoint = device.getEndpoint(1);
|
|
497
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
|
|
498
|
+
await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
|
|
499
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
500
|
+
},
|
|
501
|
+
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
zigbeeModel: ['SBM300ZB3'],
|
|
505
|
+
model: 'SBM300ZB3',
|
|
506
|
+
vendor: 'ShinaSystem',
|
|
507
|
+
description: 'SiHAS remote control 3 button',
|
|
508
|
+
fromZigbee: [fz.sihas_action, fz.battery],
|
|
509
|
+
toZigbee: [],
|
|
510
|
+
exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long',
|
|
511
|
+
'3_single', '3_double', '3_long']), e.battery(), e.battery_voltage()],
|
|
512
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
|
|
513
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
514
|
+
const endpoint = device.getEndpoint(1);
|
|
515
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
|
|
516
|
+
await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
|
|
517
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
518
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
zigbeeModel: ['PMM-300Z1'],
|
|
523
|
+
model: 'PMM-300Z1',
|
|
524
|
+
vendor: 'ShinaSystem',
|
|
525
|
+
description: 'SiHAS energy monitor',
|
|
526
|
+
fromZigbee: [fz.electrical_measurement, fz.metering],
|
|
527
|
+
toZigbee: [tz.electrical_measurement_power],
|
|
528
|
+
exposes: [e.power().withAccess(ea.STATE_GET), e.energy()],
|
|
529
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
530
|
+
const endpoint = device.getEndpoint(1);
|
|
531
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
|
|
532
|
+
await reporting.activePower(endpoint, {min: 1, max: 600, change: 5});
|
|
533
|
+
await reporting.instantaneousDemand(endpoint, {min: 1, max: 600, change: 1});
|
|
534
|
+
endpoint.saveClusterAttributeKeyValue('seMetering', {multiplier: 1, divisor: 1000});
|
|
535
|
+
await reporting.currentSummDelivered(endpoint, {min: 1, max: 600, change: 5});
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
zigbeeModel: ['PMM-300Z2'],
|
|
540
|
+
model: 'PMM-300Z2',
|
|
541
|
+
vendor: 'ShinaSystem',
|
|
542
|
+
description: 'SiHAS energy monitor',
|
|
543
|
+
fromZigbee: [fz.electrical_measurement, fz.metering, fz.temperature],
|
|
544
|
+
toZigbee: [tz.metering_power, tz.currentsummdelivered, tz.frequency, tz.powerfactor, tz.acvoltage, tz.accurrent, tz.temperature],
|
|
545
|
+
exposes: [e.power().withAccess(ea.STATE_GET), e.energy().withAccess(ea.STATE_GET),
|
|
546
|
+
e.current().withAccess(ea.STATE_GET), e.voltage().withAccess(ea.STATE_GET),
|
|
547
|
+
e.temperature().withAccess(ea.STATE_GET).withDescription('temperature of device internal mcu'),
|
|
548
|
+
exposes.numeric('power_factor', ea.STATE_GET).withDescription('Measured electrical power factor'),
|
|
549
|
+
exposes.numeric('ac_frequency', ea.STATE_GET).withUnit('Hz').withDescription('Measured electrical ac frequency')],
|
|
550
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
551
|
+
const endpoint = device.getEndpoint(1);
|
|
552
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering', 'msTemperatureMeasurement']);
|
|
553
|
+
await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
|
|
554
|
+
'acCurrentDivisor']);
|
|
555
|
+
await endpoint.read('seMetering', ['multiplier', 'divisor']);
|
|
556
|
+
// await reporting.activePower(endpoint, {min: 1, max: 600, change: 5}); // no need, duplicate for power value.
|
|
557
|
+
await reporting.instantaneousDemand(endpoint, {min: 1, max: 600, change: 5});
|
|
558
|
+
await reporting.powerFactor(endpoint, {min: 10, max: 600, change: 1});
|
|
559
|
+
await reporting.rmsVoltage(endpoint, {min: 5, max: 600, change: 1});
|
|
560
|
+
await reporting.rmsCurrent(endpoint, {min: 5, max: 600, change: 1});
|
|
561
|
+
await reporting.currentSummDelivered(endpoint, {min: 1, max: 600, change: 5});
|
|
562
|
+
await reporting.temperature(endpoint, {min: 20, max: 300, change: 10});
|
|
563
|
+
endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acFrequencyMultiplier: 1, acFrequencyDivisor: 10});
|
|
564
|
+
await endpoint.configureReporting('haElectricalMeasurement', [{
|
|
565
|
+
attribute: 'acFrequency',
|
|
566
|
+
minimumReportInterval: 10,
|
|
567
|
+
maximumReportInterval: 600,
|
|
568
|
+
reportableChange: 3,
|
|
569
|
+
}]);
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
zigbeeModel: ['PMM-300Z3'],
|
|
574
|
+
model: 'PMM-300Z3',
|
|
575
|
+
vendor: 'ShinaSystem',
|
|
576
|
+
description: 'SiHAS 3phase energy monitor',
|
|
577
|
+
fromZigbee: [fz.electrical_measurement, fz.metering, fz.temperature],
|
|
578
|
+
toZigbee: [tz.metering_power, tz.currentsummdelivered, tz.frequency, tz.powerfactor, tz.acvoltage, tz.accurrent, tz.temperature],
|
|
579
|
+
exposes: [e.power().withAccess(ea.STATE_GET), e.energy().withAccess(ea.STATE_GET),
|
|
580
|
+
e.current().withAccess(ea.STATE_GET), e.voltage().withAccess(ea.STATE_GET),
|
|
581
|
+
e.temperature().withAccess(ea.STATE_GET).withDescription('temperature of device internal mcu'),
|
|
582
|
+
exposes.numeric('power_factor', ea.STATE_GET).withDescription('Measured electrical power factor'),
|
|
583
|
+
exposes.numeric('ac_frequency', ea.STATE_GET).withUnit('Hz').withDescription('Measured electrical ac frequency')],
|
|
584
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
585
|
+
const endpoint = device.getEndpoint(1);
|
|
586
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering', 'msTemperatureMeasurement']);
|
|
587
|
+
await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
|
|
588
|
+
'acCurrentDivisor']);
|
|
589
|
+
await endpoint.read('seMetering', ['multiplier', 'divisor']);
|
|
590
|
+
// await reporting.activePower(endpoint, {min: 1, max: 600, change: 5}); // no need, duplicate for power value.
|
|
591
|
+
await reporting.instantaneousDemand(endpoint, {min: 1, max: 600, change: 5});
|
|
592
|
+
await reporting.powerFactor(endpoint, {min: 10, max: 600, change: 1});
|
|
593
|
+
await reporting.rmsVoltage(endpoint, {min: 5, max: 600, change: 1});
|
|
594
|
+
await reporting.rmsCurrent(endpoint, {min: 5, max: 600, change: 1});
|
|
595
|
+
await reporting.currentSummDelivered(endpoint, {min: 1, max: 600, change: 5});
|
|
596
|
+
await reporting.temperature(endpoint, {min: 20, max: 300, change: 10});
|
|
597
|
+
endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acFrequencyMultiplier: 1, acFrequencyDivisor: 10});
|
|
598
|
+
await endpoint.configureReporting('haElectricalMeasurement', [{
|
|
599
|
+
attribute: 'acFrequency',
|
|
600
|
+
minimumReportInterval: 10,
|
|
601
|
+
maximumReportInterval: 600,
|
|
602
|
+
reportableChange: 3,
|
|
603
|
+
}]);
|
|
604
|
+
},
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
zigbeeModel: ['DLM-300Z'],
|
|
608
|
+
model: 'DLM-300Z',
|
|
609
|
+
vendor: 'ShinaSystem',
|
|
610
|
+
description: 'Sihas door lock',
|
|
611
|
+
fromZigbee: [fz.lock, fz.battery, fz.lock_operation_event, fz.lock_programming_event, fz.lock_pin_code_response],
|
|
612
|
+
toZigbee: [tz.lock, tz.pincode_lock],
|
|
613
|
+
meta: {pinCodeCount: 4},
|
|
614
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
615
|
+
const endpoint = device.getEndpoint(1);
|
|
616
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
617
|
+
await reporting.lockState(endpoint, {min: 0, max: 3600, change: 0});
|
|
618
|
+
await reporting.batteryPercentageRemaining(endpoint, {min: 600, max: 21600, change: 1});
|
|
619
|
+
await reporting.doorState(endpoint);
|
|
620
|
+
},
|
|
621
|
+
exposes: [e.battery(), e.lock(), exposes.enum('door_state', ea.STATE, ['open', 'closed']).withDescription('Door status'),
|
|
622
|
+
e.lock_action(), e.lock_action_source_name(), e.lock_action_user(),
|
|
623
|
+
exposes.composite('pin_code', 'pin_code', ea.ALL)
|
|
624
|
+
.withFeature(exposes.numeric('user', ea.SET).withDescription('User ID can only number 1'))
|
|
625
|
+
.withFeature(exposes.numeric('pin_code', ea.SET).withDescription('Pincode to set, set pincode(4 digit) to null to clear')),
|
|
626
|
+
],
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
zigbeeModel: ['DMS-300Z'],
|
|
630
|
+
model: 'DMS-300ZB',
|
|
631
|
+
vendor: 'ShinaSystem',
|
|
632
|
+
ota: ota.zigbeeOTA,
|
|
633
|
+
description: 'SiHAS dual motion sensor',
|
|
634
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
635
|
+
fromZigbee: [fz.battery, fzLocal.DMS300_OUT, fzLocal.DMS300_IN, fz.occupancy_timeout],
|
|
636
|
+
toZigbee: [tz.occupancy_timeout],
|
|
637
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
638
|
+
const endpoint = device.getEndpoint(1);
|
|
639
|
+
const binds = ['genPowerCfg', 'msOccupancySensing', 'ssIasZone'];
|
|
640
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
641
|
+
await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
|
|
642
|
+
await reporting.occupancy(endpoint, {min: 1, max: 600, change: 1});
|
|
643
|
+
const payload = [{
|
|
644
|
+
attribute: 'zoneStatus', minimumReportInterval: 1, maximumReportInterval: 600, reportableChange: 1}];
|
|
645
|
+
await endpoint.configureReporting('ssIasZone', payload);
|
|
646
|
+
await endpoint.read('msOccupancySensing', ['pirOToUDelay']);
|
|
647
|
+
},
|
|
648
|
+
exposes: [e.battery(), e.battery_voltage(),
|
|
649
|
+
exposes.binary('occupancy_in', ea.STATE, true, false)
|
|
650
|
+
.withDescription('Indicates whether "IN" Sensor of the device detected occupancy'),
|
|
651
|
+
exposes.binary('occupancy_out', ea.STATE, true, false)
|
|
652
|
+
.withDescription('Indicates whether "OUT" Sensor of the device detected occupancy'),
|
|
653
|
+
exposes.binary('occupancy_or', ea.STATE, true, false)
|
|
654
|
+
.withDescription('Indicates whether "IN or OUT" Sensor of the device detected occupancy'),
|
|
655
|
+
exposes.binary('occupancy_and', ea.STATE, true, false)
|
|
656
|
+
.withDescription('Indicates whether "IN and OUT" Sensor of the device detected occupancy'),
|
|
657
|
+
exposes.numeric('occupancy_timeout', ea.ALL).withUnit('second').withValueMin(0).withValueMax(3600)],
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
zigbeeModel: ['ISM300Z3'],
|
|
661
|
+
model: 'ISM300Z3',
|
|
662
|
+
vendor: 'ShinaSystem',
|
|
663
|
+
ota: ota.zigbeeOTA,
|
|
664
|
+
description: 'SiHAS IOT smart inner switch 3 gang',
|
|
665
|
+
fromZigbee: [fzLocal.ISM300Z3_on_off],
|
|
666
|
+
toZigbee: [tzLocal.ISM300Z3_on_off, tzLocal.ISM300Z3_rf_pairing],
|
|
667
|
+
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
|
|
668
|
+
exposes.enum('operation_mode', ea.ALL, ['auto', 'push', 'latch'])
|
|
669
|
+
.withDescription('Operation mode: "auto" - toggle by S/W, "push" - for momentary S/W, "latch" - sync S/W'),
|
|
670
|
+
exposes.enum('rf_pairing', ea.SET, ['l1', 'l2', 'l3'])
|
|
671
|
+
.withDescription('Enable RF pairing mode each button l1, l2, l3')],
|
|
672
|
+
endpoint: (device) => {
|
|
673
|
+
return {l1: 1, l2: 2, l3: 3};
|
|
674
|
+
},
|
|
675
|
+
meta: {multiEndpoint: true},
|
|
676
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
677
|
+
await device.getEndpoint(1).read('genOnOff', [0x9000]);
|
|
678
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
679
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
680
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
681
|
+
await reporting.onOff(device.getEndpoint(1));
|
|
682
|
+
await reporting.onOff(device.getEndpoint(2));
|
|
683
|
+
await reporting.onOff(device.getEndpoint(3));
|
|
684
|
+
},
|
|
685
|
+
},
|
|
686
|
+
];
|