@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,92 @@
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 globalStore = require('../lib/store');
5
+ const reporting = require('../lib/reporting');
6
+ const extend = require('../lib/extend');
7
+ const e = exposes.presets;
8
+
9
+ module.exports = [
10
+ {
11
+ zigbeeModel: ['Leak_Sensor'],
12
+ model: 'MCLH-07',
13
+ vendor: 'LifeControl',
14
+ description: 'Water leak switch',
15
+ fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
16
+ toZigbee: [],
17
+ meta: {battery: {dontDividePercentage: true}},
18
+ exposes: [e.water_leak(), e.battery_low(), e.tamper(), e.battery()],
19
+ },
20
+ {
21
+ zigbeeModel: ['Door_Sensor'],
22
+ model: 'MCLH-04',
23
+ vendor: 'LifeControl',
24
+ description: 'Door sensor',
25
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
26
+ toZigbee: [],
27
+ exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery()],
28
+ },
29
+ {
30
+ zigbeeModel: ['vivi ZLight'],
31
+ model: 'MCLH-02',
32
+ vendor: 'LifeControl',
33
+ description: 'RGB LED lamp',
34
+ extend: extend.light_onoff_brightness_colortemp_color(),
35
+ },
36
+ {
37
+ zigbeeModel: ['RICI01'],
38
+ model: 'MCLH-03',
39
+ vendor: 'LifeControl',
40
+ description: 'Power plug',
41
+ fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering],
42
+ toZigbee: [tz.on_off],
43
+ configure: async (device, coordinatorEndpoint, logger) => {
44
+ const endpoint = device.getEndpoint(1);
45
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
46
+ await reporting.onOff(endpoint);
47
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
48
+ await reporting.readMeteringMultiplierDivisor(endpoint);
49
+ await reporting.currentSummDelivered(endpoint);
50
+ },
51
+ onEvent: async (type, data, device) => {
52
+ // This device doesn't support reporting correctly.
53
+ // https://github.com/Koenkk/zigbee-herdsman-converters/pull/1270
54
+ const endpoint = device.getEndpoint(1);
55
+ if (type === 'stop') {
56
+ clearInterval(globalStore.getValue(device, 'interval'));
57
+ globalStore.clearValue(device, 'interval');
58
+ } else if (!globalStore.hasValue(device, 'interval')) {
59
+ const interval = setInterval(async () => {
60
+ try {
61
+ await endpoint.read('haElectricalMeasurement', ['rmsVoltage', 'rmsCurrent', 'activePower']);
62
+ await endpoint.read('seMetering', ['currentSummDelivered', 'multiplier', 'divisor']);
63
+ } catch (error) {
64
+ // Do nothing
65
+ }
66
+ }, 10*1000); // Every 10 seconds
67
+ globalStore.putValue(device, 'interval', interval);
68
+ }
69
+ },
70
+ exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()],
71
+ },
72
+ {
73
+ zigbeeModel: ['Motion_Sensor'],
74
+ model: 'MCLH-05',
75
+ vendor: 'LifeControl',
76
+ description: 'Motion sensor',
77
+ fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery],
78
+ toZigbee: [],
79
+ meta: {battery: {dontDividePercentage: true}},
80
+ exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
81
+ },
82
+ {
83
+ zigbeeModel: ['VOC_Sensor'],
84
+ model: 'MCLH-08',
85
+ vendor: 'LifeControl',
86
+ description: 'Air sensor',
87
+ fromZigbee: [fz.lifecontrolVoc, fz.battery],
88
+ toZigbee: [],
89
+ meta: {battery: {dontDividePercentage: true}},
90
+ exposes: [e.temperature(), e.humidity(), e.voc().withUnit('ppb'), e.eco2(), e.battery()],
91
+ },
92
+ ];
@@ -0,0 +1,37 @@
1
+ const reporting = require('../lib/reporting');
2
+ const extend = require('../lib/extend');
3
+
4
+ module.exports = [
5
+ {
6
+ zigbeeModel: ['91-947'],
7
+ model: '200403V2-B',
8
+ vendor: 'LightSolutions',
9
+ description: 'Mini dimmer 200W',
10
+ extend: extend.light_onoff_brightness({noConfigure: true}),
11
+ configure: async (device, coordinatorEndpoint, logger) => {
12
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
13
+ const endpoint = device.getEndpoint(1);
14
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
15
+ await reporting.onOff(endpoint);
16
+ },
17
+ },
18
+ {
19
+ zigbeeModel: ['91-948'],
20
+ model: '200106V3',
21
+ vendor: 'LightSolutions',
22
+ description: 'Zigbee switch 200W',
23
+ extend: extend.switch(),
24
+ configure: async (device, coordinatorEndpoint, logger) => {
25
+ const endpoint = device.getEndpoint(1);
26
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
27
+ await reporting.onOff(endpoint);
28
+ },
29
+ },
30
+ {
31
+ zigbeeModel: ['42-032'],
32
+ model: '42-032',
33
+ vendor: 'LightSolutions',
34
+ description: 'LED driver CCT 12V - 30W - CCT',
35
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [160, 450]}),
36
+ },
37
+ ];
@@ -0,0 +1,205 @@
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
+ const globalStore = require('../lib/store');
9
+
10
+ module.exports = [
11
+ {
12
+ zigbeeModel: ['ZB-KeypadGeneric-D0002'],
13
+ model: 'ZS130000078',
14
+ vendor: 'Linkind',
15
+ description: 'Security keypad battery',
16
+ meta: {battery: {voltageToPercentage: '3V_2100'}},
17
+ fromZigbee: [fz.command_arm_with_transaction, fz.battery, fz.ias_ace_occupancy_with_timeout,
18
+ fz.ias_smoke_alarm_1, fz.command_panic],
19
+ exposes: [e.battery(), e.battery_voltage(), e.battery_low(), e.occupancy(), e.tamper(),
20
+ exposes.numeric('action_code', ea.STATE).withDescription('Pin code introduced.'),
21
+ exposes.numeric('action_transaction', ea.STATE).withDescription('Last action transaction number.'),
22
+ exposes.text('action_zone', ea.STATE).withDescription('Alarm zone. Default value 23'),
23
+ e.action([
24
+ 'panic', 'disarm', 'arm_day_zones', 'arm_all_zones', 'exit_delay', 'entry_delay'])],
25
+ toZigbee: [tz.arm_mode],
26
+ configure: async (device, coordinatorEndpoint) => {
27
+ const endpoint = device.getEndpoint(1);
28
+ const clusters = ['genPowerCfg', 'ssIasZone', 'ssIasAce', 'genBasic', 'genIdentify'];
29
+ await reporting.bind(endpoint, coordinatorEndpoint, clusters);
30
+ await reporting.batteryVoltage(endpoint);
31
+ },
32
+ onEvent: async (type, data, device) => {
33
+ if (type === 'message' && data.type === 'commandGetPanelStatus' && data.cluster === 'ssIasAce' &&
34
+ globalStore.hasValue(device.getEndpoint(1), 'panelStatus')) {
35
+ const payload = {
36
+ panelstatus: globalStore.getValue(device.getEndpoint(1), 'panelStatus'),
37
+ secondsremain: 0x00, audiblenotif: 0x00, alarmstatus: 0x00,
38
+ };
39
+ await device.getEndpoint(1).commandResponse(
40
+ 'ssIasAce', 'getPanelStatusRsp', payload, {}, data.meta.zclTransactionSequenceNumber,
41
+ );
42
+ }
43
+ },
44
+ },
45
+ {
46
+ zigbeeModel: ['ZBT-RGBWSwitch-D0801'],
47
+ model: 'ZS230002',
48
+ vendor: 'Linkind',
49
+ description: '5-key smart bulb dimmer switch light remote control',
50
+ fromZigbee: [fz.command_on, fz.command_off, fz.command_step, fz.command_move,
51
+ fz.command_stop, fz.command_move_to_color_temp, fz.command_move_to_color,
52
+ fz.command_move_to_level, fz.command_move_color_temperature, fz.battery],
53
+ exposes: [e.battery(), e.battery_low(), e.action(['on', 'off', 'brightness_step_up',
54
+ 'brightness_step_down', 'color_temperature_move', 'color_move', 'brightness_move_up', 'brightness_move_down', 'brightness_stop',
55
+ 'brightness_move_to_level', 'color_temperature_move_up', 'color_temperature_move_down'])],
56
+ toZigbee: [],
57
+ configure: async (device, coordinatorEndpoint, logger) => {
58
+ const endpoint = device.getEndpoint(1);
59
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
60
+ await reporting.batteryPercentageRemaining(endpoint);
61
+ },
62
+ },
63
+ {
64
+ zigbeeModel: ['ZBT-CCTLight-D0106', 'ZBT-CCTLight-GLS0108', 'ZBT-CCTLight-GLS0109'],
65
+ model: 'ZL1000100-CCT-US-V1A02',
66
+ vendor: 'Linkind',
67
+ description: 'Zigbee LED 9W A19 bulb, dimmable & tunable',
68
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
69
+ },
70
+ {
71
+ zigbeeModel: ['ZBT-CCTLight-C4700107'],
72
+ model: 'ZL1000400-CCT-EU-2-V1A02',
73
+ vendor: 'Linkind',
74
+ description: 'Zigbee LED 5.4W C35 bulb E14, dimmable & tunable',
75
+ extend: extend.light_onoff_brightness_colortemp(),
76
+ },
77
+ {
78
+ zigbeeModel: ['ZBT-CCTLight-M3500107'],
79
+ model: 'ZL00030014',
80
+ vendor: 'Linkind',
81
+ description: 'Zigbee LED 4.8W GU10 bulb, dimmable & tunable',
82
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
83
+ },
84
+ {
85
+ zigbeeModel: ['ZBT-CCTLight-D115'],
86
+ model: 'ZL13100314',
87
+ vendor: 'Linkind',
88
+ description: 'Ceiling light 28W, 3000 lm, Ø40CM CCT',
89
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
90
+ },
91
+ {
92
+ zigbeeModel: ['ZBT-CCTLight-BR300107'],
93
+ model: 'ZL100050004',
94
+ vendor: 'Linkind',
95
+ description: 'Zigbee LED 7.4W BR30 bulb E26, dimmable & tunable',
96
+ extend: extend.light_onoff_brightness_colortemp(),
97
+ },
98
+ {
99
+ zigbeeModel: ['ZBT-DIMLight-GLS0010'],
100
+ model: 'ZL100010008',
101
+ vendor: 'Linkind',
102
+ description: 'Zigbee LED 9W 2700K A19 bulb, dimmable',
103
+ extend: extend.light_onoff_brightness(),
104
+ },
105
+ {
106
+ zigbeeModel: ['ZBT-DIMLight-D0120'],
107
+ model: 'ZL1000701-27-EU-V1A02',
108
+ vendor: 'Linkind',
109
+ description: 'Zigbee A60 filament bulb 6.3W',
110
+ extend: extend.light_onoff_brightness(),
111
+ },
112
+ {
113
+ zigbeeModel: ['ZBT-DIMLight-A4700003'],
114
+ model: 'ZL1000700-22-EU-V1A02',
115
+ vendor: 'Linkind',
116
+ description: 'Zigbee A60 led filament, dimmable warm light (2200K), E27. 4.2W, 420lm',
117
+ extend: extend.light_onoff_brightness(),
118
+ },
119
+ {
120
+ zigbeeModel: ['ZB-MotionSensor-D0003'],
121
+ model: 'ZS1100400-IN-V1A02',
122
+ vendor: 'Linkind',
123
+ description: 'PIR motion sensor, wireless motion detector',
124
+ fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery],
125
+ toZigbee: [],
126
+ exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
127
+ configure: async (device, coordinatorEndpoint, logger) => {
128
+ const endpoint = device.getEndpoint(1);
129
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
130
+ await reporting.batteryPercentageRemaining(endpoint);
131
+ },
132
+ },
133
+ {
134
+ zigbeeModel: ['ZB-DoorSensor-D0003'],
135
+ model: 'ZS110050078',
136
+ vendor: 'Linkind',
137
+ description: 'Door/window Sensor',
138
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
139
+ toZigbee: [],
140
+ exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery()],
141
+ configure: async (device, coordinatorEndpoint, logger) => {
142
+ const endpoint = device.getEndpoint(1);
143
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
144
+ await reporting.batteryPercentageRemaining(endpoint);
145
+ },
146
+ },
147
+ {
148
+ zigbeeModel: ['ZBT-DIMSwitch-D0001'],
149
+ model: 'ZS232000178',
150
+ vendor: 'Linkind',
151
+ description: '1-key remote control',
152
+ fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
153
+ exposes: [e.action(['on', 'off', 'brightness_move_up', 'brightness_move_down', 'brightness_stop']), e.battery(), e.battery_low()],
154
+ toZigbee: [],
155
+ configure: async (device, coordinatorEndpoint, logger) => {
156
+ const endpoint = device.getEndpoint(1);
157
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
158
+ await reporting.batteryPercentageRemaining(endpoint);
159
+ },
160
+ },
161
+ {
162
+ zigbeeModel: ['ZBT-OnOffPlug-D0011', 'ZBT-OnOffPlug-D0001'],
163
+ model: 'ZS190000118',
164
+ vendor: 'Linkind',
165
+ description: 'Control outlet',
166
+ extend: extend.switch(),
167
+ configure: async (device, coordinatorEndpoint, logger) => {
168
+ const endpoint = device.getEndpoint(1);
169
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
170
+ await reporting.onOff(endpoint);
171
+ },
172
+ },
173
+ {
174
+ zigbeeModel: ['ZB-KeyfodGeneric-D0001'],
175
+ model: 'ZS130000178',
176
+ vendor: 'Linkind',
177
+ description: 'Security system key fob',
178
+ fromZigbee: [fz.command_arm, fz.command_panic],
179
+ toZigbee: [],
180
+ exposes: [e.action(['panic', 'disarm', 'arm_partial_zones', 'arm_all_zones'])],
181
+ onEvent: async (type, data, device) => {
182
+ // Since arm command has a response zigbee-herdsman doesn't send a default response.
183
+ // This causes the remote to repeat the arm command, so send a default response here.
184
+ if (data.type === 'commandArm' && data.cluster === 'ssIasAce') {
185
+ await data.endpoint.defaultResponse(0, 0, 1281, data.meta.zclTransactionSequenceNumber);
186
+ }
187
+ },
188
+ },
189
+ {
190
+ zigbeeModel: ['A001082'],
191
+ model: 'LS21001',
192
+ vendor: 'Linkind',
193
+ description: 'Water leak sensor',
194
+ fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
195
+ toZigbee: [tz.LS21001_alert_behaviour],
196
+ exposes: [e.water_leak(), e.battery_low(), e.battery(),
197
+ exposes.enum('alert_behaviour', ea.STATE_SET, ['siren_led', 'siren', 'led', 'nothing'])
198
+ .withDescription('Controls behaviour of led/siren on alarm')],
199
+ configure: async (device, coordinatorEndpoint, logger) => {
200
+ const endpoint = device.getEndpoint(1);
201
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
202
+ await reporting.batteryPercentageRemaining(endpoint);
203
+ },
204
+ },
205
+ ];
@@ -0,0 +1,59 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
3
+ const extend = require('../lib/extend');
4
+ const e = exposes.presets;
5
+
6
+ module.exports = [
7
+ {
8
+ zigbeeModel: ['abb71ca5fe1846f185cfbda554046cce'],
9
+ model: 'LVS-ZB500D',
10
+ vendor: 'LivingWise',
11
+ description: 'ZigBee smart dimmer switch',
12
+ extend: extend.light_onoff_brightness(),
13
+ },
14
+ {
15
+ zigbeeModel: ['545df2981b704114945f6df1c780515a'],
16
+ model: 'LVS-ZB15S',
17
+ vendor: 'LivingWise',
18
+ description: 'ZigBee smart in-wall switch',
19
+ extend: extend.switch(),
20
+ },
21
+ {
22
+ zigbeeModel: ['e70f96b3773a4c9283c6862dbafb6a99'],
23
+ model: 'LVS-SM10ZW',
24
+ vendor: 'LivingWise',
25
+ description: 'Door or window contact switch',
26
+ fromZigbee: [fz.ias_contact_alarm_1],
27
+ toZigbee: [],
28
+ exposes: [e.contact(), e.battery_low(), e.tamper()],
29
+ },
30
+ {
31
+ zigbeeModel: ['895a2d80097f4ae2b2d40500d5e03dcc', '700ae5aab3414ec09c1872efe7b8755a'],
32
+ model: 'LVS-SN10ZW_SN11',
33
+ vendor: 'LivingWise',
34
+ description: 'Occupancy sensor',
35
+ fromZigbee: [fz.battery, fz.ias_occupancy_alarm_1_with_timeout],
36
+ toZigbee: [],
37
+ exposes: [e.battery(), e.occupancy(), e.battery_low(), e.tamper()],
38
+ },
39
+ {
40
+ zigbeeModel: ['55e0fa5cdb144ba3a91aefb87c068cff'],
41
+ model: 'LVS-ZB15R',
42
+ vendor: 'LivingWise',
43
+ description: 'Zigbee smart outlet',
44
+ extend: extend.switch(),
45
+ },
46
+ {
47
+ zigbeeModel: ['75d430d66c164c26ac8601c05932dc94'],
48
+ model: 'LVS-SC7',
49
+ vendor: 'LivingWise',
50
+ description: 'Scene controller ',
51
+ fromZigbee: [fz.orvibo_raw_2],
52
+ exposes: [e.action([
53
+ 'button_1_click', 'button_1_hold', 'button_1_release', 'button_2_click', 'button_2_hold', 'button_2_release',
54
+ 'button_3_click', 'button_3_hold', 'button_3_release', 'button_4_click', 'button_4_hold', 'button_4_release',
55
+ 'button_5_click', 'button_5_hold', 'button_5_release', 'button_6_click', 'button_6_hold', 'button_6_release',
56
+ 'button_7_click', 'button_7_hold', 'button_7_release'])],
57
+ toZigbee: [],
58
+ },
59
+ ];
@@ -0,0 +1,286 @@
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 globalStore = require('../lib/store');
5
+ const extend = require('../lib/extend');
6
+ const e = exposes.presets;
7
+ const ea = exposes.access;
8
+
9
+ const poll = async (device) => {
10
+ try {
11
+ const endpoint = device.getEndpoint(6);
12
+ const options = {transactionSequenceNumber: 0, srcEndpoint: 8, disableResponse: true, disableRecovery: true};
13
+ await endpoint.command('genOnOff', 'toggle', {}, options);
14
+ } catch (error) {
15
+ // device is lost, need to permit join
16
+ }
17
+ };
18
+
19
+ module.exports = [
20
+ {
21
+ zigbeeModel: ['TI0001 '],
22
+ model: 'TI0001',
23
+ description: 'Zigbee switch (1, 2, 3, 4 gang)',
24
+ vendor: 'Livolo',
25
+ exposes: [
26
+ e.switch().withEndpoint('left'),
27
+ e.switch().withEndpoint('right'),
28
+ e.switch().withEndpoint('bottom_left'),
29
+ e.switch().withEndpoint('bottom_right'),
30
+ ],
31
+ fromZigbee: [fz.livolo_switch_state, fz.livolo_switch_state_raw, fz.livolo_new_switch_state_4gang],
32
+ toZigbee: [tz.livolo_socket_switch_on_off],
33
+ endpoint: (device) => {
34
+ return {'left': 6, 'right': 6, 'bottom_left': 6, 'bottom_right': 6};
35
+ },
36
+ configure: poll,
37
+ onEvent: async (type, data, device) => {
38
+ if (type === 'stop') {
39
+ clearInterval(globalStore.getValue(device, 'interval'));
40
+ globalStore.clearValue(device, 'interval');
41
+ }
42
+ if (['start', 'deviceAnnounce'].includes(type)) {
43
+ await poll(device);
44
+ if (!globalStore.hasValue(device, 'interval')) {
45
+ const interval = setInterval(async () => await poll(device), 300*1000);
46
+ globalStore.putValue(device, 'interval', interval);
47
+ }
48
+ }
49
+ if (data.cluster === 'genPowerCfg' && data.type === 'raw') {
50
+ const dp = data.data[10];
51
+ if (data.data[0] === 0x7a && data.data[1] === 0xd1) {
52
+ const endpoint = device.getEndpoint(6);
53
+ if (dp === 0x01) {
54
+ const options = {manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
55
+ reservedBits: 3, direction: 1, writeUndiv: true};
56
+ const payload = {0x2002: {value: [0, 0, 0, 0, 0, 0, 0], type: 0x0e}};
57
+ await endpoint.readResponse('genPowerCfg', 0xe9, payload, options);
58
+ }
59
+ }
60
+ }
61
+ },
62
+ },
63
+ {
64
+ zigbeeModel: ['TI0001-switch'],
65
+ model: 'TI0001-switch',
66
+ description: 'Zigbee switch 1 gang',
67
+ vendor: 'Livolo',
68
+ fromZigbee: [fz.livolo_new_switch_state, fz.power_on_behavior],
69
+ toZigbee: [tz.livolo_socket_switch_on_off, tz.power_on_behavior],
70
+ extend: extend.switch(),
71
+ configure: poll,
72
+ endpoint: (device) => {
73
+ return {'left': 6, 'right': 6};
74
+ },
75
+ onEvent: async (type, data, device) => {
76
+ if (type === 'stop') {
77
+ clearInterval(globalStore.getValue(device, 'interval'));
78
+ globalStore.clearValue(device, 'interval');
79
+ }
80
+ if (['start', 'deviceAnnounce'].includes(type)) {
81
+ await poll(device);
82
+ if (!globalStore.hasValue(device, 'interval')) {
83
+ const interval = setInterval(async () => {
84
+ await poll(device);
85
+ }, 300*1000); // Every 300 seconds
86
+ globalStore.putValue(device, 'interval', interval);
87
+ }
88
+ }
89
+ },
90
+ },
91
+ {
92
+ zigbeeModel: ['TI0001-switch-2gang'],
93
+ model: 'TI0001-switch-2gang',
94
+ description: 'Zigbee Switch 2 gang',
95
+ vendor: 'Livolo',
96
+ fromZigbee: [fz.livolo_new_switch_state_2gang],
97
+ toZigbee: [tz.livolo_socket_switch_on_off],
98
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
99
+ configure: poll,
100
+ endpoint: (device) => {
101
+ return {'left': 6, 'right': 6};
102
+ },
103
+ onEvent: async (type, data, device) => {
104
+ if (type === 'stop') {
105
+ clearInterval(globalStore.getValue(device, 'interval'));
106
+ globalStore.clearValue(device, 'interval');
107
+ }
108
+ if (['start', 'deviceAnnounce'].includes(type)) {
109
+ await poll(device);
110
+ if (!globalStore.hasValue(device, 'interval')) {
111
+ const interval = setInterval(async () => {
112
+ await poll(device);
113
+ }, 300*1000); // Every 300 seconds
114
+ globalStore.putValue(device, 'interval', interval);
115
+ }
116
+ }
117
+ },
118
+ },
119
+ {
120
+ zigbeeModel: ['TI0001-curtain-switch'],
121
+ model: 'TI0001-curtain-switch',
122
+ description: 'Zigbee curtain switch (can only read status, control does not work yet)',
123
+ vendor: 'Livolo',
124
+ fromZigbee: [fz.livolo_curtain_switch_state],
125
+ toZigbee: [tz.livolo_socket_switch_on_off],
126
+ // toZigbee: [tz.livolo_curtain_switch_on_off],
127
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
128
+ configure: poll,
129
+ endpoint: (device) => {
130
+ return {'left': 6, 'right': 6};
131
+ },
132
+ onEvent: async (type, data, device) => {
133
+ if (type === 'stop') {
134
+ clearInterval(globalStore.getValue(device, 'interval'));
135
+ globalStore.clearValue(device, 'interval');
136
+ }
137
+ if (['start', 'deviceAnnounce'].includes(type)) {
138
+ await poll(device);
139
+ if (!globalStore.hasValue(device, 'interval')) {
140
+ const interval = setInterval(async () => {
141
+ await poll(device);
142
+ }, 300*1000); // Every 300 seconds
143
+ globalStore.putValue(device, 'interval', interval);
144
+ }
145
+ }
146
+ },
147
+ },
148
+ {
149
+ zigbeeModel: ['TI0001-socket'],
150
+ model: 'TI0001-socket',
151
+ description: 'Zigbee socket',
152
+ vendor: 'Livolo',
153
+ extend: extend.switch(),
154
+ fromZigbee: [fz.livolo_socket_state, fz.power_on_behavior],
155
+ toZigbee: [tz.livolo_socket_switch_on_off, tz.power_on_behavior],
156
+ configure: poll,
157
+ onEvent: async (type, data, device) => {
158
+ if (type === 'stop') {
159
+ clearInterval(globalStore.getValue(device, 'interval'));
160
+ globalStore.clearValue(device, 'interval');
161
+ }
162
+ if (['start', 'deviceAnnounce'].includes(type)) {
163
+ await poll(device);
164
+ if (!globalStore.hasValue(device, 'interval')) {
165
+ const interval = setInterval(async () => {
166
+ await poll(device);
167
+ }, 300*1000); // Every 300 seconds
168
+ globalStore.putValue(device, 'interval', interval);
169
+ }
170
+ }
171
+ },
172
+ },
173
+ {
174
+ zigbeeModel: ['TI0001-dimmer'],
175
+ model: 'TI0001-dimmer',
176
+ description: 'Zigbee dimmer',
177
+ vendor: 'Livolo',
178
+ fromZigbee: [fz.livolo_dimmer_state],
179
+ toZigbee: [tz.livolo_socket_switch_on_off, tz.livolo_dimmer_level],
180
+ exposes: [e.light_brightness()],
181
+ configure: poll,
182
+ endpoint: (device) => {
183
+ return {'left': 6, 'right': 6};
184
+ },
185
+ onEvent: async (type, data, device) => {
186
+ if (type === 'stop') {
187
+ clearInterval(globalStore.getValue(device, 'interval'));
188
+ globalStore.clearValue(device, 'interval');
189
+ }
190
+ if (!globalStore.hasValue(device, 'interval')) {
191
+ await poll(device);
192
+ const interval = setInterval(async () => {
193
+ await poll(device);
194
+ }, 300*1000); // Every 300 seconds
195
+ globalStore.putValue(device, 'interval', interval);
196
+ }
197
+ },
198
+ },
199
+ {
200
+ zigbeeModel: ['TI0001-cover'],
201
+ model: 'TI0001-cover',
202
+ description: 'Zigbee roller blind motor',
203
+ vendor: 'Livolo',
204
+ fromZigbee: [fz.livolo_cover_state, fz.command_off],
205
+ toZigbee: [tz.livolo_cover_state, tz.livolo_cover_position, tz.livolo_cover_options],
206
+ exposes: [
207
+ e.cover_position().setAccess('position', ea.STATE_SET),
208
+ exposes.composite('options', 'options', ea.STATE_SET)
209
+ .withDescription('Motor options')
210
+ .withFeature(exposes.numeric('motor_speed', ea.STATE_SET)
211
+ .withValueMin(20)
212
+ .withValueMax(40)
213
+ .withDescription('Motor speed')
214
+ .withUnit('rpm'))
215
+ .withFeature(exposes.enum('motor_direction', ea.STATE_SET, ['FORWARD', 'REVERSE'])
216
+ .withDescription('Motor direction')),
217
+ exposes.binary('moving', ea.STATE)
218
+ .withDescription('Motor is moving'),
219
+ ],
220
+ configure: poll,
221
+ onEvent: async (type, data, device) => {
222
+ if (type === 'stop') {
223
+ clearInterval(globalStore.getValue(device, 'interval'));
224
+ globalStore.clearValue(device, 'interval');
225
+ }
226
+ if (!globalStore.hasValue(device, 'interval')) {
227
+ await poll(device);
228
+ const interval = setInterval(async () => {
229
+ await poll(device);
230
+ }, 300*1000); // Every 300 seconds
231
+ globalStore.putValue(device, 'interval', interval);
232
+ }
233
+ // This is needed while pairing in order to let the device know that the interview went right and prevent
234
+ // it from disconnecting from the Zigbee network.
235
+ if (data.cluster === 'genPowerCfg' && data.type === 'raw') {
236
+ const dp = data.data[10];
237
+ if (data.data[0] === 0x7a && data.data[1] === 0xd1) {
238
+ const endpoint = device.getEndpoint(6);
239
+ if (dp === 0x02) {
240
+ const options = {manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
241
+ reservedBits: 3, direction: 1, writeUndiv: true};
242
+ const payload = {0x0802: {value: [data.data[3], 0, 0, 0, 0, 0, 0], type: data.data[2]}};
243
+ await endpoint.readResponse('genPowerCfg', 0xe9, payload, options);
244
+ }
245
+ }
246
+ }
247
+ },
248
+ },
249
+ {
250
+ zigbeeModel: ['TI0001-pir'],
251
+ model: 'TI0001-pir',
252
+ description: 'Zigbee motion Sensor',
253
+ vendor: 'Livolo',
254
+ exposes: [
255
+ e.occupancy(),
256
+ ],
257
+ fromZigbee: [fz.livolo_pir_state],
258
+ toZigbee: [],
259
+ configure: poll,
260
+ onEvent: async (type, data, device) => {
261
+ if (type === 'stop') {
262
+ clearInterval(globalStore.getValue(device, 'interval'));
263
+ globalStore.clearValue(device, 'interval');
264
+ }
265
+ if (['start', 'deviceAnnounce'].includes(type)) {
266
+ await poll(device);
267
+ if (!globalStore.hasValue(device, 'interval')) {
268
+ const interval = setInterval(async () => await poll(device), 10*1000);
269
+ globalStore.putValue(device, 'interval', interval);
270
+ }
271
+ }
272
+ if (data.cluster === 'genPowerCfg' && data.type === 'raw') {
273
+ const dp = data.data[10];
274
+ if (data.data[0] === 0x7a && data.data[1] === 0xd1) {
275
+ const endpoint = device.getEndpoint(6);
276
+ if (dp === 0x01) {
277
+ const options = {manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
278
+ reservedBits: 3, direction: 1, writeUndiv: true};
279
+ const payload = {0x2002: {value: [0, 0, 0, 0, 0, 0, 0], type: 0x0e}};
280
+ await endpoint.readResponse('genPowerCfg', 0xe9, payload, options);
281
+ }
282
+ }
283
+ }
284
+ },
285
+ },
286
+ ];