@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.
Files changed (312) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/converters/fromZigbee.js +8439 -0
  4. package/converters/toZigbee.js +7162 -0
  5. package/devices/ITCommander.js +37 -0
  6. package/devices/RMC002.js +20 -0
  7. package/devices/acova.js +101 -0
  8. package/devices/acuity_brands_lighting.js +11 -0
  9. package/devices/adeo.js +256 -0
  10. package/devices/adurosmart.js +130 -0
  11. package/devices/aeotec.js +13 -0
  12. package/devices/airam.js +59 -0
  13. package/devices/ajax_online.js +49 -0
  14. package/devices/akuvox.js +28 -0
  15. package/devices/alchemy.js +18 -0
  16. package/devices/aldi.js +53 -0
  17. package/devices/alecto.js +98 -0
  18. package/devices/anchor.js +17 -0
  19. package/devices/atlantic.js +110 -0
  20. package/devices/atsmart.js +28 -0
  21. package/devices/aubess.js +21 -0
  22. package/devices/aurora_lighting.js +292 -0
  23. package/devices/automaton.js +44 -0
  24. package/devices/awox.js +184 -0
  25. package/devices/axis.js +22 -0
  26. package/devices/bankamp.js +11 -0
  27. package/devices/bega.js +22 -0
  28. package/devices/belkin.js +11 -0
  29. package/devices/bitron.js +334 -0
  30. package/devices/blaupunkt.js +27 -0
  31. package/devices/blitzwolf.js +47 -0
  32. package/devices/bosch.js +702 -0
  33. package/devices/brimate.js +15 -0
  34. package/devices/bseed.js +17 -0
  35. package/devices/bticino.js +118 -0
  36. package/devices/busch-jaeger.js +140 -0
  37. package/devices/byun.js +24 -0
  38. package/devices/calex.js +37 -0
  39. package/devices/candeo.js +49 -0
  40. package/devices/casaia.js +52 -0
  41. package/devices/centralite.js +359 -0
  42. package/devices/cleode.js +20 -0
  43. package/devices/cleverio.js +36 -0
  44. package/devices/climax.js +138 -0
  45. package/devices/commercial_electric.js +16 -0
  46. package/devices/connecte.js +46 -0
  47. package/devices/cree.js +11 -0
  48. package/devices/ctm.js +999 -0
  49. package/devices/current_products_corp.js +24 -0
  50. package/devices/custom_devices_diy.js +850 -0
  51. package/devices/cy-lighting.js +11 -0
  52. package/devices/danalock.js +26 -0
  53. package/devices/danfoss.js +340 -0
  54. package/devices/databyte.ch.js +55 -0
  55. package/devices/datek.js +246 -0
  56. package/devices/dawon_dns.js +338 -0
  57. package/devices/develco.js +868 -0
  58. package/devices/digi.js +14 -0
  59. package/devices/diyruz.js +305 -0
  60. package/devices/dlink.js +37 -0
  61. package/devices/dnake.js +11 -0
  62. package/devices/dresden_elektronik.js +47 -0
  63. package/devices/easyaccess.js +27 -0
  64. package/devices/eatonhalo_led.js +11 -0
  65. package/devices/echostar.js +25 -0
  66. package/devices/ecodim.js +145 -0
  67. package/devices/ecolink.js +21 -0
  68. package/devices/ecosmart.js +64 -0
  69. package/devices/ecozy.js +31 -0
  70. package/devices/edp.js +39 -0
  71. package/devices/eglo.js +25 -0
  72. package/devices/elko.js +176 -0
  73. package/devices/enbrighten.js +163 -0
  74. package/devices/enocean.js +52 -0
  75. package/devices/envilar.js +73 -0
  76. package/devices/essentialb.js +87 -0
  77. package/devices/eurotronic.js +48 -0
  78. package/devices/evanell.js +29 -0
  79. package/devices/evn.js +31 -0
  80. package/devices/evology.js +24 -0
  81. package/devices/evvr.js +17 -0
  82. package/devices/ewelink.js +184 -0
  83. package/devices/ezex.js +24 -0
  84. package/devices/fantem.js +77 -0
  85. package/devices/feibit.js +172 -0
  86. package/devices/fireangel.js +15 -0
  87. package/devices/frankever.js +23 -0
  88. package/devices/garza.js +11 -0
  89. package/devices/ge.js +111 -0
  90. package/devices/gewiss.js +48 -0
  91. package/devices/gidealed.js +11 -0
  92. package/devices/giderwel.js +11 -0
  93. package/devices/giex.js +222 -0
  94. package/devices/girier.js +19 -0
  95. package/devices/gledopto.js +756 -0
  96. package/devices/gmy.js +11 -0
  97. package/devices/gs.js +29 -0
  98. package/devices/halemeier.js +18 -0
  99. package/devices/hampton_bay.js +37 -0
  100. package/devices/heiman.js +805 -0
  101. package/devices/hej.js +107 -0
  102. package/devices/hfh.js +11 -0
  103. package/devices/hgkg.js +54 -0
  104. package/devices/hilux.js +11 -0
  105. package/devices/hive.js +524 -0
  106. package/devices/home_control_as.js +27 -0
  107. package/devices/hommyn.js +24 -0
  108. package/devices/honyar.js +29 -0
  109. package/devices/hornbach.js +53 -0
  110. package/devices/hzc.js +21 -0
  111. package/devices/hzc_electric.js +42 -0
  112. package/devices/icasa.js +121 -0
  113. package/devices/idinio.js +19 -0
  114. package/devices/ihorn.js +61 -0
  115. package/devices/ikea.js +1168 -0
  116. package/devices/ilightsin.js +11 -0
  117. package/devices/iluminize.js +262 -0
  118. package/devices/ilux.js +11 -0
  119. package/devices/immax.js +203 -0
  120. package/devices/innr.js +705 -0
  121. package/devices/inovelli.js +1315 -0
  122. package/devices/insta.js +110 -0
  123. package/devices/iolloi.js +20 -0
  124. package/devices/iotperfect.js +20 -0
  125. package/devices/iris.js +180 -0
  126. package/devices/istar.js +20 -0
  127. package/devices/jasco.js +55 -0
  128. package/devices/javis.js +37 -0
  129. package/devices/jethome.js +48 -0
  130. package/devices/jiawen.js +18 -0
  131. package/devices/jumitech.js +18 -0
  132. package/devices/jxuan.js +49 -0
  133. package/devices/kami.js +15 -0
  134. package/devices/keen_home.js +80 -0
  135. package/devices/klikaanklikuit.js +17 -0
  136. package/devices/kmpcil.js +148 -0
  137. package/devices/konke.js +141 -0
  138. package/devices/ksentry.js +17 -0
  139. package/devices/kurvia.js +17 -0
  140. package/devices/kwikset.js +120 -0
  141. package/devices/lanesto.js +11 -0
  142. package/devices/lds.js +11 -0
  143. package/devices/led_trading.js +69 -0
  144. package/devices/ledvance.js +353 -0
  145. package/devices/leedarson.js +130 -0
  146. package/devices/legrand.js +554 -0
  147. package/devices/lellki.js +146 -0
  148. package/devices/letsled.js +11 -0
  149. package/devices/letv.js +18 -0
  150. package/devices/leviton.js +142 -0
  151. package/devices/lg.js +18 -0
  152. package/devices/lidl.js +1000 -0
  153. package/devices/lifecontrol.js +92 -0
  154. package/devices/lightsolutions.js +37 -0
  155. package/devices/linkind.js +205 -0
  156. package/devices/livingwise.js +59 -0
  157. package/devices/livolo.js +286 -0
  158. package/devices/lixee.js +779 -0
  159. package/devices/lonsonho.js +218 -0
  160. package/devices/lubeez.js +18 -0
  161. package/devices/lupus.js +74 -0
  162. package/devices/lutron.js +32 -0
  163. package/devices/lux.js +40 -0
  164. package/devices/m-elec.js +18 -0
  165. package/devices/makegood.js +51 -0
  166. package/devices/matcall_bv.js +18 -0
  167. package/devices/meazon.js +47 -0
  168. package/devices/mercator.js +225 -0
  169. package/devices/miboxer.js +72 -0
  170. package/devices/micromatic.js +29 -0
  171. package/devices/moes.js +400 -0
  172. package/devices/mycket.js +11 -0
  173. package/devices/m/303/274ller_licht.js +220 -0
  174. package/devices/namron.js +774 -0
  175. package/devices/nanoleaf.js +11 -0
  176. package/devices/neo.js +86 -0
  177. package/devices/net2grid.js +29 -0
  178. package/devices/netvox.js +35 -0
  179. package/devices/niko.js +314 -0
  180. package/devices/ninja_blocks.js +24 -0
  181. package/devices/niviss.js +11 -0
  182. package/devices/nodon.js +109 -0
  183. package/devices/nordtronic.js +30 -0
  184. package/devices/nous.js +88 -0
  185. package/devices/novo.js +17 -0
  186. package/devices/nue_3a.js +417 -0
  187. package/devices/nyce.js +67 -0
  188. package/devices/onesti.js +59 -0
  189. package/devices/openlumi.js +22 -0
  190. package/devices/orvibo.js +515 -0
  191. package/devices/osram.js +519 -0
  192. package/devices/oujiabao.js +15 -0
  193. package/devices/owon.js +352 -0
  194. package/devices/ozsmartthings.js +11 -0
  195. package/devices/paul_neuhaus.js +96 -0
  196. package/devices/paulmann.js +158 -0
  197. package/devices/peq.js +24 -0
  198. package/devices/perenio.js +413 -0
  199. package/devices/philips.js +3118 -0
  200. package/devices/plaid.js +25 -0
  201. package/devices/plugwise.js +173 -0
  202. package/devices/popp.js +10 -0
  203. package/devices/profalux.js +47 -0
  204. package/devices/prolight.js +54 -0
  205. package/devices/qmotion.js +33 -0
  206. package/devices/qoto.js +113 -0
  207. package/devices/quotra.js +18 -0
  208. package/devices/rademacher.js +18 -0
  209. package/devices/rgb_genie.js +119 -0
  210. package/devices/robb.js +335 -0
  211. package/devices/roome.js +15 -0
  212. package/devices/rtx.js +90 -0
  213. package/devices/salus_controls.js +137 -0
  214. package/devices/samotech.js +93 -0
  215. package/devices/saswell.js +58 -0
  216. package/devices/scanproducts.js +32 -0
  217. package/devices/schlage.js +24 -0
  218. package/devices/schneider_electric.js +1039 -0
  219. package/devices/schwaiger.js +62 -0
  220. package/devices/seastar_intelligence.js +16 -0
  221. package/devices/securifi.js +39 -0
  222. package/devices/sengled.js +332 -0
  223. package/devices/sercomm.js +140 -0
  224. package/devices/shenzhen_homa.js +53 -0
  225. package/devices/shinasystem.js +686 -0
  226. package/devices/siglis.js +440 -0
  227. package/devices/sinope.js +1257 -0
  228. package/devices/siterwell.js +46 -0
  229. package/devices/skydance.js +112 -0
  230. package/devices/slv.js +27 -0
  231. package/devices/smart9.js +27 -0
  232. package/devices/smart_home_pty.js +18 -0
  233. package/devices/smartenit.js +42 -0
  234. package/devices/smartthings.js +495 -0
  235. package/devices/smartwings.js +24 -0
  236. package/devices/sohan_electric.js +13 -0
  237. package/devices/solaredge.js +11 -0
  238. package/devices/somgoms.js +47 -0
  239. package/devices/sonoff.js +262 -0
  240. package/devices/spotmau.js +36 -0
  241. package/devices/sprut.js +317 -0
  242. package/devices/stelpro.js +216 -0
  243. package/devices/sunricher.js +625 -0
  244. package/devices/swann.js +33 -0
  245. package/devices/sylvania.js +200 -0
  246. package/devices/tci.js +25 -0
  247. package/devices/technicolor.js +47 -0
  248. package/devices/terncy.js +64 -0
  249. package/devices/the_light_group.js +70 -0
  250. package/devices/third_reality.js +195 -0
  251. package/devices/titan_products.js +22 -0
  252. package/devices/tplink.js +42 -0
  253. package/devices/trust.js +114 -0
  254. package/devices/tubeszb.js +20 -0
  255. package/devices/tuya.js +4215 -0
  256. package/devices/ubisys.js +938 -0
  257. package/devices/uhome.js +25 -0
  258. package/devices/universal_electronics_inc.js +119 -0
  259. package/devices/urlighting.js +12 -0
  260. package/devices/useelink.js +52 -0
  261. package/devices/vbled.js +18 -0
  262. package/devices/vesternet.js +188 -0
  263. package/devices/viessmann.js +51 -0
  264. package/devices/villeroy_boch.js +18 -0
  265. package/devices/vimar.js +78 -0
  266. package/devices/visonic.js +80 -0
  267. package/devices/vrey.js +18 -0
  268. package/devices/wally.js +25 -0
  269. package/devices/waxman.js +45 -0
  270. package/devices/weiser.js +67 -0
  271. package/devices/weten.js +13 -0
  272. package/devices/wisdom.js +11 -0
  273. package/devices/woox.js +177 -0
  274. package/devices/wyze.js +23 -0
  275. package/devices/xiaomi.js +3223 -0
  276. package/devices/xinghuoyuan.js +11 -0
  277. package/devices/yale.js +227 -0
  278. package/devices/ynoa.js +68 -0
  279. package/devices/yookee.js +23 -0
  280. package/devices/ysrsai.js +26 -0
  281. package/devices/zemismart.js +254 -0
  282. package/devices/zen.js +34 -0
  283. package/devices/zipato.js +11 -0
  284. package/index.js +242 -0
  285. package/lib/color.js +784 -0
  286. package/lib/configureKey.js +944 -0
  287. package/lib/constants.js +316 -0
  288. package/lib/exposes.js +677 -0
  289. package/lib/extend.js +180 -0
  290. package/lib/kelvinToXy.js +1912 -0
  291. package/lib/legacy.js +2223 -0
  292. package/lib/light.js +111 -0
  293. package/lib/ota/OTA_URLs.md +119 -0
  294. package/lib/ota/common.js +476 -0
  295. package/lib/ota/index.js +10 -0
  296. package/lib/ota/inovelli.js +72 -0
  297. package/lib/ota/ledvance.js +52 -0
  298. package/lib/ota/lixee.js +57 -0
  299. package/lib/ota/salus.js +82 -0
  300. package/lib/ota/securifi.js +25 -0
  301. package/lib/ota/tradfri.js +45 -0
  302. package/lib/ota/ubisys.js +61 -0
  303. package/lib/ota/zigbeeOTA.js +161 -0
  304. package/lib/philips.js +667 -0
  305. package/lib/reporting.js +234 -0
  306. package/lib/store.js +57 -0
  307. package/lib/tuya.js +2027 -0
  308. package/lib/utils.js +527 -0
  309. package/lib/xiaomi.d.ts +11 -0
  310. package/lib/xiaomi.js +1288 -0
  311. package/lib/zosung.js +243 -0
  312. package/package.json +39 -0
@@ -0,0 +1,88 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
3
+ const tz = require('../converters/toZigbee');
4
+ const tuya = require('../lib/tuya');
5
+ const reporting = require('../lib/reporting');
6
+ const e = exposes.presets;
7
+ const ea = exposes.access;
8
+
9
+ module.exports = [
10
+ {
11
+ fingerprint: [{modelID: 'TS0201', manufacturerName: '_TZ3000_lbtpiody'}],
12
+ model: 'E5',
13
+ vendor: 'Nous',
14
+ description: 'Temperature & humidity',
15
+ fromZigbee: [fz.temperature, fz.humidity, fz.battery],
16
+ toZigbee: [],
17
+ exposes: [e.temperature(), e.humidity(), e.battery()],
18
+ },
19
+ {
20
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_lve3dvpy'},
21
+ {modelID: 'TS0601', manufacturerName: '_TZE200_c7emyjom'},
22
+ {modelID: 'TS0601', manufacturerName: '_TZE200_locansqn'}],
23
+ model: 'SZ-T04',
24
+ vendor: 'Nous',
25
+ description: 'Temperature and humidity sensor with clock',
26
+ fromZigbee: [fz.nous_lcd_temperature_humidity_sensor, fz.ignore_tuya_set_time],
27
+ toZigbee: [tz.nous_lcd_temperature_humidity_sensor],
28
+ onEvent: tuya.onEventSetLocalTime,
29
+ configure: async (device, coordinatorEndpoint, logger) => {
30
+ const endpoint = device.getEndpoint(1);
31
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
32
+ },
33
+ exposes: [
34
+ e.temperature(), e.humidity(), e.battery(),
35
+ exposes.numeric('temperature_report_interval', ea.STATE_SET).withUnit('min').withValueMin(5).withValueMax(120).withValueStep(5)
36
+ .withDescription('Temperature Report interval'),
37
+ exposes.numeric('humidity_report_interval', ea.STATE_SET).withUnit('min').withValueMin(5).withValueMax(120).withValueStep(5)
38
+ .withDescription('Humidity Report interval'),
39
+ exposes.enum('temperature_unit_convert', ea.STATE_SET, ['celsius', 'fahrenheit']).withDescription('Current display unit'),
40
+ exposes.enum('temperature_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
41
+ .withDescription('Temperature alarm status'),
42
+ exposes.numeric('max_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
43
+ .withDescription('Alarm temperature max'),
44
+ exposes.numeric('min_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
45
+ .withDescription('Alarm temperature min'),
46
+ exposes.numeric('temperature_sensitivity', ea.STATE_SET).withUnit('°C').withValueMin(0.1).withValueMax(50).withValueStep(0.1)
47
+ .withDescription('Temperature sensitivity'),
48
+ exposes.enum('humidity_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
49
+ .withDescription('Humidity alarm status'),
50
+ exposes.numeric('max_humidity', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100)
51
+ .withDescription('Alarm humidity max'),
52
+ exposes.numeric('min_humidity', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100)
53
+ .withDescription('Alarm humidity min'),
54
+ exposes.numeric('humidity_sensitivity', ea.STATE_SET).withUnit('%').withValueMin(1).withValueMax(100).withValueStep(1)
55
+ .withDescription('Humidity sensitivity'),
56
+ ],
57
+ },
58
+ {
59
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_nnrfa68v'}],
60
+ model: 'E6',
61
+ vendor: 'Nous',
62
+ description: 'Temperature & humidity LCD sensor',
63
+ fromZigbee: [fz.nous_lcd_temperature_humidity_sensor, fz.ignore_tuya_set_time],
64
+ toZigbee: [tz.nous_lcd_temperature_humidity_sensor],
65
+ onEvent: tuya.onEventSetLocalTime,
66
+ configure: async (device, coordinatorEndpoint, logger) => {
67
+ const endpoint = device.getEndpoint(1);
68
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
69
+ },
70
+ exposes: [
71
+ e.temperature(),
72
+ e.humidity(),
73
+ e.battery(),
74
+ exposes.enum('temperature_unit_convert', ea.STATE_SET, ['celsius', 'fahrenheit']).withDescription('Current display unit'),
75
+ exposes.enum('temperature_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
76
+ .withDescription('Temperature alarm status'),
77
+ exposes.numeric('max_temperature', ea.STATE_SET)
78
+ .withUnit('°C').withValueMin(-20).withValueMax(60)
79
+ .withDescription('Alarm temperature max'),
80
+ exposes.numeric('min_temperature', ea.STATE_SET).withUnit('°C')
81
+ .withValueMin(-20).withValueMax(60)
82
+ .withDescription('Alarm temperature min'),
83
+ exposes.numeric('temperature_sensitivity', ea.STATE_SET)
84
+ .withUnit('°C').withValueMin(0.1).withValueMax(50).withValueStep(0.1)
85
+ .withDescription('Temperature sensitivity'),
86
+ ],
87
+ },
88
+ ];
@@ -0,0 +1,17 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = require('../converters/fromZigbee');
3
+ const tz = require('../converters/toZigbee');
4
+ const e = exposes.presets;
5
+ const ea = exposes.access;
6
+
7
+ module.exports = [
8
+ {
9
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_swhwv3k3'}],
10
+ model: 'C10-3E-1.2',
11
+ vendor: 'Novo',
12
+ description: 'Curtain switch',
13
+ fromZigbee: [fz.tuya_cover, fz.ignore_basic_report],
14
+ toZigbee: [tz.tuya_cover_control, tz.tuya_cover_options],
15
+ exposes: [e.cover_position().setAccess('position', ea.STATE_SET)],
16
+ },
17
+ ];
@@ -0,0 +1,417 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
3
+ const tz = require('../converters/toZigbee');
4
+ const reporting = require('../lib/reporting');
5
+ const extend = require('../lib/extend');
6
+ const e = exposes.presets;
7
+ const ea = exposes.access;
8
+
9
+ const fzLocal = {
10
+ LXN59_cover_options: {
11
+ cluster: 'closuresWindowCovering',
12
+ type: ['attributeReport', 'readResponse'],
13
+ convert: (model, msg, publish, options, meta) => {
14
+ const result = {};
15
+ if (msg.data.hasOwnProperty('tuyaMovingState')) {
16
+ const value = msg.data['tuyaMovingState'];
17
+ const movingLookup = {0: 'DOWN', 1: 'UP', 2: 'STOP'};
18
+ result.moving = movingLookup[value];
19
+ }
20
+ return result;
21
+ },
22
+ },
23
+ LXN59_cover_state_via_onoff: {
24
+ cluster: 'genOnOff',
25
+ type: ['attributeReport', 'readResponse'],
26
+ convert: (model, msg, publish, options, meta) => {
27
+ if (msg.data.hasOwnProperty('onOff')) {
28
+ return {state: msg.data['onOff'] === 1 ? 'CLOSE' : 'OPEN'};
29
+ }
30
+ },
31
+ },
32
+ };
33
+
34
+ module.exports = [
35
+ {
36
+ zigbeeModel: ['LXN59-1S7LX1.0'],
37
+ model: 'HGZB-01',
38
+ vendor: 'Nue / 3A',
39
+ description: 'Smart Zigbee 3.0 light controller',
40
+ extend: extend.switch(),
41
+ whiteLabel: [{vendor: 'Zemismart', model: 'ZW-EU-01', description: 'Smart light relay - 1 gang'},
42
+ {vendor: 'Moes', model: 'ZK-CH-2U', description: 'Plug with 2 USB ports'}],
43
+ configure: async (device, coordinatorEndpoint, logger) => {
44
+ const endpoint1 = device.getEndpoint(1);
45
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
46
+ await reporting.onOff(endpoint1);
47
+ device.powerSource = 'Mains (single phase)';
48
+ device.save();
49
+ },
50
+ },
51
+ {
52
+ zigbeeModel: ['LXN59-2S7LX1.0'],
53
+ model: 'LXN59-2S7LX1.0',
54
+ vendor: 'Nue / 3A',
55
+ description: 'Smart light relay - 2 gang',
56
+ extend: extend.switch(),
57
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
58
+ whiteLabel: [{vendor: 'Zemismart', model: 'ZW-EU-02'}],
59
+ endpoint: (device) => {
60
+ return {'left': 1, 'right': 2};
61
+ },
62
+ meta: {multiEndpoint: true},
63
+ configure: async (device, coordinatorEndpoint, logger) => {
64
+ const endpoint1 = device.getEndpoint(1);
65
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
66
+ await reporting.onOff(endpoint1);
67
+ const endpoint2 = device.getEndpoint(2);
68
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
69
+ await reporting.onOff(endpoint2);
70
+ device.powerSource = 'Mains (single phase)';
71
+ device.save();
72
+ },
73
+ },
74
+ {
75
+ zigbeeModel: ['FTB56+ZSN15HG1.0'],
76
+ model: 'HGZB-1S',
77
+ vendor: 'Nue / 3A',
78
+ description: 'Smart 1 key scene wall switch',
79
+ toZigbee: [tz.on_off],
80
+ fromZigbee: [fz.command_recall, fz.legacy.scenes_recall_click, fz.ignore_power_report],
81
+ exposes: [e.action(['recall_*']), e.switch()],
82
+ },
83
+ {
84
+ zigbeeModel: ['FTB56+ZSN16HG1.0'],
85
+ model: 'HGZB-02S',
86
+ vendor: 'Nue / 3A',
87
+ description: 'Smart 2 key scene wall switch',
88
+ toZigbee: [tz.on_off],
89
+ exposes: [e.action(['recall_*']), e.switch()],
90
+ fromZigbee: [fz.command_recall, fz.legacy.scenes_recall_click, fz.ignore_power_report],
91
+ },
92
+ {
93
+ zigbeeModel: ['FB56+ZSN08KJ2.3'],
94
+ model: 'HGZB-045',
95
+ vendor: 'Nue / 3A',
96
+ description: 'Smart 4 key scene wall switch',
97
+ toZigbee: [tz.on_off],
98
+ fromZigbee: [fz.command_recall, fz.legacy.scenes_recall_click, fz.ignore_power_report],
99
+ exposes: [e.action(['recall_*']), e.switch()],
100
+ },
101
+ {
102
+ zigbeeModel: ['LXN56-DC27LX1.1', 'LXN56-DS27LX1.1', 'LXN56-DS27LX1.3'],
103
+ model: 'LXZB-02A',
104
+ vendor: 'Nue / 3A',
105
+ description: 'Smart light controller',
106
+ extend: extend.light_onoff_brightness({disablePowerOnBehavior: true}),
107
+ },
108
+ {
109
+ zigbeeModel: ['FNB56-ZSW03LX2.0', 'LXN-3S27LX1.0'],
110
+ model: 'HGZB-43',
111
+ vendor: 'Nue / 3A',
112
+ description: 'Smart light switch - 3 gang v2.0',
113
+ extend: extend.switch(),
114
+ exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('center'), e.switch().withEndpoint('bottom')],
115
+ endpoint: (device) => {
116
+ return {'top': 1, 'center': 2, 'bottom': 3};
117
+ },
118
+ meta: {multiEndpoint: true},
119
+ configure: async (device, coordinatorEndpoint, logger) => {
120
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
121
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
122
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
123
+ },
124
+ },
125
+ {
126
+ zigbeeModel: ['LXN-4S27LX1.0'],
127
+ model: 'HGZB-4S',
128
+ vendor: 'Nue / 3A',
129
+ description: 'Smart light switch - 4 gang v2.0',
130
+ extend: extend.switch(),
131
+ exposes: [
132
+ e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'), e.switch().withEndpoint('l4')],
133
+ endpoint: (device) => {
134
+ return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4};
135
+ },
136
+ meta: {multiEndpoint: true},
137
+ configure: async (device, coordinatorEndpoint, logger) => {
138
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
139
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
140
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
141
+ await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
142
+ },
143
+ },
144
+ {
145
+ zigbeeModel: ['FB56+ZSW1IKJ1.7', 'FB56+ZSW1IKJ2.5', 'FB56+ZSW1IKJ2.7'],
146
+ model: 'HGZB-043',
147
+ vendor: 'Nue / 3A',
148
+ description: 'Smart light switch - 3 gang',
149
+ extend: extend.switch(),
150
+ exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('bottom'), e.switch().withEndpoint('center')],
151
+ endpoint: (device) => {
152
+ return {'top': 16, 'center': 17, 'bottom': 18};
153
+ },
154
+ meta: {multiEndpoint: true},
155
+ configure: async (device, coordinatorEndpoint, logger) => {
156
+ await reporting.bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff']);
157
+ await reporting.bind(device.getEndpoint(17), coordinatorEndpoint, ['genOnOff']);
158
+ await reporting.bind(device.getEndpoint(18), coordinatorEndpoint, ['genOnOff']);
159
+ },
160
+ },
161
+ {
162
+ zigbeeModel: ['FB56+ZSW1JKJ2.7'],
163
+ model: 'HGZB-44',
164
+ vendor: 'Nue / 3A',
165
+ description: 'Smart light switch - 4 gang v2.0',
166
+ extend: extend.switch(),
167
+ exposes: [e.switch().withEndpoint('top_left'), e.switch().withEndpoint('top_right'),
168
+ e.switch().withEndpoint('bottom_left'), e.switch().withEndpoint('bottom_right')],
169
+ endpoint: (device) => {
170
+ return {'top_left': 16, 'top_right': 17, 'bottom_right': 18, 'bottom_left': 19};
171
+ },
172
+ meta: {multiEndpoint: true},
173
+ configure: async (device, coordinatorEndpoint, logger) => {
174
+ await reporting.bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff']);
175
+ await reporting.bind(device.getEndpoint(17), coordinatorEndpoint, ['genOnOff']);
176
+ await reporting.bind(device.getEndpoint(18), coordinatorEndpoint, ['genOnOff']);
177
+ await reporting.bind(device.getEndpoint(19), coordinatorEndpoint, ['genOnOff']);
178
+ },
179
+ },
180
+ {
181
+ zigbeeModel: ['FB56+ZSC05HG1.0', 'FNB56-ZBW01LX1.2', 'LXN60-DS27LX1.3'],
182
+ model: 'HGZB-04D / HGZB-4D-UK',
183
+ vendor: 'Nue / 3A',
184
+ description: 'Smart dimmer wall switch',
185
+ extend: extend.light_onoff_brightness({disableEffect: true, noConfigure: true}),
186
+ whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K8-DIM'}],
187
+ configure: async (device, coordinatorEndpoint, logger) => {
188
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
189
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
190
+ await reporting.brightness(device.getEndpoint(1));
191
+ },
192
+ },
193
+ {
194
+ zigbeeModel: ['FB56+ZSW1HKJ1.7', 'FB56+ZSW1HKJ2.5', 'FB56+ZSW1HKJ2.7'],
195
+ model: 'HGZB-042',
196
+ vendor: 'Nue / 3A',
197
+ description: 'Smart light switch - 2 gang',
198
+ extend: extend.switch(),
199
+ exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('bottom')],
200
+ endpoint: (device) => {
201
+ return {'top': 16, 'bottom': 17};
202
+ },
203
+ meta: {multiEndpoint: true},
204
+ configure: async (device, coordinatorEndpoint, logger) => {
205
+ await reporting.bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff']);
206
+ await reporting.bind(device.getEndpoint(17), coordinatorEndpoint, ['genOnOff']);
207
+ },
208
+ },
209
+ {
210
+ fingerprint: [
211
+ {type: 'Router', manufacturerName: '3A Smart Home DE', modelID: 'LXN-2S27LX1.0', endpoints: [
212
+ {ID: 11, profileID: 49246, deviceID: 0, inputClusters: [0, 4, 3, 6, 5, 4096, 8], outputClusters: [25]},
213
+ {ID: 12, profileID: 49246, deviceID: 0, inputClusters: [0, 4, 3, 6, 5, 8], outputClusters: [25]},
214
+ ]},
215
+ ],
216
+ zigbeeModel: ['FNB56-ZSW02LX2.0'],
217
+ model: 'HGZB-42',
218
+ vendor: 'Nue / 3A',
219
+ description: 'Smart light switch - 2 gang v2.0',
220
+ extend: extend.switch(),
221
+ exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('bottom')],
222
+ endpoint: (device) => {
223
+ return {'top': 11, 'bottom': 12};
224
+ },
225
+ meta: {multiEndpoint: true},
226
+ configure: async (device, coordinatorEndpoint, logger) => {
227
+ await reporting.bind(device.getEndpoint(11), coordinatorEndpoint, ['genOnOff']);
228
+ await reporting.bind(device.getEndpoint(12), coordinatorEndpoint, ['genOnOff']);
229
+ },
230
+ },
231
+ {
232
+ zigbeeModel: ['FNB56-SKT1JXN1.0'],
233
+ model: 'HGZB-20A',
234
+ vendor: 'Nue / 3A',
235
+ description: 'Power plug',
236
+ extend: extend.switch(),
237
+ configure: async (device, coordinatorEndpoint, logger) => {
238
+ await reporting.bind(device.getEndpoint(11), coordinatorEndpoint, ['genOnOff']);
239
+ },
240
+ },
241
+ {
242
+ zigbeeModel: ['FB56+ZSW1GKJ2.5', 'LXN-1S27LX1.0', 'FB56+ZSW1GKJ2.7'],
243
+ model: 'HGZB-41',
244
+ vendor: 'Nue / 3A',
245
+ description: 'Smart one gang wall switch',
246
+ extend: extend.switch(),
247
+ },
248
+ {
249
+ zigbeeModel: ['FNB56-SKT1DHG1.4'],
250
+ model: 'MG-AUWS01',
251
+ vendor: 'Nue / 3A',
252
+ description: 'Smart Double GPO',
253
+ extend: extend.switch(),
254
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
255
+ meta: {multiEndpoint: true},
256
+ endpoint: (device) => {
257
+ return {left: 11, right: 12};
258
+ },
259
+ },
260
+ {
261
+ zigbeeModel: ['FNB56-ZCW25FB1.9'],
262
+ model: 'XY12S-15',
263
+ vendor: 'Nue / 3A',
264
+ description: 'Smart light controller RGBW',
265
+ extend: extend.light_onoff_brightness_colortemp_color(),
266
+ },
267
+ {
268
+ zigbeeModel: ['FNB56-ZSW23HG1.1', 'LXN56-LC27LX1.1', 'LXN56-LC27LX1.3'],
269
+ model: 'HGZB-01A',
270
+ vendor: 'Nue / 3A',
271
+ description: 'Smart in-wall switch',
272
+ extend: extend.switch(),
273
+ },
274
+ {
275
+ zigbeeModel: ['FNB56-ZSC01LX1.2', 'FB56+ZSW05HG1.2', 'FB56+ZSC04HG1.0'],
276
+ model: 'HGZB-02A',
277
+ vendor: 'Nue / 3A',
278
+ description: 'Smart light controller',
279
+ extend: extend.light_onoff_brightness({disablePowerOnBehavior: true}),
280
+ },
281
+ {
282
+ zigbeeModel: ['FNB56-ZSW01LX2.0'],
283
+ model: 'HGZB-42-UK / HGZB-41 / HGZB-41-UK',
284
+ description: 'Smart switch 1 or 2 gang',
285
+ vendor: 'Nue / 3A',
286
+ extend: extend.switch(),
287
+ },
288
+ {
289
+ zigbeeModel: ['FNB56-ZCW25FB1.6', 'FNB56-ZCW25FB2.1'],
290
+ model: 'HGZB-06A',
291
+ vendor: 'Nue / 3A',
292
+ description: 'Smart 7W E27 light bulb',
293
+ extend: extend.light_onoff_brightness_colortemp_color(),
294
+ },
295
+ {
296
+ zigbeeModel: ['LXN59-CS27LX1.0'],
297
+ model: 'ZW-EU-4C',
298
+ vendor: 'Nue / 3A',
299
+ description: 'Zigbee smart curtain switch',
300
+ fromZigbee: [fz.cover_position_tilt, fzLocal.LXN59_cover_state_via_onoff, fzLocal.LXN59_cover_options],
301
+ toZigbee: [tz.cover_state, tz.cover_position_tilt],
302
+ meta: {disableDefaultResponse: true},
303
+ exposes: [e.cover_position(), exposes.enum('moving', ea.STATE, ['UP', 'STOP', 'DOWN'])],
304
+ configure: async (device, coordinatorEndpoint, logger) => {
305
+ const endpoint1 = device.getEndpoint(1);
306
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
307
+ await reporting.onOff(endpoint1);
308
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['closuresWindowCovering']);
309
+ await reporting.currentPositionLiftPercentage(endpoint1);
310
+ device.powerSource = 'Mains (single phase)';
311
+ device.save();
312
+ },
313
+ },
314
+ {
315
+ zigbeeModel: ['LXX60-CS27LX1.0'],
316
+ model: 'ZW-EC-01',
317
+ vendor: 'Nue / 3A',
318
+ description: 'Zigbee smart curtain switch',
319
+ extend: extend.switch(),
320
+ configure: async (device, coordinatorEndpoint, logger) => {
321
+ const endpoint1 = device.getEndpoint(1);
322
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
323
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['closuresWindowCovering']);
324
+ await reporting.onOff(endpoint1);
325
+ device.powerSource = 'Mains (single phase)';
326
+ device.save();
327
+ },
328
+ },
329
+ {
330
+ zigbeeModel: ['LXN56-0S27LX1.1', 'LXN56-0S27LX1.3'],
331
+ model: 'HGZB-20-UK',
332
+ vendor: 'Nue / 3A',
333
+ description: 'Power plug',
334
+ extend: extend.switch(),
335
+ },
336
+ {
337
+ zigbeeModel: ['NUET56-DL27LX1.2'],
338
+ model: 'HGZB-DLC4-N12B',
339
+ vendor: 'Nue / 3A',
340
+ description: 'RGB LED downlight',
341
+ extend: extend.light_onoff_brightness_colortemp_color(),
342
+ },
343
+ {
344
+ zigbeeModel: ['FB56-WTS04HM1.1'],
345
+ model: 'HGZB-14A',
346
+ vendor: 'Nue / 3A',
347
+ description: 'Water leakage sensor',
348
+ fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
349
+ toZigbee: [],
350
+ exposes: [e.water_leak(), e.battery_low(), e.tamper(), e.battery()],
351
+ },
352
+ {
353
+ zigbeeModel: ['FNB56-DOS07FB3.1'],
354
+ model: 'HGZB-13A',
355
+ vendor: 'Nue / 3A',
356
+ description: 'Door/window sensor',
357
+ fromZigbee: [fz.ias_contact_alarm_1],
358
+ toZigbee: [],
359
+ exposes: [e.contact(), e.battery_low(), e.tamper()],
360
+ },
361
+ {
362
+ zigbeeModel: ['LXT56-LS27LX1.4', 'LXT56-LS27LX1.7'],
363
+ model: '3A12S-15',
364
+ vendor: 'Nue / 3A',
365
+ description: 'Smart Zigbee 3.0 strip light controller',
366
+ extend: extend.light_onoff_brightness_colortemp_color(),
367
+ },
368
+ {
369
+ zigbeeModel: ['LXN60-LS27-Z30', 'FEB56-ZCW2CLX1.0'],
370
+ model: 'WL-SD001-9W',
371
+ vendor: 'Nue / 3A',
372
+ description: '9W RGB LED downlight',
373
+ extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
374
+ },
375
+ {
376
+ fingerprint: [
377
+ {type: 'Router', manufacturerName: '3A Smart Home DE', modelID: 'LXN-2S27LX1.0', endpoints: [
378
+ {ID: 1, profileID: 49246, deviceID: 0, inputClusters: [0, 4, 3, 6, 5, 4096, 8], outputClusters: [0]},
379
+ {ID: 2, profileID: 49246, deviceID: 0, inputClusters: [0, 4, 3, 6, 5, 4096, 8], outputClusters: [0]},
380
+ ]},
381
+ ],
382
+ model: 'NUE-AUWZO2',
383
+ vendor: 'Nue / 3A',
384
+ description: 'Smart Zigbee double power point',
385
+ extend: extend.switch(),
386
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
387
+ meta: {multiEndpoint: true},
388
+ endpoint: (device) => {
389
+ return {left: 1, right: 2};
390
+ },
391
+ },
392
+ {
393
+ zigbeeModel: ['LXN56-1S27LX1.2', 'LXX60-FN27LX1.0'],
394
+ model: 'NUE-ZBFLB',
395
+ vendor: 'Nue / 3A',
396
+ description: 'Smart fan light switch',
397
+ extend: extend.switch(),
398
+ exposes: [
399
+ e.switch().withEndpoint('button_light'),
400
+ e.switch().withEndpoint('button_fan_high'),
401
+ e.switch().withEndpoint('button_fan_med'),
402
+ e.switch().withEndpoint('button_fan_low'),
403
+ ],
404
+ endpoint: (device) => {
405
+ return {'button_light': 1, 'button_fan_high': 2, 'button_fan_med': 3, 'button_fan_low': 4};
406
+ },
407
+ meta: {multiEndpoint: true},
408
+ configure: async (device, coordinatorEndpoint, logger) => {
409
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
410
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
411
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
412
+ await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
413
+ device.powerSource = 'Mains (single phase)';
414
+ device.save();
415
+ },
416
+ },
417
+ ];
@@ -0,0 +1,67 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
3
+ const reporting = require('../lib/reporting');
4
+ const e = exposes.presets;
5
+
6
+ module.exports = [
7
+ {
8
+ zigbeeModel: ['3010'],
9
+ model: 'NCZ-3010',
10
+ vendor: 'Nyce',
11
+ description: 'Door hinge sensor',
12
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
13
+ toZigbee: [],
14
+ configure: async (device, coordinatorEndpoint, logger) => {
15
+ const endpoint = device.getEndpoint(1);
16
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
17
+ await reporting.batteryPercentageRemaining(endpoint);
18
+ },
19
+ exposes: [e.contact(), e.battery_low(), e.battery()],
20
+ },
21
+ {
22
+ zigbeeModel: ['3011'],
23
+ model: 'NCZ-3011-HA',
24
+ vendor: 'Nyce',
25
+ description: 'Door/window sensor',
26
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
27
+ toZigbee: [],
28
+ configure: async (device, coordinatorEndpoint, logger) => {
29
+ const endpoint = device.getEndpoint(1);
30
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
31
+ await reporting.batteryPercentageRemaining(endpoint);
32
+ },
33
+ exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery()],
34
+ },
35
+ {
36
+ zigbeeModel: ['3043'],
37
+ model: 'NCZ-3043-HA',
38
+ vendor: 'Nyce',
39
+ description: 'Ceiling motion sensor',
40
+ fromZigbee: [fz.occupancy, fz.humidity, fz.temperature, fz.ignore_basic_report, fz.ignore_genIdentify, fz.ignore_poll_ctrl,
41
+ fz.battery, fz.ignore_iaszone_report, fz.ias_occupancy_alarm_2],
42
+ toZigbee: [],
43
+ exposes: [e.occupancy(), e.humidity(), e.temperature(), e.battery(), e.battery_low(), e.tamper()],
44
+ },
45
+ {
46
+ zigbeeModel: ['3041'],
47
+ model: 'NCZ-3041-HA',
48
+ vendor: 'Nyce',
49
+ description: 'Wall motion sensor',
50
+ fromZigbee: [fz.occupancy, fz.humidity, fz.temperature, fz.ignore_basic_report, fz.ignore_genIdentify, fz.ignore_poll_ctrl,
51
+ fz.battery, fz.ignore_iaszone_report, fz.ias_occupancy_alarm_2],
52
+ toZigbee: [],
53
+ meta: {battery: {dontDividePercentage: true}},
54
+ exposes: [e.occupancy(), e.humidity(), e.temperature(), e.battery(), e.battery_low(), e.tamper()],
55
+ },
56
+ {
57
+ zigbeeModel: ['3045'],
58
+ model: 'NCZ-3045-HA',
59
+ vendor: 'Nyce',
60
+ description: 'Curtain motion sensor',
61
+ fromZigbee: [fz.occupancy, fz.humidity, fz.temperature, fz.ignore_basic_report, fz.ignore_genIdentify, fz.ignore_poll_ctrl,
62
+ fz.battery, fz.ignore_iaszone_report, fz.ias_occupancy_alarm_2],
63
+ toZigbee: [],
64
+ meta: {battery: {dontDividePercentage: true}},
65
+ exposes: [e.occupancy(), e.humidity(), e.temperature(), e.battery(), e.battery_low(), e.tamper()],
66
+ },
67
+ ];
@@ -0,0 +1,59 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
3
+ const tz = require('../converters/toZigbee');
4
+ const reporting = require('../lib/reporting');
5
+ const e = exposes.presets;
6
+ const ea = exposes.access;
7
+ const constants = require('../lib/constants');
8
+
9
+ module.exports = [
10
+ {
11
+ zigbeeModel: ['easyCodeTouch_v1', 'EasyCodeTouch', 'EasyFingerTouch', 'NimlyPRO'],
12
+ model: 'easyCodeTouch_v1',
13
+ vendor: 'Onesti Products AS',
14
+ description: 'Zigbee module for EasyAccess code touch series',
15
+ fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery, fz.lock_programming_event, fz.easycodetouch_action],
16
+ toZigbee: [tz.lock, tz.easycode_auto_relock, tz.lock_sound_volume, tz.pincode_lock],
17
+ meta: {pinCodeCount: 50},
18
+ configure: async (device, coordinatorEndpoint, logger) => {
19
+ const endpoint = device.getEndpoint(11);
20
+ await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
21
+ await reporting.lockState(endpoint);
22
+ await reporting.batteryPercentageRemaining(endpoint);
23
+ await endpoint.read('closuresDoorLock', ['lockState', 'soundVolume']);
24
+ device.powerSource = 'Battery';
25
+ device.save();
26
+ },
27
+ exposes: [e.lock(), e.battery(), e.sound_volume(),
28
+ e.lock_action_source_name(), e.lock_action_user(),
29
+ e.action(Array.from(Object.values(constants.easyCodeTouchActions))),
30
+ exposes.binary('auto_relock', ea.STATE_SET, true, false).withDescription('Auto relock after 7 seconds.'),
31
+ e.pincode(),
32
+ ],
33
+ },
34
+ {
35
+ zigbeeModel: ['S4RX-110'],
36
+ model: 'S4RX-110',
37
+ vendor: 'Onesti Products AS',
38
+ description: 'Relax smart plug',
39
+ fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.device_temperature, fz.identify],
40
+ toZigbee: [tz.on_off],
41
+ exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy(), e.device_temperature()],
42
+ configure: async (device, coordinatorEndpoint, logger) => {
43
+ const endpoint = device.getEndpoint(2);
44
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'genDeviceTempCfg',
45
+ 'haElectricalMeasurement', 'seMetering']);
46
+ await reporting.onOff(endpoint);
47
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
48
+ await reporting.activePower(endpoint);
49
+ await reporting.rmsCurrent(endpoint);
50
+ await reporting.rmsVoltage(endpoint);
51
+ await reporting.readMeteringMultiplierDivisor(endpoint);
52
+ await reporting.currentSummDelivered(endpoint);
53
+ await reporting.deviceTemperature(endpoint);
54
+ },
55
+ endpoint: (device) => {
56
+ return {default: 2};
57
+ },
58
+ },
59
+ ];
@@ -0,0 +1,22 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
3
+ const constants = require('../lib/constants');
4
+ const reporting = require('../lib/reporting');
5
+ const e = exposes.presets;
6
+
7
+ module.exports = [
8
+ {
9
+ zigbeeModel: ['openlumi.gw_router.jn5169'],
10
+ model: 'GWRJN5169',
11
+ vendor: 'OpenLumi',
12
+ description: '[Lumi Router (JN5169)](https://github.com/igo-r/Lumi-Router-JN5169)',
13
+ fromZigbee: [fz.ignore_basic_report, fz.device_temperature],
14
+ toZigbee: [],
15
+ configure: async (device, coordinatorEndpoint, logger) => {
16
+ const endpoint = device.getEndpoint(1);
17
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genDeviceTempCfg']);
18
+ await reporting.deviceTemperature(endpoint, {min: constants.repInterval.MINUTE, max: constants.repInterval.MINUTES_5});
19
+ },
20
+ exposes: [e.device_temperature()],
21
+ },
22
+ ];