@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,172 @@
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: ['FZB56+ZSW2FYM1.1'],
11
+ model: 'TZSW22FW-L4',
12
+ vendor: 'Feibit',
13
+ description: 'Smart light switch - 2 gang',
14
+ extend: extend.switch(),
15
+ exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('bottom')],
16
+ endpoint: (device) => {
17
+ return {'top': 16, 'bottom': 17};
18
+ },
19
+ meta: {multiEndpoint: true},
20
+ configure: async (device, coordinatorEndpoint, logger) => {
21
+ await reporting.bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff']);
22
+ await reporting.bind(device.getEndpoint(17), coordinatorEndpoint, ['genOnOff']);
23
+ },
24
+ },
25
+ {
26
+ zigbeeModel: ['FB56+ZSW1GKJ2.3'],
27
+ model: 'SKY01-TS1-101',
28
+ vendor: 'Feibit',
29
+ description: 'Smart light switch - 1 gang',
30
+ extend: extend.switch(),
31
+ },
32
+ {
33
+ zigbeeModel: ['FNB56-SOS03FB1.5'],
34
+ model: 'SEB01ZB',
35
+ vendor: 'Feibit',
36
+ description: 'SOS button',
37
+ fromZigbee: [fz.ias_sos_alarm_2, fz.battery],
38
+ toZigbee: [],
39
+ exposes: [e.sos(), e.battery_low(), e.tamper(), e.battery()],
40
+ },
41
+ {
42
+ zigbeeModel: ['FNB56-BOT06FB2.3', 'FNB56-BOT06FB2.8', 'FB56-BOT02HM1.2', 'FNB56-BOT06FB2.8'],
43
+ model: 'SBM01ZB',
44
+ vendor: 'Feibit',
45
+ description: 'Human body movement sensor',
46
+ fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery],
47
+ toZigbee: [],
48
+ configure: async (device, coordinatorEndpoint, logger) => {
49
+ const endpoint = device.getEndpoint(1);
50
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
51
+ await reporting.batteryPercentageRemaining(endpoint);
52
+ await reporting.batteryAlarmState(endpoint);
53
+ },
54
+ exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
55
+ },
56
+ {
57
+ zigbeeModel: ['FNB56-THM14FB2.4', 'FNB54-THM17ML1.1', 'FB56-THM12HM1.2', 'FNB56-THM14FB2.5'],
58
+ model: 'STH01ZB',
59
+ vendor: 'Feibit',
60
+ description: 'Smart temperature & humidity Sensor',
61
+ fromZigbee: [fz.temperature, fz.humidity, fz.battery],
62
+ toZigbee: [],
63
+ meta: {battery: {voltageToPercentage: '3V_2500'}},
64
+ exposes: [e.temperature(), e.humidity(), e.battery()],
65
+ },
66
+ {
67
+ zigbeeModel: ['FNB56-SMF06FB1.6', 'FNB56-SMF06FB2.0'],
68
+ model: 'SSA01ZB',
69
+ vendor: 'Feibit',
70
+ description: 'Smoke detector',
71
+ fromZigbee: [fz.ias_smoke_alarm_1, fz.battery],
72
+ toZigbee: [],
73
+ configure: async (device, coordinatorEndpoint, logger) => {
74
+ const endpoint = device.getEndpoint(1);
75
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
76
+ await reporting.batteryPercentageRemaining(endpoint);
77
+ await reporting.batteryAlarmState(endpoint);
78
+ },
79
+ exposes: [e.smoke(), e.battery_low(), e.tamper(), e.battery()],
80
+ },
81
+ {
82
+ zigbeeModel: ['FNB56-COS06FB1.7', 'FNB56-COS06FB2.1'],
83
+ model: 'SCA01ZB',
84
+ vendor: 'Feibit',
85
+ description: 'Smart carbon monoxide sensor',
86
+ fromZigbee: [fz.ias_carbon_monoxide_alarm_1, fz.battery],
87
+ toZigbee: [],
88
+ configure: async (device, coordinatorEndpoint, logger) => {
89
+ const endpoint = device.getEndpoint(1);
90
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
91
+ await reporting.batteryPercentageRemaining(endpoint);
92
+ await reporting.batteryAlarmState(endpoint);
93
+ },
94
+ exposes: [e.carbon_monoxide(), e.battery_low(), e.tamper(), e.battery()],
95
+ },
96
+ {
97
+ zigbeeModel: ['FNB56-GAS05FB1.4', 'FNB56-GAS05FB1.8'],
98
+ model: 'SGA01ZB',
99
+ vendor: 'Feibit',
100
+ description: 'Combustible gas sensor',
101
+ fromZigbee: [fz.ias_gas_alarm_2],
102
+ toZigbee: [],
103
+ exposes: [e.gas()],
104
+ },
105
+ {
106
+ zigbeeModel: ['FNB56-WTS05FB2.0', 'FNB56-WTS05FB2.4'],
107
+ model: 'SWA01ZB',
108
+ vendor: 'Feibit',
109
+ description: 'Water leakage sensor',
110
+ fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
111
+ toZigbee: [],
112
+ exposes: [e.water_leak(), e.battery_low(), e.tamper(), e.battery()],
113
+ },
114
+ {
115
+ zigbeeModel: ['FNB56-DOS07FB2.4', 'FB56-DOS02HM1.2'],
116
+ model: 'SDM01ZB',
117
+ vendor: 'Feibit',
118
+ description: 'Door or window contact switch',
119
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
120
+ toZigbee: [],
121
+ exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery()],
122
+ },
123
+ {
124
+ zigbeeModel: ['FB56+SKT14AL2.1', 'FTB56+SKT1BCW1.0'],
125
+ model: 'SFS01ZB',
126
+ vendor: 'Feibit',
127
+ description: 'Power plug',
128
+ extend: extend.switch(),
129
+ },
130
+ {
131
+ zigbeeModel: ['FB56+ZSW1HKJ2.2', 'FB56+ZSW1HKJ1.1'],
132
+ model: 'SLS301ZB_2',
133
+ vendor: 'Feibit',
134
+ description: 'Smart light switch - 2 gang',
135
+ extend: extend.switch(),
136
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
137
+ endpoint: (device) => {
138
+ return {'left': 16, 'right': 17};
139
+ },
140
+ meta: {multiEndpoint: true},
141
+ configure: async (device, coordinatorEndpoint, logger) => {
142
+ await reporting.bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff']);
143
+ await reporting.bind(device.getEndpoint(17), coordinatorEndpoint, ['genOnOff']);
144
+ },
145
+ },
146
+ {
147
+ zigbeeModel: ['FB56+ZSW1IKJ2.2', 'FB56+ZSW1IKJ1.1'],
148
+ model: 'SLS301ZB_3',
149
+ vendor: 'Feibit',
150
+ description: 'Smart light switch - 3 gang',
151
+ extend: extend.switch(),
152
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right'), e.switch().withEndpoint('center')],
153
+ endpoint: (device) => {
154
+ return {'left': 16, 'center': 17, 'right': 18};
155
+ },
156
+ meta: {multiEndpoint: true},
157
+ configure: async (device, coordinatorEndpoint, logger) => {
158
+ await reporting.bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff']);
159
+ await reporting.bind(device.getEndpoint(17), coordinatorEndpoint, ['genOnOff']);
160
+ await reporting.bind(device.getEndpoint(18), coordinatorEndpoint, ['genOnOff']);
161
+ },
162
+ },
163
+ {
164
+ zigbeeModel: ['FB56+ZSN08KJ2.2'],
165
+ model: 'SSS401ZB',
166
+ vendor: 'Feibit',
167
+ description: 'Smart 4 key scene wall switch',
168
+ toZigbee: [tz.on_off],
169
+ fromZigbee: [fz.command_recall],
170
+ exposes: [e.action(['recall_*']), e.switch()],
171
+ },
172
+ ];
@@ -0,0 +1,15 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
3
+ const e = exposes.presets;
4
+
5
+ module.exports = [
6
+ {
7
+ zigbeeModel: ['Alarm_SD_Device'],
8
+ model: 'W2-Module',
9
+ description: 'Carbon monoxide sensor',
10
+ vendor: 'FireAngel',
11
+ fromZigbee: [fz.W2_module_carbon_monoxide, fz.battery],
12
+ toZigbee: [],
13
+ exposes: [e.carbon_monoxide(), e.battery()],
14
+ },
15
+ ];
@@ -0,0 +1,23 @@
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 e = exposes.presets;
5
+ const ea = exposes.access;
6
+
7
+ module.exports = [
8
+ {
9
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_wt9agwf3'},
10
+ {modelID: 'TS0601', manufacturerName: '_TZE200_5uodvhgc'},
11
+ {modelID: 'TS0601', manufacturerName: '_TZE200_1n2zev06'}],
12
+ model: 'FK_V02',
13
+ vendor: 'FrankEver',
14
+ description: 'Zigbee smart water valve',
15
+ fromZigbee: [fz.frankever_valve],
16
+ toZigbee: [tz.tuya_switch_state, tz.frankever_threshold, tz.frankever_timer],
17
+ exposes: [e.switch().setAccess('state', ea.STATE_SET),
18
+ exposes.numeric('threshold', exposes.access.STATE_SET).withValueMin(0).withValueMax(100).withUnit('%')
19
+ .withDescription('Valve open percentage (multiple of 10)'),
20
+ exposes.numeric('timer', exposes.access.STATE_SET).withValueMin(0).withValueMax(600).withUnit('min')
21
+ .withDescription('Countdown timer in minutes')],
22
+ },
23
+ ];
@@ -0,0 +1,11 @@
1
+ const tuya = require('../lib/tuya');
2
+
3
+ module.exports = [
4
+ {
5
+ fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3210_sln7ah6r'}],
6
+ model: 'Garza-Standard-A60',
7
+ vendor: 'Garza Smart',
8
+ description: 'Standard A60 bulb',
9
+ extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
10
+ },
11
+ ];
package/devices/ge.js ADDED
@@ -0,0 +1,111 @@
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: ['SoftWhite'],
11
+ model: 'PSB19-SW27',
12
+ vendor: 'GE',
13
+ description: 'Link smart LED light bulb, A19 soft white (2700K)',
14
+ extend: extend.light_onoff_brightness(),
15
+ },
16
+ {
17
+ zigbeeModel: ['ZLL Light'],
18
+ model: '22670',
19
+ vendor: 'GE',
20
+ description: 'Link smart LED light bulb, A19/BR30 soft white (2700K)',
21
+ extend: extend.light_onoff_brightness(),
22
+ },
23
+ {
24
+ zigbeeModel: ['Daylight'],
25
+ model: 'PQC19-DY01',
26
+ vendor: 'GE',
27
+ description: 'Link smart LED light bulb, A19/BR30 cold white (5000K)',
28
+ extend: extend.light_onoff_brightness(),
29
+ },
30
+ {
31
+ zigbeeModel: ['45852'],
32
+ model: '45852GE',
33
+ vendor: 'GE',
34
+ description: 'ZigBee plug-in smart dimmer',
35
+ extend: extend.light_onoff_brightness({noConfigure: true}),
36
+ configure: async (device, coordinatorEndpoint, logger) => {
37
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
38
+ const endpoint = device.getEndpoint(1);
39
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
40
+ await reporting.onOff(endpoint);
41
+ },
42
+ },
43
+ {
44
+ zigbeeModel: ['45853'],
45
+ model: '45853GE',
46
+ vendor: 'GE',
47
+ description: 'Plug-in smart switch',
48
+ fromZigbee: [fz.on_off, fz.metering, fz.ignore_basic_report],
49
+ toZigbee: [tz.on_off, tz.ignore_transition],
50
+ configure: async (device, coordinatorEndpoint, logger) => {
51
+ const endpoint = device.getEndpoint(1);
52
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
53
+ await reporting.onOff(endpoint);
54
+ await reporting.readMeteringMultiplierDivisor(endpoint);
55
+ await reporting.instantaneousDemand(endpoint, {min: 10, change: 2});
56
+ },
57
+ exposes: [e.switch(), e.power(), e.energy()],
58
+ },
59
+ {
60
+ zigbeeModel: ['45856'],
61
+ model: '45856GE',
62
+ vendor: 'GE',
63
+ description: 'In-wall smart switch',
64
+ fromZigbee: [fz.on_off, fz.metering],
65
+ toZigbee: [tz.on_off],
66
+ exposes: [e.switch(), e.energy(), e.power()],
67
+ configure: async (device, coordinatorEndpoint, logger) => {
68
+ const endpoint = device.getEndpoint(1);
69
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
70
+ await reporting.onOff(endpoint);
71
+ await reporting.instantaneousDemand(endpoint);
72
+ await reporting.currentSummDelivered(endpoint);
73
+ endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 10000, multiplier: 1});
74
+ },
75
+ },
76
+ {
77
+ zigbeeModel: ['45857'],
78
+ model: '45857GE',
79
+ vendor: 'GE',
80
+ description: 'ZigBee in-wall smart dimmer',
81
+ extend: extend.light_onoff_brightness({noConfigure: true}),
82
+ configure: async (device, coordinatorEndpoint, logger) => {
83
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
84
+ const endpoint = device.getEndpoint(1);
85
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
86
+ await reporting.onOff(endpoint);
87
+ },
88
+ },
89
+ {
90
+ zigbeeModel: ['Smart Switch'],
91
+ model: 'PTAPT-WH02',
92
+ vendor: 'GE',
93
+ description: 'Quirky smart switch',
94
+ extend: extend.switch(),
95
+ endpoint: (device) => {
96
+ return {'default': 2};
97
+ },
98
+ configure: async (device, coordinatorEndpoint, logger) => {
99
+ const endpoint = device.getEndpoint(2);
100
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
101
+ await reporting.onOff(endpoint);
102
+ },
103
+ },
104
+ {
105
+ zigbeeModel: ['ZHA Smart Plug'],
106
+ model: 'POTLK-WH02',
107
+ vendor: 'GE',
108
+ description: 'Outlink smart remote outlet',
109
+ extend: extend.switch(),
110
+ },
111
+ ];
@@ -0,0 +1,48 @@
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: ['GWA1521_Actuator_1_CH_PF'],
11
+ model: 'GWA1521',
12
+ description: 'Switch actuator 1 channel with input',
13
+ vendor: 'Gewiss',
14
+ extend: extend.switch(),
15
+ configure: async (device, coordinatorEndpoint, logger) => {
16
+ const endpoint = device.getEndpoint(1);
17
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
18
+ await reporting.onOff(endpoint);
19
+ },
20
+ },
21
+ {
22
+ zigbeeModel: ['GWA1522_Actuator_2_CH'],
23
+ model: 'GWA1522',
24
+ description: 'Switch actuator 2 channels with input',
25
+ vendor: 'Gewiss',
26
+ extend: extend.switch(),
27
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2')],
28
+ meta: {multiEndpoint: true},
29
+ endpoint: (device) => {
30
+ return {'l1': 1, 'l2': 2};
31
+ },
32
+ },
33
+ {
34
+ zigbeeModel: ['GWA1531_Shutter'],
35
+ model: 'GWA1531',
36
+ description: 'Shutter actuator',
37
+ vendor: 'Gewiss',
38
+ fromZigbee: [fz.cover_position_tilt, fz.ignore_basic_report],
39
+ toZigbee: [tz.cover_state, tz.cover_position_tilt],
40
+ meta: {coverInverted: true},
41
+ configure: async (device, coordinatorEndpoint, logger) => {
42
+ const endpoint = device.getEndpoint(1);
43
+ await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']);
44
+ await reporting.currentPositionLiftPercentage(endpoint);
45
+ },
46
+ exposes: [e.cover_position()],
47
+ },
48
+ ];
@@ -0,0 +1,11 @@
1
+ const extend = require('../lib/extend');
2
+
3
+ module.exports = [
4
+ {
5
+ zigbeeModel: ['A11'],
6
+ model: 'ZC05M',
7
+ vendor: 'GIDEALED',
8
+ description: 'Smart Zigbee RGB LED strip controller',
9
+ extend: extend.light_onoff_brightness_colortemp_color({supportsHS: true, colorTempRange: [153, 370]}),
10
+ },
11
+ ];
@@ -0,0 +1,11 @@
1
+ const extend = require('../lib/extend');
2
+
3
+ module.exports = [
4
+ {
5
+ zigbeeModel: ['A10'],
6
+ model: 'GD-ZCRGB012',
7
+ vendor: 'GIDERWEL',
8
+ description: 'Smart Zigbee RGB LED strip controller',
9
+ extend: extend.light_onoff_brightness_color({supportsHS: false}),
10
+ },
11
+ ];
@@ -0,0 +1,222 @@
1
+ const exposes = require('../lib/exposes');
2
+ const tuya = require('../lib/tuya');
3
+
4
+ const {presets: ep, access: ea} = exposes;
5
+
6
+ const CAPACITY = 'capacity';
7
+ const DURATION = 'duration';
8
+ const MINUTES_IN_A_DAY = 1440;
9
+ const OFF = 'OFF';
10
+ const ON = 'ON';
11
+ const SAFETY_MIN_SECS = 10;
12
+ const SECONDS_IN_12_HOURS = 43200;
13
+
14
+ const toLocalTime = (time, timezone) => {
15
+ if (time === '--:--:--') {
16
+ return time;
17
+ }
18
+
19
+ const local = new Date(`2000-01-01T${time}.000${timezone}`); // Using 1970 instead produces edge cases
20
+ return local.toTimeString().split(' ').shift();
21
+ };
22
+
23
+ const keys = {
24
+ giexWaterValve: {
25
+ battery: 'battery',
26
+ currentTemperature: 'current_temperature',
27
+ cycleIrrigationInterval: 'cycle_irrigation_interval',
28
+ cycleIrrigationNumTimes: 'cycle_irrigation_num_times',
29
+ irrigationEndTime: 'irrigation_end_time',
30
+ irrigationStartTime: 'irrigation_start_time',
31
+ irrigationTarget: 'irrigation_target',
32
+ lastIrrigationDuration: 'last_irrigation_duration',
33
+ mode: 'mode',
34
+ state: 'state',
35
+ waterConsumed: 'water_consumed',
36
+ },
37
+ };
38
+
39
+ const dataPoints = {
40
+ giexWaterValve: {
41
+ battery: 108,
42
+ currentTemperature: 106,
43
+ cycleIrrigationInterval: 105,
44
+ cycleIrrigationNumTimes: 103,
45
+ irrigationEndTime: 102,
46
+ irrigationStartTime: 101,
47
+ irrigationTarget: 104,
48
+ lastIrrigationDuration: 114,
49
+ mode: 1,
50
+ state: 2,
51
+ waterConsumed: 111,
52
+ },
53
+ };
54
+
55
+ const fzModelConverters = {
56
+ QT06_1: {
57
+ // _TZE200_sh1btabb timezone is GMT+8
58
+ time: (value) => toLocalTime(value, '+08:00'),
59
+ },
60
+ };
61
+
62
+ const fzLocal = {
63
+ giexWaterValve: {
64
+ cluster: 'manuSpecificTuya',
65
+ type: ['commandDataResponse', 'commandDataReport'],
66
+ convert: (model, msg, publish, options, meta) => {
67
+ const modelConverters = fzModelConverters[model.model] || {};
68
+ for (const dpValue of msg.data.dpValues) {
69
+ const value = tuya.getDataValue(dpValue);
70
+ const {dp} = dpValue;
71
+ switch (dp) {
72
+ case dataPoints.giexWaterValve.state:
73
+ return {[keys.giexWaterValve.state]: value ? ON: OFF};
74
+ case dataPoints.giexWaterValve.mode:
75
+ return {[keys.giexWaterValve.mode]: value ? CAPACITY: DURATION};
76
+ case dataPoints.giexWaterValve.irrigationTarget:
77
+ return {[keys.giexWaterValve.irrigationTarget]: value};
78
+ case dataPoints.giexWaterValve.cycleIrrigationNumTimes:
79
+ return {[keys.giexWaterValve.cycleIrrigationNumTimes]: value};
80
+ case dataPoints.giexWaterValve.cycleIrrigationInterval:
81
+ return {[keys.giexWaterValve.cycleIrrigationInterval]: value};
82
+ case dataPoints.giexWaterValve.waterConsumed:
83
+ return {[keys.giexWaterValve.waterConsumed]: value};
84
+ case dataPoints.giexWaterValve.irrigationStartTime:
85
+ return {[keys.giexWaterValve.irrigationStartTime]: modelConverters.time?.(value) || value};
86
+ case dataPoints.giexWaterValve.irrigationEndTime:
87
+ return {[keys.giexWaterValve.irrigationEndTime]: modelConverters.time?.(value) || value};
88
+ case dataPoints.giexWaterValve.lastIrrigationDuration:
89
+ return {[keys.giexWaterValve.lastIrrigationDuration]: value.split(',').shift()}; // Remove meaningless ,0 suffix
90
+ case dataPoints.giexWaterValve.battery:
91
+ return {[keys.giexWaterValve.battery]: value};
92
+ case dataPoints.giexWaterValve.currentTemperature:
93
+ return; // Do Nothing - value ignored because it isn't a valid temperature reading (misdocumented and usage unclear)
94
+ default: // Unknown data point warning
95
+ meta.logger.warn(`fzLocal.giexWaterValve: Unrecognized DP #${dp} with VALUE = ${value}`);
96
+ }
97
+ }
98
+ },
99
+ },
100
+ };
101
+
102
+ const tzModelConverters = {
103
+ QT06_2: {
104
+ // _TZE200_a7sghmms irrigation time should not be less than 10 secs as per GiEX advice
105
+ irrigationTarget: (value, mode) => value > 0 && value < SAFETY_MIN_SECS && mode === DURATION ? SAFETY_MIN_SECS : value,
106
+ },
107
+ };
108
+
109
+ const tzLocal = {
110
+ giexWaterValve:
111
+ {
112
+ key: [
113
+ keys.giexWaterValve.mode,
114
+ keys.giexWaterValve.irrigationTarget,
115
+ keys.giexWaterValve.state,
116
+ keys.giexWaterValve.cycleIrrigationNumTimes,
117
+ keys.giexWaterValve.cycleIrrigationInterval,
118
+ ],
119
+ convertSet: async (entity, key, value, meta) => {
120
+ const modelConverters = tzModelConverters[meta.mapped?.model] || {};
121
+ switch (key) {
122
+ case keys.giexWaterValve.state:
123
+ await tuya.sendDataPointBool(entity, dataPoints.giexWaterValve.state, value === ON);
124
+ break;
125
+ case keys.giexWaterValve.mode:
126
+ await tuya.sendDataPointBool(entity, dataPoints.giexWaterValve.mode, value === CAPACITY);
127
+ return {state: {[keys.giexWaterValve.mode]: value}};
128
+ case keys.giexWaterValve.irrigationTarget: {
129
+ const mode = meta.state?.[keys.giexWaterValve.mode];
130
+ const sanitizedValue = modelConverters.irrigationTarget?.(value, mode) || value;
131
+ await tuya.sendDataPointValue(entity, dataPoints.giexWaterValve.irrigationTarget, sanitizedValue);
132
+ return {state: {[keys.giexWaterValve.irrigationTarget]: sanitizedValue}};
133
+ }
134
+ case keys.giexWaterValve.cycleIrrigationNumTimes:
135
+ await tuya.sendDataPointValue(entity, dataPoints.giexWaterValve.cycleIrrigationNumTimes, value);
136
+ return {state: {[keys.giexWaterValve.cycleIrrigationNumTimes]: value}};
137
+ case keys.giexWaterValve.cycleIrrigationInterval:
138
+ await tuya.sendDataPointValue(entity, dataPoints.giexWaterValve.cycleIrrigationInterval, value);
139
+ return {state: {[keys.giexWaterValve.cycleIrrigationInterval]: value}};
140
+ default: // Unknown key warning
141
+ meta.logger.warn(`tzLocal.giexWaterValve: Unhandled KEY ${key}`);
142
+ }
143
+ },
144
+ },
145
+ };
146
+
147
+ const exportTemplates = {
148
+ giexWaterValve: {
149
+ vendor: 'GiEX',
150
+ description: 'Water irrigation valve',
151
+ onEvent: tuya.onEventSetLocalTime,
152
+ fromZigbee: [fzLocal.giexWaterValve],
153
+ toZigbee: [tzLocal.giexWaterValve],
154
+ exposes: [
155
+ ep.battery(),
156
+ exposes.binary(keys.giexWaterValve.state, ea.STATE_SET, ON, OFF)
157
+ .withDescription('State'),
158
+ exposes.enum(keys.giexWaterValve.mode, ea.STATE_SET, [DURATION, CAPACITY])
159
+ .withDescription('Irrigation mode'),
160
+ exposes.numeric(keys.giexWaterValve.cycleIrrigationNumTimes, ea.STATE_SET)
161
+ .withValueMin(0)
162
+ .withValueMax(100)
163
+ .withDescription('Number of cycle irrigation times, set to 0 for single cycle'),
164
+ exposes.numeric(keys.giexWaterValve.irrigationStartTime, ea.STATE)
165
+ .withDescription('Last irrigation start time'),
166
+ exposes.numeric(keys.giexWaterValve.irrigationEndTime, ea.STATE)
167
+ .withDescription('Last irrigation end time'),
168
+ exposes.numeric(keys.giexWaterValve.lastIrrigationDuration, ea.STATE)
169
+ .withDescription('Last irrigation duration'),
170
+ exposes.numeric(keys.giexWaterValve.waterConsumed, ea.STATE)
171
+ .withUnit('L')
172
+ .withDescription('Last irrigation water consumption'),
173
+ ],
174
+ },
175
+ };
176
+
177
+ module.exports = [
178
+ // _TZE200_sh1btabb uses minutes, timezone is GMT+8
179
+ {
180
+ ...exportTemplates.giexWaterValve,
181
+ model: 'QT06_1',
182
+ fingerprint: [
183
+ {modelID: 'TS0601', manufacturerName: '_TZE200_sh1btabb'},
184
+ ],
185
+ exposes: [
186
+ ...exportTemplates.giexWaterValve.exposes,
187
+ exposes.numeric(keys.giexWaterValve.irrigationTarget, ea.STATE_SET)
188
+ .withValueMin(0)
189
+ .withValueMax(MINUTES_IN_A_DAY)
190
+ .withUnit('minutes or litres')
191
+ .withDescription('Irrigation target, duration in minutes or capacity in litres (depending on mode)'),
192
+ exposes.numeric(keys.giexWaterValve.cycleIrrigationInterval, ea.STATE_SET)
193
+ .withValueMin(0)
194
+ .withValueMax(MINUTES_IN_A_DAY)
195
+ .withUnit('min')
196
+ .withDescription('Cycle irrigation interval'),
197
+ ],
198
+ },
199
+ // _TZE200_a7sghmms uses seconds, timezone is local
200
+ {
201
+ ...exportTemplates.giexWaterValve,
202
+ model: 'QT06_2',
203
+ fingerprint: [
204
+ {modelID: 'TS0601', manufacturerName: '_TZE200_a7sghmms'},
205
+ ],
206
+ exposes: [
207
+ ...exportTemplates.giexWaterValve.exposes,
208
+ exposes.numeric(keys.giexWaterValve.irrigationTarget, ea.STATE_SET)
209
+ .withValueMin(0)
210
+ .withValueMax(SECONDS_IN_12_HOURS)
211
+ .withUnit('seconds or litres')
212
+ .withDescription('Irrigation target, duration in seconds or capacity in litres (depending on mode), ' +
213
+ 'set to 0 to leave the valve on indefinitely, ' +
214
+ 'for safety reasons the target will be forced to a minimum of 10 seconds in duration mode'),
215
+ exposes.numeric(keys.giexWaterValve.cycleIrrigationInterval, ea.STATE_SET)
216
+ .withValueMin(0)
217
+ .withValueMax(SECONDS_IN_12_HOURS)
218
+ .withUnit('sec')
219
+ .withDescription('Cycle irrigation interval'),
220
+ ],
221
+ },
222
+ ];
@@ -0,0 +1,19 @@
1
+ const tuya = require('../lib/tuya');
2
+ const reporting = require('../lib/reporting');
3
+
4
+ module.exports = [
5
+ {
6
+ fingerprint: [
7
+ {modelID: 'TS0001', manufacturerName: '_TZ3000_majwnphg'},
8
+ {modelID: 'TS0001', manufacturerName: '_TZ3000_6axxqqi2'},
9
+ {modelID: 'TS0001', manufacturerName: '_TZ3000_zw7yf6yk'},
10
+ ],
11
+ model: 'JR-ZDS01',
12
+ vendor: 'Girier',
13
+ description: '1 gang mini switch',
14
+ extend: tuya.extend.switch({switchType: true}),
15
+ configure: async (device, coordinatorEndpoint, logger) => {
16
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
17
+ },
18
+ },
19
+ ];