@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,774 @@
|
|
|
1
|
+
const herdsman = require('zigbee-herdsman');
|
|
2
|
+
const exposes = require('../lib/exposes');
|
|
3
|
+
const fz = require('../converters/fromZigbee');
|
|
4
|
+
const tz = require('../converters/toZigbee');
|
|
5
|
+
const constants = require('../lib/constants');
|
|
6
|
+
const reporting = require('../lib/reporting');
|
|
7
|
+
const globalStore = require('../lib/store');
|
|
8
|
+
const ota = require('../lib/ota');
|
|
9
|
+
const utils = require('../lib/utils');
|
|
10
|
+
const extend = require('../lib/extend');
|
|
11
|
+
const ea = exposes.access;
|
|
12
|
+
const e = exposes.presets;
|
|
13
|
+
|
|
14
|
+
const sunricherManufacturer = {manufacturerCode: herdsman.Zcl.ManufacturerCode.SHENZHEN_SUNRICH};
|
|
15
|
+
|
|
16
|
+
const fzLocal = {
|
|
17
|
+
namron_panelheater: {
|
|
18
|
+
cluster: 'hvacThermostat',
|
|
19
|
+
type: ['attributeReport', 'readResponse'],
|
|
20
|
+
convert: (model, msg, publish, options, meta) => {
|
|
21
|
+
const result = {};
|
|
22
|
+
const data = msg.data;
|
|
23
|
+
if (data.hasOwnProperty(0x1000)) { // OperateDisplayBrightnesss
|
|
24
|
+
result.display_brightnesss = data[0x1000];
|
|
25
|
+
}
|
|
26
|
+
if (data.hasOwnProperty(0x1001)) { // DisplayAutoOffActivation
|
|
27
|
+
const lookup = {0: 'deactivated', 1: 'activated'};
|
|
28
|
+
result.display_auto_off = lookup[data[0x1001]];
|
|
29
|
+
}
|
|
30
|
+
if (data.hasOwnProperty(0x1004)) { // PowerUpStatus
|
|
31
|
+
const lookup = {0: 'manual', 1: 'last_state'};
|
|
32
|
+
result.power_up_status = lookup[data[0x1004]];
|
|
33
|
+
}
|
|
34
|
+
if (data.hasOwnProperty(0x1009)) { // WindowOpenCheck
|
|
35
|
+
const lookup = {0: 'enable', 1: 'disable'};
|
|
36
|
+
result.window_open_check = lookup[data[0x1009]];
|
|
37
|
+
}
|
|
38
|
+
if (data.hasOwnProperty(0x100A)) { // Hysterersis
|
|
39
|
+
result.hysterersis = utils.precisionRound(data[0x100A], 2) / 10;
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const tzLocal = {
|
|
47
|
+
namron_panelheater: {
|
|
48
|
+
key: [
|
|
49
|
+
'display_brightnesss', 'display_auto_off',
|
|
50
|
+
'power_up_status', 'window_open_check', 'hysterersis',
|
|
51
|
+
],
|
|
52
|
+
convertSet: async (entity, key, value, meta) => {
|
|
53
|
+
if (key === 'display_brightnesss') {
|
|
54
|
+
const payload = {0x1000: {value: value, type: herdsman.Zcl.DataType.enum8}};
|
|
55
|
+
await entity.write('hvacThermostat', payload, sunricherManufacturer);
|
|
56
|
+
} else if (key === 'display_auto_off') {
|
|
57
|
+
const lookup = {'deactivated': 0, 'activated': 1};
|
|
58
|
+
const payload = {0x1001: {value: lookup[value], type: herdsman.Zcl.DataType.enum8}};
|
|
59
|
+
await entity.write('hvacThermostat', payload, sunricherManufacturer);
|
|
60
|
+
} else if (key === 'power_up_status') {
|
|
61
|
+
const lookup = {'manual': 0, 'last_state': 1};
|
|
62
|
+
const payload = {0x1004: {value: lookup[value], type: herdsman.Zcl.DataType.enum8}};
|
|
63
|
+
await entity.write('hvacThermostat', payload, sunricherManufacturer);
|
|
64
|
+
} else if (key==='window_open_check') {
|
|
65
|
+
const lookup = {'enable': 0, 'disable': 1};
|
|
66
|
+
const payload = {0x1009: {value: lookup[value], type: herdsman.Zcl.DataType.enum8}};
|
|
67
|
+
await entity.write('hvacThermostat', payload, sunricherManufacturer);
|
|
68
|
+
} else if (key==='hysterersis') {
|
|
69
|
+
const payload = {0x100A: {value: value * 10, type: 0x20}};
|
|
70
|
+
await entity.write('hvacThermostat', payload, sunricherManufacturer);
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
convertGet: async (entity, key, meta) => {
|
|
74
|
+
switch (key) {
|
|
75
|
+
case 'display_brightnesss':
|
|
76
|
+
await entity.read('hvacThermostat', [0x1000], sunricherManufacturer);
|
|
77
|
+
break;
|
|
78
|
+
case 'display_auto_off':
|
|
79
|
+
await entity.read('hvacThermostat', [0x1001], sunricherManufacturer);
|
|
80
|
+
break;
|
|
81
|
+
case 'power_up_status':
|
|
82
|
+
await entity.read('hvacThermostat', [0x1004], sunricherManufacturer);
|
|
83
|
+
break;
|
|
84
|
+
case 'window_open_check':
|
|
85
|
+
await entity.read('hvacThermostat', [0x1009], sunricherManufacturer);
|
|
86
|
+
break;
|
|
87
|
+
case 'hysterersis':
|
|
88
|
+
await entity.read('hvacThermostat', [0x100A], sunricherManufacturer);
|
|
89
|
+
break;
|
|
90
|
+
|
|
91
|
+
default: // Unknown key
|
|
92
|
+
throw new Error(`Unhandled key toZigbee.namron_panelheater.convertGet ${key}`);
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
module.exports = [
|
|
99
|
+
{
|
|
100
|
+
zigbeeModel: ['3308431'],
|
|
101
|
+
model: '3308431',
|
|
102
|
+
vendor: 'Namron',
|
|
103
|
+
description: 'Luna ceiling light',
|
|
104
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
zigbeeModel: ['3802967'],
|
|
108
|
+
model: '3802967',
|
|
109
|
+
vendor: 'Namron',
|
|
110
|
+
description: 'Led bulb 6w RGBW',
|
|
111
|
+
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 555]}),
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
zigbeeModel: ['4512700'],
|
|
115
|
+
model: '4512700',
|
|
116
|
+
vendor: 'Namron',
|
|
117
|
+
description: 'ZigBee dimmer 400W',
|
|
118
|
+
extend: extend.light_onoff_brightness({noConfigure: true}),
|
|
119
|
+
ota: ota.zigbeeOTA,
|
|
120
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
121
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
122
|
+
const endpoint = device.getEndpoint(1);
|
|
123
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
124
|
+
await reporting.onOff(endpoint);
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
zigbeeModel: ['4512708'],
|
|
129
|
+
model: '4512708',
|
|
130
|
+
vendor: 'Namron',
|
|
131
|
+
description: 'Zigbee LED dimmer',
|
|
132
|
+
extend: extend.light_onoff_brightness({noConfigure: true}),
|
|
133
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
134
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
135
|
+
const endpoint = device.getEndpoint(1);
|
|
136
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
137
|
+
await reporting.onOff(endpoint);
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
zigbeeModel: ['4512733'],
|
|
142
|
+
model: '4512733',
|
|
143
|
+
vendor: 'Namron',
|
|
144
|
+
description: 'ZigBee dimmer 2-pol 400W',
|
|
145
|
+
extend: extend.light_onoff_brightness({noConfigure: true}),
|
|
146
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
147
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
148
|
+
const endpoint = device.getEndpoint(1);
|
|
149
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
150
|
+
await reporting.onOff(endpoint);
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
zigbeeModel: ['4512704'],
|
|
155
|
+
model: '4512704',
|
|
156
|
+
vendor: 'Namron',
|
|
157
|
+
description: 'Zigbee switch 400W',
|
|
158
|
+
extend: extend.switch(),
|
|
159
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
160
|
+
const endpoint = device.getEndpoint(1) || device.getEndpoint(3);
|
|
161
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
162
|
+
await reporting.onOff(endpoint);
|
|
163
|
+
},
|
|
164
|
+
ota: ota.zigbeeOTA,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
zigbeeModel: ['1402755'],
|
|
168
|
+
model: '1402755',
|
|
169
|
+
vendor: 'Namron',
|
|
170
|
+
description: 'ZigBee LED dimmer',
|
|
171
|
+
extend: extend.light_onoff_brightness({noConfigure: true}),
|
|
172
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
173
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
174
|
+
const endpoint = device.getEndpoint(1);
|
|
175
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
176
|
+
await reporting.onOff(endpoint);
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
zigbeeModel: ['4512703'],
|
|
181
|
+
model: '4512703',
|
|
182
|
+
vendor: 'Namron',
|
|
183
|
+
description: 'Zigbee 4 channel switch K8 (white)',
|
|
184
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
|
|
185
|
+
exposes: [e.battery(), e.action([
|
|
186
|
+
'on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
|
|
187
|
+
'on_l2', 'off_l2', 'brightness_move_up_l2', 'brightness_move_down_l2', 'brightness_stop_l2',
|
|
188
|
+
'on_l3', 'off_l3', 'brightness_move_up_l3', 'brightness_move_down_l3', 'brightness_stop_l3',
|
|
189
|
+
'on_l4', 'off_l4', 'brightness_move_up_l4', 'brightness_move_down_l4', 'brightness_stop_l4',
|
|
190
|
+
])],
|
|
191
|
+
toZigbee: [],
|
|
192
|
+
meta: {multiEndpoint: true},
|
|
193
|
+
endpoint: (device) => {
|
|
194
|
+
return {l1: 1, l2: 2, l3: 3, l4: 4};
|
|
195
|
+
},
|
|
196
|
+
ota: ota.zigbeeOTA,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
zigbeeModel: ['4512721'],
|
|
200
|
+
model: '4512721',
|
|
201
|
+
vendor: 'Namron',
|
|
202
|
+
description: 'Zigbee 4 channel switch K8 (black)',
|
|
203
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
|
|
204
|
+
toZigbee: [],
|
|
205
|
+
meta: {multiEndpoint: true},
|
|
206
|
+
exposes: [e.battery(), e.action([
|
|
207
|
+
'on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
|
|
208
|
+
'on_l2', 'off_l2', 'brightness_move_up_l2', 'brightness_move_down_l2', 'brightness_stop_l2',
|
|
209
|
+
'on_l3', 'off_l3', 'brightness_move_up_l3', 'brightness_move_down_l3', 'brightness_stop_l3',
|
|
210
|
+
'on_l4', 'off_l4', 'brightness_move_up_l4', 'brightness_move_down_l4', 'brightness_stop_l4'])],
|
|
211
|
+
endpoint: (device) => {
|
|
212
|
+
return {l1: 1, l2: 2, l3: 3, l4: 4};
|
|
213
|
+
},
|
|
214
|
+
ota: ota.zigbeeOTA,
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
zigbeeModel: ['4512701'],
|
|
218
|
+
model: '4512701',
|
|
219
|
+
vendor: 'Namron',
|
|
220
|
+
description: 'Zigbee 1 channel switch K2',
|
|
221
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
|
|
222
|
+
exposes: [e.battery(), e.action(['on', 'off', 'brightness_move_up', 'brightness_move_down', 'brightness_stop'])],
|
|
223
|
+
toZigbee: [],
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
zigbeeModel: ['4512702'],
|
|
227
|
+
model: '4512702',
|
|
228
|
+
vendor: 'Namron',
|
|
229
|
+
description: 'Zigbee 1 channel switch K4',
|
|
230
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop, fz.command_step],
|
|
231
|
+
exposes: [e.battery(), e.action([
|
|
232
|
+
'on', 'off', 'brightness_move_up', 'brightness_move_down', 'brightness_stop', 'brightness_step_up', 'brightness_step_down'])],
|
|
233
|
+
toZigbee: [],
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
zigbeeModel: ['4512719'],
|
|
237
|
+
model: '4512719',
|
|
238
|
+
vendor: 'Namron',
|
|
239
|
+
description: 'Zigbee 2 channel switch K4 (white)',
|
|
240
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
|
|
241
|
+
meta: {multiEndpoint: true},
|
|
242
|
+
exposes: [e.battery(), e.action(['on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
|
|
243
|
+
'on_l2', 'off_l2', 'brightness_move_up_l2', 'brightness_move_down_l2', 'brightness_stop_l2'])],
|
|
244
|
+
toZigbee: [],
|
|
245
|
+
endpoint: (device) => {
|
|
246
|
+
return {l1: 1, l2: 2};
|
|
247
|
+
},
|
|
248
|
+
ota: ota.zigbeeOTA,
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
zigbeeModel: ['4512726'],
|
|
252
|
+
model: '4512726',
|
|
253
|
+
vendor: 'Namron',
|
|
254
|
+
description: 'Zigbee 4 in 1 dimmer',
|
|
255
|
+
fromZigbee: [fz.battery, fz.command_on, fz.command_off, fz.command_move_to_level, fz.command_move_to_color_temp,
|
|
256
|
+
fz.command_move_to_hue, fz.ignore_genOta],
|
|
257
|
+
toZigbee: [],
|
|
258
|
+
exposes: [e.battery(), e.battery_voltage(),
|
|
259
|
+
e.action(['on', 'off', 'brightness_move_to_level', 'color_temperature_move', 'move_to_hue'])],
|
|
260
|
+
meta: {battery: {dontDividePercentage: true}},
|
|
261
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
262
|
+
const endpoint = device.getEndpoint(1);
|
|
263
|
+
const binds = ['genBasic', 'genPowerCfg', 'genIdentify', 'haDiagnostic', 'genOta'];
|
|
264
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
265
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
266
|
+
await reporting.batteryVoltage(endpoint);
|
|
267
|
+
},
|
|
268
|
+
ota: ota.zigbeeOTA,
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
zigbeeModel: ['4512729'],
|
|
272
|
+
model: '4512729',
|
|
273
|
+
vendor: 'Namron',
|
|
274
|
+
description: 'Zigbee 2 channel switch K4 (black)',
|
|
275
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
|
|
276
|
+
meta: {multiEndpoint: true},
|
|
277
|
+
exposes: [e.battery(), e.action(['on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
|
|
278
|
+
'on_l2', 'off_l2', 'brightness_move_up_l2', 'brightness_move_down_l2', 'brightness_stop_l2'])],
|
|
279
|
+
toZigbee: [],
|
|
280
|
+
endpoint: (device) => {
|
|
281
|
+
return {l1: 1, l2: 2};
|
|
282
|
+
},
|
|
283
|
+
ota: ota.zigbeeOTA,
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
zigbeeModel: ['4512706'],
|
|
287
|
+
model: '4512706',
|
|
288
|
+
vendor: 'Namron',
|
|
289
|
+
description: 'Remote control',
|
|
290
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.command_step, fz.command_step_color_temperature, fz.command_recall,
|
|
291
|
+
fz.command_move_to_color_temp, fz.battery, fz.command_move_to_hue],
|
|
292
|
+
exposes: [e.battery(), e.action([
|
|
293
|
+
'on', 'off', 'brightness_step_up', 'brightness_step_down', 'color_temperature_step_up',
|
|
294
|
+
'color_temperature_step_down', 'recall_*', 'color_temperature_move',
|
|
295
|
+
'move_to_hue_l1', 'move_to_hue_l2', 'move_to_hue_l3', 'move_to_hue_l4'])],
|
|
296
|
+
toZigbee: [],
|
|
297
|
+
meta: {multiEndpoint: true},
|
|
298
|
+
endpoint: (device) => {
|
|
299
|
+
return {l1: 1, l2: 2, l3: 3, l4: 4};
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
zigbeeModel: ['4512705'],
|
|
304
|
+
model: '4512705',
|
|
305
|
+
vendor: 'Namron',
|
|
306
|
+
description: 'Zigbee 4 channel remote control',
|
|
307
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop, fz.command_recall],
|
|
308
|
+
toZigbee: [],
|
|
309
|
+
ota: ota.zigbeeOTA,
|
|
310
|
+
exposes: [e.battery(), e.action([
|
|
311
|
+
'on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
|
|
312
|
+
'on_l2', 'off_l2', 'brightness_move_up_l2', 'brightness_move_down_l2', 'brightness_stop_l2',
|
|
313
|
+
'on_l3', 'off_l3', 'brightness_move_up_l3', 'brightness_move_down_l3', 'brightness_stop_l3',
|
|
314
|
+
'on_l4', 'off_l4', 'brightness_move_up_l4', 'brightness_move_down_l4', 'brightness_stop_l4',
|
|
315
|
+
'recall_*'])],
|
|
316
|
+
meta: {multiEndpoint: true},
|
|
317
|
+
endpoint: (device) => {
|
|
318
|
+
return {l1: 1, l2: 2, l3: 3, l4: 4};
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
zigbeeModel: ['3802960'],
|
|
323
|
+
model: '3802960',
|
|
324
|
+
vendor: 'Namron',
|
|
325
|
+
description: 'LED 9W DIM E27',
|
|
326
|
+
extend: extend.light_onoff_brightness(),
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
zigbeeModel: ['3802961'],
|
|
330
|
+
model: '3802961',
|
|
331
|
+
vendor: 'Namron',
|
|
332
|
+
description: 'LED 9W CCT E27',
|
|
333
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
zigbeeModel: ['3802962'],
|
|
337
|
+
model: '3802962',
|
|
338
|
+
vendor: 'Namron',
|
|
339
|
+
description: 'LED 9W RGBW E27',
|
|
340
|
+
meta: {turnsOffAtBrightness1: true},
|
|
341
|
+
extend: extend.light_onoff_brightness_colortemp_color(),
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
zigbeeModel: ['3802963'],
|
|
345
|
+
model: '3802963',
|
|
346
|
+
vendor: 'Namron',
|
|
347
|
+
description: 'LED 5,3W DIM E14',
|
|
348
|
+
extend: extend.light_onoff_brightness(),
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
zigbeeModel: ['3802964'],
|
|
352
|
+
model: '3802964',
|
|
353
|
+
vendor: 'Namron',
|
|
354
|
+
description: 'LED 5,3W CCT E14',
|
|
355
|
+
extend: extend.light_onoff_brightness_colortemp(),
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
zigbeeModel: ['3802965'],
|
|
359
|
+
model: '3802965',
|
|
360
|
+
vendor: 'Namron',
|
|
361
|
+
description: 'LED 4,8W DIM GU10',
|
|
362
|
+
extend: extend.light_onoff_brightness(),
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
zigbeeModel: ['3802966'],
|
|
366
|
+
model: '3802966',
|
|
367
|
+
vendor: 'Namron',
|
|
368
|
+
description: 'LED 4.8W CCT GU10',
|
|
369
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
zigbeeModel: ['89665'],
|
|
373
|
+
model: '89665',
|
|
374
|
+
vendor: 'Namron',
|
|
375
|
+
description: 'LED Strip RGB+W (5m) IP20',
|
|
376
|
+
meta: {turnsOffAtBrightness1: true},
|
|
377
|
+
extend: extend.light_onoff_brightness_colortemp_color(),
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
zigbeeModel: ['4512737', '4512738'],
|
|
381
|
+
model: '4512737/4512738',
|
|
382
|
+
vendor: 'Namron',
|
|
383
|
+
description: 'Touch termostat',
|
|
384
|
+
fromZigbee: [fz.thermostat, fz.namron_thermostat, fz.metering, fz.electrical_measurement,
|
|
385
|
+
fz.namron_hvac_user_interface],
|
|
386
|
+
toZigbee: [tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint, tz.thermostat_occupancy,
|
|
387
|
+
tz.thermostat_local_temperature_calibration, tz.thermostat_local_temperature, tz.thermostat_outdoor_temperature,
|
|
388
|
+
tz.thermostat_system_mode, tz.thermostat_control_sequence_of_operation, tz.thermostat_running_state,
|
|
389
|
+
tz.namron_thermostat_child_lock, tz.namron_thermostat],
|
|
390
|
+
exposes: [
|
|
391
|
+
e.local_temperature(),
|
|
392
|
+
exposes.numeric('outdoor_temperature', ea.STATE_GET).withUnit('°C')
|
|
393
|
+
.withDescription('Current temperature measured from the floor sensor'),
|
|
394
|
+
exposes.climate()
|
|
395
|
+
.withSetpoint('occupied_heating_setpoint', 0, 40, 0.1)
|
|
396
|
+
.withLocalTemperature()
|
|
397
|
+
.withLocalTemperatureCalibration(-3, 3, 0.1)
|
|
398
|
+
.withSystemMode(['off', 'auto', 'dry', 'heat'])
|
|
399
|
+
.withRunningState(['idle', 'heat']),
|
|
400
|
+
exposes.binary('away_mode', ea.ALL, 'ON', 'OFF')
|
|
401
|
+
.withDescription('Enable/disable away mode'),
|
|
402
|
+
exposes.binary('child_lock', ea.ALL, 'LOCK', 'UNLOCK')
|
|
403
|
+
.withDescription('Enables/disables physical input on the device'),
|
|
404
|
+
e.power(), e.current(), e.voltage(), e.energy(),
|
|
405
|
+
exposes.enum('lcd_brightness', ea.ALL, ['low', 'mid', 'high'])
|
|
406
|
+
.withDescription('OLED brightness when operating the buttons. Default: Medium.'),
|
|
407
|
+
exposes.enum('button_vibration_level', ea.ALL, ['off', 'low', 'high'])
|
|
408
|
+
.withDescription('Key beep volume and vibration level. Default: Low.'),
|
|
409
|
+
exposes.enum('floor_sensor_type', ea.ALL, ['10k', '15k', '50k', '100k', '12k'])
|
|
410
|
+
.withDescription('Type of the external floor sensor. Default: NTC 10K/25.'),
|
|
411
|
+
exposes.enum('sensor', ea.ALL, ['air', 'floor', 'both'])
|
|
412
|
+
.withDescription('The sensor used for heat control. Default: Room Sensor.'),
|
|
413
|
+
exposes.enum('powerup_status', ea.ALL, ['default', 'last_status'])
|
|
414
|
+
.withDescription('The mode after a power reset. Default: Previous Mode.'),
|
|
415
|
+
exposes.numeric('floor_sensor_calibration', ea.ALL)
|
|
416
|
+
.withUnit('°C')
|
|
417
|
+
.withValueMin(-3).withValueMax(3).withValueStep(0.1)
|
|
418
|
+
.withDescription('The tempearatue calibration for the exernal floor sensor, between -3 and 3 in 0.1°C. Default: 0.'),
|
|
419
|
+
exposes.numeric('dry_time', ea.ALL)
|
|
420
|
+
.withUnit('min')
|
|
421
|
+
.withValueMin(5).withValueMax(100)
|
|
422
|
+
.withDescription('The duration of Dry Mode, between 5 and 100 minutes. Default: 5.'),
|
|
423
|
+
exposes.enum('mode_after_dry', ea.ALL, ['off', 'manual', 'auto', 'away'])
|
|
424
|
+
.withDescription('The mode after Dry Mode. Default: Auto.'),
|
|
425
|
+
exposes.enum('temperature_display', ea.ALL, ['room', 'floor'])
|
|
426
|
+
.withDescription('The temperature on the display. Default: Room Temperature.'),
|
|
427
|
+
exposes.numeric('window_open_check', ea.ALL)
|
|
428
|
+
.withUnit('°C')
|
|
429
|
+
.withValueMin(1.5).withValueMax(4).withValueStep(0.5)
|
|
430
|
+
.withDescription('The threshold to detect window open, between 1.5 and 4 in 0.5 °C. Default: 0 (disabled).'),
|
|
431
|
+
exposes.numeric('hysterersis', ea.ALL)
|
|
432
|
+
.withUnit('°C')
|
|
433
|
+
.withValueMin(0.5).withValueMax(5).withValueStep(0.1)
|
|
434
|
+
.withDescription('Hysteresis setting, between 0.5 and 5 in 0.1 °C. Default: 0.5.'),
|
|
435
|
+
exposes.enum('display_auto_off_enabled', ea.ALL, ['enabled', 'disabled']),
|
|
436
|
+
exposes.numeric('alarm_airtemp_overvalue', ea.ALL)
|
|
437
|
+
.withUnit('°C')
|
|
438
|
+
.withValueMin(0).withValueMax(35)
|
|
439
|
+
.withDescription('Floor temperature over heating threshold, range is 0-35, unit is 1ºC, ' +
|
|
440
|
+
'0 means this function is disabled, default value is 27.'),
|
|
441
|
+
],
|
|
442
|
+
onEvent: async (type, data, device, options) => {
|
|
443
|
+
const endpoint = device.getEndpoint(1);
|
|
444
|
+
if (type === 'stop') {
|
|
445
|
+
clearInterval(globalStore.getValue(device, 'time'));
|
|
446
|
+
globalStore.clearValue(device, 'time');
|
|
447
|
+
} else if (!globalStore.hasValue(device, 'time')) {
|
|
448
|
+
const hours24 = 1000 * 60 * 60 * 24;
|
|
449
|
+
const interval = setInterval(async () => {
|
|
450
|
+
try {
|
|
451
|
+
// Device does not asks for the time with binding, therefore we write the time every 24 hours
|
|
452
|
+
const time = Math.round(((new Date()).getTime() - constants.OneJanuary2000) / 1000 + ((new Date())
|
|
453
|
+
.getTimezoneOffset() * -1) * 60);
|
|
454
|
+
const values = {time: time};
|
|
455
|
+
await endpoint.write('genTime', values);
|
|
456
|
+
} catch (error) {/* Do nothing*/}
|
|
457
|
+
}, hours24);
|
|
458
|
+
globalStore.putValue(device, 'time', interval);
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
462
|
+
const endpoint = device.getEndpoint(1);
|
|
463
|
+
const binds = [
|
|
464
|
+
'genBasic', 'genIdentify', 'hvacThermostat', 'seMetering', 'haElectricalMeasurement', 'genAlarms',
|
|
465
|
+
'msOccupancySensing', 'genTime', 'hvacUserInterfaceCfg',
|
|
466
|
+
];
|
|
467
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
468
|
+
|
|
469
|
+
// standard ZCL attributes
|
|
470
|
+
await reporting.thermostatTemperature(endpoint, {min: 0, change: 50});
|
|
471
|
+
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
472
|
+
await reporting.thermostatUnoccupiedHeatingSetpoint(endpoint);
|
|
473
|
+
await reporting.thermostatKeypadLockMode(endpoint);
|
|
474
|
+
|
|
475
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
476
|
+
attribute: 'occupancy',
|
|
477
|
+
minimumReportInterval: 0,
|
|
478
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
479
|
+
reportableChange: null,
|
|
480
|
+
}]);
|
|
481
|
+
|
|
482
|
+
// Metering
|
|
483
|
+
await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier']);
|
|
484
|
+
await endpoint.read('haElectricalMeasurement', ['acCurrentDivisor']);
|
|
485
|
+
await reporting.rmsVoltage(endpoint, {min: 10, change: 20}); // Voltage - Min change of 2v
|
|
486
|
+
await reporting.rmsCurrent(endpoint, {min: 10, change: 10}); // A - z2m displays only the first decimals, so change of 10 (0,01)
|
|
487
|
+
await reporting.activePower(endpoint, {min: 10, change: 15}); // W - Min change of 1,5W
|
|
488
|
+
await reporting.currentSummDelivered(endpoint, {min: 300}); // Report KWH every 5min
|
|
489
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
490
|
+
|
|
491
|
+
// Custom attributes
|
|
492
|
+
const options = {manufacturerCode: 0x1224};
|
|
493
|
+
|
|
494
|
+
// OperateDisplayLcdBrightnesss
|
|
495
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
496
|
+
attribute: {ID: 0x1000, type: 0x30},
|
|
497
|
+
minimumReportInterval: 0,
|
|
498
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
499
|
+
reportableChange: null}],
|
|
500
|
+
options);
|
|
501
|
+
// ButtonVibrationLevel
|
|
502
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
503
|
+
attribute: {ID: 0x1001, type: 0x30},
|
|
504
|
+
minimumReportInterval: 0,
|
|
505
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
506
|
+
reportableChange: null}],
|
|
507
|
+
options);
|
|
508
|
+
// FloorSensorType
|
|
509
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
510
|
+
attribute: {ID: 0x1002, type: 0x30},
|
|
511
|
+
minimumReportInterval: 0,
|
|
512
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
513
|
+
reportableChange: null}],
|
|
514
|
+
options);
|
|
515
|
+
// ControlType
|
|
516
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
517
|
+
attribute: {ID: 0x1003, type: 0x30},
|
|
518
|
+
minimumReportInterval: 0,
|
|
519
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
520
|
+
reportableChange: null}],
|
|
521
|
+
options);
|
|
522
|
+
// PowerUpStatus
|
|
523
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
524
|
+
attribute: {ID: 0x1004, type: 0x30},
|
|
525
|
+
minimumReportInterval: 0,
|
|
526
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
527
|
+
reportableChange: null}],
|
|
528
|
+
options);
|
|
529
|
+
// FloorSensorCalibration
|
|
530
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
531
|
+
attribute: {ID: 0x1005, type: 0x28},
|
|
532
|
+
minimumReportInterval: 0,
|
|
533
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
534
|
+
reportableChange: 0}],
|
|
535
|
+
options);
|
|
536
|
+
// DryTime
|
|
537
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
538
|
+
attribute: {ID: 0x1006, type: 0x20},
|
|
539
|
+
minimumReportInterval: 0,
|
|
540
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
541
|
+
reportableChange: 0}],
|
|
542
|
+
options);
|
|
543
|
+
// ModeAfterDry
|
|
544
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
545
|
+
attribute: {ID: 0x1007, type: 0x30},
|
|
546
|
+
minimumReportInterval: 0,
|
|
547
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
548
|
+
reportableChange: null}],
|
|
549
|
+
options);
|
|
550
|
+
// TemperatureDisplay
|
|
551
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
552
|
+
attribute: {ID: 0x1008, type: 0x30},
|
|
553
|
+
minimumReportInterval: 0,
|
|
554
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
555
|
+
reportableChange: null}],
|
|
556
|
+
options);
|
|
557
|
+
// WindowOpenCheck
|
|
558
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
559
|
+
attribute: {ID: 0x1009, type: 0x20},
|
|
560
|
+
minimumReportInterval: 0,
|
|
561
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
562
|
+
reportableChange: 0}],
|
|
563
|
+
options);
|
|
564
|
+
|
|
565
|
+
// Hysterersis
|
|
566
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
567
|
+
attribute: {ID: 0x100A, type: 0x20},
|
|
568
|
+
minimumReportInterval: 0,
|
|
569
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
570
|
+
reportableChange: 0}],
|
|
571
|
+
options);
|
|
572
|
+
// DisplayAutoOffEnable
|
|
573
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
574
|
+
attribute: {ID: 0x100B, type: 0x30},
|
|
575
|
+
minimumReportInterval: 0,
|
|
576
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
577
|
+
reportableChange: null}],
|
|
578
|
+
options);
|
|
579
|
+
|
|
580
|
+
// AlarmAirTempOverValue
|
|
581
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
582
|
+
attribute: {ID: 0x2001, type: 0x20},
|
|
583
|
+
minimumReportInterval: 0,
|
|
584
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
585
|
+
reportableChange: 0}],
|
|
586
|
+
options);
|
|
587
|
+
// Away Mode Set
|
|
588
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
589
|
+
attribute: {ID: 0x2002, type: 0x30},
|
|
590
|
+
minimumReportInterval: 0,
|
|
591
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
592
|
+
reportableChange: null}],
|
|
593
|
+
options);
|
|
594
|
+
|
|
595
|
+
// Trigger initial read
|
|
596
|
+
await endpoint.read('hvacThermostat', ['systemMode', 'runningState', 'occupiedHeatingSetpoint']);
|
|
597
|
+
await endpoint.read('hvacThermostat', [0x1000, 0x1001, 0x1002, 0x1003], options);
|
|
598
|
+
await endpoint.read('hvacThermostat', [0x1004, 0x1005, 0x1006, 0x1007], options);
|
|
599
|
+
await endpoint.read('hvacThermostat', [0x1008, 0x1009, 0x100A, 0x100B], options);
|
|
600
|
+
await endpoint.read('hvacThermostat', [0x2001, 0x2002], options);
|
|
601
|
+
},
|
|
602
|
+
ota: ota.zigbeeOTA,
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
zigbeeModel: ['4512735'],
|
|
606
|
+
model: '4512735',
|
|
607
|
+
vendor: 'Namron',
|
|
608
|
+
description: 'Multiprise with 4 AC outlets and 2 USB super charging ports (16A)',
|
|
609
|
+
fromZigbee: [fz.on_off],
|
|
610
|
+
toZigbee: [tz.on_off],
|
|
611
|
+
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
|
|
612
|
+
e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5')],
|
|
613
|
+
endpoint: (device) => {
|
|
614
|
+
return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5};
|
|
615
|
+
},
|
|
616
|
+
meta: {multiEndpoint: true},
|
|
617
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
618
|
+
for (const ID of [1, 2, 3, 4, 5]) {
|
|
619
|
+
const endpoint = device.getEndpoint(ID);
|
|
620
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
621
|
+
}
|
|
622
|
+
device.powerSource = 'Mains (single phase)';
|
|
623
|
+
device.save();
|
|
624
|
+
},
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
zigbeeModel: ['5401392', '5401396', '5401393', '5401397', '5401394', '5401398', '5401395', '5401399', '5401395'],
|
|
628
|
+
model: '540139X',
|
|
629
|
+
vendor: 'Namron',
|
|
630
|
+
description: 'Panel heater 400/600/800/1000 W',
|
|
631
|
+
fromZigbee: [fz.thermostat, fz.metering, fz.electrical_measurement, fzLocal.namron_panelheater, fz.namron_hvac_user_interface],
|
|
632
|
+
toZigbee: [tz.thermostat_occupied_heating_setpoint, tz.thermostat_local_temperature_calibration, tz.thermostat_system_mode,
|
|
633
|
+
tz.thermostat_running_state, tz.thermostat_local_temperature, tzLocal.namron_panelheater, tz.namron_thermostat_child_lock],
|
|
634
|
+
exposes: [e.power(), e.current(), e.voltage(), e.energy(),
|
|
635
|
+
exposes.climate()
|
|
636
|
+
.withSetpoint('occupied_heating_setpoint', 5, 35, 0.5)
|
|
637
|
+
.withLocalTemperature()
|
|
638
|
+
// Unit also supports Auto, but i havent added support the scheduler yet
|
|
639
|
+
// so the function is not listed for now, as this doesn´t allow you the set the temperature
|
|
640
|
+
.withSystemMode(['off', 'heat'])
|
|
641
|
+
.withLocalTemperatureCalibration(-3, 3, 0.1)
|
|
642
|
+
.withRunningState(['idle', 'heat']),
|
|
643
|
+
// Namron proprietary stuff
|
|
644
|
+
exposes.binary('child_lock', ea.ALL, 'LOCK', 'UNLOCK')
|
|
645
|
+
.withDescription('Enables/disables physical input on the device'),
|
|
646
|
+
exposes.numeric('hysterersis', ea.ALL)
|
|
647
|
+
.withUnit('°C')
|
|
648
|
+
.withValueMin(0.5).withValueMax(2).withValueStep(0.1)
|
|
649
|
+
.withDescription('Hysteresis setting, default: 0.5'),
|
|
650
|
+
exposes.numeric('display_brightnesss', ea.ALL)
|
|
651
|
+
.withValueMin(1).withValueMax(7).withValueStep(1)
|
|
652
|
+
.withDescription('Adjust brightness of display values 1(Low)-7(High)'),
|
|
653
|
+
exposes.enum('display_auto_off', ea.ALL, ['deactivated', 'activated'])
|
|
654
|
+
.withDescription('Enable / Disable display auto off'),
|
|
655
|
+
exposes.enum('power_up_status', ea.ALL, ['manual', 'last_state'])
|
|
656
|
+
.withDescription('The mode after a power reset. Default: Previous Mode. See instructions for information about manual'),
|
|
657
|
+
exposes.enum('window_open_check', ea.ALL, ['enable', 'disable'])
|
|
658
|
+
.withDescription('Turn on/off window check mode'),
|
|
659
|
+
],
|
|
660
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
661
|
+
const endpoint = device.getEndpoint(1);
|
|
662
|
+
const binds = [
|
|
663
|
+
'genBasic', 'genIdentify', 'hvacThermostat', 'seMetering', 'haElectricalMeasurement', 'genAlarms',
|
|
664
|
+
'genTime', 'hvacUserInterfaceCfg',
|
|
665
|
+
];
|
|
666
|
+
|
|
667
|
+
// Reporting
|
|
668
|
+
|
|
669
|
+
// Metering
|
|
670
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
671
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
672
|
+
await reporting.rmsVoltage(endpoint, {min: 10, change: 20}); // Voltage - Min change of 2v
|
|
673
|
+
await reporting.rmsCurrent(endpoint, {min: 10, change: 10}); // A - z2m displays only the first decimals, so change of 10 (0,01)
|
|
674
|
+
await reporting.activePower(endpoint, {min: 10, change: 15}); // W - Min change of 1,5W
|
|
675
|
+
await reporting.currentSummDelivered(endpoint, {min: 300}); // Report KWH every 5min
|
|
676
|
+
|
|
677
|
+
// Thermostat reporting
|
|
678
|
+
await reporting.thermostatTemperature(endpoint);
|
|
679
|
+
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
680
|
+
await reporting.thermostatTemperature(endpoint);
|
|
681
|
+
await reporting.thermostatKeypadLockMode(endpoint);
|
|
682
|
+
// LocalTemp is spammy, reports 0.01C diff by default, min change is now 0.5C
|
|
683
|
+
await reporting.thermostatTemperature(endpoint, {min: 0, change: 50});
|
|
684
|
+
|
|
685
|
+
// Namron proprietary stuff
|
|
686
|
+
const options = {manufacturerCode: 0x1224};
|
|
687
|
+
|
|
688
|
+
// display_brightnesss
|
|
689
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
690
|
+
attribute: {ID: 0x1000, type: 0x30},
|
|
691
|
+
minimumReportInterval: 0,
|
|
692
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
693
|
+
reportableChange: null}],
|
|
694
|
+
options);
|
|
695
|
+
// display_auto_off
|
|
696
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
697
|
+
attribute: {ID: 0x1001, type: 0x30},
|
|
698
|
+
minimumReportInterval: 0,
|
|
699
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
700
|
+
reportableChange: null}],
|
|
701
|
+
options);
|
|
702
|
+
// power_up_status
|
|
703
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
704
|
+
attribute: {ID: 0x1004, type: 0x30},
|
|
705
|
+
minimumReportInterval: 0,
|
|
706
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
707
|
+
reportableChange: null}],
|
|
708
|
+
options);
|
|
709
|
+
// window_open_check
|
|
710
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
711
|
+
attribute: {ID: 0x1009, type: 0x30},
|
|
712
|
+
minimumReportInterval: 0,
|
|
713
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
714
|
+
reportableChange: null}],
|
|
715
|
+
options);
|
|
716
|
+
// hysterersis
|
|
717
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
718
|
+
attribute: {ID: 0x100A, type: 0x20},
|
|
719
|
+
minimumReportInterval: 0,
|
|
720
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
721
|
+
reportableChange: null}],
|
|
722
|
+
options);
|
|
723
|
+
|
|
724
|
+
await endpoint.read('hvacThermostat', ['systemMode', 'runningState', 'occupiedHeatingSetpoint']);
|
|
725
|
+
await endpoint.read('hvacUserInterfaceCfg', ['keypadLockout']);
|
|
726
|
+
await endpoint.read('hvacThermostat', [0x1000, 0x1001, 0x1004, 0x1009, 0x100A], options);
|
|
727
|
+
|
|
728
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
729
|
+
},
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
zigbeeModel: ['3802968'],
|
|
733
|
+
model: '3802968',
|
|
734
|
+
vendor: 'Namron',
|
|
735
|
+
description: 'LED Filament Flex 5W CCT E27 Clear',
|
|
736
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 555]}),
|
|
737
|
+
meta: {turnsOffAtBrightness1: true},
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
zigbeeModel: ['4512749'],
|
|
741
|
+
model: '4512749',
|
|
742
|
+
vendor: 'Namron',
|
|
743
|
+
description: 'Thermostat outlet socket',
|
|
744
|
+
fromZigbee: [fz.metering, fz.electrical_measurement, fz.on_off, fz.temperature],
|
|
745
|
+
toZigbee: [tz.on_off, tz.power_on_behavior],
|
|
746
|
+
exposes: [e.temperature(), e.power(), e.current(), e.voltage(), e.switch(), e.power_on_behavior()],
|
|
747
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
748
|
+
const endpoint = device.getEndpoint(1);
|
|
749
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'msTemperatureMeasurement']);
|
|
750
|
+
await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor']);
|
|
751
|
+
await endpoint.read('haElectricalMeasurement', ['acPowerMultiplier', 'acPowerDivisor']);
|
|
752
|
+
await endpoint.read('haElectricalMeasurement', ['acCurrentMultiplier', 'acCurrentDivisor']);
|
|
753
|
+
await reporting.onOff(endpoint);
|
|
754
|
+
await reporting.temperature(endpoint);
|
|
755
|
+
await reporting.rmsVoltage(endpoint);
|
|
756
|
+
await reporting.rmsCurrent(endpoint);
|
|
757
|
+
await reporting.activePower(endpoint);
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
zigbeeModel: ['4512747'],
|
|
762
|
+
model: '4512747',
|
|
763
|
+
vendor: 'Namron',
|
|
764
|
+
description: 'Curtain motor controller',
|
|
765
|
+
fromZigbee: [fz.cover_position_tilt],
|
|
766
|
+
toZigbee: [tz.cover_state, tz.cover_position_tilt],
|
|
767
|
+
exposes: [e.cover_position()],
|
|
768
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
769
|
+
const endpoint = device.getEndpoint(1);
|
|
770
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']);
|
|
771
|
+
await reporting.currentPositionLiftPercentage(endpoint);
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
];
|