@willieee802/zigbee-herdsman-converters 19.44.4 → 19.45.0

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 (591) hide show
  1. package/CHANGELOG.md +1101 -0
  2. package/dist/converters/actions.d.ts.map +1 -1
  3. package/dist/converters/actions.js +2 -0
  4. package/dist/converters/actions.js.map +1 -1
  5. package/dist/converters/fromZigbee.d.ts +1 -150
  6. package/dist/converters/fromZigbee.d.ts.map +1 -1
  7. package/dist/converters/fromZigbee.js +183 -3044
  8. package/dist/converters/fromZigbee.js.map +1 -1
  9. package/dist/converters/toZigbee.d.ts +0 -121
  10. package/dist/converters/toZigbee.d.ts.map +1 -1
  11. package/dist/converters/toZigbee.js +289 -2386
  12. package/dist/converters/toZigbee.js.map +1 -1
  13. package/dist/devices/ITCommander.d.ts.map +1 -1
  14. package/dist/devices/ITCommander.js +2 -1
  15. package/dist/devices/ITCommander.js.map +1 -1
  16. package/dist/devices/acova.d.ts.map +1 -1
  17. package/dist/devices/acova.js +69 -2
  18. package/dist/devices/acova.js.map +1 -1
  19. package/dist/devices/adeo.d.ts.map +1 -1
  20. package/dist/devices/adeo.js +35 -3
  21. package/dist/devices/adeo.js.map +1 -1
  22. package/dist/devices/adurosmart.js +1 -1
  23. package/dist/devices/adurosmart.js.map +1 -1
  24. package/dist/devices/amina.d.ts.map +1 -1
  25. package/dist/devices/amina.js +47 -10
  26. package/dist/devices/amina.js.map +1 -1
  27. package/dist/devices/aurora_lighting.d.ts.map +1 -1
  28. package/dist/devices/aurora_lighting.js +15 -0
  29. package/dist/devices/aurora_lighting.js.map +1 -1
  30. package/dist/devices/automaton.d.ts.map +1 -1
  31. package/dist/devices/automaton.js +1 -0
  32. package/dist/devices/automaton.js.map +1 -1
  33. package/dist/devices/avatto.d.ts.map +1 -1
  34. package/dist/devices/avatto.js +29 -24
  35. package/dist/devices/avatto.js.map +1 -1
  36. package/dist/devices/awox.d.ts.map +1 -1
  37. package/dist/devices/awox.js +41 -3
  38. package/dist/devices/awox.js.map +1 -1
  39. package/dist/devices/bacchus.d.ts.map +1 -1
  40. package/dist/devices/bacchus.js +75 -0
  41. package/dist/devices/bacchus.js.map +1 -1
  42. package/dist/devices/bitron.d.ts.map +1 -1
  43. package/dist/devices/bitron.js +29 -2
  44. package/dist/devices/bitron.js.map +1 -1
  45. package/dist/devices/bosch.d.ts.map +1 -1
  46. package/dist/devices/bosch.js +70 -50
  47. package/dist/devices/bosch.js.map +1 -1
  48. package/dist/devices/bticino.d.ts.map +1 -1
  49. package/dist/devices/bticino.js +11 -1
  50. package/dist/devices/bticino.js.map +1 -1
  51. package/dist/devices/byun.d.ts.map +1 -1
  52. package/dist/devices/byun.js +40 -3
  53. package/dist/devices/byun.js.map +1 -1
  54. package/dist/devices/candeo.d.ts.map +1 -1
  55. package/dist/devices/candeo.js +262 -9
  56. package/dist/devices/candeo.js.map +1 -1
  57. package/dist/devices/centralite.d.ts +9 -0
  58. package/dist/devices/centralite.d.ts.map +1 -1
  59. package/dist/devices/centralite.js +44 -5
  60. package/dist/devices/centralite.js.map +1 -1
  61. package/dist/devices/{aubess.d.ts → cigol.d.ts} +1 -1
  62. package/dist/devices/cigol.d.ts.map +1 -0
  63. package/dist/devices/cigol.js +260 -0
  64. package/dist/devices/cigol.js.map +1 -0
  65. package/dist/devices/cleverio.js +2 -2
  66. package/dist/devices/cleverio.js.map +1 -1
  67. package/dist/devices/climax.d.ts.map +1 -1
  68. package/dist/devices/climax.js +15 -1
  69. package/dist/devices/climax.js.map +1 -1
  70. package/dist/devices/ctm.d.ts.map +1 -1
  71. package/dist/devices/ctm.js +845 -496
  72. package/dist/devices/ctm.js.map +1 -1
  73. package/dist/devices/custom_devices_diy.d.ts +183 -1
  74. package/dist/devices/custom_devices_diy.d.ts.map +1 -1
  75. package/dist/devices/custom_devices_diy.js +390 -33
  76. package/dist/devices/custom_devices_diy.js.map +1 -1
  77. package/dist/devices/daewoo.d.ts +3 -0
  78. package/dist/devices/daewoo.d.ts.map +1 -0
  79. package/dist/devices/daewoo.js +198 -0
  80. package/dist/devices/daewoo.js.map +1 -0
  81. package/dist/devices/danfoss.d.ts.map +1 -1
  82. package/dist/devices/danfoss.js +1270 -296
  83. package/dist/devices/danfoss.js.map +1 -1
  84. package/dist/devices/databyte.d.ts.map +1 -1
  85. package/dist/devices/databyte.js +47 -3
  86. package/dist/devices/databyte.js.map +1 -1
  87. package/dist/devices/datek.d.ts.map +1 -1
  88. package/dist/devices/datek.js +202 -41
  89. package/dist/devices/datek.js.map +1 -1
  90. package/dist/devices/dawon_dns.d.ts.map +1 -1
  91. package/dist/devices/dawon_dns.js +14 -1
  92. package/dist/devices/dawon_dns.js.map +1 -1
  93. package/dist/devices/develco.d.ts.map +1 -1
  94. package/dist/devices/develco.js +145 -64
  95. package/dist/devices/develco.js.map +1 -1
  96. package/dist/devices/diyruz.d.ts.map +1 -1
  97. package/dist/devices/diyruz.js +444 -20
  98. package/dist/devices/diyruz.js.map +1 -1
  99. package/dist/devices/domraem.d.ts.map +1 -1
  100. package/dist/devices/domraem.js +7 -0
  101. package/dist/devices/domraem.js.map +1 -1
  102. package/dist/devices/easyaccess.d.ts.map +1 -1
  103. package/dist/devices/easyaccess.js +22 -2
  104. package/dist/devices/easyaccess.js.map +1 -1
  105. package/dist/devices/easyiot.d.ts.map +1 -1
  106. package/dist/devices/easyiot.js +767 -5
  107. package/dist/devices/easyiot.js.map +1 -1
  108. package/dist/devices/echostar.d.ts.map +1 -1
  109. package/dist/devices/echostar.js +25 -1
  110. package/dist/devices/echostar.js.map +1 -1
  111. package/dist/devices/ecodim.d.ts.map +1 -1
  112. package/dist/devices/ecodim.js +8 -0
  113. package/dist/devices/ecodim.js.map +1 -1
  114. package/dist/devices/ecolink.d.ts.map +1 -1
  115. package/dist/devices/ecolink.js +12 -0
  116. package/dist/devices/ecolink.js.map +1 -1
  117. package/dist/devices/efekta.d.ts.map +1 -1
  118. package/dist/devices/efekta.js +1615 -60
  119. package/dist/devices/efekta.js.map +1 -1
  120. package/dist/devices/eglo.d.ts.map +1 -1
  121. package/dist/devices/eglo.js +203 -17
  122. package/dist/devices/eglo.js.map +1 -1
  123. package/dist/devices/elko.d.ts.map +1 -1
  124. package/dist/devices/elko.js +20 -22
  125. package/dist/devices/elko.js.map +1 -1
  126. package/dist/devices/engo.d.ts.map +1 -1
  127. package/dist/devices/engo.js +201 -0
  128. package/dist/devices/engo.js.map +1 -1
  129. package/dist/devices/enocean.d.ts.map +1 -1
  130. package/dist/devices/enocean.js +132 -4
  131. package/dist/devices/enocean.js.map +1 -1
  132. package/dist/devices/ensystec.d.ts +3 -0
  133. package/dist/devices/ensystec.d.ts.map +1 -0
  134. package/dist/devices/ensystec.js +1200 -0
  135. package/dist/devices/ensystec.js.map +1 -0
  136. package/dist/devices/eurotronic.d.ts +78 -1
  137. package/dist/devices/eurotronic.d.ts.map +1 -1
  138. package/dist/devices/eurotronic.js +244 -40
  139. package/dist/devices/eurotronic.js.map +1 -1
  140. package/dist/devices/ewelink.d.ts.map +1 -1
  141. package/dist/devices/ewelink.js +154 -2
  142. package/dist/devices/ewelink.js.map +1 -1
  143. package/dist/devices/fantem.js +1 -1
  144. package/dist/devices/fantem.js.map +1 -1
  145. package/dist/devices/fireangel.d.ts.map +1 -1
  146. package/dist/devices/fireangel.js +12 -1
  147. package/dist/devices/fireangel.js.map +1 -1
  148. package/dist/devices/frankever.d.ts.map +1 -1
  149. package/dist/devices/frankever.js +96 -0
  150. package/dist/devices/frankever.js.map +1 -1
  151. package/dist/devices/frient.d.ts.map +1 -1
  152. package/dist/devices/frient.js +15 -0
  153. package/dist/devices/frient.js.map +1 -1
  154. package/dist/devices/girier.js +1 -1
  155. package/dist/devices/girier.js.map +1 -1
  156. package/dist/devices/gledopto.js +1 -1
  157. package/dist/devices/gledopto.js.map +1 -1
  158. package/dist/devices/gmmts.d.ts.map +1 -1
  159. package/dist/devices/gmmts.js +59 -55
  160. package/dist/devices/gmmts.js.map +1 -1
  161. package/dist/devices/halo_smart_labs.d.ts +3 -0
  162. package/dist/devices/halo_smart_labs.d.ts.map +1 -0
  163. package/dist/devices/halo_smart_labs.js +918 -0
  164. package/dist/devices/halo_smart_labs.js.map +1 -0
  165. package/dist/devices/handshake_finland.d.ts +3 -0
  166. package/dist/devices/handshake_finland.d.ts.map +1 -0
  167. package/dist/devices/handshake_finland.js +15 -0
  168. package/dist/devices/handshake_finland.js.map +1 -0
  169. package/dist/devices/heiman.d.ts.map +1 -1
  170. package/dist/devices/heiman.js +1361 -147
  171. package/dist/devices/heiman.js.map +1 -1
  172. package/dist/devices/heimgard_technologies.d.ts.map +1 -1
  173. package/dist/devices/heimgard_technologies.js +13 -0
  174. package/dist/devices/heimgard_technologies.js.map +1 -1
  175. package/dist/devices/hive.d.ts.map +1 -1
  176. package/dist/devices/hive.js +11 -0
  177. package/dist/devices/hive.js.map +1 -1
  178. package/dist/devices/ikea.d.ts.map +1 -1
  179. package/dist/devices/ikea.js +185 -135
  180. package/dist/devices/ikea.js.map +1 -1
  181. package/dist/devices/iluminize.d.ts.map +1 -1
  182. package/dist/devices/iluminize.js +8 -7
  183. package/dist/devices/iluminize.js.map +1 -1
  184. package/dist/devices/immax.d.ts.map +1 -1
  185. package/dist/devices/immax.js +3 -1
  186. package/dist/devices/immax.js.map +1 -1
  187. package/dist/devices/index.d.ts.map +1 -1
  188. package/dist/devices/index.js +20 -2
  189. package/dist/devices/index.js.map +1 -1
  190. package/dist/devices/innr.d.ts.map +1 -1
  191. package/dist/devices/innr.js +34 -2
  192. package/dist/devices/innr.js.map +1 -1
  193. package/dist/devices/inovelli.d.ts.map +1 -1
  194. package/dist/devices/inovelli.js +41 -2348
  195. package/dist/devices/inovelli.js.map +1 -1
  196. package/dist/devices/iris.d.ts.map +1 -1
  197. package/dist/devices/iris.js +13 -1
  198. package/dist/devices/iris.js.map +1 -1
  199. package/dist/devices/javis.d.ts.map +1 -1
  200. package/dist/devices/javis.js +39 -1
  201. package/dist/devices/javis.js.map +1 -1
  202. package/dist/devices/jxuan.d.ts.map +1 -1
  203. package/dist/devices/jxuan.js +37 -2
  204. package/dist/devices/jxuan.js.map +1 -1
  205. package/dist/devices/kami.d.ts.map +1 -1
  206. package/dist/devices/kami.js +21 -2
  207. package/dist/devices/kami.js.map +1 -1
  208. package/dist/devices/keen_home.d.ts.map +1 -1
  209. package/dist/devices/keen_home.js +13 -3
  210. package/dist/devices/keen_home.js.map +1 -1
  211. package/dist/devices/klikaanklikuit.d.ts.map +1 -1
  212. package/dist/devices/klikaanklikuit.js +7 -0
  213. package/dist/devices/klikaanklikuit.js.map +1 -1
  214. package/dist/devices/kmpcil.d.ts.map +1 -1
  215. package/dist/devices/kmpcil.js +44 -5
  216. package/dist/devices/kmpcil.js.map +1 -1
  217. package/dist/devices/konke.d.ts.map +1 -1
  218. package/dist/devices/konke.js +10 -1
  219. package/dist/devices/konke.js.map +1 -1
  220. package/dist/devices/lds.d.ts.map +1 -1
  221. package/dist/devices/lds.js +7 -0
  222. package/dist/devices/lds.js.map +1 -1
  223. package/dist/devices/led_trading.d.ts.map +1 -1
  224. package/dist/devices/led_trading.js +13 -13
  225. package/dist/devices/led_trading.js.map +1 -1
  226. package/dist/devices/leedarson.d.ts.map +1 -1
  227. package/dist/devices/leedarson.js +140 -1
  228. package/dist/devices/leedarson.js.map +1 -1
  229. package/dist/devices/legrand.d.ts.map +1 -1
  230. package/dist/devices/legrand.js +73 -42
  231. package/dist/devices/legrand.js.map +1 -1
  232. package/dist/devices/lellki.d.ts.map +1 -1
  233. package/dist/devices/lellki.js +3 -1
  234. package/dist/devices/lellki.js.map +1 -1
  235. package/dist/devices/letv.d.ts.map +1 -1
  236. package/dist/devices/letv.js +16 -2
  237. package/dist/devices/letv.js.map +1 -1
  238. package/dist/devices/lidl.d.ts.map +1 -1
  239. package/dist/devices/lidl.js +26 -6
  240. package/dist/devices/lidl.js.map +1 -1
  241. package/dist/devices/lincukoo.d.ts.map +1 -1
  242. package/dist/devices/lincukoo.js +92 -31
  243. package/dist/devices/lincukoo.js.map +1 -1
  244. package/dist/devices/linkind.d.ts.map +1 -1
  245. package/dist/devices/linkind.js +14 -1
  246. package/dist/devices/linkind.js.map +1 -1
  247. package/dist/devices/linptech.d.ts.map +1 -1
  248. package/dist/devices/linptech.js +3 -1
  249. package/dist/devices/linptech.js.map +1 -1
  250. package/dist/devices/livingwise.d.ts.map +1 -1
  251. package/dist/devices/livingwise.js +2 -1
  252. package/dist/devices/livingwise.js.map +1 -1
  253. package/dist/devices/livolo.d.ts.map +1 -1
  254. package/dist/devices/livolo.js +612 -20
  255. package/dist/devices/livolo.js.map +1 -1
  256. package/dist/devices/lixee.d.ts.map +1 -1
  257. package/dist/devices/lixee.js +46 -44
  258. package/dist/devices/lixee.js.map +1 -1
  259. package/dist/devices/lonsonho.d.ts.map +1 -1
  260. package/dist/devices/lonsonho.js +18 -11
  261. package/dist/devices/lonsonho.js.map +1 -1
  262. package/dist/devices/lumi.d.ts.map +1 -1
  263. package/dist/devices/lumi.js +877 -155
  264. package/dist/devices/lumi.js.map +1 -1
  265. package/dist/devices/lytko.d.ts.map +1 -1
  266. package/dist/devices/lytko.js +205 -556
  267. package/dist/devices/lytko.js.map +1 -1
  268. package/dist/devices/makegood.d.ts.map +1 -1
  269. package/dist/devices/makegood.js +5 -1
  270. package/dist/devices/makegood.js.map +1 -1
  271. package/dist/devices/mazda.js +7 -7
  272. package/dist/devices/mazda.js.map +1 -1
  273. package/dist/devices/meazon.d.ts.map +1 -1
  274. package/dist/devices/meazon.js +82 -20
  275. package/dist/devices/meazon.js.map +1 -1
  276. package/dist/devices/megaman.d.ts +4 -0
  277. package/dist/devices/megaman.d.ts.map +1 -0
  278. package/dist/devices/megaman.js +48 -0
  279. package/dist/devices/megaman.js.map +1 -0
  280. package/dist/devices/mercator.d.ts.map +1 -1
  281. package/dist/devices/mercator.js +20 -5
  282. package/dist/devices/mercator.js.map +1 -1
  283. package/dist/devices/miboxer.d.ts.map +1 -1
  284. package/dist/devices/miboxer.js +3 -1
  285. package/dist/devices/miboxer.js.map +1 -1
  286. package/dist/devices/mill.d.ts.map +1 -1
  287. package/dist/devices/mill.js +33 -7
  288. package/dist/devices/mill.js.map +1 -1
  289. package/dist/devices/moes.d.ts.map +1 -1
  290. package/dist/devices/moes.js +89 -15
  291. package/dist/devices/moes.js.map +1 -1
  292. package/dist/devices/msh.d.ts +3 -0
  293. package/dist/devices/msh.d.ts.map +1 -0
  294. package/dist/devices/msh.js +93 -0
  295. package/dist/devices/msh.js.map +1 -0
  296. package/dist/devices/muller_licht.d.ts.map +1 -1
  297. package/dist/devices/muller_licht.js +11 -0
  298. package/dist/devices/muller_licht.js.map +1 -1
  299. package/dist/devices/multir.d.ts.map +1 -1
  300. package/dist/devices/multir.js +12 -1
  301. package/dist/devices/multir.js.map +1 -1
  302. package/dist/devices/multiterm.js +2 -2
  303. package/dist/devices/multiterm.js.map +1 -1
  304. package/dist/devices/namron.d.ts.map +1 -1
  305. package/dist/devices/namron.js +488 -128
  306. package/dist/devices/namron.js.map +1 -1
  307. package/dist/devices/neo.d.ts.map +1 -1
  308. package/dist/devices/neo.js +151 -192
  309. package/dist/devices/neo.js.map +1 -1
  310. package/dist/devices/netica.d.ts +3 -0
  311. package/dist/devices/netica.d.ts.map +1 -0
  312. package/dist/devices/netica.js +153 -0
  313. package/dist/devices/netica.js.map +1 -0
  314. package/dist/devices/niko.d.ts.map +1 -1
  315. package/dist/devices/niko.js +10 -8
  316. package/dist/devices/niko.js.map +1 -1
  317. package/dist/devices/nodon.d.ts.map +1 -1
  318. package/dist/devices/nodon.js +6 -4
  319. package/dist/devices/nodon.js.map +1 -1
  320. package/dist/devices/nous.d.ts.map +1 -1
  321. package/dist/devices/nous.js +160 -61
  322. package/dist/devices/nous.js.map +1 -1
  323. package/dist/devices/nue_3a.d.ts.map +1 -1
  324. package/dist/devices/nue_3a.js +2 -0
  325. package/dist/devices/nue_3a.js.map +1 -1
  326. package/dist/devices/onesti.d.ts +11 -1
  327. package/dist/devices/onesti.d.ts.map +1 -1
  328. package/dist/devices/onesti.js +30 -6
  329. package/dist/devices/onesti.js.map +1 -1
  330. package/dist/devices/onokom.d.ts.map +1 -1
  331. package/dist/devices/onokom.js +1152 -2309
  332. package/dist/devices/onokom.js.map +1 -1
  333. package/dist/devices/orvibo.d.ts +17 -1
  334. package/dist/devices/orvibo.d.ts.map +1 -1
  335. package/dist/devices/orvibo.js +71 -4
  336. package/dist/devices/orvibo.js.map +1 -1
  337. package/dist/devices/owon.d.ts.map +1 -1
  338. package/dist/devices/owon.js +382 -62
  339. package/dist/devices/owon.js.map +1 -1
  340. package/dist/devices/paul_neuhaus.d.ts.map +1 -1
  341. package/dist/devices/paul_neuhaus.js +9 -0
  342. package/dist/devices/paul_neuhaus.js.map +1 -1
  343. package/dist/devices/paulmann.js +2 -2
  344. package/dist/devices/paulmann.js.map +1 -1
  345. package/dist/devices/perenio.d.ts.map +1 -1
  346. package/dist/devices/perenio.js +57 -39
  347. package/dist/devices/perenio.js.map +1 -1
  348. package/dist/devices/philips.d.ts.map +1 -1
  349. package/dist/devices/philips.js +194 -53
  350. package/dist/devices/philips.js.map +1 -1
  351. package/dist/devices/plaid.d.ts.map +1 -1
  352. package/dist/devices/plaid.js +18 -1
  353. package/dist/devices/plaid.js.map +1 -1
  354. package/dist/devices/plugwise.d.ts.map +1 -1
  355. package/dist/devices/plugwise.js +307 -26
  356. package/dist/devices/plugwise.js.map +1 -1
  357. package/dist/devices/profalux.d.ts.map +1 -1
  358. package/dist/devices/profalux.js +25 -1
  359. package/dist/devices/profalux.js.map +1 -1
  360. package/dist/devices/pushok.d.ts.map +1 -1
  361. package/dist/devices/pushok.js +44 -0
  362. package/dist/devices/pushok.js.map +1 -1
  363. package/dist/devices/qa.d.ts.map +1 -1
  364. package/dist/devices/qa.js +80 -32
  365. package/dist/devices/qa.js.map +1 -1
  366. package/dist/devices/repenic_ltd.d.ts +3 -0
  367. package/dist/devices/repenic_ltd.d.ts.map +1 -0
  368. package/dist/devices/repenic_ltd.js +97 -0
  369. package/dist/devices/repenic_ltd.js.map +1 -0
  370. package/dist/devices/robb.d.ts.map +1 -1
  371. package/dist/devices/robb.js +13 -1
  372. package/dist/devices/robb.js.map +1 -1
  373. package/dist/devices/rtx.js +1 -1
  374. package/dist/devices/rtx.js.map +1 -1
  375. package/dist/devices/salus_controls.d.ts.map +1 -1
  376. package/dist/devices/salus_controls.js +44 -17
  377. package/dist/devices/salus_controls.js.map +1 -1
  378. package/dist/devices/samotech.js +2 -2
  379. package/dist/devices/samotech.js.map +1 -1
  380. package/dist/devices/sber.d.ts.map +1 -1
  381. package/dist/devices/sber.js +435 -26
  382. package/dist/devices/sber.js.map +1 -1
  383. package/dist/devices/schneider_electric.d.ts.map +1 -1
  384. package/dist/devices/schneider_electric.js +808 -252
  385. package/dist/devices/schneider_electric.js.map +1 -1
  386. package/dist/devices/securifi.d.ts.map +1 -1
  387. package/dist/devices/securifi.js +24 -1
  388. package/dist/devices/securifi.js.map +1 -1
  389. package/dist/devices/sengled.d.ts.map +1 -1
  390. package/dist/devices/sengled.js +5 -4
  391. package/dist/devices/sengled.js.map +1 -1
  392. package/dist/devices/shada.d.ts +3 -0
  393. package/dist/devices/shada.d.ts.map +1 -0
  394. package/dist/devices/{aubess.js → shada.js} +7 -20
  395. package/dist/devices/shada.js.map +1 -0
  396. package/dist/devices/shelly.d.ts.map +1 -1
  397. package/dist/devices/shelly.js +646 -61
  398. package/dist/devices/shelly.js.map +1 -1
  399. package/dist/devices/shinasystem.d.ts.map +1 -1
  400. package/dist/devices/shinasystem.js +75 -16
  401. package/dist/devices/shinasystem.js.map +1 -1
  402. package/dist/devices/siglis.d.ts.map +1 -1
  403. package/dist/devices/siglis.js +26 -0
  404. package/dist/devices/siglis.js.map +1 -1
  405. package/dist/devices/sinope.d.ts.map +1 -1
  406. package/dist/devices/sinope.js +163 -83
  407. package/dist/devices/sinope.js.map +1 -1
  408. package/dist/devices/slacky_diy.d.ts.map +1 -1
  409. package/dist/devices/slacky_diy.js +3007 -69
  410. package/dist/devices/slacky_diy.js.map +1 -1
  411. package/dist/devices/smarli.d.ts.map +1 -1
  412. package/dist/devices/smarli.js +4 -5
  413. package/dist/devices/smarli.js.map +1 -1
  414. package/dist/devices/smartthings.d.ts +25 -0
  415. package/dist/devices/smartthings.d.ts.map +1 -1
  416. package/dist/devices/smartthings.js +62 -11
  417. package/dist/devices/smartthings.js.map +1 -1
  418. package/dist/devices/somfy.d.ts.map +1 -1
  419. package/dist/devices/somfy.js +14 -1
  420. package/dist/devices/somfy.js.map +1 -1
  421. package/dist/devices/sonoff.d.ts +42 -1
  422. package/dist/devices/sonoff.d.ts.map +1 -1
  423. package/dist/devices/sonoff.js +5161 -2007
  424. package/dist/devices/sonoff.js.map +1 -1
  425. package/dist/devices/sprut.d.ts.map +1 -1
  426. package/dist/devices/sprut.js +5 -4
  427. package/dist/devices/sprut.js.map +1 -1
  428. package/dist/devices/stello.d.ts.map +1 -1
  429. package/dist/devices/stello.js +6 -24
  430. package/dist/devices/stello.js.map +1 -1
  431. package/dist/devices/stelpro.d.ts +51 -1
  432. package/dist/devices/stelpro.d.ts.map +1 -1
  433. package/dist/devices/stelpro.js +86 -23
  434. package/dist/devices/stelpro.js.map +1 -1
  435. package/dist/devices/sunricher.d.ts.map +1 -1
  436. package/dist/devices/sunricher.js +215 -29
  437. package/dist/devices/sunricher.js.map +1 -1
  438. package/dist/devices/tech.d.ts.map +1 -1
  439. package/dist/devices/tech.js +35 -35
  440. package/dist/devices/tech.js.map +1 -1
  441. package/dist/devices/terncy.d.ts.map +1 -1
  442. package/dist/devices/terncy.js +398 -2
  443. package/dist/devices/terncy.js.map +1 -1
  444. package/dist/devices/third_reality.d.ts +42 -1
  445. package/dist/devices/third_reality.d.ts.map +1 -1
  446. package/dist/devices/third_reality.js +521 -110
  447. package/dist/devices/third_reality.js.map +1 -1
  448. package/dist/devices/tuya.d.ts.map +1 -1
  449. package/dist/devices/tuya.js +3139 -814
  450. package/dist/devices/tuya.js.map +1 -1
  451. package/dist/devices/ubisys.d.ts.map +1 -1
  452. package/dist/devices/ubisys.js +11 -8
  453. package/dist/devices/ubisys.js.map +1 -1
  454. package/dist/devices/vesternet.d.ts.map +1 -1
  455. package/dist/devices/vesternet.js +7 -0
  456. package/dist/devices/vesternet.js.map +1 -1
  457. package/dist/devices/viessmann.d.ts.map +1 -1
  458. package/dist/devices/viessmann.js +107 -4
  459. package/dist/devices/viessmann.js.map +1 -1
  460. package/dist/devices/vsmart.d.ts.map +1 -1
  461. package/dist/devices/vsmart.js +11 -0
  462. package/dist/devices/vsmart.js.map +1 -1
  463. package/dist/devices/weiser.d.ts.map +1 -1
  464. package/dist/devices/weiser.js +6 -0
  465. package/dist/devices/weiser.js.map +1 -1
  466. package/dist/devices/wirenboard.d.ts.map +1 -1
  467. package/dist/devices/wirenboard.js +124 -21
  468. package/dist/devices/wirenboard.js.map +1 -1
  469. package/dist/devices/wmun.d.ts.map +1 -1
  470. package/dist/devices/wmun.js +3 -2
  471. package/dist/devices/wmun.js.map +1 -1
  472. package/dist/devices/woolley.d.ts.map +1 -1
  473. package/dist/devices/woolley.js +6 -9
  474. package/dist/devices/woolley.js.map +1 -1
  475. package/dist/devices/woox.js +2 -2
  476. package/dist/devices/woox.js.map +1 -1
  477. package/dist/devices/xyzroe.d.ts.map +1 -1
  478. package/dist/devices/xyzroe.js +16 -4
  479. package/dist/devices/xyzroe.js.map +1 -1
  480. package/dist/devices/yale.d.ts.map +1 -1
  481. package/dist/devices/yale.js +138 -40
  482. package/dist/devices/yale.js.map +1 -1
  483. package/dist/devices/yandex.d.ts.map +1 -1
  484. package/dist/devices/yandex.js +93 -11
  485. package/dist/devices/yandex.js.map +1 -1
  486. package/dist/devices/yokis.d.ts.map +1 -1
  487. package/dist/devices/yokis.js +122 -85
  488. package/dist/devices/yokis.js.map +1 -1
  489. package/dist/devices/zbeacon.d.ts.map +1 -1
  490. package/dist/devices/zbeacon.js +0 -7
  491. package/dist/devices/zbeacon.js.map +1 -1
  492. package/dist/devices/zemismart.d.ts.map +1 -1
  493. package/dist/devices/zemismart.js +148 -11
  494. package/dist/devices/zemismart.js.map +1 -1
  495. package/dist/devices/zigbeetlc.js +1 -1
  496. package/dist/devices/zigbeetlc.js.map +1 -1
  497. package/dist/index.d.ts +1 -1
  498. package/dist/index.d.ts.map +1 -1
  499. package/dist/index.js +40 -35
  500. package/dist/index.js.map +1 -1
  501. package/dist/lib/bosch.d.ts.map +1 -1
  502. package/dist/lib/bosch.js +212 -42
  503. package/dist/lib/bosch.js.map +1 -1
  504. package/dist/lib/constants.d.ts +99 -17
  505. package/dist/lib/constants.d.ts.map +1 -1
  506. package/dist/lib/constants.js +15 -2
  507. package/dist/lib/constants.js.map +1 -1
  508. package/dist/lib/develco.d.ts +11 -0
  509. package/dist/lib/develco.d.ts.map +1 -1
  510. package/dist/lib/develco.js +78 -9
  511. package/dist/lib/develco.js.map +1 -1
  512. package/dist/lib/exposes.d.ts +11 -10
  513. package/dist/lib/exposes.d.ts.map +1 -1
  514. package/dist/lib/exposes.js +7 -48
  515. package/dist/lib/exposes.js.map +1 -1
  516. package/dist/lib/heiman.d.ts.map +1 -1
  517. package/dist/lib/heiman.js +34 -14
  518. package/dist/lib/heiman.js.map +1 -1
  519. package/dist/lib/ikea.d.ts +17 -0
  520. package/dist/lib/ikea.d.ts.map +1 -1
  521. package/dist/lib/ikea.js +46 -20
  522. package/dist/lib/ikea.js.map +1 -1
  523. package/dist/lib/inovelli.d.ts +86 -0
  524. package/dist/lib/inovelli.d.ts.map +1 -0
  525. package/dist/lib/inovelli.js +2580 -0
  526. package/dist/lib/inovelli.js.map +1 -0
  527. package/dist/lib/ledvance.d.ts +4 -4
  528. package/dist/lib/ledvance.d.ts.map +1 -1
  529. package/dist/lib/ledvance.js +23 -7
  530. package/dist/lib/ledvance.js.map +1 -1
  531. package/dist/lib/legacy.d.ts +21 -2
  532. package/dist/lib/legacy.d.ts.map +1 -1
  533. package/dist/lib/legacy.js +29 -2
  534. package/dist/lib/legacy.js.map +1 -1
  535. package/dist/lib/legrand.d.ts +65 -6
  536. package/dist/lib/legrand.d.ts.map +1 -1
  537. package/dist/lib/legrand.js +188 -9
  538. package/dist/lib/legrand.js.map +1 -1
  539. package/dist/lib/light.d.ts +1 -1
  540. package/dist/lib/light.d.ts.map +1 -1
  541. package/dist/lib/light.js +2 -2
  542. package/dist/lib/light.js.map +1 -1
  543. package/dist/lib/lumi.d.ts +88 -44
  544. package/dist/lib/lumi.d.ts.map +1 -1
  545. package/dist/lib/lumi.js +1813 -59
  546. package/dist/lib/lumi.js.map +1 -1
  547. package/dist/lib/modernExtend.d.ts +19 -14
  548. package/dist/lib/modernExtend.d.ts.map +1 -1
  549. package/dist/lib/modernExtend.js +37 -35
  550. package/dist/lib/modernExtend.js.map +1 -1
  551. package/dist/lib/namron.d.ts +131 -28
  552. package/dist/lib/namron.d.ts.map +1 -1
  553. package/dist/lib/namron.js +723 -42
  554. package/dist/lib/namron.js.map +1 -1
  555. package/dist/lib/nodon.d.ts.map +1 -1
  556. package/dist/lib/nodon.js +3 -1
  557. package/dist/lib/nodon.js.map +1 -1
  558. package/dist/lib/philips.d.ts +106 -2
  559. package/dist/lib/philips.d.ts.map +1 -1
  560. package/dist/lib/philips.js +945 -44
  561. package/dist/lib/philips.js.map +1 -1
  562. package/dist/lib/sonoff.d.ts +77 -10
  563. package/dist/lib/sonoff.d.ts.map +1 -1
  564. package/dist/lib/sonoff.js +165 -34
  565. package/dist/lib/sonoff.js.map +1 -1
  566. package/dist/lib/sunricher.d.ts +1 -1
  567. package/dist/lib/sunricher.d.ts.map +1 -1
  568. package/dist/lib/sunricher.js +6 -8
  569. package/dist/lib/sunricher.js.map +1 -1
  570. package/dist/lib/tuya.d.ts +558 -13
  571. package/dist/lib/tuya.d.ts.map +1 -1
  572. package/dist/lib/tuya.js +1518 -10
  573. package/dist/lib/tuya.js.map +1 -1
  574. package/dist/lib/types.d.ts +9 -6
  575. package/dist/lib/types.d.ts.map +1 -1
  576. package/dist/lib/ubisys.d.ts +1 -1
  577. package/dist/lib/ubisys.d.ts.map +1 -1
  578. package/dist/lib/ubisys.js +60 -5
  579. package/dist/lib/ubisys.js.map +1 -1
  580. package/dist/lib/utils.d.ts +5 -8
  581. package/dist/lib/utils.d.ts.map +1 -1
  582. package/dist/lib/utils.js +30 -17
  583. package/dist/lib/utils.js.map +1 -1
  584. package/dist/lib/zosung.d.ts +69 -6
  585. package/dist/lib/zosung.d.ts.map +1 -1
  586. package/dist/lib/zosung.js +113 -1
  587. package/dist/lib/zosung.js.map +1 -1
  588. package/dist/models-index.json +1 -1
  589. package/package.json +2 -2
  590. package/dist/devices/aubess.d.ts.map +0 -1
  591. package/dist/devices/aubess.js.map +0 -1
@@ -39,6 +39,7 @@ const tz = __importStar(require("../converters/toZigbee"));
39
39
  const exposes = __importStar(require("../lib/exposes"));
40
40
  const logger_1 = require("../lib/logger");
41
41
  const m = __importStar(require("../lib/modernExtend"));
42
+ const utils = __importStar(require("../lib/utils"));
42
43
  const NS = "zhc:livolo";
43
44
  const e = exposes.presets;
44
45
  const ea = exposes.access;
@@ -62,6 +63,274 @@ const mLocal = {
62
63
  return { ...extend, configure: [poll] };
63
64
  },
64
65
  };
66
+ const tzLocal = {
67
+ livolo_socket_switch_on_off: {
68
+ key: ["state"],
69
+ convertSet: async (entity, key, value, meta) => {
70
+ if (typeof value !== "string") {
71
+ return;
72
+ }
73
+ const state = value.toLowerCase();
74
+ let oldstate = 1;
75
+ if (state === "on") {
76
+ oldstate = 108;
77
+ }
78
+ let channel = 1.0;
79
+ const postfix = meta.endpoint_name || "left";
80
+ await entity.command("genOnOff", "toggle", {}, { transactionSequenceNumber: 0 });
81
+ const payloadOn = { 1: { value: Buffer.from([1, 0, 0, 0, 0, 0, 0, 0]), type: 1 } };
82
+ const payloadOff = { 1: { value: Buffer.from([0, 0, 0, 0, 0, 0, 0, 0]), type: 1 } };
83
+ const payloadOnRight = { 1: { value: Buffer.from([2, 0, 0, 0, 0, 0, 0, 0]), type: 2 } };
84
+ const payloadOffRight = { 1: { value: Buffer.from([0, 0, 0, 0, 0, 0, 0, 0]), type: 2 } };
85
+ const payloadOnBottomLeft = { 1: { value: Buffer.from([4, 0, 0, 0, 0, 0, 0, 0]), type: 4 } };
86
+ const payloadOffBottomLeft = { 1: { value: Buffer.from([0, 0, 0, 0, 0, 0, 0, 0]), type: 4 } };
87
+ const payloadOnBottomRight = { 1: { value: Buffer.from([8, 0, 0, 0, 0, 0, 0, 0]), type: 136 } };
88
+ const payloadOffBottomRight = { 1: { value: Buffer.from([0, 0, 0, 0, 0, 0, 0, 0]), type: 136 } };
89
+ if (postfix === "left") {
90
+ await entity.command("genLevelCtrl", "moveToLevelWithOnOff", {
91
+ level: oldstate,
92
+ transtime: channel,
93
+ optionsMask: 0,
94
+ optionsOverride: 0,
95
+ });
96
+ await entity.write("genPowerCfg", state === "on" ? payloadOn : payloadOff, {
97
+ manufacturerCode: 0x1ad2,
98
+ disableDefaultResponse: true,
99
+ disableResponse: true,
100
+ reservedBits: 3,
101
+ direction: 1,
102
+ transactionSequenceNumber: 0xe9,
103
+ });
104
+ return { state: { state: value.toUpperCase() } };
105
+ }
106
+ if (postfix === "right") {
107
+ channel = 2.0;
108
+ await entity.command("genLevelCtrl", "moveToLevelWithOnOff", {
109
+ level: oldstate,
110
+ transtime: channel,
111
+ optionsMask: 0,
112
+ optionsOverride: 0,
113
+ });
114
+ await entity.write("genPowerCfg", state === "on" ? payloadOnRight : payloadOffRight, {
115
+ manufacturerCode: 0x1ad2,
116
+ disableDefaultResponse: true,
117
+ disableResponse: true,
118
+ reservedBits: 3,
119
+ direction: 1,
120
+ transactionSequenceNumber: 0xe9,
121
+ });
122
+ return { state: { state: value.toUpperCase() } };
123
+ }
124
+ if (postfix === "bottom_right") {
125
+ await entity.write("genPowerCfg", state === "on" ? payloadOnBottomRight : payloadOffBottomRight, {
126
+ manufacturerCode: 0x1ad2,
127
+ disableDefaultResponse: true,
128
+ disableResponse: true,
129
+ reservedBits: 3,
130
+ direction: 1,
131
+ transactionSequenceNumber: 0xe9,
132
+ });
133
+ return { state: { state: value.toUpperCase() } };
134
+ }
135
+ if (postfix === "bottom_left") {
136
+ await entity.write("genPowerCfg", state === "on" ? payloadOnBottomLeft : payloadOffBottomLeft, {
137
+ manufacturerCode: 0x1ad2,
138
+ disableDefaultResponse: true,
139
+ disableResponse: true,
140
+ reservedBits: 3,
141
+ direction: 1,
142
+ transactionSequenceNumber: 0xe9,
143
+ });
144
+ return { state: { state: value.toUpperCase() } };
145
+ }
146
+ return { state: { state: value.toUpperCase() } };
147
+ },
148
+ convertGet: async (entity, key, meta) => {
149
+ await entity.command("genOnOff", "toggle", {}, { transactionSequenceNumber: 0 });
150
+ },
151
+ },
152
+ livolo_switch_on_off: {
153
+ key: ["state"],
154
+ convertSet: async (entity, key, value, meta) => {
155
+ utils.assertString(value, key);
156
+ const postfix = meta.endpoint_name || "left";
157
+ const state = value.toLowerCase() === "on" ? 108 : 1;
158
+ let channel = 1;
159
+ if (postfix === "left") {
160
+ channel = 1.0;
161
+ }
162
+ else if (postfix === "right") {
163
+ channel = 2.0;
164
+ }
165
+ else {
166
+ return;
167
+ }
168
+ await entity.command("genLevelCtrl", "moveToLevelWithOnOff", { level: state, transtime: channel, optionsMask: 0, optionsOverride: 0 });
169
+ return { state: { state: value.toUpperCase() } };
170
+ },
171
+ convertGet: async (entity, key, meta) => {
172
+ await entity.command("genOnOff", "toggle", {}, { transactionSequenceNumber: 0 });
173
+ },
174
+ },
175
+ livolo_dimmer_level: {
176
+ key: ["brightness", "brightness_percent", "level"],
177
+ convertSet: async (entity, key, value, meta) => {
178
+ // upscale to 100
179
+ value = Number(value);
180
+ utils.assertNumber(value, key);
181
+ // biome-ignore lint/suspicious/noImplicitAnyLet: ignored using `--suppress`
182
+ let newValue;
183
+ if (key === "level") {
184
+ if (value >= 0 && value <= 1000) {
185
+ newValue = utils.mapNumberRange(value, 0, 1000, 0, 100);
186
+ }
187
+ else {
188
+ throw new Error("Dimmer level is out of range 0..1000");
189
+ }
190
+ }
191
+ else if (key === "brightness_percent") {
192
+ if (value >= 0 && value <= 100) {
193
+ newValue = Math.round(value);
194
+ }
195
+ else {
196
+ throw new Error("Dimmer brightness_percent is out of range 0..100");
197
+ }
198
+ }
199
+ else {
200
+ if (value >= 0 && value <= 255) {
201
+ newValue = utils.mapNumberRange(value, 0, 255, 0, 100);
202
+ }
203
+ else {
204
+ throw new Error("Dimmer brightness is out of range 0..255");
205
+ }
206
+ }
207
+ await entity.command("genOnOff", "toggle", {}, { transactionSequenceNumber: 0 });
208
+ const payload = { 769: { value: Buffer.from([newValue, 0, 0, 0, 0, 0, 0, 0]), type: 1 } };
209
+ await entity.write("genPowerCfg", payload, {
210
+ manufacturerCode: 0x1ad2,
211
+ disableDefaultResponse: true,
212
+ disableResponse: true,
213
+ reservedBits: 3,
214
+ direction: 1,
215
+ transactionSequenceNumber: 0xe9,
216
+ writeUndiv: true,
217
+ });
218
+ return {
219
+ state: { brightness_percent: newValue, brightness: utils.mapNumberRange(newValue, 0, 100, 0, 255), level: newValue * 10 },
220
+ };
221
+ },
222
+ convertGet: async (entity, key, meta) => {
223
+ await entity.command("genOnOff", "toggle", {}, { transactionSequenceNumber: 0 });
224
+ },
225
+ },
226
+ livolo_cover_state: {
227
+ key: ["state"],
228
+ convertSet: async (entity, key, value, meta) => {
229
+ utils.assertEndpoint(entity);
230
+ // biome-ignore lint/suspicious/noImplicitAnyLet: ignored using `--suppress`
231
+ let payload;
232
+ const options = {
233
+ frameType: 0,
234
+ manufacturerCode: 0x1ad2,
235
+ disableDefaultResponse: true,
236
+ disableResponse: true,
237
+ reservedBits: 3,
238
+ direction: 1,
239
+ writeUndiv: true,
240
+ transactionSequenceNumber: 0xe9,
241
+ };
242
+ switch (value) {
243
+ case "OPEN":
244
+ payload = { attrId: 0x0000, selector: null, elementData: [0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] };
245
+ break;
246
+ case "CLOSE":
247
+ payload = { attrId: 0x0000, selector: null, elementData: [0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] };
248
+ break;
249
+ case "STOP":
250
+ payload = { attrId: 0x0000, selector: null, elementData: [0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] };
251
+ break;
252
+ default:
253
+ throw new Error(`Value '${value}' is not a valid cover position (must be one of 'OPEN' or 'CLOSE')`);
254
+ }
255
+ await entity.writeStructured("genPowerCfg",
256
+ // @ts-expect-error workaround write custom payload
257
+ [payload], options);
258
+ return {
259
+ state: {
260
+ moving: true,
261
+ },
262
+ };
263
+ },
264
+ },
265
+ livolo_cover_position: {
266
+ key: ["position"],
267
+ convertSet: async (entity, key, value, meta) => {
268
+ utils.assertNumber(value, key);
269
+ const position = 100 - value;
270
+ await entity.command("genOnOff", "toggle", {}, { transactionSequenceNumber: 0 });
271
+ const payload = { 1025: { value: [position, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], type: 1 } };
272
+ await entity.write("genPowerCfg", payload, {
273
+ manufacturerCode: 0x1ad2,
274
+ disableDefaultResponse: true,
275
+ disableResponse: true,
276
+ reservedBits: 3,
277
+ direction: 1,
278
+ transactionSequenceNumber: 0xe9,
279
+ writeUndiv: true,
280
+ });
281
+ return {
282
+ state: {
283
+ position: value,
284
+ moving: true,
285
+ },
286
+ };
287
+ },
288
+ },
289
+ livolo_cover_options: {
290
+ key: ["options"],
291
+ convertSet: async (entity, key, value, meta) => {
292
+ utils.assertObject(value);
293
+ const options = {
294
+ frameType: 0,
295
+ manufacturerCode: 0x1ad2,
296
+ disableDefaultResponse: true,
297
+ disableResponse: true,
298
+ reservedBits: 3,
299
+ direction: 1,
300
+ writeUndiv: true,
301
+ transactionSequenceNumber: 0xe9,
302
+ };
303
+ if (value.motor_direction != null) {
304
+ // biome-ignore lint/suspicious/noImplicitAnyLet: ignored using `--suppress`
305
+ let direction;
306
+ switch (value.motor_direction) {
307
+ case "FORWARD":
308
+ direction = 0x00;
309
+ break;
310
+ case "REVERSE":
311
+ direction = 0x80;
312
+ break;
313
+ default:
314
+ throw new Error(`livolo_cover_options: ${value.motor_direction} is not a valid motor direction \
315
+ (must be one of 'FORWARD' or 'REVERSE')`);
316
+ }
317
+ const payload = { 4865: { value: [direction, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] } };
318
+ await entity.write("genPowerCfg",
319
+ // @ts-expect-error workaround write custom payload
320
+ payload, options);
321
+ }
322
+ if (value.motor_speed != null) {
323
+ if (value.motor_speed < 20 || value.motor_speed > 40) {
324
+ throw new Error("livolo_cover_options: Motor speed is out of range (20-40)");
325
+ }
326
+ const payload = { 4609: { value: [value.motor_speed, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] } };
327
+ await entity.write("genPowerCfg",
328
+ // @ts-expect-error workaround write custom payload
329
+ payload, options);
330
+ }
331
+ },
332
+ },
333
+ };
65
334
  const fzLocal = {
66
335
  // biome-ignore lint/suspicious/noExplicitAny: ignore
67
336
  prevent_disconnect: (args) => {
@@ -91,6 +360,329 @@ const fzLocal = {
91
360
  },
92
361
  };
93
362
  },
363
+ livolo_switch_state: {
364
+ cluster: "genOnOff",
365
+ type: ["attributeReport", "readResponse"],
366
+ convert: (model, msg, publish, options, meta) => {
367
+ const status = msg.data.onOff;
368
+ return {
369
+ state_left: status & 1 ? "ON" : "OFF",
370
+ state_right: status & 2 ? "ON" : "OFF",
371
+ };
372
+ },
373
+ },
374
+ livolo_socket_state: {
375
+ cluster: "genPowerCfg",
376
+ type: ["raw"],
377
+ convert: (model, msg, publish, options, meta) => {
378
+ const stateHeader = Buffer.from([122, 209]);
379
+ if (msg.data.indexOf(stateHeader) === 0) {
380
+ const status = msg.data[14];
381
+ return { state: status & 1 ? "ON" : "OFF" };
382
+ }
383
+ },
384
+ },
385
+ livolo_new_switch_state: {
386
+ cluster: "genPowerCfg",
387
+ type: ["raw"],
388
+ convert: (model, msg, publish, options, meta) => {
389
+ const stateHeader = Buffer.from([122, 209]);
390
+ if (msg.data.indexOf(stateHeader) === 0) {
391
+ const status = msg.data[14];
392
+ return { state: status & 1 ? "ON" : "OFF" };
393
+ }
394
+ },
395
+ },
396
+ livolo_new_switch_state_2gang: {
397
+ cluster: "genPowerCfg",
398
+ type: ["raw"],
399
+ convert: (model, msg, publish, options, meta) => {
400
+ const stateHeader = Buffer.from([122, 209]);
401
+ if (msg.data.indexOf(stateHeader) === 0) {
402
+ if (msg.data[10] === 7) {
403
+ const status = msg.data[14];
404
+ return {
405
+ state_left: status & 1 ? "ON" : "OFF",
406
+ state_right: status & 2 ? "ON" : "OFF",
407
+ };
408
+ }
409
+ }
410
+ },
411
+ },
412
+ livolo_new_switch_state_4gang: {
413
+ cluster: "genPowerCfg",
414
+ type: ["raw"],
415
+ convert: (model, msg, publish, options, meta) => {
416
+ const stateHeader = Buffer.from([122, 209]);
417
+ if (msg.data.indexOf(stateHeader) === 0) {
418
+ if (msg.data[10] === 7) {
419
+ const status = msg.data[14];
420
+ return {
421
+ state_left: status & 1 ? "ON" : "OFF",
422
+ state_right: status & 2 ? "ON" : "OFF",
423
+ state_bottom_left: status & 4 ? "ON" : "OFF",
424
+ state_bottom_right: status & 8 ? "ON" : "OFF",
425
+ };
426
+ }
427
+ if (msg.data[10] === 13) {
428
+ const status = msg.data[13];
429
+ return {
430
+ state_left: status & 1 ? "ON" : "OFF",
431
+ state_right: status & 2 ? "ON" : "OFF",
432
+ state_bottom_left: status & 4 ? "ON" : "OFF",
433
+ state_bottom_right: status & 8 ? "ON" : "OFF",
434
+ };
435
+ }
436
+ }
437
+ },
438
+ },
439
+ livolo_curtain_switch_state: {
440
+ cluster: "genPowerCfg",
441
+ type: ["raw"],
442
+ convert: (model, msg, publish, options, meta) => {
443
+ const stateHeader = Buffer.from([122, 209]);
444
+ if (msg.data.indexOf(stateHeader) === 0) {
445
+ if (msg.data[10] === 5 || msg.data[10] === 2) {
446
+ const status = msg.data[14];
447
+ return {
448
+ state_left: status === 1 ? "ON" : "OFF",
449
+ state_right: status === 0 ? "ON" : "OFF",
450
+ };
451
+ }
452
+ }
453
+ },
454
+ },
455
+ livolo_dimmer_state: {
456
+ cluster: "genPowerCfg",
457
+ type: ["raw"],
458
+ convert: (model, msg, publish, options, meta) => {
459
+ const stateHeader = Buffer.from([122, 209]);
460
+ if (msg.data.indexOf(stateHeader) === 0) {
461
+ if (msg.data[10] === 7) {
462
+ const status = msg.data[14];
463
+ return { state: status & 1 ? "ON" : "OFF" };
464
+ }
465
+ if (msg.data[10] === 13) {
466
+ const status = msg.data[13];
467
+ return { state: status & 1 ? "ON" : "OFF" };
468
+ }
469
+ if (msg.data[10] === 5) {
470
+ // TODO: Unknown dp, assumed value type
471
+ const value = msg.data[14] * 10;
472
+ return {
473
+ brightness: utils.mapNumberRange(value, 0, 1000, 0, 255),
474
+ brightness_percent: utils.mapNumberRange(value, 0, 1000, 0, 100),
475
+ level: value,
476
+ };
477
+ }
478
+ }
479
+ },
480
+ },
481
+ livolo_cover_state: {
482
+ cluster: "genPowerCfg",
483
+ type: ["raw"],
484
+ convert: (model, msg, publish, options, meta) => {
485
+ const dp = msg.data[10];
486
+ const defaults = { motor_direction: "FORWARD", motor_speed: 40 };
487
+ if (msg.data[0] === 0x7a && msg.data[1] === 0xd1) {
488
+ const reportType = msg.data[12];
489
+ switch (dp) {
490
+ case 0x0c:
491
+ case 0x0f:
492
+ if (reportType === 0x04) {
493
+ // Position report
494
+ const position = 100 - msg.data[13];
495
+ const state = position > 0 ? "OPEN" : "CLOSE";
496
+ const moving = dp === 0x0f;
497
+ return { ...defaults, ...meta.state, position, state, moving };
498
+ }
499
+ if (reportType === 0x12) {
500
+ // Speed report
501
+ const motorSpeed = msg.data[13];
502
+ return { ...defaults, ...meta.state, motor_speed: motorSpeed };
503
+ }
504
+ if (reportType === 0x13) {
505
+ // Direction report
506
+ const direction = msg.data[13];
507
+ if (direction < 0x80) {
508
+ return { ...defaults, ...meta.state, motor_direction: "FORWARD" };
509
+ }
510
+ return { ...defaults, ...meta.state, motor_direction: "REVERSE" };
511
+ }
512
+ break;
513
+ case 0x02:
514
+ case 0x03:
515
+ // Ignore special commands used only when pairing, as these will rather be handled by `onEvent`
516
+ return null;
517
+ case 0x08:
518
+ // Ignore general command acknowledgements, as they provide no useful information.
519
+ return null;
520
+ default:
521
+ // Unknown dps
522
+ logger_1.logger.debug(`Unhandled DP ${dp} for ${meta.device.manufacturerName}: ${msg.data.toString("hex")}`, NS);
523
+ }
524
+ }
525
+ },
526
+ },
527
+ livolo_hygrometer_state: {
528
+ cluster: "genPowerCfg",
529
+ type: ["raw"],
530
+ convert: (model, msg, publish, options, meta) => {
531
+ const dp = msg.data[10];
532
+ switch (dp) {
533
+ case 14:
534
+ return {
535
+ temperature: Number(msg.data[13]),
536
+ };
537
+ case 12:
538
+ return {
539
+ humidity: Number(msg.data[13]),
540
+ };
541
+ }
542
+ },
543
+ },
544
+ livolo_illuminance_state: {
545
+ cluster: "genPowerCfg",
546
+ type: ["raw"],
547
+ convert: (model, msg, publish, options, meta) => {
548
+ const dp = msg.data[12];
549
+ const noiseLookup = { 1: "silent", 2: "normal", 3: "lively", 4: "noisy" };
550
+ switch (dp) {
551
+ case 13:
552
+ return {
553
+ illuminance: Number(msg.data[13]),
554
+ };
555
+ case 14:
556
+ return {
557
+ noise_detected: msg.data[13] > 2,
558
+ noise_level: noiseLookup[msg.data[13]],
559
+ };
560
+ }
561
+ },
562
+ },
563
+ livolo_pir_state: {
564
+ cluster: "genPowerCfg",
565
+ type: ["raw"],
566
+ convert: (model, msg, publish, options, meta) => {
567
+ const stateHeader = Buffer.from([122, 209]);
568
+ if (msg.data.indexOf(stateHeader) === 0) {
569
+ if (msg.data[10] === 7) {
570
+ const status = msg.data[14];
571
+ return {
572
+ occupancy: !!(status & 1),
573
+ };
574
+ }
575
+ }
576
+ },
577
+ },
578
+ livolo_switch_state_raw: {
579
+ cluster: "genPowerCfg",
580
+ type: ["raw"],
581
+ convert: (model, msg, publish, options, meta) => {
582
+ /*
583
+ header ieee address info data
584
+ new socket
585
+ [124,210,21,216,128, 199,147,3,24,0,75,18,0, 19,7,0] after interview
586
+ [122,209, 199,147,3,24,0,75,18,0, 7,1,6,1,0,11] off
587
+ [122,209, 199,147,3,24,0,75,18,0, 7,1,6,1,1,11] on
588
+
589
+ new switch
590
+ [124,210,21,216,128, 228,41,3,24,0,75,18,0, 19,1,0] after interview
591
+ [122,209, 228,41,3,24,0,75,18,0, 7,1,0,1,0,11] off
592
+ [122,209, 228,41,3,24,0,75,18,0, 7,1,0,1,1,11] on
593
+
594
+ old switch
595
+ [124,210,21,216,128, 170, 10,2,24,0,75,18,0, 17,0,1] after interview
596
+ [124,210,21,216,0, 18, 15,5,24,0,75,18,0, 34,0,0] left: 0, right: 0
597
+ [124,210,21,216,0, 18, 15,5,24,0,75,18,0, 34,0,1] left: 1, right: 0
598
+ [124,210,21,216,0, 18, 15,5,24,0,75,18,0, 34,0,2] left: 0, right: 1
599
+ [124,210,21,216,0, 18, 15,5,24,0,75,18,0, 34,0,3] left: 1, right: 1
600
+
601
+ curtain switch
602
+ [124,210,21,216,128, 110,74,116,33,0,75,18,0, 19,5,0] after interview
603
+ [122,209, 110,74,116,33,0,75,18,0, 5,1,5,0,2,11] left: 0, right: 0 (off)
604
+ [122,209, 110,74,116,33,0,75,18,0, 5,1,5,0,1,11] left: 1, right: 0 (left on)
605
+ [122,209, 110,74,116,33,0,75,18,0, 5,1,5,0,0,11] left: 0, right: 1 (right on)
606
+
607
+ pir sensor
608
+ [124,210,21,216,128, 225,52,225,34,0,75,18,0, 19,13,0] after interview
609
+ [122,209, 245,94,225,34,0,75,18,0, 7,1,7,1,1,11] occupancy: true
610
+ [122,209, 245,94,225,34,0,75,18,0, 7,1,7,1,0,11] occupancy: false
611
+
612
+ hygrometer
613
+ [122,209, 191,22,3,24,0,75,18,0, 14,1,8,21,14,11] temperature: 21 degrees Celsius
614
+ [122,209, 191,22,3,24,0,75,18,0, 12,1,9,73,12,11] humidity: 73%
615
+
616
+ illuminance
617
+ [124,210,21,216,128, 221,0,115,33,0,75,18,0, 19,12,0] after interview
618
+ [122,209, 221,0,115,33,0,75,18,0, 12,1,14,4,12,11] noise: 4 (noisy)
619
+ [122,209, 221,0,115,33,0,75,18,0, 12,1,14,3,12,11] noise: 3 (lively)
620
+ [122,209, 221,0,115,33,0,75,18,0, 12,1,14,2,12,11] noise: 2 (normal)
621
+ [122,209, 221,0,115,33,0,75,18,0, 12,1,14,1,12,11] noise: 1 (silent)
622
+ [122,209, 221,0,115,33,0,75,18,0, 12,1,13,20,12,11] lux: 20
623
+ [122,209, 221,0,115,33,0,75,18,0, 2,0,12,199,1,11] ??
624
+ */
625
+ const malformedHeader = Buffer.from([0x7c, 0xd2, 0x15, 0xd8, 0x00]);
626
+ const infoHeader = Buffer.from([0x7c, 0xd2, 0x15, 0xd8, 0x80]);
627
+ // status of old devices
628
+ if (msg.data.indexOf(malformedHeader) === 0) {
629
+ const status = msg.data[15];
630
+ return {
631
+ state_left: status & 1 ? "ON" : "OFF",
632
+ state_right: status & 2 ? "ON" : "OFF",
633
+ };
634
+ }
635
+ // info about device
636
+ if (msg.data.indexOf(infoHeader) === 0) {
637
+ if (msg.data.includes(Buffer.from([19, 7, 0]), 13)) {
638
+ // new socket, hack
639
+ meta.device.modelID = "TI0001-socket";
640
+ meta.device.save();
641
+ }
642
+ // No need to detect this switches, will be done by universal procedure
643
+ /* if (msg.data.includes(Buffer.from([19, 1, 0]), 13)) {
644
+ // new switch, hack
645
+ meta.device.modelID = 'TI0001-switch';
646
+ meta.device.save();
647
+ }
648
+ if (msg.data.includes(Buffer.from([19, 2, 0]), 13)) {
649
+ // new switch, hack
650
+ meta.device.modelID = 'TI0001-switch-2gang';
651
+ meta.device.save();
652
+ }*/
653
+ if (msg.data.includes(Buffer.from([19, 5, 0]), 13)) {
654
+ logger_1.logger.debug("Detected Livolo Curtain Switch", NS);
655
+ // curtain switch, hack
656
+ meta.device.modelID = "TI0001-curtain-switch";
657
+ meta.device.save();
658
+ }
659
+ if (msg.data.includes(Buffer.from([19, 20, 0]), 13)) {
660
+ // new dimmer, hack
661
+ meta.device.modelID = "TI0001-dimmer";
662
+ meta.device.save();
663
+ }
664
+ if (msg.data.includes(Buffer.from([19, 21, 0]), 13)) {
665
+ meta.device.modelID = "TI0001-cover";
666
+ meta.device.save();
667
+ }
668
+ if (msg.data.includes(Buffer.from([19, 13, 0]), 13)) {
669
+ logger_1.logger.debug("Detected Livolo Pir Sensor", NS);
670
+ meta.device.modelID = "TI0001-pir";
671
+ meta.device.save();
672
+ }
673
+ if (msg.data.includes(Buffer.from([19, 15, 0]), 13)) {
674
+ logger_1.logger.debug("Detected Livolo Digital Hygrometer", NS);
675
+ meta.device.modelID = "TI0001-hygrometer";
676
+ meta.device.save();
677
+ }
678
+ if (msg.data.includes(Buffer.from([19, 12, 0]), 13)) {
679
+ logger_1.logger.debug("Detected Livolo Digital Illuminance and Sound Sensor", NS);
680
+ meta.device.modelID = "TI0001-illuminance";
681
+ meta.device.save();
682
+ }
683
+ }
684
+ },
685
+ },
94
686
  };
95
687
  exports.definitions = [
96
688
  {
@@ -105,12 +697,12 @@ exports.definitions = [
105
697
  e.switch().withEndpoint("bottom_right"),
106
698
  ],
107
699
  fromZigbee: [
108
- fz.livolo_switch_state,
109
- fz.livolo_switch_state_raw,
110
- fz.livolo_new_switch_state_4gang,
700
+ fzLocal.livolo_switch_state,
701
+ fzLocal.livolo_switch_state_raw,
702
+ fzLocal.livolo_new_switch_state_4gang,
111
703
  fzLocal.prevent_disconnect({ dp: 1, payload: { 8194: { value: 0n, type: 0x0e } } }),
112
704
  ],
113
- toZigbee: [tz.livolo_socket_switch_on_off],
705
+ toZigbee: [tzLocal.livolo_socket_switch_on_off],
114
706
  endpoint: (device) => {
115
707
  return { left: 6, right: 6, bottom_left: 6, bottom_right: 6 };
116
708
  },
@@ -121,8 +713,8 @@ exports.definitions = [
121
713
  model: "TI0001-switch",
122
714
  description: "Zigbee switch 1 gang",
123
715
  vendor: "Livolo",
124
- fromZigbee: [fz.livolo_new_switch_state, fz.power_on_behavior],
125
- toZigbee: [tz.livolo_socket_switch_on_off, tz.power_on_behavior],
716
+ fromZigbee: [fzLocal.livolo_new_switch_state, fz.power_on_behavior],
717
+ toZigbee: [tzLocal.livolo_socket_switch_on_off, tz.power_on_behavior],
126
718
  exposes: [e.switch()],
127
719
  endpoint: (device) => {
128
720
  return { left: 6, right: 6 };
@@ -134,8 +726,8 @@ exports.definitions = [
134
726
  model: "TI0001-switch-2gang",
135
727
  description: "Zigbee Switch 2 gang",
136
728
  vendor: "Livolo",
137
- fromZigbee: [fz.livolo_new_switch_state_2gang],
138
- toZigbee: [tz.livolo_socket_switch_on_off],
729
+ fromZigbee: [fzLocal.livolo_new_switch_state_2gang],
730
+ toZigbee: [tzLocal.livolo_socket_switch_on_off],
139
731
  exposes: [e.switch().withEndpoint("left"), e.switch().withEndpoint("right")],
140
732
  endpoint: (device) => {
141
733
  return { left: 6, right: 6 };
@@ -147,9 +739,9 @@ exports.definitions = [
147
739
  model: "TI0001-curtain-switch",
148
740
  description: "Zigbee curtain switch (can only read status, control does not work yet)",
149
741
  vendor: "Livolo",
150
- fromZigbee: [fz.livolo_curtain_switch_state],
151
- toZigbee: [tz.livolo_socket_switch_on_off],
152
- // toZigbee: [tz.livolo_curtain_switch_on_off],
742
+ fromZigbee: [fzLocal.livolo_curtain_switch_state],
743
+ toZigbee: [tzLocal.livolo_socket_switch_on_off],
744
+ // toZigbee: [tzLocal.livolo_curtain_switch_on_off],
153
745
  exposes: [e.switch().withEndpoint("left"), e.switch().withEndpoint("right")],
154
746
  endpoint: (device) => {
155
747
  return { left: 6, right: 6 };
@@ -162,8 +754,8 @@ exports.definitions = [
162
754
  description: "Zigbee socket",
163
755
  vendor: "Livolo",
164
756
  exposes: [e.switch()],
165
- fromZigbee: [fz.livolo_socket_state, fz.power_on_behavior],
166
- toZigbee: [tz.livolo_socket_switch_on_off, tz.power_on_behavior],
757
+ fromZigbee: [fzLocal.livolo_socket_state, fz.power_on_behavior],
758
+ toZigbee: [tzLocal.livolo_socket_switch_on_off, tz.power_on_behavior],
167
759
  extend: [mLocal.poll()],
168
760
  },
169
761
  {
@@ -171,8 +763,8 @@ exports.definitions = [
171
763
  model: "TI0001-dimmer",
172
764
  description: "Zigbee dimmer",
173
765
  vendor: "Livolo",
174
- fromZigbee: [fz.livolo_dimmer_state],
175
- toZigbee: [tz.livolo_socket_switch_on_off, tz.livolo_dimmer_level],
766
+ fromZigbee: [fzLocal.livolo_dimmer_state],
767
+ toZigbee: [tzLocal.livolo_socket_switch_on_off, tzLocal.livolo_dimmer_level],
176
768
  exposes: [e.light_brightness()],
177
769
  endpoint: (device) => {
178
770
  return { left: 6, right: 6 };
@@ -185,7 +777,7 @@ exports.definitions = [
185
777
  description: "Zigbee roller blind motor",
186
778
  vendor: "Livolo",
187
779
  fromZigbee: [
188
- fz.livolo_cover_state,
780
+ fzLocal.livolo_cover_state,
189
781
  fz.command_off,
190
782
  fzLocal.prevent_disconnect({
191
783
  dp: 0x02,
@@ -194,7 +786,7 @@ exports.definitions = [
194
786
  },
195
787
  }),
196
788
  ],
197
- toZigbee: [tz.livolo_cover_state, tz.livolo_cover_position, tz.livolo_cover_options],
789
+ toZigbee: [tzLocal.livolo_cover_state, tzLocal.livolo_cover_position, tzLocal.livolo_cover_options],
198
790
  exposes: [
199
791
  e.cover_position().setAccess("position", ea.STATE_SET),
200
792
  e
@@ -213,7 +805,7 @@ exports.definitions = [
213
805
  vendor: "Livolo",
214
806
  exposes: [e.occupancy()],
215
807
  fromZigbee: [
216
- fz.livolo_pir_state,
808
+ fzLocal.livolo_pir_state,
217
809
  fzLocal.prevent_disconnect({
218
810
  dp: 0x01,
219
811
  payload: { 8194: { value: 0n, type: 0x0e } },
@@ -228,7 +820,7 @@ exports.definitions = [
228
820
  vendor: "Livolo",
229
821
  exposes: [e.humidity(), e.temperature()],
230
822
  fromZigbee: [
231
- fz.livolo_hygrometer_state,
823
+ fzLocal.livolo_hygrometer_state,
232
824
  fzLocal.prevent_disconnect({
233
825
  dp: 0x02,
234
826
  payload(data) {
@@ -249,7 +841,7 @@ exports.definitions = [
249
841
  e.enum("noise_level", ea.STATE, ["silent", "normal", "lively", "noisy"]).withDescription("Detected noise level"),
250
842
  ],
251
843
  fromZigbee: [
252
- fz.livolo_illuminance_state,
844
+ fzLocal.livolo_illuminance_state,
253
845
  fzLocal.prevent_disconnect({
254
846
  dp: 0x02,
255
847
  payload(data) {