@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,335 @@
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
+
8
+ module.exports = [
9
+ {
10
+ zigbeeModel: ['ROB_200-060-0'],
11
+ model: 'ROB_200-060-0',
12
+ vendor: 'ROBB',
13
+ description: 'Zigbee LED driver',
14
+ extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [160, 450]}),
15
+ },
16
+ {
17
+ zigbeeModel: ['ROB_200-061-0'],
18
+ model: 'ROB_200-061-0',
19
+ vendor: 'ROBB',
20
+ description: '50W Zigbee CCT LED driver (constant current)',
21
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [160, 450]}),
22
+ },
23
+ {
24
+ zigbeeModel: ['ROB_200-029-0'],
25
+ model: 'ROB_200-029-0',
26
+ vendor: 'ROBB',
27
+ description: 'Zigbee curtain motor controller',
28
+ meta: {coverInverted: true},
29
+ fromZigbee: [fz.cover_position_tilt],
30
+ toZigbee: [tz.cover_state, tz.cover_position_tilt],
31
+ configure: async (device, coordinatorEndpoint, logger) => {
32
+ const endpoint = device.getEndpoint(1);
33
+ await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']);
34
+ await reporting.currentPositionLiftPercentage(endpoint);
35
+ },
36
+ exposes: [e.cover_position()],
37
+ },
38
+ {
39
+ zigbeeModel: ['ROB_200-050-0'],
40
+ model: 'ROB_200-050-0',
41
+ vendor: 'ROBB',
42
+ description: '4 port switch with 2 usb ports (no metering)',
43
+ extend: extend.switch(),
44
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
45
+ e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5')],
46
+ endpoint: (device) => {
47
+ return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5};
48
+ },
49
+ meta: {multiEndpoint: true},
50
+ whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9023A(EU)'}],
51
+ configure: async (device, coordinatorEndpoint, logger) => {
52
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
53
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
54
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
55
+ await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
56
+ await reporting.bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
57
+ },
58
+ },
59
+ {
60
+ zigbeeModel: ['ROB_200-006-0'],
61
+ model: 'ROB_200-006-0',
62
+ vendor: 'ROBB',
63
+ description: 'ZigBee LED dimmer',
64
+ extend: extend.light_onoff_brightness(),
65
+ },
66
+ {
67
+ zigbeeModel: ['ROB_200-004-0'],
68
+ model: 'ROB_200-004-0',
69
+ vendor: 'ROBB',
70
+ description: 'ZigBee AC phase-cut dimmer',
71
+ extend: extend.light_onoff_brightness({noConfigure: true}),
72
+ configure: async (device, coordinatorEndpoint, logger) => {
73
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
74
+ const endpoint = device.getEndpoint(1);
75
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
76
+ await reporting.onOff(endpoint);
77
+ },
78
+ },
79
+ {
80
+ zigbeeModel: ['ROB_200-011-0'],
81
+ model: 'ROB_200-011-0',
82
+ vendor: 'ROBB',
83
+ description: 'ZigBee AC phase-cut dimmer',
84
+ fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([fz.electrical_measurement, fz.metering, fz.ignore_genOta]),
85
+ toZigbee: extend.light_onoff_brightness().toZigbee,
86
+ exposes: [...extend.light_onoff_brightness({noConfigure: true}).exposes, e.power(), e.voltage(), e.energy(), e.current()],
87
+ configure: async (device, coordinatorEndpoint, logger) => {
88
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
89
+ const endpoint = device.getEndpoint(1);
90
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'haElectricalMeasurement', 'seMetering']);
91
+ await reporting.onOff(endpoint);
92
+ await reporting.activePower(endpoint);
93
+ await reporting.readMeteringMultiplierDivisor(endpoint);
94
+ await reporting.rmsVoltage(endpoint);
95
+ await reporting.rmsCurrent(endpoint);
96
+ endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {
97
+ acVoltageMultiplier: 1, acVoltageDivisor: 10,
98
+ acCurrentMultiplier: 1, acCurrentDivisor: 1000,
99
+ acPowerMultiplier: 1, acPowerDivisor: 10,
100
+ });
101
+ },
102
+ },
103
+ {
104
+ zigbeeModel: ['ROB_200-003-0'],
105
+ model: 'ROB_200-003-0',
106
+ vendor: 'ROBB',
107
+ description: 'Zigbee AC in wall switch',
108
+ extend: extend.switch(),
109
+ configure: async (device, coordinatorEndpoint, logger) => {
110
+ const endpoint = device.getEndpoint(1) || device.getEndpoint(3);
111
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
112
+ await reporting.onOff(endpoint);
113
+ },
114
+ },
115
+ {
116
+ zigbeeModel: ['ROB_200-030-0'],
117
+ model: 'ROB_200-030-0',
118
+ vendor: 'ROBB',
119
+ description: 'Zigbee AC in wall switch 400W (2-wire)',
120
+ extend: extend.switch(),
121
+ configure: async (device, coordinatorEndpoint, logger) => {
122
+ const endpoint = device.getEndpoint(1) || device.getEndpoint(3);
123
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
124
+ await reporting.onOff(endpoint);
125
+ },
126
+ },
127
+ {
128
+ zigbeeModel: ['ROB_200-014-0'],
129
+ model: 'ROB_200-014-0',
130
+ vendor: 'ROBB',
131
+ description: 'ZigBee AC phase-cut rotary dimmer',
132
+ fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([fz.electrical_measurement, fz.metering, fz.ignore_genOta]),
133
+ toZigbee: extend.light_onoff_brightness().toZigbee,
134
+ exposes: [e.light_brightness(), e.power(), e.voltage(), e.current(), e.energy()],
135
+ whiteLabel: [{vendor: 'YPHIX', model: '50208695'}, {vendor: 'Samotech', model: 'SM311'}],
136
+ configure: async (device, coordinatorEndpoint, logger) => {
137
+ const endpoint = device.getEndpoint(1);
138
+ const binds = ['genOnOff', 'genLevelCtrl', 'haElectricalMeasurement', 'seMetering'];
139
+ await reporting.bind(endpoint, coordinatorEndpoint, binds);
140
+ await reporting.onOff(endpoint);
141
+ await reporting.brightness(endpoint);
142
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
143
+ await reporting.activePower(endpoint);
144
+ await reporting.rmsCurrent(endpoint, {min: 10, change: 10});
145
+ await reporting.rmsVoltage(endpoint, {min: 10});
146
+ await reporting.readMeteringMultiplierDivisor(endpoint);
147
+ await reporting.currentSummDelivered(endpoint);
148
+ },
149
+ },
150
+ {
151
+ zigbeeModel: ['ZG2833K8_EU05', 'ROB_200-007-0'],
152
+ model: 'ROB_200-007-0',
153
+ vendor: 'ROBB',
154
+ description: 'Zigbee 8 button wall switch',
155
+ fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery, fz.ignore_genOta],
156
+ exposes: [e.battery(), e.action([
157
+ 'on_1', 'off_1', 'brightness_move_up_1', 'brightness_move_down_1', 'brightness_stop_1',
158
+ 'on_2', 'off_2', 'brightness_move_up_2', 'brightness_move_down_2', 'brightness_stop_2',
159
+ 'on_3', 'off_3', 'brightness_move_up_3', 'brightness_move_down_3', 'brightness_stop_3',
160
+ 'on_4', 'off_4', 'brightness_move_up_4', 'brightness_move_down_4', 'brightness_stop_4'])],
161
+ toZigbee: [],
162
+ meta: {multiEndpoint: true},
163
+ whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K8-DIM'}],
164
+ },
165
+ {
166
+ zigbeeModel: ['ROB_200-025-0'],
167
+ model: 'ROB_200-025-0',
168
+ vendor: 'ROBB',
169
+ description: 'Zigbee 8 button wall switch',
170
+ fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery, fz.ignore_genOta],
171
+ exposes: [e.battery(), e.action([
172
+ 'on_1', 'off_1', 'brightness_move_up_1', 'brightness_move_down_1', 'brightness_stop_1',
173
+ 'on_2', 'off_2', 'brightness_move_up_2', 'brightness_move_down_2', 'brightness_stop_2',
174
+ 'on_3', 'off_3', 'brightness_move_up_3', 'brightness_move_down_3', 'brightness_stop_3',
175
+ 'on_4', 'off_4', 'brightness_move_up_4', 'brightness_move_down_4', 'brightness_stop_4'])],
176
+ toZigbee: [],
177
+ meta: {multiEndpoint: true, battery: {dontDividePercentage: true}},
178
+ },
179
+ {
180
+ zigbeeModel: ['ZG2833K4_EU06', 'ROB_200-008', 'ROB_200-008-0'],
181
+ model: 'ROB_200-008-0',
182
+ vendor: 'ROBB',
183
+ description: 'Zigbee 4 button wall switch',
184
+ fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
185
+ exposes: [e.battery(), e.action([
186
+ 'on_1', 'off_1', 'stop_1', 'brightness_move_up_1', 'brightness_move_down_1', 'brightness_stop_1',
187
+ 'on_2', 'off_2', 'stop_2', 'brightness_move_up_2', 'brightness_move_down_2', 'brightness_stop_2'])],
188
+ toZigbee: [],
189
+ meta: {multiEndpoint: true, battery: {dontDividePercentage: true}},
190
+ whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K4-DIM2'}],
191
+ },
192
+ {
193
+ zigbeeModel: ['ROB_200-009-0'],
194
+ model: 'ROB_200-009-0',
195
+ vendor: 'ROBB',
196
+ description: 'Zigbee 2 button wall switch',
197
+ fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
198
+ exposes: [e.battery(), e.action([
199
+ 'on_1', 'off_1', 'stop_1', 'brightness_move_up_1', 'brightness_move_down_1', 'brightness_stop_1'])],
200
+ toZigbee: [],
201
+ meta: {multiEndpoint: true, battery: {dontDividePercentage: true}},
202
+ whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K2-DIM'}],
203
+ },
204
+ {
205
+ zigbeeModel: ['Motor Controller', 'ROB_200-010-0'],
206
+ model: 'ROB_200-010-0',
207
+ vendor: 'ROBB',
208
+ description: 'Zigbee curtain motor controller',
209
+ meta: {coverInverted: true},
210
+ fromZigbee: [fz.cover_position_tilt],
211
+ toZigbee: [tz.cover_state, tz.cover_position_tilt],
212
+ configure: async (device, coordinatorEndpoint, logger) => {
213
+ const endpoint = device.getEndpoint(1);
214
+ await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']);
215
+ await reporting.currentPositionLiftPercentage(endpoint);
216
+ },
217
+ exposes: [e.cover_position()],
218
+ },
219
+ {
220
+ zigbeeModel: ['ROB_200-018-0'],
221
+ model: 'ROB_200-018-0',
222
+ vendor: 'ROBB',
223
+ description: 'ZigBee knob smart dimmer',
224
+ fromZigbee: [fz.command_on, fz.command_off, fz.command_move_to_level, fz.command_move_to_color_temp, fz.battery,
225
+ fz.command_move_to_color],
226
+ exposes: [e.battery(), e.action(['on', 'off', 'brightness_move_to_level', 'color_temperature_move', 'color_move'])],
227
+ toZigbee: [],
228
+ meta: {multiEndpoint: true, battery: {dontDividePercentage: true}},
229
+ whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG2835'}],
230
+ },
231
+ {
232
+ zigbeeModel: ['ROB_200-017-0', 'HK-PLUG-A'],
233
+ model: 'ROB_200-017-0',
234
+ vendor: 'ROBB',
235
+ description: 'Zigbee smart plug',
236
+ fromZigbee: [fz.electrical_measurement, fz.on_off, fz.ignore_genLevelCtrl_report, fz.metering, fz.temperature],
237
+ toZigbee: [tz.on_off],
238
+ configure: async (device, coordinatorEndpoint, logger) => {
239
+ const endpoint = device.getEndpoint(1);
240
+ await reporting.bind(endpoint, coordinatorEndpoint,
241
+ ['genOnOff', 'haElectricalMeasurement', 'seMetering', 'msTemperatureMeasurement']);
242
+ await reporting.onOff(endpoint);
243
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
244
+ await reporting.readMeteringMultiplierDivisor(endpoint);
245
+ await reporting.rmsVoltage(endpoint);
246
+ await reporting.rmsCurrent(endpoint);
247
+ await reporting.activePower(endpoint);
248
+ await reporting.temperature(endpoint);
249
+ await reporting.currentSummDelivered(endpoint);
250
+ },
251
+ exposes: [e.power(), e.current(), e.voltage(), e.switch(), e.energy(), e.temperature()],
252
+ },
253
+ {
254
+ zigbeeModel: ['ROB_200-017-1'],
255
+ model: 'ROB_200-017-1',
256
+ vendor: 'ROBB',
257
+ description: 'Zigbee smart plug',
258
+ fromZigbee: [fz.electrical_measurement, fz.on_off, fz.ignore_genLevelCtrl_report, fz.metering, fz.temperature],
259
+ toZigbee: [tz.on_off],
260
+ configure: async (device, coordinatorEndpoint, logger) => {
261
+ const endpoint = device.getEndpoint(1);
262
+ await reporting.bind(endpoint, coordinatorEndpoint,
263
+ ['genOnOff', 'haElectricalMeasurement', 'seMetering', 'msTemperatureMeasurement']);
264
+ await reporting.onOff(endpoint);
265
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
266
+ await reporting.readMeteringMultiplierDivisor(endpoint);
267
+ await reporting.rmsVoltage(endpoint);
268
+ await reporting.rmsCurrent(endpoint);
269
+ await reporting.activePower(endpoint);
270
+ await reporting.temperature(endpoint);
271
+ await reporting.currentSummDelivered(endpoint);
272
+ },
273
+ exposes: [e.power(), e.current(), e.voltage(), e.switch(), e.energy(), e.temperature()],
274
+ },
275
+ {
276
+ zigbeeModel: ['ROB_200-016-0'],
277
+ model: 'ROB_200-016-0',
278
+ vendor: 'ROBB smart',
279
+ description: 'RGB CCT DIM 3 in 1 Zigbee Remote',
280
+ fromZigbee: [fz.battery, fz.command_move_to_color, fz.command_move_to_color_temp, fz.command_move_hue,
281
+ fz.command_step, fz.command_recall, fz.command_on, fz.command_off, fz.command_toggle, fz.command_stop,
282
+ fz.command_move, fz.command_color_loop_set, fz.command_ehanced_move_to_hue_and_saturation],
283
+ toZigbee: [],
284
+ exposes: [e.battery(), e.action([
285
+ 'color_move', 'color_temperature_move', 'hue_move', 'brightness_step_up', 'brightness_step_down',
286
+ 'recall_*', 'on', 'off', 'toggle', 'brightness_stop', 'brightness_move_up', 'brightness_move_down',
287
+ 'color_loop_set', 'enhanced_move_to_hue_and_saturation', 'hue_stop'])],
288
+ },
289
+ {
290
+ zigbeeModel: ['ROB_200-026-0'],
291
+ model: 'ROB_200-026-0',
292
+ vendor: 'ROBB',
293
+ description: '2-gang in-wall switch',
294
+ fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.power_on_behavior],
295
+ toZigbee: [tz.on_off, tz.power_on_behavior, tz.electrical_measurement_power],
296
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.energy()],
297
+ endpoint: (device) => {
298
+ return {'l1': 1, 'l2': 2};
299
+ },
300
+ meta: {multiEndpoint: true},
301
+ configure: async (device, coordinatorEndpoint, logger) => {
302
+ const endpoint1 = device.getEndpoint(1);
303
+ const endpoint2 = device.getEndpoint(2);
304
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
305
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
306
+ await reporting.onOff(endpoint1);
307
+ await reporting.onOff(endpoint2);
308
+ await endpoint1.read('haElectricalMeasurement', ['acPowerMultiplier', 'acPowerDivisor']);
309
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
310
+ await reporting.activePower(endpoint1);
311
+ await reporting.readMeteringMultiplierDivisor(endpoint1);
312
+ await reporting.currentSummDelivered(endpoint1, {min: 60, change: 1});
313
+ },
314
+ },
315
+ {
316
+ zigbeeModel: ['ROB_200-035-0'],
317
+ model: 'ROB_200-035-0',
318
+ vendor: 'ROBB',
319
+ description: '1 channel switch with power monitoring',
320
+ fromZigbee: [fz.electrical_measurement, fz.on_off, fz.ignore_genLevelCtrl_report, fz.metering],
321
+ toZigbee: [tz.on_off],
322
+ exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()],
323
+ configure: async (device, coordinatorEndpoint, logger) => {
324
+ const endpoint = device.getEndpoint(1);
325
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
326
+ await reporting.onOff(endpoint);
327
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
328
+ await reporting.readMeteringMultiplierDivisor(endpoint);
329
+ await reporting.rmsCurrent(endpoint);
330
+ await reporting.activePower(endpoint);
331
+ await reporting.rmsVoltage(endpoint);
332
+ await reporting.currentSummDelivered(endpoint);
333
+ },
334
+ },
335
+ ];
@@ -0,0 +1,15 @@
1
+ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
2
+ const exposes = require('../lib/exposes');
3
+ const e = exposes.presets;
4
+
5
+ module.exports = [
6
+ {
7
+ zigbeeModel: ['MULTI-MECI--EA01'],
8
+ model: 'HSC1-WD-0',
9
+ vendor: 'ROOME',
10
+ description: 'Door or window contact switch',
11
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery, fz.ignore_iaszone_attreport],
12
+ toZigbee: [],
13
+ exposes: [e.contact(), e.battery_low(), e.tamper()],
14
+ },
15
+ ];
package/devices/rtx.js ADDED
@@ -0,0 +1,90 @@
1
+ const fz = require('../converters/fromZigbee');
2
+ const tz = require('../converters/toZigbee');
3
+ const exposes = require('../lib/exposes');
4
+ const tuya = require('../lib/tuya');
5
+ const e = exposes.presets;
6
+ const ea = exposes.access;
7
+
8
+ module.exports = [
9
+ {
10
+ fingerprint: [
11
+ {modelID: 'TS0601', manufacturerName: '_TZE200_akjefhj5'},
12
+ {modelID: 'TS0601', manufacturerName: '_TZE200_2wg5qrjy'},
13
+ {modelID: 'TS0601', manufacturerName: '_TZE200_81isopgh'},
14
+ ],
15
+ model: 'ZVG1',
16
+ vendor: 'RTX',
17
+ description: 'Zigbee smart water valve',
18
+ onEvent: tuya.onEventSetLocalTime,
19
+ fromZigbee: [fz.ZVG1, fz.ignore_basic_report],
20
+ toZigbee: [tz.tuya_switch_state, tz.ZVG1_weather_delay, tz.ZVG1_timer, tz.ZVG1_cycle_timer, tz.ZVG1_normal_schedule_timer],
21
+ exposes: [e.switch().setAccess('state', ea.STATE_SET), e.battery(),
22
+ exposes.enum('weather_delay', ea.STATE_SET, ['disabled', '24h', '48h', '72h']),
23
+ exposes.enum('timer_state', ea.STATE, ['disabled', 'active', 'enabled']),
24
+ exposes.numeric('timer', ea.STATE_SET).withValueMin(0).withValueMax(60).withUnit('min')
25
+ .withDescription('Auto off after specific time'),
26
+ exposes.numeric('timer_time_left', ea.STATE).withUnit('min')
27
+ .withDescription('Auto off timer time left'),
28
+ exposes.numeric('last_valve_open_duration', ea.STATE).withUnit('min')
29
+ .withDescription('Time the valve was open when state on'),
30
+ exposes.numeric('water_consumed', ea.STATE).withUnit('l')
31
+ .withDescription('Liters of water consumed'),
32
+ exposes.text('cycle_timer_1', ea.STATE_SET).withDescription('Format 08:00 / 20:00 / 15 / 60 / MoTuWeThFrSaSu / 1 (' +
33
+ '08:00 = start time ' +
34
+ '20:00 = end time ' +
35
+ '15 = irrigation duration in minutes ' +
36
+ '60 = pause duration in minutes ' +
37
+ 'MoTu..= active weekdays ' +
38
+ '1 = deactivate timer with 0)'),
39
+ exposes.text('cycle_timer_2', ea.STATE_SET).withDescription('Format 08:00 / 20:00 / 15 / 60 / MoTuWeThFrSaSu / 1 (' +
40
+ '08:00 = start time ' +
41
+ '20:00 = end time ' +
42
+ '15 = irrigation duration in minutes ' +
43
+ '60 = pause duration in minutes ' +
44
+ 'MoTu..= active weekdays ' +
45
+ '1 = deactivate timer with 0)'),
46
+ exposes.text('cycle_timer_3', ea.STATE_SET).withDescription('Format 08:00 / 20:00 / 15 / 60 / MoTuWeThFrSaSu / 1 (' +
47
+ '08:00 = start time ' +
48
+ '20:00 = end time ' +
49
+ '15 = irrigation duration in minutes ' +
50
+ '60 = pause duration in minutes ' +
51
+ 'MoTu..= active weekdays ' +
52
+ '1 = deactivate timer with 0)'),
53
+ exposes.text('cycle_timer_4', ea.STATE_SET).withDescription('Format 08:00 / 20:00 / 15 / 60 / MoTuWeThFrSaSu / 1 (' +
54
+ '08:00 = start time ' +
55
+ '20:00 = end time ' +
56
+ '15 = irrigation duration in minutes ' +
57
+ '60 = pause duration in minutes ' +
58
+ 'MoTu..= active weekdays ' +
59
+ '1 = deactivate timer with 0)'),
60
+ exposes.text('normal_schedule_timer_1', ea.STATE_SET).withDescription('Format 08:00 / 15 / MoTuWeThFrSaSu / 1 (' +
61
+ '08:00 = start time ' +
62
+ '15 = duration in minutes ' +
63
+ 'MoTu..= active weekdays ' +
64
+ '1 = deactivate timer with 0)'),
65
+ exposes.text('normal_schedule_timer_2', ea.STATE_SET).withDescription('Format 08:00 / 15 / MoTuWeThFrSaSu / 1 (' +
66
+ '08:00 = start time ' +
67
+ '15 = duration in minutes ' +
68
+ 'MoTu..= active weekdays ' +
69
+ '1 = deactivate timer with 0)'),
70
+ exposes.text('normal_schedule_timer_3', ea.STATE_SET).withDescription('Format 08:00 / 15 / MoTuWeThFrSaSu / 1 (' +
71
+ '08:00 = start time ' +
72
+ '15 = duration in minutes ' +
73
+ 'MoTu..= active weekdays ' +
74
+ '1 = deactivate timer with 0)'),
75
+ exposes.text('normal_schedule_timer_4', ea.STATE_SET).withDescription('Format 08:00 / 15 / MoTuWeThFrSaSu / 1 (' +
76
+ '08:00 = start time ' +
77
+ '15 = duration in minutes ' +
78
+ 'MoTu..= active weekdays ' +
79
+ '1 = deactivate timer with 0)')],
80
+ },
81
+ {
82
+ fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3000_mwd3c2at'}],
83
+ model: 'ZMS4',
84
+ vendor: 'RTX',
85
+ description: 'Zigbee PIR sensor',
86
+ fromZigbee: [fz.ias_occupancy_alarm_1],
87
+ toZigbee: [],
88
+ exposes: [e.battery_low(), e.occupancy()],
89
+ },
90
+ ];
@@ -0,0 +1,137 @@
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 ota = require('../lib/ota');
5
+ const reporting = require('../lib/reporting');
6
+ const extend = require('../lib/extend');
7
+ const e = exposes.presets;
8
+
9
+ module.exports = [
10
+ {
11
+ zigbeeModel: ['SPE600'],
12
+ model: 'SPE600',
13
+ vendor: 'Salus Controls',
14
+ description: 'Smart plug (EU socket)',
15
+ fromZigbee: [fz.on_off, fz.metering],
16
+ toZigbee: [tz.on_off],
17
+ configure: async (device, coordinatorEndpoint, logger) => {
18
+ const endpoint = device.getEndpoint(9);
19
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
20
+ await reporting.onOff(endpoint);
21
+ await reporting.instantaneousDemand(endpoint, {min: 5, change: 10});
22
+ await reporting.currentSummDelivered(endpoint, {min: 5, change: [0, 10]});
23
+ await endpoint.read('seMetering', ['multiplier', 'divisor']);
24
+ },
25
+ ota: ota.salus,
26
+ exposes: [e.switch(), e.power(), e.energy()],
27
+ },
28
+ {
29
+ zigbeeModel: ['SP600'],
30
+ model: 'SP600',
31
+ vendor: 'Salus Controls',
32
+ description: 'Smart plug (UK socket)',
33
+ fromZigbee: [fz.on_off, fz.SP600_power],
34
+ exposes: [e.switch(), e.power(), e.energy()],
35
+ toZigbee: [tz.on_off],
36
+ configure: async (device, coordinatorEndpoint, logger) => {
37
+ const endpoint = device.getEndpoint(9);
38
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
39
+ await reporting.onOff(endpoint);
40
+ await reporting.instantaneousDemand(endpoint, {min: 5, change: 10});
41
+ await reporting.currentSummDelivered(endpoint, {min: 5, change: [0, 10]});
42
+ await endpoint.read('seMetering', ['multiplier', 'divisor']);
43
+ },
44
+ ota: ota.salus,
45
+ },
46
+ {
47
+ zigbeeModel: ['SX885ZB'],
48
+ model: 'SX885ZB',
49
+ vendor: 'Salus Controls',
50
+ description: 'miniSmartPlug',
51
+ fromZigbee: [fz.on_off, fz.metering],
52
+ toZigbee: [tz.on_off],
53
+ configure: async (device, coordinatorEndpoint, logger) => {
54
+ const endpoint = device.getEndpoint(9);
55
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
56
+ await reporting.onOff(endpoint);
57
+ await reporting.instantaneousDemand(endpoint, {min: 5, change: 10});
58
+ await reporting.currentSummDelivered(endpoint, {min: 5, change: [0, 10]});
59
+ await endpoint.read('seMetering', ['multiplier', 'divisor']);
60
+ },
61
+ ota: ota.salus,
62
+ exposes: [e.switch(), e.power(), e.energy()],
63
+ },
64
+ {
65
+ zigbeeModel: ['SR600'],
66
+ model: 'SR600',
67
+ vendor: 'Salus Controls',
68
+ description: 'Relay switch',
69
+ extend: extend.switch(),
70
+ ota: ota.salus,
71
+ configure: async (device, coordinatorEndpoint, logger) => {
72
+ const endpoint = device.getEndpoint(9);
73
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
74
+ await reporting.onOff(endpoint);
75
+ },
76
+ },
77
+ {
78
+ zigbeeModel: ['SW600'],
79
+ model: 'SW600',
80
+ vendor: 'Salus Controls',
81
+ description: 'Door or window contact sensor',
82
+ fromZigbee: [fz.ias_contact_alarm_1],
83
+ toZigbee: [],
84
+ exposes: [e.contact(), e.battery_low(), e.tamper()],
85
+ ota: ota.salus,
86
+ },
87
+ {
88
+ zigbeeModel: ['WLS600'],
89
+ model: 'WLS600',
90
+ vendor: 'Salus Controls',
91
+ description: 'Water leakage sensor',
92
+ fromZigbee: [fz.ias_water_leak_alarm_1],
93
+ toZigbee: [],
94
+ exposes: [e.water_leak(), e.battery_low(), e.tamper()],
95
+ ota: ota.salus,
96
+ },
97
+ {
98
+ zigbeeModel: ['OS600'],
99
+ model: 'OS600',
100
+ vendor: 'Salus Controls',
101
+ description: 'Door or window contact sensor',
102
+ fromZigbee: [fz.ias_contact_alarm_1],
103
+ toZigbee: [],
104
+ exposes: [e.contact(), e.battery_low(), e.tamper()],
105
+ ota: ota.salus,
106
+ },
107
+ {
108
+ zigbeeModel: [
109
+ 'SS909ZB',
110
+ 'PS600',
111
+ ],
112
+ model: 'PS600',
113
+ vendor: 'Salus Controls',
114
+ description: 'Pipe temperature sensor',
115
+ fromZigbee: [fz.temperature, fz.battery],
116
+ toZigbee: [],
117
+ meta: {battery: {voltageToPercentage: '3V_2500'}},
118
+ exposes: [e.battery(), e.temperature()],
119
+ configure: async (device, coordinatorEndpoint, logger) => {
120
+ const endpoint = device.getEndpoint(9);
121
+ await reporting.bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
122
+ await reporting.temperature(endpoint);
123
+ await reporting.batteryVoltage(endpoint);
124
+ },
125
+ ota: ota.salus,
126
+ },
127
+ {
128
+ zigbeeModel: ['RE600'],
129
+ model: 'RE600',
130
+ vendor: 'Salus Controls',
131
+ description: 'Router Zigbee',
132
+ fromZigbee: [],
133
+ toZigbee: [],
134
+ exposes: [],
135
+ ota: ota.salus,
136
+ },
137
+ ];
@@ -0,0 +1,93 @@
1
+ const fz = require('../converters/fromZigbee');
2
+ const exposes = require('../lib/exposes');
3
+ const reporting = require('../lib/reporting');
4
+ const extend = require('../lib/extend');
5
+ const e = exposes.presets;
6
+
7
+ module.exports = [
8
+ {
9
+ zigbeeModel: ['SM308'],
10
+ model: 'SM308',
11
+ vendor: 'Samotech',
12
+ description: 'Zigbee AC in wall switch',
13
+ extend: extend.switch(),
14
+ configure: async (device, coordinatorEndpoint, logger) => {
15
+ const endpoint = device.getEndpoint(1);
16
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genOnOff']);
17
+ },
18
+ },
19
+ {
20
+ zigbeeModel: ['SM308-S'],
21
+ model: 'SM308-S',
22
+ vendor: 'Samotech',
23
+ description: 'Zigbee in wall smart switch',
24
+ extend: extend.switch(),
25
+ configure: async (device, coordinatorEndpoint, logger) => {
26
+ const endpoint = device.getEndpoint(1);
27
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genOnOff']);
28
+ },
29
+ },
30
+ {
31
+ zigbeeModel: ['SM309-S'],
32
+ model: 'SM309-S',
33
+ vendor: 'Samotech',
34
+ description: 'Zigbee dimmer 400W with power and energy metering',
35
+ fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([fz.electrical_measurement, fz.metering]),
36
+ toZigbee: extend.light_onoff_brightness().toZigbee,
37
+ configure: async (device, coordinatorEndpoint, logger) => {
38
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
39
+ const endpoint = device.getEndpoint(1);
40
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'haElectricalMeasurement', 'seMetering']);
41
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
42
+ await reporting.readMeteringMultiplierDivisor(endpoint);
43
+ await reporting.rmsVoltage(endpoint, {min: 10, change: 20});
44
+ await reporting.rmsCurrent(endpoint, {min: 10, change: 10});
45
+ await reporting.activePower(endpoint, {min: 10, change: 15});
46
+ await reporting.currentSummDelivered(endpoint, {min: 300});
47
+ await reporting.onOff(endpoint);
48
+ },
49
+ exposes: extend.light_onoff_brightness().exposes.concat([e.power(), e.current(), e.voltage(), e.energy()]),
50
+ },
51
+ {
52
+ zigbeeModel: ['SM309'],
53
+ model: 'SM309',
54
+ vendor: 'Samotech',
55
+ description: 'Zigbee dimmer 400W',
56
+ extend: extend.light_onoff_brightness({noConfigure: true}),
57
+ configure: async (device, coordinatorEndpoint, logger) => {
58
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
59
+ const endpoint = device.getEndpoint(1);
60
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
61
+ await reporting.onOff(endpoint);
62
+ },
63
+ },
64
+ {
65
+ fingerprint: [{modelID: 'Dimmer-Switch-ZB3.0', manufacturerName: 'Samotech'}, {modelID: 'HK_DIM_A', manufacturerName: 'Samotech'}],
66
+ model: 'SM323',
67
+ vendor: 'Samotech',
68
+ description: 'Zigbee retrofit dimmer 250W',
69
+ extend: extend.light_onoff_brightness({noConfigure: true}),
70
+ configure: async (device, coordinatorEndpoint, logger) => {
71
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
72
+ const endpoint = device.getEndpoint(1);
73
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
74
+ await reporting.onOff(endpoint);
75
+ await reporting.brightness(endpoint);
76
+ },
77
+ },
78
+ {
79
+ zigbeeModel: ['SM324'],
80
+ model: 'SM324',
81
+ vendor: 'Samotech',
82
+ description: '220V Zigbee CCT LED dimmer',
83
+ extend: extend.light_onoff_brightness_colortemp({noConfigure: true, colorTempRange: [150, 500]}),
84
+ configure: async (device, coordinatorEndpoint, logger) => {
85
+ await extend.light_onoff_brightness_colortemp().configure(device, coordinatorEndpoint, logger);
86
+ const endpoint = device.getEndpoint(1);
87
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'lightingColorCtrl']);
88
+ await reporting.onOff(endpoint);
89
+ await reporting.brightness(endpoint);
90
+ await reporting.colorTemperature(endpoint);
91
+ },
92
+ },
93
+ ];