@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.
- package/CHANGELOG.md +1101 -0
- package/dist/converters/actions.d.ts.map +1 -1
- package/dist/converters/actions.js +2 -0
- package/dist/converters/actions.js.map +1 -1
- package/dist/converters/fromZigbee.d.ts +1 -150
- package/dist/converters/fromZigbee.d.ts.map +1 -1
- package/dist/converters/fromZigbee.js +183 -3044
- package/dist/converters/fromZigbee.js.map +1 -1
- package/dist/converters/toZigbee.d.ts +0 -121
- package/dist/converters/toZigbee.d.ts.map +1 -1
- package/dist/converters/toZigbee.js +289 -2386
- package/dist/converters/toZigbee.js.map +1 -1
- package/dist/devices/ITCommander.d.ts.map +1 -1
- package/dist/devices/ITCommander.js +2 -1
- package/dist/devices/ITCommander.js.map +1 -1
- package/dist/devices/acova.d.ts.map +1 -1
- package/dist/devices/acova.js +69 -2
- package/dist/devices/acova.js.map +1 -1
- package/dist/devices/adeo.d.ts.map +1 -1
- package/dist/devices/adeo.js +35 -3
- package/dist/devices/adeo.js.map +1 -1
- package/dist/devices/adurosmart.js +1 -1
- package/dist/devices/adurosmart.js.map +1 -1
- package/dist/devices/amina.d.ts.map +1 -1
- package/dist/devices/amina.js +47 -10
- package/dist/devices/amina.js.map +1 -1
- package/dist/devices/aurora_lighting.d.ts.map +1 -1
- package/dist/devices/aurora_lighting.js +15 -0
- package/dist/devices/aurora_lighting.js.map +1 -1
- package/dist/devices/automaton.d.ts.map +1 -1
- package/dist/devices/automaton.js +1 -0
- package/dist/devices/automaton.js.map +1 -1
- package/dist/devices/avatto.d.ts.map +1 -1
- package/dist/devices/avatto.js +29 -24
- package/dist/devices/avatto.js.map +1 -1
- package/dist/devices/awox.d.ts.map +1 -1
- package/dist/devices/awox.js +41 -3
- package/dist/devices/awox.js.map +1 -1
- package/dist/devices/bacchus.d.ts.map +1 -1
- package/dist/devices/bacchus.js +75 -0
- package/dist/devices/bacchus.js.map +1 -1
- package/dist/devices/bitron.d.ts.map +1 -1
- package/dist/devices/bitron.js +29 -2
- package/dist/devices/bitron.js.map +1 -1
- package/dist/devices/bosch.d.ts.map +1 -1
- package/dist/devices/bosch.js +70 -50
- package/dist/devices/bosch.js.map +1 -1
- package/dist/devices/bticino.d.ts.map +1 -1
- package/dist/devices/bticino.js +11 -1
- package/dist/devices/bticino.js.map +1 -1
- package/dist/devices/byun.d.ts.map +1 -1
- package/dist/devices/byun.js +40 -3
- package/dist/devices/byun.js.map +1 -1
- package/dist/devices/candeo.d.ts.map +1 -1
- package/dist/devices/candeo.js +262 -9
- package/dist/devices/candeo.js.map +1 -1
- package/dist/devices/centralite.d.ts +9 -0
- package/dist/devices/centralite.d.ts.map +1 -1
- package/dist/devices/centralite.js +44 -5
- package/dist/devices/centralite.js.map +1 -1
- package/dist/devices/{aubess.d.ts → cigol.d.ts} +1 -1
- package/dist/devices/cigol.d.ts.map +1 -0
- package/dist/devices/cigol.js +260 -0
- package/dist/devices/cigol.js.map +1 -0
- package/dist/devices/cleverio.js +2 -2
- package/dist/devices/cleverio.js.map +1 -1
- package/dist/devices/climax.d.ts.map +1 -1
- package/dist/devices/climax.js +15 -1
- package/dist/devices/climax.js.map +1 -1
- package/dist/devices/ctm.d.ts.map +1 -1
- package/dist/devices/ctm.js +845 -496
- package/dist/devices/ctm.js.map +1 -1
- package/dist/devices/custom_devices_diy.d.ts +183 -1
- package/dist/devices/custom_devices_diy.d.ts.map +1 -1
- package/dist/devices/custom_devices_diy.js +390 -33
- package/dist/devices/custom_devices_diy.js.map +1 -1
- package/dist/devices/daewoo.d.ts +3 -0
- package/dist/devices/daewoo.d.ts.map +1 -0
- package/dist/devices/daewoo.js +198 -0
- package/dist/devices/daewoo.js.map +1 -0
- package/dist/devices/danfoss.d.ts.map +1 -1
- package/dist/devices/danfoss.js +1270 -296
- package/dist/devices/danfoss.js.map +1 -1
- package/dist/devices/databyte.d.ts.map +1 -1
- package/dist/devices/databyte.js +47 -3
- package/dist/devices/databyte.js.map +1 -1
- package/dist/devices/datek.d.ts.map +1 -1
- package/dist/devices/datek.js +202 -41
- package/dist/devices/datek.js.map +1 -1
- package/dist/devices/dawon_dns.d.ts.map +1 -1
- package/dist/devices/dawon_dns.js +14 -1
- package/dist/devices/dawon_dns.js.map +1 -1
- package/dist/devices/develco.d.ts.map +1 -1
- package/dist/devices/develco.js +145 -64
- package/dist/devices/develco.js.map +1 -1
- package/dist/devices/diyruz.d.ts.map +1 -1
- package/dist/devices/diyruz.js +444 -20
- package/dist/devices/diyruz.js.map +1 -1
- package/dist/devices/domraem.d.ts.map +1 -1
- package/dist/devices/domraem.js +7 -0
- package/dist/devices/domraem.js.map +1 -1
- package/dist/devices/easyaccess.d.ts.map +1 -1
- package/dist/devices/easyaccess.js +22 -2
- package/dist/devices/easyaccess.js.map +1 -1
- package/dist/devices/easyiot.d.ts.map +1 -1
- package/dist/devices/easyiot.js +767 -5
- package/dist/devices/easyiot.js.map +1 -1
- package/dist/devices/echostar.d.ts.map +1 -1
- package/dist/devices/echostar.js +25 -1
- package/dist/devices/echostar.js.map +1 -1
- package/dist/devices/ecodim.d.ts.map +1 -1
- package/dist/devices/ecodim.js +8 -0
- package/dist/devices/ecodim.js.map +1 -1
- package/dist/devices/ecolink.d.ts.map +1 -1
- package/dist/devices/ecolink.js +12 -0
- package/dist/devices/ecolink.js.map +1 -1
- package/dist/devices/efekta.d.ts.map +1 -1
- package/dist/devices/efekta.js +1615 -60
- package/dist/devices/efekta.js.map +1 -1
- package/dist/devices/eglo.d.ts.map +1 -1
- package/dist/devices/eglo.js +203 -17
- package/dist/devices/eglo.js.map +1 -1
- package/dist/devices/elko.d.ts.map +1 -1
- package/dist/devices/elko.js +20 -22
- package/dist/devices/elko.js.map +1 -1
- package/dist/devices/engo.d.ts.map +1 -1
- package/dist/devices/engo.js +201 -0
- package/dist/devices/engo.js.map +1 -1
- package/dist/devices/enocean.d.ts.map +1 -1
- package/dist/devices/enocean.js +132 -4
- package/dist/devices/enocean.js.map +1 -1
- package/dist/devices/ensystec.d.ts +3 -0
- package/dist/devices/ensystec.d.ts.map +1 -0
- package/dist/devices/ensystec.js +1200 -0
- package/dist/devices/ensystec.js.map +1 -0
- package/dist/devices/eurotronic.d.ts +78 -1
- package/dist/devices/eurotronic.d.ts.map +1 -1
- package/dist/devices/eurotronic.js +244 -40
- package/dist/devices/eurotronic.js.map +1 -1
- package/dist/devices/ewelink.d.ts.map +1 -1
- package/dist/devices/ewelink.js +154 -2
- package/dist/devices/ewelink.js.map +1 -1
- package/dist/devices/fantem.js +1 -1
- package/dist/devices/fantem.js.map +1 -1
- package/dist/devices/fireangel.d.ts.map +1 -1
- package/dist/devices/fireangel.js +12 -1
- package/dist/devices/fireangel.js.map +1 -1
- package/dist/devices/frankever.d.ts.map +1 -1
- package/dist/devices/frankever.js +96 -0
- package/dist/devices/frankever.js.map +1 -1
- package/dist/devices/frient.d.ts.map +1 -1
- package/dist/devices/frient.js +15 -0
- package/dist/devices/frient.js.map +1 -1
- package/dist/devices/girier.js +1 -1
- package/dist/devices/girier.js.map +1 -1
- package/dist/devices/gledopto.js +1 -1
- package/dist/devices/gledopto.js.map +1 -1
- package/dist/devices/gmmts.d.ts.map +1 -1
- package/dist/devices/gmmts.js +59 -55
- package/dist/devices/gmmts.js.map +1 -1
- package/dist/devices/halo_smart_labs.d.ts +3 -0
- package/dist/devices/halo_smart_labs.d.ts.map +1 -0
- package/dist/devices/halo_smart_labs.js +918 -0
- package/dist/devices/halo_smart_labs.js.map +1 -0
- package/dist/devices/handshake_finland.d.ts +3 -0
- package/dist/devices/handshake_finland.d.ts.map +1 -0
- package/dist/devices/handshake_finland.js +15 -0
- package/dist/devices/handshake_finland.js.map +1 -0
- package/dist/devices/heiman.d.ts.map +1 -1
- package/dist/devices/heiman.js +1361 -147
- package/dist/devices/heiman.js.map +1 -1
- package/dist/devices/heimgard_technologies.d.ts.map +1 -1
- package/dist/devices/heimgard_technologies.js +13 -0
- package/dist/devices/heimgard_technologies.js.map +1 -1
- package/dist/devices/hive.d.ts.map +1 -1
- package/dist/devices/hive.js +11 -0
- package/dist/devices/hive.js.map +1 -1
- package/dist/devices/ikea.d.ts.map +1 -1
- package/dist/devices/ikea.js +185 -135
- package/dist/devices/ikea.js.map +1 -1
- package/dist/devices/iluminize.d.ts.map +1 -1
- package/dist/devices/iluminize.js +8 -7
- package/dist/devices/iluminize.js.map +1 -1
- package/dist/devices/immax.d.ts.map +1 -1
- package/dist/devices/immax.js +3 -1
- package/dist/devices/immax.js.map +1 -1
- package/dist/devices/index.d.ts.map +1 -1
- package/dist/devices/index.js +20 -2
- package/dist/devices/index.js.map +1 -1
- package/dist/devices/innr.d.ts.map +1 -1
- package/dist/devices/innr.js +34 -2
- package/dist/devices/innr.js.map +1 -1
- package/dist/devices/inovelli.d.ts.map +1 -1
- package/dist/devices/inovelli.js +41 -2348
- package/dist/devices/inovelli.js.map +1 -1
- package/dist/devices/iris.d.ts.map +1 -1
- package/dist/devices/iris.js +13 -1
- package/dist/devices/iris.js.map +1 -1
- package/dist/devices/javis.d.ts.map +1 -1
- package/dist/devices/javis.js +39 -1
- package/dist/devices/javis.js.map +1 -1
- package/dist/devices/jxuan.d.ts.map +1 -1
- package/dist/devices/jxuan.js +37 -2
- package/dist/devices/jxuan.js.map +1 -1
- package/dist/devices/kami.d.ts.map +1 -1
- package/dist/devices/kami.js +21 -2
- package/dist/devices/kami.js.map +1 -1
- package/dist/devices/keen_home.d.ts.map +1 -1
- package/dist/devices/keen_home.js +13 -3
- package/dist/devices/keen_home.js.map +1 -1
- package/dist/devices/klikaanklikuit.d.ts.map +1 -1
- package/dist/devices/klikaanklikuit.js +7 -0
- package/dist/devices/klikaanklikuit.js.map +1 -1
- package/dist/devices/kmpcil.d.ts.map +1 -1
- package/dist/devices/kmpcil.js +44 -5
- package/dist/devices/kmpcil.js.map +1 -1
- package/dist/devices/konke.d.ts.map +1 -1
- package/dist/devices/konke.js +10 -1
- package/dist/devices/konke.js.map +1 -1
- package/dist/devices/lds.d.ts.map +1 -1
- package/dist/devices/lds.js +7 -0
- package/dist/devices/lds.js.map +1 -1
- package/dist/devices/led_trading.d.ts.map +1 -1
- package/dist/devices/led_trading.js +13 -13
- package/dist/devices/led_trading.js.map +1 -1
- package/dist/devices/leedarson.d.ts.map +1 -1
- package/dist/devices/leedarson.js +140 -1
- package/dist/devices/leedarson.js.map +1 -1
- package/dist/devices/legrand.d.ts.map +1 -1
- package/dist/devices/legrand.js +73 -42
- package/dist/devices/legrand.js.map +1 -1
- package/dist/devices/lellki.d.ts.map +1 -1
- package/dist/devices/lellki.js +3 -1
- package/dist/devices/lellki.js.map +1 -1
- package/dist/devices/letv.d.ts.map +1 -1
- package/dist/devices/letv.js +16 -2
- package/dist/devices/letv.js.map +1 -1
- package/dist/devices/lidl.d.ts.map +1 -1
- package/dist/devices/lidl.js +26 -6
- package/dist/devices/lidl.js.map +1 -1
- package/dist/devices/lincukoo.d.ts.map +1 -1
- package/dist/devices/lincukoo.js +92 -31
- package/dist/devices/lincukoo.js.map +1 -1
- package/dist/devices/linkind.d.ts.map +1 -1
- package/dist/devices/linkind.js +14 -1
- package/dist/devices/linkind.js.map +1 -1
- package/dist/devices/linptech.d.ts.map +1 -1
- package/dist/devices/linptech.js +3 -1
- package/dist/devices/linptech.js.map +1 -1
- package/dist/devices/livingwise.d.ts.map +1 -1
- package/dist/devices/livingwise.js +2 -1
- package/dist/devices/livingwise.js.map +1 -1
- package/dist/devices/livolo.d.ts.map +1 -1
- package/dist/devices/livolo.js +612 -20
- package/dist/devices/livolo.js.map +1 -1
- package/dist/devices/lixee.d.ts.map +1 -1
- package/dist/devices/lixee.js +46 -44
- package/dist/devices/lixee.js.map +1 -1
- package/dist/devices/lonsonho.d.ts.map +1 -1
- package/dist/devices/lonsonho.js +18 -11
- package/dist/devices/lonsonho.js.map +1 -1
- package/dist/devices/lumi.d.ts.map +1 -1
- package/dist/devices/lumi.js +877 -155
- package/dist/devices/lumi.js.map +1 -1
- package/dist/devices/lytko.d.ts.map +1 -1
- package/dist/devices/lytko.js +205 -556
- package/dist/devices/lytko.js.map +1 -1
- package/dist/devices/makegood.d.ts.map +1 -1
- package/dist/devices/makegood.js +5 -1
- package/dist/devices/makegood.js.map +1 -1
- package/dist/devices/mazda.js +7 -7
- package/dist/devices/mazda.js.map +1 -1
- package/dist/devices/meazon.d.ts.map +1 -1
- package/dist/devices/meazon.js +82 -20
- package/dist/devices/meazon.js.map +1 -1
- package/dist/devices/megaman.d.ts +4 -0
- package/dist/devices/megaman.d.ts.map +1 -0
- package/dist/devices/megaman.js +48 -0
- package/dist/devices/megaman.js.map +1 -0
- package/dist/devices/mercator.d.ts.map +1 -1
- package/dist/devices/mercator.js +20 -5
- package/dist/devices/mercator.js.map +1 -1
- package/dist/devices/miboxer.d.ts.map +1 -1
- package/dist/devices/miboxer.js +3 -1
- package/dist/devices/miboxer.js.map +1 -1
- package/dist/devices/mill.d.ts.map +1 -1
- package/dist/devices/mill.js +33 -7
- package/dist/devices/mill.js.map +1 -1
- package/dist/devices/moes.d.ts.map +1 -1
- package/dist/devices/moes.js +89 -15
- package/dist/devices/moes.js.map +1 -1
- package/dist/devices/msh.d.ts +3 -0
- package/dist/devices/msh.d.ts.map +1 -0
- package/dist/devices/msh.js +93 -0
- package/dist/devices/msh.js.map +1 -0
- package/dist/devices/muller_licht.d.ts.map +1 -1
- package/dist/devices/muller_licht.js +11 -0
- package/dist/devices/muller_licht.js.map +1 -1
- package/dist/devices/multir.d.ts.map +1 -1
- package/dist/devices/multir.js +12 -1
- package/dist/devices/multir.js.map +1 -1
- package/dist/devices/multiterm.js +2 -2
- package/dist/devices/multiterm.js.map +1 -1
- package/dist/devices/namron.d.ts.map +1 -1
- package/dist/devices/namron.js +488 -128
- package/dist/devices/namron.js.map +1 -1
- package/dist/devices/neo.d.ts.map +1 -1
- package/dist/devices/neo.js +151 -192
- package/dist/devices/neo.js.map +1 -1
- package/dist/devices/netica.d.ts +3 -0
- package/dist/devices/netica.d.ts.map +1 -0
- package/dist/devices/netica.js +153 -0
- package/dist/devices/netica.js.map +1 -0
- package/dist/devices/niko.d.ts.map +1 -1
- package/dist/devices/niko.js +10 -8
- package/dist/devices/niko.js.map +1 -1
- package/dist/devices/nodon.d.ts.map +1 -1
- package/dist/devices/nodon.js +6 -4
- package/dist/devices/nodon.js.map +1 -1
- package/dist/devices/nous.d.ts.map +1 -1
- package/dist/devices/nous.js +160 -61
- package/dist/devices/nous.js.map +1 -1
- package/dist/devices/nue_3a.d.ts.map +1 -1
- package/dist/devices/nue_3a.js +2 -0
- package/dist/devices/nue_3a.js.map +1 -1
- package/dist/devices/onesti.d.ts +11 -1
- package/dist/devices/onesti.d.ts.map +1 -1
- package/dist/devices/onesti.js +30 -6
- package/dist/devices/onesti.js.map +1 -1
- package/dist/devices/onokom.d.ts.map +1 -1
- package/dist/devices/onokom.js +1152 -2309
- package/dist/devices/onokom.js.map +1 -1
- package/dist/devices/orvibo.d.ts +17 -1
- package/dist/devices/orvibo.d.ts.map +1 -1
- package/dist/devices/orvibo.js +71 -4
- package/dist/devices/orvibo.js.map +1 -1
- package/dist/devices/owon.d.ts.map +1 -1
- package/dist/devices/owon.js +382 -62
- package/dist/devices/owon.js.map +1 -1
- package/dist/devices/paul_neuhaus.d.ts.map +1 -1
- package/dist/devices/paul_neuhaus.js +9 -0
- package/dist/devices/paul_neuhaus.js.map +1 -1
- package/dist/devices/paulmann.js +2 -2
- package/dist/devices/paulmann.js.map +1 -1
- package/dist/devices/perenio.d.ts.map +1 -1
- package/dist/devices/perenio.js +57 -39
- package/dist/devices/perenio.js.map +1 -1
- package/dist/devices/philips.d.ts.map +1 -1
- package/dist/devices/philips.js +194 -53
- package/dist/devices/philips.js.map +1 -1
- package/dist/devices/plaid.d.ts.map +1 -1
- package/dist/devices/plaid.js +18 -1
- package/dist/devices/plaid.js.map +1 -1
- package/dist/devices/plugwise.d.ts.map +1 -1
- package/dist/devices/plugwise.js +307 -26
- package/dist/devices/plugwise.js.map +1 -1
- package/dist/devices/profalux.d.ts.map +1 -1
- package/dist/devices/profalux.js +25 -1
- package/dist/devices/profalux.js.map +1 -1
- package/dist/devices/pushok.d.ts.map +1 -1
- package/dist/devices/pushok.js +44 -0
- package/dist/devices/pushok.js.map +1 -1
- package/dist/devices/qa.d.ts.map +1 -1
- package/dist/devices/qa.js +80 -32
- package/dist/devices/qa.js.map +1 -1
- package/dist/devices/repenic_ltd.d.ts +3 -0
- package/dist/devices/repenic_ltd.d.ts.map +1 -0
- package/dist/devices/repenic_ltd.js +97 -0
- package/dist/devices/repenic_ltd.js.map +1 -0
- package/dist/devices/robb.d.ts.map +1 -1
- package/dist/devices/robb.js +13 -1
- package/dist/devices/robb.js.map +1 -1
- package/dist/devices/rtx.js +1 -1
- package/dist/devices/rtx.js.map +1 -1
- package/dist/devices/salus_controls.d.ts.map +1 -1
- package/dist/devices/salus_controls.js +44 -17
- package/dist/devices/salus_controls.js.map +1 -1
- package/dist/devices/samotech.js +2 -2
- package/dist/devices/samotech.js.map +1 -1
- package/dist/devices/sber.d.ts.map +1 -1
- package/dist/devices/sber.js +435 -26
- package/dist/devices/sber.js.map +1 -1
- package/dist/devices/schneider_electric.d.ts.map +1 -1
- package/dist/devices/schneider_electric.js +808 -252
- package/dist/devices/schneider_electric.js.map +1 -1
- package/dist/devices/securifi.d.ts.map +1 -1
- package/dist/devices/securifi.js +24 -1
- package/dist/devices/securifi.js.map +1 -1
- package/dist/devices/sengled.d.ts.map +1 -1
- package/dist/devices/sengled.js +5 -4
- package/dist/devices/sengled.js.map +1 -1
- package/dist/devices/shada.d.ts +3 -0
- package/dist/devices/shada.d.ts.map +1 -0
- package/dist/devices/{aubess.js → shada.js} +7 -20
- package/dist/devices/shada.js.map +1 -0
- package/dist/devices/shelly.d.ts.map +1 -1
- package/dist/devices/shelly.js +646 -61
- package/dist/devices/shelly.js.map +1 -1
- package/dist/devices/shinasystem.d.ts.map +1 -1
- package/dist/devices/shinasystem.js +75 -16
- package/dist/devices/shinasystem.js.map +1 -1
- package/dist/devices/siglis.d.ts.map +1 -1
- package/dist/devices/siglis.js +26 -0
- package/dist/devices/siglis.js.map +1 -1
- package/dist/devices/sinope.d.ts.map +1 -1
- package/dist/devices/sinope.js +163 -83
- package/dist/devices/sinope.js.map +1 -1
- package/dist/devices/slacky_diy.d.ts.map +1 -1
- package/dist/devices/slacky_diy.js +3007 -69
- package/dist/devices/slacky_diy.js.map +1 -1
- package/dist/devices/smarli.d.ts.map +1 -1
- package/dist/devices/smarli.js +4 -5
- package/dist/devices/smarli.js.map +1 -1
- package/dist/devices/smartthings.d.ts +25 -0
- package/dist/devices/smartthings.d.ts.map +1 -1
- package/dist/devices/smartthings.js +62 -11
- package/dist/devices/smartthings.js.map +1 -1
- package/dist/devices/somfy.d.ts.map +1 -1
- package/dist/devices/somfy.js +14 -1
- package/dist/devices/somfy.js.map +1 -1
- package/dist/devices/sonoff.d.ts +42 -1
- package/dist/devices/sonoff.d.ts.map +1 -1
- package/dist/devices/sonoff.js +5161 -2007
- package/dist/devices/sonoff.js.map +1 -1
- package/dist/devices/sprut.d.ts.map +1 -1
- package/dist/devices/sprut.js +5 -4
- package/dist/devices/sprut.js.map +1 -1
- package/dist/devices/stello.d.ts.map +1 -1
- package/dist/devices/stello.js +6 -24
- package/dist/devices/stello.js.map +1 -1
- package/dist/devices/stelpro.d.ts +51 -1
- package/dist/devices/stelpro.d.ts.map +1 -1
- package/dist/devices/stelpro.js +86 -23
- package/dist/devices/stelpro.js.map +1 -1
- package/dist/devices/sunricher.d.ts.map +1 -1
- package/dist/devices/sunricher.js +215 -29
- package/dist/devices/sunricher.js.map +1 -1
- package/dist/devices/tech.d.ts.map +1 -1
- package/dist/devices/tech.js +35 -35
- package/dist/devices/tech.js.map +1 -1
- package/dist/devices/terncy.d.ts.map +1 -1
- package/dist/devices/terncy.js +398 -2
- package/dist/devices/terncy.js.map +1 -1
- package/dist/devices/third_reality.d.ts +42 -1
- package/dist/devices/third_reality.d.ts.map +1 -1
- package/dist/devices/third_reality.js +521 -110
- package/dist/devices/third_reality.js.map +1 -1
- package/dist/devices/tuya.d.ts.map +1 -1
- package/dist/devices/tuya.js +3139 -814
- package/dist/devices/tuya.js.map +1 -1
- package/dist/devices/ubisys.d.ts.map +1 -1
- package/dist/devices/ubisys.js +11 -8
- package/dist/devices/ubisys.js.map +1 -1
- package/dist/devices/vesternet.d.ts.map +1 -1
- package/dist/devices/vesternet.js +7 -0
- package/dist/devices/vesternet.js.map +1 -1
- package/dist/devices/viessmann.d.ts.map +1 -1
- package/dist/devices/viessmann.js +107 -4
- package/dist/devices/viessmann.js.map +1 -1
- package/dist/devices/vsmart.d.ts.map +1 -1
- package/dist/devices/vsmart.js +11 -0
- package/dist/devices/vsmart.js.map +1 -1
- package/dist/devices/weiser.d.ts.map +1 -1
- package/dist/devices/weiser.js +6 -0
- package/dist/devices/weiser.js.map +1 -1
- package/dist/devices/wirenboard.d.ts.map +1 -1
- package/dist/devices/wirenboard.js +124 -21
- package/dist/devices/wirenboard.js.map +1 -1
- package/dist/devices/wmun.d.ts.map +1 -1
- package/dist/devices/wmun.js +3 -2
- package/dist/devices/wmun.js.map +1 -1
- package/dist/devices/woolley.d.ts.map +1 -1
- package/dist/devices/woolley.js +6 -9
- package/dist/devices/woolley.js.map +1 -1
- package/dist/devices/woox.js +2 -2
- package/dist/devices/woox.js.map +1 -1
- package/dist/devices/xyzroe.d.ts.map +1 -1
- package/dist/devices/xyzroe.js +16 -4
- package/dist/devices/xyzroe.js.map +1 -1
- package/dist/devices/yale.d.ts.map +1 -1
- package/dist/devices/yale.js +138 -40
- package/dist/devices/yale.js.map +1 -1
- package/dist/devices/yandex.d.ts.map +1 -1
- package/dist/devices/yandex.js +93 -11
- package/dist/devices/yandex.js.map +1 -1
- package/dist/devices/yokis.d.ts.map +1 -1
- package/dist/devices/yokis.js +122 -85
- package/dist/devices/yokis.js.map +1 -1
- package/dist/devices/zbeacon.d.ts.map +1 -1
- package/dist/devices/zbeacon.js +0 -7
- package/dist/devices/zbeacon.js.map +1 -1
- package/dist/devices/zemismart.d.ts.map +1 -1
- package/dist/devices/zemismart.js +148 -11
- package/dist/devices/zemismart.js.map +1 -1
- package/dist/devices/zigbeetlc.js +1 -1
- package/dist/devices/zigbeetlc.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -35
- package/dist/index.js.map +1 -1
- package/dist/lib/bosch.d.ts.map +1 -1
- package/dist/lib/bosch.js +212 -42
- package/dist/lib/bosch.js.map +1 -1
- package/dist/lib/constants.d.ts +99 -17
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +15 -2
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/develco.d.ts +11 -0
- package/dist/lib/develco.d.ts.map +1 -1
- package/dist/lib/develco.js +78 -9
- package/dist/lib/develco.js.map +1 -1
- package/dist/lib/exposes.d.ts +11 -10
- package/dist/lib/exposes.d.ts.map +1 -1
- package/dist/lib/exposes.js +7 -48
- package/dist/lib/exposes.js.map +1 -1
- package/dist/lib/heiman.d.ts.map +1 -1
- package/dist/lib/heiman.js +34 -14
- package/dist/lib/heiman.js.map +1 -1
- package/dist/lib/ikea.d.ts +17 -0
- package/dist/lib/ikea.d.ts.map +1 -1
- package/dist/lib/ikea.js +46 -20
- package/dist/lib/ikea.js.map +1 -1
- package/dist/lib/inovelli.d.ts +86 -0
- package/dist/lib/inovelli.d.ts.map +1 -0
- package/dist/lib/inovelli.js +2580 -0
- package/dist/lib/inovelli.js.map +1 -0
- package/dist/lib/ledvance.d.ts +4 -4
- package/dist/lib/ledvance.d.ts.map +1 -1
- package/dist/lib/ledvance.js +23 -7
- package/dist/lib/ledvance.js.map +1 -1
- package/dist/lib/legacy.d.ts +21 -2
- package/dist/lib/legacy.d.ts.map +1 -1
- package/dist/lib/legacy.js +29 -2
- package/dist/lib/legacy.js.map +1 -1
- package/dist/lib/legrand.d.ts +65 -6
- package/dist/lib/legrand.d.ts.map +1 -1
- package/dist/lib/legrand.js +188 -9
- package/dist/lib/legrand.js.map +1 -1
- package/dist/lib/light.d.ts +1 -1
- package/dist/lib/light.d.ts.map +1 -1
- package/dist/lib/light.js +2 -2
- package/dist/lib/light.js.map +1 -1
- package/dist/lib/lumi.d.ts +88 -44
- package/dist/lib/lumi.d.ts.map +1 -1
- package/dist/lib/lumi.js +1813 -59
- package/dist/lib/lumi.js.map +1 -1
- package/dist/lib/modernExtend.d.ts +19 -14
- package/dist/lib/modernExtend.d.ts.map +1 -1
- package/dist/lib/modernExtend.js +37 -35
- package/dist/lib/modernExtend.js.map +1 -1
- package/dist/lib/namron.d.ts +131 -28
- package/dist/lib/namron.d.ts.map +1 -1
- package/dist/lib/namron.js +723 -42
- package/dist/lib/namron.js.map +1 -1
- package/dist/lib/nodon.d.ts.map +1 -1
- package/dist/lib/nodon.js +3 -1
- package/dist/lib/nodon.js.map +1 -1
- package/dist/lib/philips.d.ts +106 -2
- package/dist/lib/philips.d.ts.map +1 -1
- package/dist/lib/philips.js +945 -44
- package/dist/lib/philips.js.map +1 -1
- package/dist/lib/sonoff.d.ts +77 -10
- package/dist/lib/sonoff.d.ts.map +1 -1
- package/dist/lib/sonoff.js +165 -34
- package/dist/lib/sonoff.js.map +1 -1
- package/dist/lib/sunricher.d.ts +1 -1
- package/dist/lib/sunricher.d.ts.map +1 -1
- package/dist/lib/sunricher.js +6 -8
- package/dist/lib/sunricher.js.map +1 -1
- package/dist/lib/tuya.d.ts +558 -13
- package/dist/lib/tuya.d.ts.map +1 -1
- package/dist/lib/tuya.js +1518 -10
- package/dist/lib/tuya.js.map +1 -1
- package/dist/lib/types.d.ts +9 -6
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/ubisys.d.ts +1 -1
- package/dist/lib/ubisys.d.ts.map +1 -1
- package/dist/lib/ubisys.js +60 -5
- package/dist/lib/ubisys.js.map +1 -1
- package/dist/lib/utils.d.ts +5 -8
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +30 -17
- package/dist/lib/utils.js.map +1 -1
- package/dist/lib/zosung.d.ts +69 -6
- package/dist/lib/zosung.d.ts.map +1 -1
- package/dist/lib/zosung.js +113 -1
- package/dist/lib/zosung.js.map +1 -1
- package/dist/models-index.json +1 -1
- package/package.json +2 -2
- package/dist/devices/aubess.d.ts.map +0 -1
- package/dist/devices/aubess.js.map +0 -1
|
@@ -0,0 +1,2580 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.m = exports.VZM36_ATTRIBUTES = exports.VZM35_ATTRIBUTES = exports.VZM32_MMWAVE_ATTRIBUTES = exports.VZM32_ATTRIBUTES = exports.VZM31_ATTRIBUTES = exports.VZM30_ATTRIBUTES = exports.Model = exports.INOVELLI = exports.MMWAVE_CLUSTER_NAME = exports.CLUSTER_NAME = void 0;
|
|
37
|
+
const zigbee_herdsman_1 = require("@willieee802/zigbee-herdsman");
|
|
38
|
+
const enums_1 = require("@willieee802/zigbee-herdsman/dist/zspec/zcl/definition/enums");
|
|
39
|
+
const fz = __importStar(require("../converters/fromZigbee"));
|
|
40
|
+
const tz = __importStar(require("../converters/toZigbee"));
|
|
41
|
+
const exposes = __importStar(require("./exposes"));
|
|
42
|
+
const m = __importStar(require("./modernExtend"));
|
|
43
|
+
const reporting = __importStar(require("./reporting"));
|
|
44
|
+
const utils = __importStar(require("./utils"));
|
|
45
|
+
const e = exposes.presets;
|
|
46
|
+
const ea = exposes.access;
|
|
47
|
+
const clickLookup = {
|
|
48
|
+
0: "single",
|
|
49
|
+
1: "release",
|
|
50
|
+
2: "held",
|
|
51
|
+
3: "double",
|
|
52
|
+
4: "triple",
|
|
53
|
+
5: "quadruple",
|
|
54
|
+
6: "quintuple",
|
|
55
|
+
};
|
|
56
|
+
const buttonLookup = {
|
|
57
|
+
1: "down",
|
|
58
|
+
2: "up",
|
|
59
|
+
3: "config",
|
|
60
|
+
4: "aux_down",
|
|
61
|
+
5: "aux_up",
|
|
62
|
+
6: "aux_config",
|
|
63
|
+
};
|
|
64
|
+
const ledEffects = {
|
|
65
|
+
off: 0,
|
|
66
|
+
solid: 1,
|
|
67
|
+
fast_blink: 2,
|
|
68
|
+
slow_blink: 3,
|
|
69
|
+
pulse: 4,
|
|
70
|
+
chase: 5,
|
|
71
|
+
open_close: 6,
|
|
72
|
+
small_to_big: 7,
|
|
73
|
+
aurora: 8,
|
|
74
|
+
slow_falling: 9,
|
|
75
|
+
medium_falling: 10,
|
|
76
|
+
fast_falling: 11,
|
|
77
|
+
slow_rising: 12,
|
|
78
|
+
medium_rising: 13,
|
|
79
|
+
fast_rising: 14,
|
|
80
|
+
medium_blink: 15,
|
|
81
|
+
slow_chase: 16,
|
|
82
|
+
fast_chase: 17,
|
|
83
|
+
fast_siren: 18,
|
|
84
|
+
slow_siren: 19,
|
|
85
|
+
clear_effect: 255,
|
|
86
|
+
};
|
|
87
|
+
const individualLedEffects = {
|
|
88
|
+
off: 0,
|
|
89
|
+
solid: 1,
|
|
90
|
+
fast_blink: 2,
|
|
91
|
+
slow_blink: 3,
|
|
92
|
+
pulse: 4,
|
|
93
|
+
chase: 5,
|
|
94
|
+
falling: 6,
|
|
95
|
+
rising: 7,
|
|
96
|
+
aurora: 8,
|
|
97
|
+
clear_effect: 255,
|
|
98
|
+
};
|
|
99
|
+
const mmWaveControlCommands = {
|
|
100
|
+
reset_mmwave_module: 0,
|
|
101
|
+
set_interference: 1,
|
|
102
|
+
query_areas: 2,
|
|
103
|
+
clear_interference: 3,
|
|
104
|
+
reset_detection_area: 4,
|
|
105
|
+
clear_stay_areas: 5,
|
|
106
|
+
};
|
|
107
|
+
const INOVELLI_CLUSTER_NAME = "manuSpecificInovelli";
|
|
108
|
+
const INOVELLI_MMWAVE_CLUSTER_NAME = "manuSpecificInovelliMMWave";
|
|
109
|
+
exports.CLUSTER_NAME = INOVELLI_CLUSTER_NAME;
|
|
110
|
+
exports.MMWAVE_CLUSTER_NAME = INOVELLI_MMWAVE_CLUSTER_NAME;
|
|
111
|
+
exports.INOVELLI = 0x122f;
|
|
112
|
+
const inovelliExtend = {
|
|
113
|
+
addCustomCluster: () => m.deviceAddCustomCluster(INOVELLI_CLUSTER_NAME, {
|
|
114
|
+
name: INOVELLI_CLUSTER_NAME,
|
|
115
|
+
ID: 64561,
|
|
116
|
+
manufacturerCode: 0x122f,
|
|
117
|
+
attributes: {
|
|
118
|
+
dimmingSpeedUpRemote: { name: "dimmingSpeedUpRemote", ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
119
|
+
dimmingSpeedUpLocal: { name: "dimmingSpeedUpLocal", ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
120
|
+
rampRateOffToOnRemote: { name: "rampRateOffToOnRemote", ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
121
|
+
rampRateOffToOnLocal: { name: "rampRateOffToOnLocal", ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
122
|
+
dimmingSpeedDownRemote: { name: "dimmingSpeedDownRemote", ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
123
|
+
dimmingSpeedDownLocal: { name: "dimmingSpeedDownLocal", ID: 0x0006, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
124
|
+
rampRateOnToOffRemote: { name: "rampRateOnToOffRemote", ID: 0x0007, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
125
|
+
rampRateOnToOffLocal: { name: "rampRateOnToOffLocal", ID: 0x0008, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
126
|
+
minimumLevel: { name: "minimumLevel", ID: 0x0009, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
127
|
+
maximumLevel: { name: "maximumLevel", ID: 0x000a, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
128
|
+
invertSwitch: { name: "invertSwitch", ID: 0x000b, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
129
|
+
autoTimerOff: { name: "autoTimerOff", ID: 0x000c, type: zigbee_herdsman_1.Zcl.DataType.UINT16, write: true, max: 0xffff },
|
|
130
|
+
defaultLevelLocal: { name: "defaultLevelLocal", ID: 0x000d, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
131
|
+
defaultLevelRemote: { name: "defaultLevelRemote", ID: 0x000e, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
132
|
+
stateAfterPowerRestored: { name: "stateAfterPowerRestored", ID: 0x000f, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
133
|
+
loadLevelIndicatorTimeout: { name: "loadLevelIndicatorTimeout", ID: 0x0011, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
134
|
+
activePowerReports: { name: "activePowerReports", ID: 0x0012, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
135
|
+
periodicPowerAndEnergyReports: {
|
|
136
|
+
name: "periodicPowerAndEnergyReports",
|
|
137
|
+
ID: 0x0013,
|
|
138
|
+
type: zigbee_herdsman_1.Zcl.DataType.UINT16,
|
|
139
|
+
write: true,
|
|
140
|
+
max: 0xffff,
|
|
141
|
+
},
|
|
142
|
+
activeEnergyReports: { name: "activeEnergyReports", ID: 0x0014, type: zigbee_herdsman_1.Zcl.DataType.UINT16, write: true, max: 0xffff },
|
|
143
|
+
powerType: { name: "powerType", ID: 0x0015, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
144
|
+
switchType: { name: "switchType", ID: 0x0016, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
145
|
+
quickStartTime: { name: "quickStartTime", ID: 0x0017, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
146
|
+
quickStartLevel: { name: "quickStartLevel", ID: 0x0018, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
147
|
+
higherOutputInNonNeutral: { name: "higherOutputInNonNeutral", ID: 0x0019, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
148
|
+
dimmingMode: { name: "dimmingMode", ID: 0x001a, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
149
|
+
dimmingAlgorithm: { name: "dimmingAlgorithm", ID: 0x001b, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
150
|
+
auxDetectionLevel: { name: "auxDetectionLevel", ID: 0x007c, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
151
|
+
dumbDetectionLevel: { name: "dumbDetectionLevel", ID: 0x00a5, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
152
|
+
nonNeutralAuxMediumGear: { name: "nonNeutralAuxMediumGear", ID: 0x001e, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
153
|
+
nonNeutralAuxLowGear: { name: "nonNeutralAuxLowGear", ID: 0x001f, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
154
|
+
internalTemperature: { name: "internalTemperature", ID: 0x0020, type: zigbee_herdsman_1.Zcl.DataType.INT8, write: true, max: 0xff },
|
|
155
|
+
overheat: { name: "overheat", ID: 0x0021, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
156
|
+
otaImageType: { name: "otaImageType", ID: 0x0022, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
157
|
+
buttonDelay: { name: "buttonDelay", ID: 0x0032, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
158
|
+
deviceBindNumber: { name: "deviceBindNumber", ID: 0x0033, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
159
|
+
smartBulbMode: { name: "smartBulbMode", ID: 0x0034, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
160
|
+
doubleTapUpToParam55: { name: "doubleTapUpToParam55", ID: 0x0035, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
161
|
+
doubleTapDownToParam56: { name: "doubleTapDownToParam56", ID: 0x0036, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
162
|
+
brightnessLevelForDoubleTapUp: { name: "brightnessLevelForDoubleTapUp", ID: 0x0037, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
163
|
+
brightnessLevelForDoubleTapDown: {
|
|
164
|
+
name: "brightnessLevelForDoubleTapDown",
|
|
165
|
+
ID: 0x0038,
|
|
166
|
+
type: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
167
|
+
write: true,
|
|
168
|
+
max: 0xff,
|
|
169
|
+
},
|
|
170
|
+
defaultLed1ColorWhenOn: { name: "defaultLed1ColorWhenOn", ID: 0x003c, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
171
|
+
defaultLed1ColorWhenOff: { name: "defaultLed1ColorWhenOff", ID: 0x003d, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
172
|
+
defaultLed1IntensityWhenOn: { name: "defaultLed1IntensityWhenOn", ID: 0x003e, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
173
|
+
defaultLed1IntensityWhenOff: { name: "defaultLed1IntensityWhenOff", ID: 0x003f, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
174
|
+
defaultLed2ColorWhenOn: { name: "defaultLed2ColorWhenOn", ID: 0x0041, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
175
|
+
defaultLed2ColorWhenOff: { name: "defaultLed2ColorWhenOff", ID: 0x0042, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
176
|
+
defaultLed2IntensityWhenOn: { name: "defaultLed2IntensityWhenOn", ID: 0x0043, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
177
|
+
defaultLed2IntensityWhenOff: { name: "defaultLed2IntensityWhenOff", ID: 0x0044, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
178
|
+
defaultLed3ColorWhenOn: { name: "defaultLed3ColorWhenOn", ID: 0x0046, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
179
|
+
defaultLed3ColorWhenOff: { name: "defaultLed3ColorWhenOff", ID: 0x0047, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
180
|
+
defaultLed3IntensityWhenOn: { name: "defaultLed3IntensityWhenOn", ID: 0x0048, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
181
|
+
defaultLed3IntensityWhenOff: { name: "defaultLed3IntensityWhenOff", ID: 0x0049, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
182
|
+
defaultLed4ColorWhenOn: { name: "defaultLed4ColorWhenOn", ID: 0x004b, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
183
|
+
defaultLed4ColorWhenOff: { name: "defaultLed4ColorWhenOff", ID: 0x004c, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
184
|
+
defaultLed4IntensityWhenOn: { name: "defaultLed4IntensityWhenOn", ID: 0x004d, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
185
|
+
defaultLed4IntensityWhenOff: { name: "defaultLed4IntensityWhenOff", ID: 0x004e, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
186
|
+
defaultLed5ColorWhenOn: { name: "defaultLed5ColorWhenOn", ID: 0x0050, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
187
|
+
defaultLed5ColorWhenOff: { name: "defaultLed5ColorWhenOff", ID: 0x0051, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
188
|
+
defaultLed5IntensityWhenOn: { name: "defaultLed5IntensityWhenOn", ID: 0x0052, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
189
|
+
defaultLed5IntensityWhenOff: { name: "defaultLed5IntensityWhenOff", ID: 0x0053, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
190
|
+
defaultLed6ColorWhenOn: { name: "defaultLed6ColorWhenOn", ID: 0x0055, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
191
|
+
defaultLed6ColorWhenOff: { name: "defaultLed6ColorWhenOff", ID: 0x0056, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
192
|
+
defaultLed6IntensityWhenOn: { name: "defaultLed6IntensityWhenOn", ID: 0x0057, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
193
|
+
defaultLed6IntensityWhenOff: { name: "defaultLed6IntensityWhenOff", ID: 0x0058, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
194
|
+
defaultLed7ColorWhenOn: { name: "defaultLed7ColorWhenOn", ID: 0x005a, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
195
|
+
defaultLed7ColorWhenOff: { name: "defaultLed7ColorWhenOff", ID: 0x005b, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
196
|
+
defaultLed7IntensityWhenOn: { name: "defaultLed7IntensityWhenOn", ID: 0x005c, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
197
|
+
defaultLed7IntensityWhenOff: { name: "defaultLed7IntensityWhenOff", ID: 0x005d, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
198
|
+
ledColorWhenOn: { name: "ledColorWhenOn", ID: 0x005f, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
199
|
+
ledColorWhenOff: { name: "ledColorWhenOff", ID: 0x060, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
200
|
+
ledIntensityWhenOn: { name: "ledIntensityWhenOn", ID: 0x0061, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
201
|
+
ledIntensityWhenOff: { name: "ledIntensityWhenOff", ID: 0x0062, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
202
|
+
ledBarScaling: { name: "ledBarScaling", ID: 0x0064, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
203
|
+
mmwaveControlWiredDevice: { name: "mmwaveControlWiredDevice", ID: 0x006e, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
204
|
+
mmWaveRoomSizePreset: { name: "mmWaveRoomSizePreset", ID: 0x0075, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
205
|
+
singleTapBehavior: { name: "singleTapBehavior", ID: 0x0078, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
206
|
+
fanTimerMode: { name: "fanTimerMode", ID: 0x0079, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
207
|
+
auxSwitchUniqueScenes: { name: "auxSwitchUniqueScenes", ID: 0x007b, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
208
|
+
bindingOffToOnSyncLevel: { name: "bindingOffToOnSyncLevel", ID: 0x007d, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
209
|
+
breezeMode: { name: "breezeMode", ID: 0x0081, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
|
|
210
|
+
fanControlMode: { name: "fanControlMode", ID: 0x0082, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
211
|
+
lowLevelForFanControlMode: { name: "lowLevelForFanControlMode", ID: 0x0083, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
212
|
+
mediumLevelForFanControlMode: { name: "mediumLevelForFanControlMode", ID: 0x0084, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
213
|
+
highLevelForFanControlMode: { name: "highLevelForFanControlMode", ID: 0x0085, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
214
|
+
ledColorForFanControlMode: { name: "ledColorForFanControlMode", ID: 0x0086, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
215
|
+
localProtection: { name: "localProtection", ID: 0x0100, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
216
|
+
remoteProtection: { name: "remoteProtection", ID: 0x0101, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
217
|
+
outputMode: { name: "outputMode", ID: 0x0102, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
218
|
+
onOffLedMode: { name: "onOffLedMode", ID: 0x0103, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
219
|
+
firmwareUpdateInProgressIndicator: { name: "firmwareUpdateInProgressIndicator", ID: 0x0104, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
220
|
+
relayClick: { name: "relayClick", ID: 0x105, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
221
|
+
doubleTapClearNotifications: { name: "doubleTapClearNotifications", ID: 0x106, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN, write: true },
|
|
222
|
+
fanLedLevelType: { name: "fanLedLevelType", ID: 0x0107, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
223
|
+
},
|
|
224
|
+
commands: {
|
|
225
|
+
ledEffect: {
|
|
226
|
+
name: "ledEffect",
|
|
227
|
+
ID: 1,
|
|
228
|
+
parameters: [
|
|
229
|
+
{ name: "effect", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff },
|
|
230
|
+
{ name: "color", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff },
|
|
231
|
+
{ name: "level", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff },
|
|
232
|
+
{ name: "duration", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff },
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
energyReset: {
|
|
236
|
+
name: "energyReset",
|
|
237
|
+
ID: 2,
|
|
238
|
+
parameters: [],
|
|
239
|
+
},
|
|
240
|
+
individualLedEffect: {
|
|
241
|
+
name: "individualLedEffect",
|
|
242
|
+
ID: 3,
|
|
243
|
+
parameters: [
|
|
244
|
+
{ name: "led", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff },
|
|
245
|
+
{ name: "effect", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff },
|
|
246
|
+
{ name: "color", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff },
|
|
247
|
+
{ name: "level", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff },
|
|
248
|
+
{ name: "duration", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff },
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
ledEffectComplete: {
|
|
252
|
+
name: "ledEffectComplete",
|
|
253
|
+
ID: 0x24,
|
|
254
|
+
parameters: [{ name: "notificationType", type: zigbee_herdsman_1.Zcl.DataType.INT8, min: -128 }],
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
commandsResponse: {},
|
|
258
|
+
}),
|
|
259
|
+
addCustomMMWaveCluster: () => {
|
|
260
|
+
const mmWaveCommandAreaParameters = [
|
|
261
|
+
{ name: "areaId", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 3 },
|
|
262
|
+
{ name: "xMin", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
|
|
263
|
+
{ name: "xMax", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
|
|
264
|
+
{ name: "yMin", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
|
|
265
|
+
{ name: "yMax", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
|
|
266
|
+
{ name: "zMin", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
|
|
267
|
+
{ name: "zMax", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
|
|
268
|
+
];
|
|
269
|
+
const mmWaveCommandResponseAreaParameters = [
|
|
270
|
+
{ name: "count", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
271
|
+
{ name: "xMin1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
272
|
+
{ name: "xMax1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
273
|
+
{ name: "yMin1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
274
|
+
{ name: "yMax1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
275
|
+
{ name: "zMin1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
276
|
+
{ name: "zMax1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
277
|
+
{ name: "xMin2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
278
|
+
{ name: "xMax2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
279
|
+
{ name: "yMin2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
280
|
+
{ name: "yMax2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
281
|
+
{ name: "zMin2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
282
|
+
{ name: "zMax2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
283
|
+
{ name: "xMin3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
284
|
+
{ name: "xMax3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
285
|
+
{ name: "yMin3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
286
|
+
{ name: "yMax3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
287
|
+
{ name: "zMin3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
288
|
+
{ name: "zMax3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
289
|
+
{ name: "xMin4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
290
|
+
{ name: "xMax4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
291
|
+
{ name: "yMin4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
292
|
+
{ name: "yMax4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
293
|
+
{ name: "zMin4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
294
|
+
{ name: "zMax4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
295
|
+
];
|
|
296
|
+
return m.deviceAddCustomCluster(INOVELLI_MMWAVE_CLUSTER_NAME, {
|
|
297
|
+
name: INOVELLI_MMWAVE_CLUSTER_NAME,
|
|
298
|
+
ID: 64562, // 0xfc32
|
|
299
|
+
manufacturerCode: 0x122f,
|
|
300
|
+
attributes: {
|
|
301
|
+
mmWaveHoldTime: { name: "mmWaveHoldTime", ID: 0x0072, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
|
|
302
|
+
mmWaveDetectSensitivity: { name: "mmWaveDetectSensitivity", ID: 0x0070, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
303
|
+
mmWaveDetectTrigger: { name: "mmWaveDetectTrigger", ID: 0x0071, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
304
|
+
mmWaveTargetInfoReport: { name: "mmWaveTargetInfoReport", ID: 0x006b, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
|
|
305
|
+
mmWaveStayLife: { name: "mmWaveStayLife", ID: 0x006c, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
|
|
306
|
+
mmWaveVersion: { name: "mmWaveVersion", ID: 0x0073, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
|
|
307
|
+
mmWaveHeightMin: { name: "mmWaveHeightMin", ID: 0x0065, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
|
|
308
|
+
mmWaveHeightMax: { name: "mmWaveHeightMax", ID: 0x0066, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
|
|
309
|
+
mmWaveWidthMin: { name: "mmWaveWidthMin", ID: 0x0067, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
|
|
310
|
+
mmWaveWidthMax: { name: "mmWaveWidthMax", ID: 0x0068, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
|
|
311
|
+
mmWaveDepthMin: { name: "mmWaveDepthMin", ID: 0x0069, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
|
|
312
|
+
mmWaveDepthMax: { name: "mmWaveDepthMax", ID: 0x006a, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
|
|
313
|
+
},
|
|
314
|
+
commands: {
|
|
315
|
+
mmWaveControl: {
|
|
316
|
+
name: "mmWaveControl",
|
|
317
|
+
ID: 0,
|
|
318
|
+
parameters: [{ name: "controlID", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff }],
|
|
319
|
+
},
|
|
320
|
+
setInterferenceArea: {
|
|
321
|
+
name: "setInterferenceArea",
|
|
322
|
+
ID: 1,
|
|
323
|
+
parameters: mmWaveCommandAreaParameters,
|
|
324
|
+
},
|
|
325
|
+
setDetectionArea: {
|
|
326
|
+
name: "setDetectionArea",
|
|
327
|
+
ID: 2,
|
|
328
|
+
parameters: mmWaveCommandAreaParameters,
|
|
329
|
+
},
|
|
330
|
+
setStayArea: {
|
|
331
|
+
name: "setStayArea",
|
|
332
|
+
ID: 3,
|
|
333
|
+
parameters: mmWaveCommandAreaParameters,
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
commandsResponse: {
|
|
337
|
+
anyoneInReportingArea: {
|
|
338
|
+
name: "anyoneInReportingArea",
|
|
339
|
+
ID: 0,
|
|
340
|
+
parameters: [
|
|
341
|
+
{ name: "area1", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
342
|
+
{ name: "area2", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
343
|
+
{ name: "area3", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
344
|
+
{ name: "area4", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
345
|
+
],
|
|
346
|
+
},
|
|
347
|
+
reportTargetInfo: {
|
|
348
|
+
name: "reportTargetInfo",
|
|
349
|
+
ID: 1,
|
|
350
|
+
parameters: [
|
|
351
|
+
{ name: "targetNum", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
352
|
+
{ name: "targets", type: enums_1.BuffaloZclDataType.BUFFER },
|
|
353
|
+
],
|
|
354
|
+
},
|
|
355
|
+
reportInterferenceArea: {
|
|
356
|
+
name: "reportInterferenceArea",
|
|
357
|
+
ID: 2,
|
|
358
|
+
parameters: mmWaveCommandResponseAreaParameters,
|
|
359
|
+
},
|
|
360
|
+
reportDetectionArea: {
|
|
361
|
+
name: "reportDetectionArea",
|
|
362
|
+
ID: 3,
|
|
363
|
+
parameters: mmWaveCommandResponseAreaParameters,
|
|
364
|
+
},
|
|
365
|
+
reportStayArea: {
|
|
366
|
+
name: "reportStayArea",
|
|
367
|
+
ID: 4,
|
|
368
|
+
parameters: mmWaveCommandResponseAreaParameters,
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
});
|
|
372
|
+
},
|
|
373
|
+
parameters: ({ attrs, model, splitValuesByEndpoint = false, }) => {
|
|
374
|
+
const fromZigbee = [];
|
|
375
|
+
const toZigbee = [];
|
|
376
|
+
for (const attr of attrs) {
|
|
377
|
+
fromZigbee.push(fzLocal.inovelli(attr.attributes, attr.clusterName, splitValuesByEndpoint, model));
|
|
378
|
+
toZigbee.push(tzLocal.inovelli_parameters(attr.attributes, attr.clusterName, model), tzLocal.inovelli_parameters_read_only(attr.attributes, attr.clusterName));
|
|
379
|
+
}
|
|
380
|
+
const dynamicExposes = (device, _options) => {
|
|
381
|
+
const result = [];
|
|
382
|
+
if (utils.isDummyDevice(device)) {
|
|
383
|
+
for (const attr of attrs) {
|
|
384
|
+
attributesToExposeList(adjustAttributesForDevice(attr.attributes, model), result);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
const fw = device.softwareBuildID ? parseFirmwareVersion(device.softwareBuildID) : undefined;
|
|
389
|
+
for (const attr of attrs) {
|
|
390
|
+
attributesToExposeList(adjustAttributesForDevice(attr.attributes, model, fw), result);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return result;
|
|
394
|
+
};
|
|
395
|
+
const configure = [
|
|
396
|
+
async (device, coordinatorEndpoint, definition) => {
|
|
397
|
+
const endpoint = device.getEndpoint(1);
|
|
398
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [INOVELLI_CLUSTER_NAME]);
|
|
399
|
+
let endpoint2;
|
|
400
|
+
if (splitValuesByEndpoint) {
|
|
401
|
+
endpoint2 = device.getEndpoint(2);
|
|
402
|
+
await reporting.bind(endpoint2, coordinatorEndpoint, [INOVELLI_CLUSTER_NAME]);
|
|
403
|
+
}
|
|
404
|
+
const fw = device.softwareBuildID ? parseFirmwareVersion(device.softwareBuildID) : undefined;
|
|
405
|
+
for (const attr of attrs) {
|
|
406
|
+
const filtered = adjustAttributesForDevice(attr.attributes, model, fw);
|
|
407
|
+
if (!splitValuesByEndpoint || !endpoint2) {
|
|
408
|
+
await chunkedRead(endpoint, Object.keys(filtered), attr.clusterName);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
await chunkedRead(endpoint, Object.keys(filtered).flatMap((key) => {
|
|
412
|
+
const keysplit = key.split("_");
|
|
413
|
+
if (keysplit.length === 2) {
|
|
414
|
+
if (Number(keysplit[1]) === 1) {
|
|
415
|
+
return [keysplit[0]];
|
|
416
|
+
}
|
|
417
|
+
return [];
|
|
418
|
+
}
|
|
419
|
+
return [key];
|
|
420
|
+
}), attr.clusterName);
|
|
421
|
+
await chunkedRead(endpoint2, Object.keys(filtered).flatMap((key) => {
|
|
422
|
+
const keysplit = key.split("_");
|
|
423
|
+
if (keysplit.length === 2) {
|
|
424
|
+
if (Number(keysplit[1]) === 2) {
|
|
425
|
+
return [keysplit[0]];
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return [];
|
|
429
|
+
}), attr.clusterName);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
];
|
|
434
|
+
return {
|
|
435
|
+
fromZigbee,
|
|
436
|
+
toZigbee,
|
|
437
|
+
exposes: [dynamicExposes],
|
|
438
|
+
configure,
|
|
439
|
+
isModernExtend: true,
|
|
440
|
+
};
|
|
441
|
+
},
|
|
442
|
+
ledEffects: () => {
|
|
443
|
+
return {
|
|
444
|
+
fromZigbee: [fzLocal.led_effect_complete],
|
|
445
|
+
toZigbee: [tzLocal.inovelli_led_effect, tzLocal.inovelli_individual_led_effect],
|
|
446
|
+
exposes: [exposeLedEffects(), exposeIndividualLedEffects(), exposeLedEffectComplete()],
|
|
447
|
+
isModernExtend: true,
|
|
448
|
+
};
|
|
449
|
+
},
|
|
450
|
+
buttonTaps: () => {
|
|
451
|
+
const configure = [
|
|
452
|
+
async (device, coordinatorEndpoint, definition) => {
|
|
453
|
+
const endpoint2 = device.getEndpoint(2);
|
|
454
|
+
await reporting.bind(endpoint2, coordinatorEndpoint, [INOVELLI_CLUSTER_NAME]);
|
|
455
|
+
},
|
|
456
|
+
];
|
|
457
|
+
return {
|
|
458
|
+
fromZigbee: [fzLocal.button_taps],
|
|
459
|
+
exposes: [e.action(BUTTON_TAP_SEQUENCES)],
|
|
460
|
+
configure,
|
|
461
|
+
isModernExtend: true,
|
|
462
|
+
};
|
|
463
|
+
},
|
|
464
|
+
light: ({ splitValuesByEndpoint = false } = {}) => {
|
|
465
|
+
const fromZigbee = [fzLocal.on_off_for_endpoint(1, "state"), fzLocal.brightness];
|
|
466
|
+
if (!splitValuesByEndpoint) {
|
|
467
|
+
fromZigbee.push(fz.level_config, fz.power_on_behavior);
|
|
468
|
+
}
|
|
469
|
+
const configure = [
|
|
470
|
+
async (device, coordinatorEndpoint, definition) => {
|
|
471
|
+
const endpoint = device.getEndpoint(1);
|
|
472
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ["genOnOff", "genLevelCtrl"]);
|
|
473
|
+
await reporting.onOff(endpoint);
|
|
474
|
+
},
|
|
475
|
+
];
|
|
476
|
+
return {
|
|
477
|
+
fromZigbee,
|
|
478
|
+
toZigbee: [
|
|
479
|
+
tzLocal.light_onoff_brightness_inovelli,
|
|
480
|
+
tz.power_on_behavior,
|
|
481
|
+
tz.ignore_transition,
|
|
482
|
+
tz.light_brightness_move,
|
|
483
|
+
tz.light_brightness_step,
|
|
484
|
+
tz.level_config,
|
|
485
|
+
],
|
|
486
|
+
exposes: [e.light_brightness()],
|
|
487
|
+
configure,
|
|
488
|
+
isModernExtend: true,
|
|
489
|
+
};
|
|
490
|
+
},
|
|
491
|
+
fan: ({ endpointId, splitValuesByEndpoint = false }) => {
|
|
492
|
+
return {
|
|
493
|
+
fromZigbee: [fzLocal.fan_mode(endpointId), fzLocal.breeze_mode(endpointId), fzLocal.fan_state(endpointId)],
|
|
494
|
+
toZigbee: [tzLocal.fan_mode(endpointId), tzLocal.breezeMode(endpointId), tzLocal.fan_state(endpointId)],
|
|
495
|
+
exposes: [e.fan().withState("fan_state").withModes(Object.keys(FAN_MODES)), exposeBreezeMode()],
|
|
496
|
+
configure: [
|
|
497
|
+
async (device, coordinatorEndpoint, definition) => {
|
|
498
|
+
const endpoint = device.getEndpoint(endpointId);
|
|
499
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ["genOnOff", "genLevelCtrl"]);
|
|
500
|
+
await reporting.onOff(endpoint);
|
|
501
|
+
},
|
|
502
|
+
],
|
|
503
|
+
isModernExtend: true,
|
|
504
|
+
};
|
|
505
|
+
},
|
|
506
|
+
mmWave: () => {
|
|
507
|
+
const configure = [
|
|
508
|
+
async (device, coordinatorEndpoint, definition) => {
|
|
509
|
+
const endpoint = device.getEndpoint(1);
|
|
510
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [INOVELLI_MMWAVE_CLUSTER_NAME]);
|
|
511
|
+
await endpoint.command(INOVELLI_MMWAVE_CLUSTER_NAME, "mmWaveControl", {
|
|
512
|
+
controlID: mmWaveControlCommands.query_areas,
|
|
513
|
+
}, { disableResponse: true, disableDefaultResponse: true });
|
|
514
|
+
},
|
|
515
|
+
];
|
|
516
|
+
return {
|
|
517
|
+
fromZigbee: [fzLocal.anyone_in_reporting_area, fzLocal.report_areas, fzLocal.report_target_info],
|
|
518
|
+
toZigbee: [
|
|
519
|
+
tzLocal.inovelli_mmwave_control_commands,
|
|
520
|
+
tzLocal.mmwave_detection_areas,
|
|
521
|
+
tzLocal.mmwave_interference_areas,
|
|
522
|
+
tzLocal.mmwave_stay_areas,
|
|
523
|
+
],
|
|
524
|
+
exposes: [
|
|
525
|
+
exposeMMWaveControl(),
|
|
526
|
+
...exposeMMWaveAreas(),
|
|
527
|
+
exposeInterferenceAreas(),
|
|
528
|
+
exposeDetectionAreas(),
|
|
529
|
+
exposeStayAreas(),
|
|
530
|
+
exposeMMWaveTargets(),
|
|
531
|
+
],
|
|
532
|
+
configure: configure,
|
|
533
|
+
isModernExtend: true,
|
|
534
|
+
};
|
|
535
|
+
},
|
|
536
|
+
energyReset: () => {
|
|
537
|
+
return {
|
|
538
|
+
toZigbee: [tzLocal.inovelli_energy_reset],
|
|
539
|
+
exposes: [exposeEnergyReset()],
|
|
540
|
+
isModernExtend: true,
|
|
541
|
+
};
|
|
542
|
+
},
|
|
543
|
+
};
|
|
544
|
+
exports.m = inovelliExtend;
|
|
545
|
+
const FAN_MODES = { off: 0, low: 2, smart: 4, medium: 86, high: 170, on: 255 };
|
|
546
|
+
const BREEZE_MODES = ["off", "low", "medium", "high"];
|
|
547
|
+
const LED_NOTIFICATION_TYPES = {
|
|
548
|
+
0: "LED_1",
|
|
549
|
+
1: "LED_2",
|
|
550
|
+
2: "LED_3",
|
|
551
|
+
3: "LED_4",
|
|
552
|
+
4: "LED_5",
|
|
553
|
+
5: "LED_6",
|
|
554
|
+
6: "LED_7",
|
|
555
|
+
16: "ALL_LEDS",
|
|
556
|
+
"-1": "CONFIG_BUTTON_DOUBLE_PRESS",
|
|
557
|
+
};
|
|
558
|
+
exports.Model = {
|
|
559
|
+
VZM30: "VZM30-SN",
|
|
560
|
+
VZM31: "VZM31-SN",
|
|
561
|
+
VZM32: "VZM32-SN",
|
|
562
|
+
VZM35: "VZM35-SN",
|
|
563
|
+
VZM36: "VZM36",
|
|
564
|
+
};
|
|
565
|
+
// Converts brightness level to a fan mode
|
|
566
|
+
const intToFanMode = (value) => {
|
|
567
|
+
let selectedMode = "low";
|
|
568
|
+
if (value >= FAN_MODES.low) {
|
|
569
|
+
selectedMode = "low";
|
|
570
|
+
}
|
|
571
|
+
if (value >= FAN_MODES.medium) {
|
|
572
|
+
selectedMode = "medium";
|
|
573
|
+
}
|
|
574
|
+
if (value >= FAN_MODES.high) {
|
|
575
|
+
selectedMode = "high";
|
|
576
|
+
}
|
|
577
|
+
if (value === 4) {
|
|
578
|
+
selectedMode = "smart";
|
|
579
|
+
}
|
|
580
|
+
if (value === 0) {
|
|
581
|
+
selectedMode = "off";
|
|
582
|
+
}
|
|
583
|
+
return selectedMode;
|
|
584
|
+
};
|
|
585
|
+
/**
|
|
586
|
+
* Convert speed string to int needed for breeze mode calculation.
|
|
587
|
+
* @param speedIn - speed string
|
|
588
|
+
* @returns low = 1, medium = 2, high = 3, off = 0
|
|
589
|
+
*/
|
|
590
|
+
const speedToInt = (speedIn) => {
|
|
591
|
+
switch (speedIn) {
|
|
592
|
+
case "low":
|
|
593
|
+
return 1;
|
|
594
|
+
case "medium":
|
|
595
|
+
return 2;
|
|
596
|
+
case "high":
|
|
597
|
+
return 3;
|
|
598
|
+
default:
|
|
599
|
+
return 0;
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
const parseFirmwareVersion = (version) => {
|
|
603
|
+
const match = version.match(/(\d+)\.(\d+)/);
|
|
604
|
+
if (!match)
|
|
605
|
+
return undefined;
|
|
606
|
+
return [Number.parseInt(match[1], 10), Number.parseInt(match[2], 10)];
|
|
607
|
+
};
|
|
608
|
+
const fwGte = (firmware, target) => {
|
|
609
|
+
return firmware[0] > target[0] || (firmware[0] === target[0] && firmware[1] >= target[1]);
|
|
610
|
+
};
|
|
611
|
+
const resolveValueMap = (attr, model) => {
|
|
612
|
+
if (!attr.modelValues)
|
|
613
|
+
return undefined;
|
|
614
|
+
const entry = model ? attr.modelValues[model] : undefined;
|
|
615
|
+
return entry?.values ?? attr.modelValues.default.values;
|
|
616
|
+
};
|
|
617
|
+
const adjustAttributesForDevice = (attributes, model, firmware) => {
|
|
618
|
+
const result = {};
|
|
619
|
+
for (const [key, attr] of Object.entries(attributes)) {
|
|
620
|
+
if (attr.addedInFirmware) {
|
|
621
|
+
const threshold = attr.addedInFirmware[model];
|
|
622
|
+
if (!threshold)
|
|
623
|
+
continue;
|
|
624
|
+
if (firmware && !fwGte(firmware, threshold))
|
|
625
|
+
continue;
|
|
626
|
+
}
|
|
627
|
+
if (attr.modelValues) {
|
|
628
|
+
const entry = attr.modelValues[model] ?? attr.modelValues.default;
|
|
629
|
+
const baseValues = { ...(entry.values ?? attr.modelValues.default.values) };
|
|
630
|
+
if (firmware && entry.conditionalValues) {
|
|
631
|
+
for (const [valueName, constraint] of Object.entries(entry.conditionalValues)) {
|
|
632
|
+
if (!(valueName in baseValues))
|
|
633
|
+
continue;
|
|
634
|
+
if (constraint.addedInFirmware && !fwGte(firmware, constraint.addedInFirmware)) {
|
|
635
|
+
delete baseValues[valueName];
|
|
636
|
+
}
|
|
637
|
+
if (constraint.removedInFirmware && fwGte(firmware, constraint.removedInFirmware)) {
|
|
638
|
+
delete baseValues[valueName];
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
const { modelValues: _, ...rest } = attr;
|
|
643
|
+
result[key] = { ...rest, values: baseValues };
|
|
644
|
+
continue;
|
|
645
|
+
}
|
|
646
|
+
result[key] = attr;
|
|
647
|
+
}
|
|
648
|
+
return result;
|
|
649
|
+
};
|
|
650
|
+
// Create Expose list with Inovelli Parameters definitions
|
|
651
|
+
const attributesToExposeList = (attributes, exposesList) => {
|
|
652
|
+
Object.keys(attributes).forEach((key) => {
|
|
653
|
+
if (attributes[key].displayType === "enum") {
|
|
654
|
+
const enumE = e
|
|
655
|
+
.enum(key, attributes[key].readOnly ? ea.STATE_GET : ea.ALL, Object.keys(attributes[key].values ?? {}))
|
|
656
|
+
.withDescription(attributes[key].description);
|
|
657
|
+
if (!attributes[key].readOnly) {
|
|
658
|
+
enumE.withCategory(attributes[key].category ?? "config");
|
|
659
|
+
}
|
|
660
|
+
exposesList.push(enumE);
|
|
661
|
+
}
|
|
662
|
+
else if (attributes[key].displayType === "binary" || attributes[key].displayType === "switch") {
|
|
663
|
+
const binary = e
|
|
664
|
+
.binary(key, attributes[key].readOnly ? ea.STATE_GET : ea.ALL,
|
|
665
|
+
// @ts-expect-error ignore
|
|
666
|
+
attributes[key].values.Enabled, attributes[key].values.Disabled)
|
|
667
|
+
.withDescription(attributes[key].description);
|
|
668
|
+
if (!attributes[key].readOnly) {
|
|
669
|
+
binary.withCategory(attributes[key].category ?? "config");
|
|
670
|
+
}
|
|
671
|
+
exposesList.push(binary);
|
|
672
|
+
}
|
|
673
|
+
else {
|
|
674
|
+
const numeric = e
|
|
675
|
+
.numeric(key, attributes[key].readOnly ? ea.STATE_GET : ea.ALL)
|
|
676
|
+
.withValueMin(attributes[key].min)
|
|
677
|
+
.withValueMax(attributes[key].max);
|
|
678
|
+
if (attributes[key].values) {
|
|
679
|
+
Object.keys(attributes[key].values).forEach((value) => {
|
|
680
|
+
numeric.withPreset(value, attributes[key].values[value], "");
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
if (attributes[key].unit) {
|
|
684
|
+
numeric.withUnit(attributes[key].unit);
|
|
685
|
+
}
|
|
686
|
+
numeric.withDescription(attributes[key].description);
|
|
687
|
+
if (!attributes[key].readOnly) {
|
|
688
|
+
numeric.withCategory(attributes[key].category ?? "config");
|
|
689
|
+
}
|
|
690
|
+
exposesList.push(numeric);
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
};
|
|
694
|
+
/**
|
|
695
|
+
* Attribute composition: COMMON_ATTRIBUTES is the base; COMMON_DIMMER_*, COMMON_DIMMABLE_LIGHT_*,
|
|
696
|
+
* COMMON_DIMMER_ON_OFF_* extend it; VZM*_ATTRIBUTES are device-specific compositions. Only VZM* are exported.
|
|
697
|
+
*/
|
|
698
|
+
/**
|
|
699
|
+
* Common Attributes
|
|
700
|
+
*
|
|
701
|
+
* These attributes are shared between all devices with the manufacturer specific Inovelli cluster
|
|
702
|
+
* Some of the descriptions, max, min or value properties may be overridden for each device
|
|
703
|
+
*/
|
|
704
|
+
const COMMON_ATTRIBUTES = {
|
|
705
|
+
dimmingSpeedUpRemote: {
|
|
706
|
+
id: 1,
|
|
707
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
708
|
+
min: 0,
|
|
709
|
+
max: 127,
|
|
710
|
+
description: "This changes the speed that the light dims up when controlled from the hub. " +
|
|
711
|
+
"A setting of 0 turns the light immediately on. Increasing the value slows down the transition speed. " +
|
|
712
|
+
"Every number represents 100ms. Default = 25 (2.5s)",
|
|
713
|
+
},
|
|
714
|
+
dimmingSpeedUpLocal: {
|
|
715
|
+
id: 2,
|
|
716
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
717
|
+
min: 0,
|
|
718
|
+
max: 127,
|
|
719
|
+
description: "This changes the speed that the light dims up when controlled at the switch. " +
|
|
720
|
+
"A setting of 0 turns the light immediately on. Increasing the value slows down the transition speed. " +
|
|
721
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
|
|
722
|
+
},
|
|
723
|
+
rampRateOffToOnRemote: {
|
|
724
|
+
id: 3,
|
|
725
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
726
|
+
min: 0,
|
|
727
|
+
max: 127,
|
|
728
|
+
description: "This changes the speed that the light turns on when controlled from the hub. " +
|
|
729
|
+
"A setting of 0 turns the light immediately on. Increasing the value slows down the transition speed. " +
|
|
730
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
|
|
731
|
+
},
|
|
732
|
+
rampRateOffToOnLocal: {
|
|
733
|
+
id: 4,
|
|
734
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
735
|
+
min: 0,
|
|
736
|
+
max: 127,
|
|
737
|
+
description: "This changes the speed that the light turns on when controlled at the switch. " +
|
|
738
|
+
"A setting of 0 turns the light immediately on. Increasing the value slows down the transition speed. " +
|
|
739
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
|
|
740
|
+
},
|
|
741
|
+
dimmingSpeedDownRemote: {
|
|
742
|
+
id: 5,
|
|
743
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
744
|
+
min: 0,
|
|
745
|
+
max: 127,
|
|
746
|
+
description: "This changes the speed that the light dims down when controlled from the hub. " +
|
|
747
|
+
"A setting of 0 turns the light immediately off. Increasing the value slows down the transition speed. " +
|
|
748
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
|
|
749
|
+
},
|
|
750
|
+
dimmingSpeedDownLocal: {
|
|
751
|
+
id: 6,
|
|
752
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
753
|
+
min: 0,
|
|
754
|
+
max: 127,
|
|
755
|
+
description: "This changes the speed that the light dims down when controlled at the switch. " +
|
|
756
|
+
"A setting of 0 turns the light immediately off. Increasing the value slows down the transition speed. " +
|
|
757
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpLocal setting.",
|
|
758
|
+
},
|
|
759
|
+
rampRateOnToOffRemote: {
|
|
760
|
+
id: 7,
|
|
761
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
762
|
+
min: 0,
|
|
763
|
+
max: 127,
|
|
764
|
+
description: "This changes the speed that the light turns off when controlled from the hub. " +
|
|
765
|
+
"A setting of 'instant' turns the light immediately off. Increasing the value slows down the transition speed. " +
|
|
766
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with rampRateOffToOnRemote setting.",
|
|
767
|
+
},
|
|
768
|
+
rampRateOnToOffLocal: {
|
|
769
|
+
id: 8,
|
|
770
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
771
|
+
min: 0,
|
|
772
|
+
max: 127,
|
|
773
|
+
description: "This changes the speed that the light turns off when controlled at the switch. " +
|
|
774
|
+
"A setting of 'instant' turns the light immediately off. Increasing the value slows down the transition speed. " +
|
|
775
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with rampRateOffToOnLocal setting.",
|
|
776
|
+
},
|
|
777
|
+
invertSwitch: {
|
|
778
|
+
id: 11,
|
|
779
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
780
|
+
displayType: "enum",
|
|
781
|
+
modelValues: { default: { values: { Yes: 1, No: 0 } } },
|
|
782
|
+
min: 0,
|
|
783
|
+
max: 1,
|
|
784
|
+
description: "Inverts the orientation of the switch." +
|
|
785
|
+
" Useful when the switch is installed upside down. Essentially up becomes down and down becomes up.",
|
|
786
|
+
},
|
|
787
|
+
autoTimerOff: {
|
|
788
|
+
id: 12,
|
|
789
|
+
min: 0,
|
|
790
|
+
max: 32767,
|
|
791
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT16,
|
|
792
|
+
unit: "seconds",
|
|
793
|
+
modelValues: { default: { values: { Disabled: 0 } } },
|
|
794
|
+
description: "Automatically turns the switch off after this many seconds." +
|
|
795
|
+
" When the switch is turned on a timer is started. When the timer expires, the switch is turned off. 0 = Auto off is disabled.",
|
|
796
|
+
},
|
|
797
|
+
defaultLevelLocal: {
|
|
798
|
+
id: 13,
|
|
799
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
800
|
+
min: 0,
|
|
801
|
+
max: 255,
|
|
802
|
+
description: "Default level for the load when it is turned on at the switch." +
|
|
803
|
+
" A setting of 255 means that the switch will return to the level that it was on before it was turned off.",
|
|
804
|
+
},
|
|
805
|
+
defaultLevelRemote: {
|
|
806
|
+
id: 14,
|
|
807
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
808
|
+
min: 0,
|
|
809
|
+
max: 255,
|
|
810
|
+
description: "Default level for the load when it is turned on from the hub." +
|
|
811
|
+
" A setting of 255 means that the switch will return to the level that it was on before it was turned off.",
|
|
812
|
+
},
|
|
813
|
+
stateAfterPowerRestored: {
|
|
814
|
+
id: 15,
|
|
815
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
816
|
+
min: 0,
|
|
817
|
+
max: 255,
|
|
818
|
+
description: "The state the switch should return to when power is restored after power failure. 0 = off, 1-254 = level, 255 = previous.",
|
|
819
|
+
},
|
|
820
|
+
loadLevelIndicatorTimeout: {
|
|
821
|
+
id: 17,
|
|
822
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
823
|
+
description: "Shows the level that the load is at for x number of seconds after the load is adjusted" +
|
|
824
|
+
" and then returns to the Default LED state. 0 = Stay Off, 1-10 = seconds, 11 = Stay On.",
|
|
825
|
+
displayType: "enum",
|
|
826
|
+
modelValues: {
|
|
827
|
+
default: {
|
|
828
|
+
values: {
|
|
829
|
+
"Stay Off": 0,
|
|
830
|
+
"1 Second": 1,
|
|
831
|
+
"2 Seconds": 2,
|
|
832
|
+
"3 Seconds": 3,
|
|
833
|
+
"4 Seconds": 4,
|
|
834
|
+
"5 Seconds": 5,
|
|
835
|
+
"6 Seconds": 6,
|
|
836
|
+
"7 Seconds": 7,
|
|
837
|
+
"8 Seconds": 8,
|
|
838
|
+
"9 Seconds": 9,
|
|
839
|
+
"10 Seconds": 10,
|
|
840
|
+
"Stay On": 11,
|
|
841
|
+
},
|
|
842
|
+
},
|
|
843
|
+
},
|
|
844
|
+
min: 0,
|
|
845
|
+
max: 11,
|
|
846
|
+
},
|
|
847
|
+
switchType: {
|
|
848
|
+
id: 22,
|
|
849
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
850
|
+
displayType: "enum",
|
|
851
|
+
modelValues: {
|
|
852
|
+
default: { values: { "Single Pole": 0, "Aux Switch": 1 } },
|
|
853
|
+
[exports.Model.VZM31]: {
|
|
854
|
+
values: { "Single Pole": 0, "3-Way Dumb Switch": 1, "3-Way Aux Switch": 2, "Single-Pole Full Sine Wave": 3 },
|
|
855
|
+
conditionalValues: { "Single-Pole Full Sine Wave": { removedInFirmware: [3, 0] } },
|
|
856
|
+
},
|
|
857
|
+
},
|
|
858
|
+
min: 0,
|
|
859
|
+
max: 3,
|
|
860
|
+
description: "Set the switch configuration.",
|
|
861
|
+
},
|
|
862
|
+
internalTemperature: {
|
|
863
|
+
id: 32,
|
|
864
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.INT8,
|
|
865
|
+
min: 0,
|
|
866
|
+
max: 127,
|
|
867
|
+
readOnly: true,
|
|
868
|
+
description: "The temperature measured by the temperature sensor inside the chip, in degrees Celsius",
|
|
869
|
+
category: "diagnostic",
|
|
870
|
+
unit: "°C",
|
|
871
|
+
},
|
|
872
|
+
overheat: {
|
|
873
|
+
id: 33,
|
|
874
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
875
|
+
displayType: "enum",
|
|
876
|
+
modelValues: { default: { values: { "No Alert": 0, Overheated: 1 } } },
|
|
877
|
+
min: 0,
|
|
878
|
+
max: 1,
|
|
879
|
+
readOnly: true,
|
|
880
|
+
description: "Indicates if the internal chipset is currently in an overheated state.",
|
|
881
|
+
},
|
|
882
|
+
buttonDelay: {
|
|
883
|
+
id: 50,
|
|
884
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
885
|
+
modelValues: {
|
|
886
|
+
default: {
|
|
887
|
+
values: {
|
|
888
|
+
"0ms": 0,
|
|
889
|
+
"100ms": 1,
|
|
890
|
+
"200ms": 2,
|
|
891
|
+
"300ms": 3,
|
|
892
|
+
"400ms": 4,
|
|
893
|
+
"500ms": 5,
|
|
894
|
+
"600ms": 6,
|
|
895
|
+
"700ms": 7,
|
|
896
|
+
"800ms": 8,
|
|
897
|
+
"900ms": 9,
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
},
|
|
901
|
+
displayType: "enum",
|
|
902
|
+
min: 0,
|
|
903
|
+
max: 9,
|
|
904
|
+
description: "This will set the button press delay. 0 = no delay (Disables Button Press Events), Default = 500ms.",
|
|
905
|
+
},
|
|
906
|
+
deviceBindNumber: {
|
|
907
|
+
id: 51,
|
|
908
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
909
|
+
readOnly: true,
|
|
910
|
+
description: "The number of devices currently bound (excluding gateways) and counts one group as two devices",
|
|
911
|
+
},
|
|
912
|
+
smartBulbMode: {
|
|
913
|
+
id: 52,
|
|
914
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
915
|
+
displayType: "enum",
|
|
916
|
+
modelValues: {
|
|
917
|
+
default: { values: { Disabled: 0, "Smart Bulb Mode": 1 } },
|
|
918
|
+
[exports.Model.VZM35]: { values: { Disabled: 0, "Smart Fan Mode": 1 } },
|
|
919
|
+
},
|
|
920
|
+
description: "For use with Smart Bulbs that need constant power and are controlled via commands rather than power.",
|
|
921
|
+
},
|
|
922
|
+
doubleTapUpToParam55: {
|
|
923
|
+
id: 53,
|
|
924
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
925
|
+
displayType: "enum",
|
|
926
|
+
modelValues: { default: { values: { Disabled: 0, Enabled: 1 } } },
|
|
927
|
+
description: "Enable or Disable setting level to parameter 55 on double-tap UP.",
|
|
928
|
+
},
|
|
929
|
+
doubleTapDownToParam56: {
|
|
930
|
+
id: 54,
|
|
931
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
932
|
+
displayType: "enum",
|
|
933
|
+
modelValues: { default: { values: { Disabled: 0, Enabled: 1 } } },
|
|
934
|
+
description: "Enable or Disable setting level to parameter 56 on double-tap DOWN.",
|
|
935
|
+
},
|
|
936
|
+
brightnessLevelForDoubleTapUp: {
|
|
937
|
+
id: 55,
|
|
938
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
939
|
+
min: 2,
|
|
940
|
+
max: 255,
|
|
941
|
+
description: "Set this level on double-tap UP (if enabled by P53). 255 = send ON command.",
|
|
942
|
+
},
|
|
943
|
+
brightnessLevelForDoubleTapDown: {
|
|
944
|
+
id: 56,
|
|
945
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
946
|
+
min: 0,
|
|
947
|
+
max: 255,
|
|
948
|
+
description: "Set this level on double-tap DOWN (if enabled by P54). 255 = send OFF command.",
|
|
949
|
+
},
|
|
950
|
+
ledColorWhenOn: {
|
|
951
|
+
id: 95,
|
|
952
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
953
|
+
min: 0,
|
|
954
|
+
max: 255,
|
|
955
|
+
modelValues: {
|
|
956
|
+
default: {
|
|
957
|
+
values: {
|
|
958
|
+
Red: 0,
|
|
959
|
+
Orange: 21,
|
|
960
|
+
Yellow: 42,
|
|
961
|
+
Green: 85,
|
|
962
|
+
Cyan: 127,
|
|
963
|
+
Blue: 170,
|
|
964
|
+
Violet: 212,
|
|
965
|
+
Pink: 234,
|
|
966
|
+
White: 255,
|
|
967
|
+
},
|
|
968
|
+
},
|
|
969
|
+
},
|
|
970
|
+
description: "Set the color of the LED Indicator when the load is on.",
|
|
971
|
+
},
|
|
972
|
+
ledColorWhenOff: {
|
|
973
|
+
id: 96,
|
|
974
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
975
|
+
min: 0,
|
|
976
|
+
max: 255,
|
|
977
|
+
modelValues: {
|
|
978
|
+
default: {
|
|
979
|
+
values: {
|
|
980
|
+
Red: 0,
|
|
981
|
+
Orange: 21,
|
|
982
|
+
Yellow: 42,
|
|
983
|
+
Green: 85,
|
|
984
|
+
Cyan: 127,
|
|
985
|
+
Blue: 170,
|
|
986
|
+
Violet: 212,
|
|
987
|
+
Pink: 234,
|
|
988
|
+
White: 255,
|
|
989
|
+
},
|
|
990
|
+
},
|
|
991
|
+
},
|
|
992
|
+
description: "Set the color of the LED Indicator when the load is off.",
|
|
993
|
+
},
|
|
994
|
+
ledIntensityWhenOn: {
|
|
995
|
+
id: 97,
|
|
996
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
997
|
+
min: 0,
|
|
998
|
+
max: 100,
|
|
999
|
+
description: "Set the intensity of the LED Indicator when the load is on.",
|
|
1000
|
+
},
|
|
1001
|
+
ledIntensityWhenOff: {
|
|
1002
|
+
id: 98,
|
|
1003
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1004
|
+
min: 0,
|
|
1005
|
+
max: 100,
|
|
1006
|
+
description: "Set the intensity of the LED Indicator when the load is off.",
|
|
1007
|
+
},
|
|
1008
|
+
singleTapBehavior: {
|
|
1009
|
+
id: 120,
|
|
1010
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1011
|
+
displayType: "enum",
|
|
1012
|
+
modelValues: { default: { values: { "Old Behavior": 0, "New Behavior": 1, "Down Always Off": 2 } } },
|
|
1013
|
+
description: "Behavior of single tapping the on or off button. Old behavior turns the switch on or off. " +
|
|
1014
|
+
"New behavior cycles through the levels set by P131-133. Down Always Off is like the new behavior but " +
|
|
1015
|
+
"down always turns the switch off instead of going to next lower speed.",
|
|
1016
|
+
},
|
|
1017
|
+
fanControlMode: {
|
|
1018
|
+
id: 130,
|
|
1019
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1020
|
+
displayType: "enum",
|
|
1021
|
+
modelValues: {
|
|
1022
|
+
default: { values: { Disabled: 0, "Multi Tap": 1, Cycle: 2, Toggle: 3 } },
|
|
1023
|
+
[exports.Model.VZM31]: {
|
|
1024
|
+
conditionalValues: { Toggle: { addedInFirmware: [3, 0] } },
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
description: "Which mode to use when binding EP3 (config button) to another device (like a fan module).",
|
|
1028
|
+
},
|
|
1029
|
+
lowLevelForFanControlMode: {
|
|
1030
|
+
id: 131,
|
|
1031
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1032
|
+
min: 2,
|
|
1033
|
+
max: 254,
|
|
1034
|
+
description: "Level to send to device bound to EP3 when set to low.",
|
|
1035
|
+
},
|
|
1036
|
+
mediumLevelForFanControlMode: {
|
|
1037
|
+
id: 132,
|
|
1038
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1039
|
+
min: 2,
|
|
1040
|
+
max: 254,
|
|
1041
|
+
description: "Level to send to device bound to EP3 when set to medium.",
|
|
1042
|
+
},
|
|
1043
|
+
highLevelForFanControlMode: {
|
|
1044
|
+
id: 133,
|
|
1045
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1046
|
+
min: 2,
|
|
1047
|
+
max: 254,
|
|
1048
|
+
description: "Level to send to device bound to EP3 when set to high.",
|
|
1049
|
+
},
|
|
1050
|
+
ledColorForFanControlMode: {
|
|
1051
|
+
id: 134,
|
|
1052
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1053
|
+
min: 0,
|
|
1054
|
+
max: 255,
|
|
1055
|
+
modelValues: {
|
|
1056
|
+
default: {
|
|
1057
|
+
values: {
|
|
1058
|
+
Red: 0,
|
|
1059
|
+
Orange: 21,
|
|
1060
|
+
Yellow: 42,
|
|
1061
|
+
Green: 85,
|
|
1062
|
+
Cyan: 127,
|
|
1063
|
+
Blue: 170,
|
|
1064
|
+
Violet: 212,
|
|
1065
|
+
Pink: 234,
|
|
1066
|
+
White: 255,
|
|
1067
|
+
},
|
|
1068
|
+
},
|
|
1069
|
+
},
|
|
1070
|
+
description: "LED color used to display fan control mode.",
|
|
1071
|
+
},
|
|
1072
|
+
auxSwitchUniqueScenes: {
|
|
1073
|
+
id: 123,
|
|
1074
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1075
|
+
displayType: "enum",
|
|
1076
|
+
modelValues: { default: { values: { Disabled: 0, Enabled: 1 } } },
|
|
1077
|
+
description: "Have unique scene numbers for scenes activated with the aux switch.",
|
|
1078
|
+
},
|
|
1079
|
+
bindingOffToOnSyncLevel: {
|
|
1080
|
+
id: 125,
|
|
1081
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1082
|
+
displayType: "enum",
|
|
1083
|
+
modelValues: { default: { values: { Disabled: 0, Enabled: 1 } } },
|
|
1084
|
+
description: "Send Move_To_Level using Default Level with Off/On to bound devices.",
|
|
1085
|
+
},
|
|
1086
|
+
localProtection: {
|
|
1087
|
+
id: 256,
|
|
1088
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1089
|
+
modelValues: { default: { values: { Disabled: 0, Enabled: 1 } } },
|
|
1090
|
+
description: "Ability to control switch from the wall.",
|
|
1091
|
+
displayType: "enum",
|
|
1092
|
+
},
|
|
1093
|
+
remoteProtection: {
|
|
1094
|
+
id: 257,
|
|
1095
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1096
|
+
modelValues: { default: { values: { Disabled: 0, Enabled: 1 } } },
|
|
1097
|
+
readOnly: true,
|
|
1098
|
+
description: "Ability to control switch from the hub.",
|
|
1099
|
+
displayType: "enum",
|
|
1100
|
+
},
|
|
1101
|
+
onOffLedMode: {
|
|
1102
|
+
id: 259,
|
|
1103
|
+
min: 0,
|
|
1104
|
+
max: 1,
|
|
1105
|
+
modelValues: { default: { values: { All: 0, One: 1 } } },
|
|
1106
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1107
|
+
description: "When the device is in On/Off mode, use full LED bar or just one LED.",
|
|
1108
|
+
displayType: "enum",
|
|
1109
|
+
},
|
|
1110
|
+
firmwareUpdateInProgressIndicator: {
|
|
1111
|
+
id: 260,
|
|
1112
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1113
|
+
modelValues: { default: { values: { Disabled: 0, Enabled: 1 } } },
|
|
1114
|
+
description: "Display progress on LED bar during firmware update.",
|
|
1115
|
+
displayType: "enum",
|
|
1116
|
+
},
|
|
1117
|
+
defaultLed1ColorWhenOn: {
|
|
1118
|
+
id: 60,
|
|
1119
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1120
|
+
min: 0,
|
|
1121
|
+
max: 255,
|
|
1122
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1123
|
+
},
|
|
1124
|
+
defaultLed1ColorWhenOff: {
|
|
1125
|
+
id: 61,
|
|
1126
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1127
|
+
min: 0,
|
|
1128
|
+
max: 255,
|
|
1129
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1130
|
+
},
|
|
1131
|
+
defaultLed1IntensityWhenOn: {
|
|
1132
|
+
id: 62,
|
|
1133
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1134
|
+
min: 0,
|
|
1135
|
+
max: 101,
|
|
1136
|
+
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1137
|
+
},
|
|
1138
|
+
defaultLed1IntensityWhenOff: {
|
|
1139
|
+
id: 63,
|
|
1140
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1141
|
+
min: 0,
|
|
1142
|
+
max: 101,
|
|
1143
|
+
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1144
|
+
},
|
|
1145
|
+
defaultLed2ColorWhenOn: {
|
|
1146
|
+
id: 65,
|
|
1147
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1148
|
+
min: 0,
|
|
1149
|
+
max: 255,
|
|
1150
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1151
|
+
},
|
|
1152
|
+
defaultLed2ColorWhenOff: {
|
|
1153
|
+
id: 66,
|
|
1154
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1155
|
+
min: 0,
|
|
1156
|
+
max: 255,
|
|
1157
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1158
|
+
},
|
|
1159
|
+
defaultLed2IntensityWhenOn: {
|
|
1160
|
+
id: 67,
|
|
1161
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1162
|
+
min: 0,
|
|
1163
|
+
max: 101,
|
|
1164
|
+
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1165
|
+
},
|
|
1166
|
+
defaultLed2IntensityWhenOff: {
|
|
1167
|
+
id: 68,
|
|
1168
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1169
|
+
min: 0,
|
|
1170
|
+
max: 101,
|
|
1171
|
+
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1172
|
+
},
|
|
1173
|
+
defaultLed3ColorWhenOn: {
|
|
1174
|
+
id: 70,
|
|
1175
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1176
|
+
min: 0,
|
|
1177
|
+
max: 255,
|
|
1178
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1179
|
+
},
|
|
1180
|
+
defaultLed3ColorWhenOff: {
|
|
1181
|
+
id: 71,
|
|
1182
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1183
|
+
min: 0,
|
|
1184
|
+
max: 255,
|
|
1185
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1186
|
+
},
|
|
1187
|
+
defaultLed3IntensityWhenOn: {
|
|
1188
|
+
id: 72,
|
|
1189
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1190
|
+
min: 0,
|
|
1191
|
+
max: 101,
|
|
1192
|
+
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1193
|
+
},
|
|
1194
|
+
defaultLed3IntensityWhenOff: {
|
|
1195
|
+
id: 73,
|
|
1196
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1197
|
+
min: 0,
|
|
1198
|
+
max: 101,
|
|
1199
|
+
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1200
|
+
},
|
|
1201
|
+
defaultLed4ColorWhenOn: {
|
|
1202
|
+
id: 75,
|
|
1203
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1204
|
+
min: 0,
|
|
1205
|
+
max: 255,
|
|
1206
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1207
|
+
},
|
|
1208
|
+
defaultLed4ColorWhenOff: {
|
|
1209
|
+
id: 76,
|
|
1210
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1211
|
+
min: 0,
|
|
1212
|
+
max: 255,
|
|
1213
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1214
|
+
},
|
|
1215
|
+
defaultLed4IntensityWhenOn: {
|
|
1216
|
+
id: 77,
|
|
1217
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1218
|
+
min: 0,
|
|
1219
|
+
max: 101,
|
|
1220
|
+
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1221
|
+
},
|
|
1222
|
+
defaultLed4IntensityWhenOff: {
|
|
1223
|
+
id: 78,
|
|
1224
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1225
|
+
min: 0,
|
|
1226
|
+
max: 101,
|
|
1227
|
+
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1228
|
+
},
|
|
1229
|
+
defaultLed5ColorWhenOn: {
|
|
1230
|
+
id: 80,
|
|
1231
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1232
|
+
min: 0,
|
|
1233
|
+
max: 255,
|
|
1234
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1235
|
+
},
|
|
1236
|
+
defaultLed5ColorWhenOff: {
|
|
1237
|
+
id: 81,
|
|
1238
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1239
|
+
min: 0,
|
|
1240
|
+
max: 255,
|
|
1241
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1242
|
+
},
|
|
1243
|
+
defaultLed5IntensityWhenOn: {
|
|
1244
|
+
id: 82,
|
|
1245
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1246
|
+
min: 0,
|
|
1247
|
+
max: 101,
|
|
1248
|
+
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1249
|
+
},
|
|
1250
|
+
defaultLed5IntensityWhenOff: {
|
|
1251
|
+
id: 83,
|
|
1252
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1253
|
+
min: 0,
|
|
1254
|
+
max: 101,
|
|
1255
|
+
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1256
|
+
},
|
|
1257
|
+
defaultLed6ColorWhenOn: {
|
|
1258
|
+
id: 85,
|
|
1259
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1260
|
+
min: 0,
|
|
1261
|
+
max: 255,
|
|
1262
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1263
|
+
},
|
|
1264
|
+
defaultLed6ColorWhenOff: {
|
|
1265
|
+
id: 86,
|
|
1266
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1267
|
+
min: 0,
|
|
1268
|
+
max: 255,
|
|
1269
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1270
|
+
},
|
|
1271
|
+
defaultLed6IntensityWhenOn: {
|
|
1272
|
+
id: 87,
|
|
1273
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1274
|
+
min: 0,
|
|
1275
|
+
max: 101,
|
|
1276
|
+
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1277
|
+
},
|
|
1278
|
+
defaultLed6IntensityWhenOff: {
|
|
1279
|
+
id: 88,
|
|
1280
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1281
|
+
min: 0,
|
|
1282
|
+
max: 101,
|
|
1283
|
+
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1284
|
+
},
|
|
1285
|
+
defaultLed7ColorWhenOn: {
|
|
1286
|
+
id: 90,
|
|
1287
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1288
|
+
min: 0,
|
|
1289
|
+
max: 255,
|
|
1290
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1291
|
+
},
|
|
1292
|
+
defaultLed7ColorWhenOff: {
|
|
1293
|
+
id: 91,
|
|
1294
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1295
|
+
min: 0,
|
|
1296
|
+
max: 255,
|
|
1297
|
+
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
|
|
1298
|
+
},
|
|
1299
|
+
defaultLed7IntensityWhenOn: {
|
|
1300
|
+
id: 92,
|
|
1301
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1302
|
+
min: 0,
|
|
1303
|
+
max: 101,
|
|
1304
|
+
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1305
|
+
},
|
|
1306
|
+
defaultLed7IntensityWhenOff: {
|
|
1307
|
+
id: 93,
|
|
1308
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1309
|
+
min: 0,
|
|
1310
|
+
max: 101,
|
|
1311
|
+
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
|
|
1312
|
+
},
|
|
1313
|
+
fanTimerMode: {
|
|
1314
|
+
id: 121,
|
|
1315
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1316
|
+
displayType: "enum",
|
|
1317
|
+
modelValues: { default: { values: { Disabled: 0, Enabled: 1 } } },
|
|
1318
|
+
description: "Enable or disable advanced timer mode to have the switch act like a bathroom fan timer",
|
|
1319
|
+
},
|
|
1320
|
+
doubleTapClearNotifications: {
|
|
1321
|
+
id: 262,
|
|
1322
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1323
|
+
min: 0,
|
|
1324
|
+
max: 1,
|
|
1325
|
+
description: "Double-Tap the Config button to clear notifications.",
|
|
1326
|
+
modelValues: { default: { values: { "Enabled (Default)": 0, Disabled: 1 } } },
|
|
1327
|
+
displayType: "enum",
|
|
1328
|
+
},
|
|
1329
|
+
fanLedLevelType: {
|
|
1330
|
+
id: 263,
|
|
1331
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1332
|
+
min: 0,
|
|
1333
|
+
max: 10,
|
|
1334
|
+
modelValues: { default: { values: { "Limitless (like VZM31)": 0, "Adaptive LED": 10 } } },
|
|
1335
|
+
description: "Level display of the LED Strip",
|
|
1336
|
+
},
|
|
1337
|
+
};
|
|
1338
|
+
/**
|
|
1339
|
+
* Common Dimmer Attributes
|
|
1340
|
+
*
|
|
1341
|
+
* These attributes are shared between all devices that act like dimmers (including dimmers + fan switches) with
|
|
1342
|
+
* the manufacturer specific Inovelli cluster. These are not shared with on/off switches.
|
|
1343
|
+
* Some of the descriptions, max, min or value properties may be overridden for each device
|
|
1344
|
+
*/
|
|
1345
|
+
const COMMON_DIMMER_ATTRIBUTES = {
|
|
1346
|
+
...COMMON_ATTRIBUTES,
|
|
1347
|
+
minimumLevel: {
|
|
1348
|
+
id: 9,
|
|
1349
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1350
|
+
min: 1,
|
|
1351
|
+
max: 254,
|
|
1352
|
+
description: "The minimum level that the dimmer allows the bulb to be dimmed to. " +
|
|
1353
|
+
"Useful when the user has an LED bulb that does not turn on or flickers at a lower level.",
|
|
1354
|
+
},
|
|
1355
|
+
maximumLevel: {
|
|
1356
|
+
id: 10,
|
|
1357
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1358
|
+
min: 2,
|
|
1359
|
+
max: 255,
|
|
1360
|
+
description: "The maximum level that the dimmer allows the bulb to be dimmed to." +
|
|
1361
|
+
"Useful when the user has an LED bulb that reaches its maximum level before the " +
|
|
1362
|
+
"dimmer value of 99 or when the user wants to limit the maximum brightness.",
|
|
1363
|
+
},
|
|
1364
|
+
powerType: {
|
|
1365
|
+
id: 21,
|
|
1366
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1367
|
+
displayType: "enum",
|
|
1368
|
+
modelValues: { default: { values: { "Non Neutral": 0, Neutral: 1 } } },
|
|
1369
|
+
min: 0,
|
|
1370
|
+
max: 1,
|
|
1371
|
+
readOnly: true,
|
|
1372
|
+
description: "Set the power type for the device.",
|
|
1373
|
+
},
|
|
1374
|
+
outputMode: {
|
|
1375
|
+
id: 258,
|
|
1376
|
+
min: 0,
|
|
1377
|
+
max: 1,
|
|
1378
|
+
modelValues: {
|
|
1379
|
+
default: { values: { Dimmer: 0, "On/Off": 1 } },
|
|
1380
|
+
[exports.Model.VZM35]: { values: { "Ceiling Fan (3-Speed)": 0, "Exhaust Fan (On/Off)": 1 } },
|
|
1381
|
+
},
|
|
1382
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1383
|
+
description: "Use device as a Dimmer or an On/Off switch.",
|
|
1384
|
+
displayType: "enum",
|
|
1385
|
+
},
|
|
1386
|
+
};
|
|
1387
|
+
/**
|
|
1388
|
+
* Common Dimmable light Attributes
|
|
1389
|
+
*
|
|
1390
|
+
* These attributes are shared between all devices that are dimmable light switches with
|
|
1391
|
+
* the manufacturer specific Inovelli cluster. These are not shared with fans or on/off switches.
|
|
1392
|
+
* Some of the descriptions, max, min or value properties may be overridden for each device
|
|
1393
|
+
*/
|
|
1394
|
+
const COMMON_DIMMABLE_LIGHT_ATTRIBUTES = {
|
|
1395
|
+
quickStartTime: {
|
|
1396
|
+
id: 23,
|
|
1397
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1398
|
+
min: 0,
|
|
1399
|
+
max: 60,
|
|
1400
|
+
description: "Duration of full power output while lamp transitions from Off to On. In 60th of second. 0 = disable, 1 = 1/60s, 60 = 1s",
|
|
1401
|
+
},
|
|
1402
|
+
quickStartLevel: {
|
|
1403
|
+
id: 24,
|
|
1404
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1405
|
+
min: 1,
|
|
1406
|
+
max: 254,
|
|
1407
|
+
description: "Level of power output during Quick Start Light time (P23).",
|
|
1408
|
+
},
|
|
1409
|
+
higherOutputInNonNeutral: {
|
|
1410
|
+
id: 25,
|
|
1411
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1412
|
+
displayType: "enum",
|
|
1413
|
+
modelValues: { default: { values: { "Disabled (default)": 0, Enabled: 1 } } },
|
|
1414
|
+
min: 0,
|
|
1415
|
+
max: 1,
|
|
1416
|
+
description: "Increase level in non-neutral mode",
|
|
1417
|
+
},
|
|
1418
|
+
dimmingMode: {
|
|
1419
|
+
id: 26,
|
|
1420
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1421
|
+
displayType: "enum",
|
|
1422
|
+
modelValues: { default: { values: { "Leading edge": 0, "Trailing edge": 1 } } },
|
|
1423
|
+
min: 0,
|
|
1424
|
+
max: 1,
|
|
1425
|
+
readOnly: true,
|
|
1426
|
+
description: "Switches the dimming mode from leading edge (default) to trailing edge. " +
|
|
1427
|
+
"1. Trailing Edge is only available on neutral single-pole and neutral multi-way with an " +
|
|
1428
|
+
"aux/add-on switch (multi-way with a dumb/existing switch and non-neutral setups are not supported and " +
|
|
1429
|
+
"will default back to Leading Edge). This parameter can only be changed at the switch.",
|
|
1430
|
+
},
|
|
1431
|
+
dimmingAlgorithm: {
|
|
1432
|
+
id: 27,
|
|
1433
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1434
|
+
displayType: "enum",
|
|
1435
|
+
modelValues: { default: { values: { "Old dimming algorithm (v2.18)": 0, "New dimming algorithm (v3.04)": 1 } } },
|
|
1436
|
+
addedInFirmware: { [exports.Model.VZM31]: [3, 5] },
|
|
1437
|
+
min: 0,
|
|
1438
|
+
max: 1,
|
|
1439
|
+
description: "Switches the dimming algorithm from old to new. When switching the algorithm, the switch will restart. " +
|
|
1440
|
+
"Some non-neutral setups may not support the new algorithm, in which case you can use the old algorithm." +
|
|
1441
|
+
"0 = old dimming algorithm (v2.18), 1 = new dimming algorithm (v3.04+) (default).",
|
|
1442
|
+
},
|
|
1443
|
+
auxDetectionLevel: {
|
|
1444
|
+
id: 124,
|
|
1445
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1446
|
+
addedInFirmware: { [exports.Model.VZM31]: [3, 5] },
|
|
1447
|
+
min: 0,
|
|
1448
|
+
max: 4,
|
|
1449
|
+
description: "Aux detection level (P124). Range: 0-4, default: 1. " +
|
|
1450
|
+
"If you are having issues with the aux function, start setting from 0 and continue until the aux function operates normally.",
|
|
1451
|
+
},
|
|
1452
|
+
dumbDetectionLevel: {
|
|
1453
|
+
id: 165,
|
|
1454
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1455
|
+
addedInFirmware: { [exports.Model.VZM31]: [3, 7] },
|
|
1456
|
+
min: 0,
|
|
1457
|
+
max: 4,
|
|
1458
|
+
description: "Dumb detection level (P165). Range: 0-4, default: 0. " +
|
|
1459
|
+
"If the dumb switch function is not working correctly, start at 0 and increase until it operates normally.",
|
|
1460
|
+
},
|
|
1461
|
+
};
|
|
1462
|
+
/**
|
|
1463
|
+
* Common Dimmer or On/Off Attributes
|
|
1464
|
+
*
|
|
1465
|
+
* These attributes are shared between all devices that are light switches (either dimmers or on/off) with
|
|
1466
|
+
* the manufacturer specific Inovelli cluster. These are not shared with fans.
|
|
1467
|
+
* Some of the descriptions, max, min or value properties may be overridden for each device
|
|
1468
|
+
*/
|
|
1469
|
+
const COMMON_DIMMER_ON_OFF_ATTRIBUTES = {
|
|
1470
|
+
ledBarScaling: {
|
|
1471
|
+
id: 100,
|
|
1472
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1473
|
+
displayType: "enum",
|
|
1474
|
+
modelValues: { default: { values: { "Gen3 method (VZM-style)": 0, "Gen2 method (LZW-style)": 1 } } },
|
|
1475
|
+
description: "Method used for scaling.",
|
|
1476
|
+
},
|
|
1477
|
+
activePowerReports: {
|
|
1478
|
+
id: 18,
|
|
1479
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1480
|
+
min: 0,
|
|
1481
|
+
max: 100,
|
|
1482
|
+
description: "Percent power level change that will result in a new power report being sent. 0 = Disabled",
|
|
1483
|
+
},
|
|
1484
|
+
periodicPowerAndEnergyReports: {
|
|
1485
|
+
id: 19,
|
|
1486
|
+
min: 0,
|
|
1487
|
+
max: 32767,
|
|
1488
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT16,
|
|
1489
|
+
description: "Time period between consecutive power & energy reports being sent (in seconds). The timer is reset after each report is sent.",
|
|
1490
|
+
},
|
|
1491
|
+
activeEnergyReports: {
|
|
1492
|
+
id: 20,
|
|
1493
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT16,
|
|
1494
|
+
min: 0,
|
|
1495
|
+
max: 32767,
|
|
1496
|
+
description: "Energy reports Energy level change which will result in sending a new energy report." +
|
|
1497
|
+
"0 = disabled, 1-32767 = 0.01kWh-327.67kWh. Default setting: 10 (0.1 kWh)",
|
|
1498
|
+
},
|
|
1499
|
+
};
|
|
1500
|
+
exports.VZM30_ATTRIBUTES = {
|
|
1501
|
+
...COMMON_ATTRIBUTES,
|
|
1502
|
+
...COMMON_DIMMER_ON_OFF_ATTRIBUTES,
|
|
1503
|
+
outputMode: {
|
|
1504
|
+
...COMMON_DIMMER_ATTRIBUTES.outputMode,
|
|
1505
|
+
description: "Use device as a Dimmer or an On/Off switch. Only applies when controlling bound devices.",
|
|
1506
|
+
},
|
|
1507
|
+
};
|
|
1508
|
+
exports.VZM31_ATTRIBUTES = {
|
|
1509
|
+
// Temporarily exclude fanTimerMode from the VZM31. While the specifications indicate that this attribute should be present, it's missing in the current firmware (2.18). This can be removed once the firmware bug is corrected.
|
|
1510
|
+
...Object.fromEntries(Object.entries(COMMON_DIMMER_ATTRIBUTES).filter(([key]) => key !== "fanTimerMode")),
|
|
1511
|
+
...COMMON_DIMMER_ON_OFF_ATTRIBUTES,
|
|
1512
|
+
...COMMON_DIMMABLE_LIGHT_ATTRIBUTES,
|
|
1513
|
+
relayClick: {
|
|
1514
|
+
id: 261,
|
|
1515
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
|
|
1516
|
+
min: 0,
|
|
1517
|
+
max: 1,
|
|
1518
|
+
description: "In neutral on/off setups, the default is to have a clicking sound to notify you that the relay " +
|
|
1519
|
+
"is open or closed. You may disable this sound by creating a, “simulated” on/off where the switch " +
|
|
1520
|
+
"only will turn onto 100 or off to 0.",
|
|
1521
|
+
modelValues: { default: { values: { "Disabled (Click Sound On)": 0, "Enabled (Click Sound Off)": 1 } } },
|
|
1522
|
+
displayType: "enum",
|
|
1523
|
+
},
|
|
1524
|
+
};
|
|
1525
|
+
exports.VZM32_ATTRIBUTES = {
|
|
1526
|
+
...COMMON_DIMMER_ATTRIBUTES,
|
|
1527
|
+
...COMMON_DIMMER_ON_OFF_ATTRIBUTES,
|
|
1528
|
+
...COMMON_DIMMABLE_LIGHT_ATTRIBUTES,
|
|
1529
|
+
otaImageType: {
|
|
1530
|
+
id: 34,
|
|
1531
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1532
|
+
displayType: "enum",
|
|
1533
|
+
modelValues: {
|
|
1534
|
+
default: {
|
|
1535
|
+
values: {
|
|
1536
|
+
"Zigbee (259)": 0,
|
|
1537
|
+
"mmWave (260)": 1,
|
|
1538
|
+
"Alternating (259 & 260) (default)": 2,
|
|
1539
|
+
},
|
|
1540
|
+
},
|
|
1541
|
+
},
|
|
1542
|
+
min: 0,
|
|
1543
|
+
max: 2,
|
|
1544
|
+
description: "Which endpoint should the switch advertise for OTA update (Zigbee, mmWave, or both).",
|
|
1545
|
+
},
|
|
1546
|
+
mmwaveControlWiredDevice: {
|
|
1547
|
+
id: 110,
|
|
1548
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1549
|
+
displayType: "enum",
|
|
1550
|
+
modelValues: {
|
|
1551
|
+
default: {
|
|
1552
|
+
values: {
|
|
1553
|
+
Disabled: 0,
|
|
1554
|
+
"Occupancy (default)": 1,
|
|
1555
|
+
Vacancy: 2,
|
|
1556
|
+
"Wasteful Occupancy": 3,
|
|
1557
|
+
"Mirrored Occupancy": 4,
|
|
1558
|
+
"Mirrored Vacancy": 5,
|
|
1559
|
+
"Mirrored Wasteful Occupancy": 6,
|
|
1560
|
+
},
|
|
1561
|
+
},
|
|
1562
|
+
},
|
|
1563
|
+
min: 0,
|
|
1564
|
+
max: 6,
|
|
1565
|
+
description: "Controls whether the wired load is automatically turned on / off by the presence detector. " +
|
|
1566
|
+
"0 = Disabled (manual control of the load), " +
|
|
1567
|
+
"1 = Occupancy (default; turn on automatically with presence; turn off automatically without presence), " +
|
|
1568
|
+
"2 = Vacancy (does not turn on automatically; turn off automatically without presence), " +
|
|
1569
|
+
"3 = Wasteful Occupancy (turn on automatically with presence; does not turn off automatically), " +
|
|
1570
|
+
"4 = Mirrored Occupancy (turn on automatically without presence; turn off automatically with presence), " +
|
|
1571
|
+
"5 = Mirrored Vacancy (turn on automatically without presence; does not turn off automatically), " +
|
|
1572
|
+
"6 = Mirrored Wasteful Occupancy (does not turn on automatically; turns off automatically with presence).",
|
|
1573
|
+
},
|
|
1574
|
+
mmWaveRoomSizePreset: {
|
|
1575
|
+
id: 117,
|
|
1576
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1577
|
+
displayType: "enum",
|
|
1578
|
+
modelValues: {
|
|
1579
|
+
default: {
|
|
1580
|
+
values: {
|
|
1581
|
+
Custom: 0,
|
|
1582
|
+
Small: 1,
|
|
1583
|
+
Medium: 2,
|
|
1584
|
+
Large: 3,
|
|
1585
|
+
},
|
|
1586
|
+
},
|
|
1587
|
+
},
|
|
1588
|
+
min: 0,
|
|
1589
|
+
max: 3,
|
|
1590
|
+
description: "Allows selection of predefined room dimensions for mmWave sensor processing. Useful for optimizing " +
|
|
1591
|
+
"detection zones based on installation environment. Defaults to Custom which allows for manual dimension configuration " +
|
|
1592
|
+
"via other parameters. \nOptions: 0=Custom (User-defined), 1=Small (X: −100 to 100, Y: 0 to 200, Z: −100 to 100), " +
|
|
1593
|
+
"2=Medium (X: −160 to 160, Y: 0 to 280, Z: −100 to 100), 3=Large (X: −210 to 210, Y: 0 to 360, Z: −100 to 100)",
|
|
1594
|
+
},
|
|
1595
|
+
};
|
|
1596
|
+
exports.VZM32_MMWAVE_ATTRIBUTES = {
|
|
1597
|
+
mmWaveHoldTime: {
|
|
1598
|
+
id: 114,
|
|
1599
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT32,
|
|
1600
|
+
min: 0,
|
|
1601
|
+
max: 4294967295,
|
|
1602
|
+
description: "This changes the duration, measured in seconds, after the mmWave radar detects transition from " +
|
|
1603
|
+
"the presence of a person to their absence. Default = 10 (seconds).",
|
|
1604
|
+
},
|
|
1605
|
+
mmWaveDetectSensitivity: {
|
|
1606
|
+
id: 112,
|
|
1607
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1608
|
+
displayType: "enum",
|
|
1609
|
+
modelValues: { default: { values: { Low: 0, Medium: 1, "High (default)": 2 } } },
|
|
1610
|
+
min: 0,
|
|
1611
|
+
max: 2,
|
|
1612
|
+
description: "The sensitivity of the mmWave sensor.",
|
|
1613
|
+
},
|
|
1614
|
+
mmWaveDetectTrigger: {
|
|
1615
|
+
id: 113,
|
|
1616
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1617
|
+
displayType: "enum",
|
|
1618
|
+
modelValues: { default: { values: { "Slow (5s)": 0, "Medium (1s)": 1, "Fast (0.2s, default)": 2 } } },
|
|
1619
|
+
min: 0,
|
|
1620
|
+
max: 2,
|
|
1621
|
+
description: "The time from detecting a person to triggering an action.",
|
|
1622
|
+
},
|
|
1623
|
+
mmWaveTargetInfoReport: {
|
|
1624
|
+
id: 107,
|
|
1625
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1626
|
+
displayType: "enum",
|
|
1627
|
+
modelValues: { default: { values: { "Disable (default)": 0, Enable: 1 } } },
|
|
1628
|
+
min: 0,
|
|
1629
|
+
max: 1,
|
|
1630
|
+
description: "Send target info report when bound to mmWave cluster.",
|
|
1631
|
+
},
|
|
1632
|
+
mmWaveStayLife: {
|
|
1633
|
+
id: 108,
|
|
1634
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT32,
|
|
1635
|
+
min: 0,
|
|
1636
|
+
max: 4294967295,
|
|
1637
|
+
description: "The delay time of the stay area is set to 50ms when it is set to 1, to 1 second when it is set to 20, and the default value is 300, that is, 15 seconds",
|
|
1638
|
+
},
|
|
1639
|
+
mmWaveVersion: {
|
|
1640
|
+
id: 115,
|
|
1641
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT32,
|
|
1642
|
+
min: 0,
|
|
1643
|
+
max: 4294967295,
|
|
1644
|
+
readOnly: true,
|
|
1645
|
+
description: "The firmware version number of the mmWave module.",
|
|
1646
|
+
},
|
|
1647
|
+
mmWaveHeightMin: {
|
|
1648
|
+
id: 101,
|
|
1649
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.INT16,
|
|
1650
|
+
min: -600,
|
|
1651
|
+
max: 600,
|
|
1652
|
+
readOnly: false,
|
|
1653
|
+
description: "Defines the detection area (negative values are below the switch, positive values are above)",
|
|
1654
|
+
},
|
|
1655
|
+
mmWaveHeightMax: {
|
|
1656
|
+
id: 102,
|
|
1657
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.INT16,
|
|
1658
|
+
min: -600,
|
|
1659
|
+
max: 600,
|
|
1660
|
+
readOnly: false,
|
|
1661
|
+
description: "Defines the detection area (negative values are below the switch, positive values are above)",
|
|
1662
|
+
},
|
|
1663
|
+
mmWaveWidthMin: {
|
|
1664
|
+
id: 103,
|
|
1665
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.INT16,
|
|
1666
|
+
min: -600,
|
|
1667
|
+
max: 600,
|
|
1668
|
+
readOnly: false,
|
|
1669
|
+
description: "Defines the detection area (negative values are left of the switch facing away from the wall, positive values are right)",
|
|
1670
|
+
},
|
|
1671
|
+
mmWaveWidthMax: {
|
|
1672
|
+
id: 104,
|
|
1673
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.INT16,
|
|
1674
|
+
min: -600,
|
|
1675
|
+
max: 600,
|
|
1676
|
+
readOnly: false,
|
|
1677
|
+
description: "Defines the detection area (negative values are left of the switch facing away from the wall, positive values are right)",
|
|
1678
|
+
},
|
|
1679
|
+
mmWaveDepthMin: {
|
|
1680
|
+
id: 105,
|
|
1681
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.INT16,
|
|
1682
|
+
min: 0,
|
|
1683
|
+
max: 600,
|
|
1684
|
+
readOnly: false,
|
|
1685
|
+
description: "Defines the detection area in front of the switch",
|
|
1686
|
+
},
|
|
1687
|
+
mmWaveDepthMax: {
|
|
1688
|
+
id: 106,
|
|
1689
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.INT16,
|
|
1690
|
+
min: 0,
|
|
1691
|
+
max: 600,
|
|
1692
|
+
readOnly: false,
|
|
1693
|
+
description: "Defines the detection area in front of the switch",
|
|
1694
|
+
},
|
|
1695
|
+
};
|
|
1696
|
+
exports.VZM35_ATTRIBUTES = {
|
|
1697
|
+
...COMMON_DIMMER_ATTRIBUTES,
|
|
1698
|
+
minimumLevel: {
|
|
1699
|
+
...COMMON_DIMMER_ATTRIBUTES.minimumLevel,
|
|
1700
|
+
description: "1-84: The level corresponding to the fan is Low, Medium, High. " +
|
|
1701
|
+
"85-170: The level corresponding to the fan is Medium, Medium, High. " +
|
|
1702
|
+
"170-254: The level corresponding to the fan is High, High, High ",
|
|
1703
|
+
},
|
|
1704
|
+
maximumLevel: {
|
|
1705
|
+
...COMMON_DIMMER_ATTRIBUTES.maximumLevel,
|
|
1706
|
+
description: "2-84: The level corresponding to the fan is Low, Medium, High.",
|
|
1707
|
+
},
|
|
1708
|
+
smartBulbMode: {
|
|
1709
|
+
...COMMON_ATTRIBUTES.smartBulbMode,
|
|
1710
|
+
description: "For use with Smart Fans that need constant power and are controlled via commands rather than power.",
|
|
1711
|
+
},
|
|
1712
|
+
quickStartTime: {
|
|
1713
|
+
id: 23,
|
|
1714
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1715
|
+
min: 0,
|
|
1716
|
+
max: 60,
|
|
1717
|
+
description: "Duration of full power output while fan tranisitions from Off to On. In 60th of second. 0 = disable, 1 = 1/60s, 60 = 1s",
|
|
1718
|
+
},
|
|
1719
|
+
nonNeutralAuxMediumGear: {
|
|
1720
|
+
id: 30,
|
|
1721
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1722
|
+
min: 42,
|
|
1723
|
+
max: 135,
|
|
1724
|
+
description: "Identification value in Non-nuetral, medium gear, aux switch",
|
|
1725
|
+
},
|
|
1726
|
+
nonNeutralAuxLowGear: {
|
|
1727
|
+
id: 31,
|
|
1728
|
+
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
|
|
1729
|
+
min: 42,
|
|
1730
|
+
max: 135,
|
|
1731
|
+
description: "Identification value in Non-nuetral, low gear, aux switch",
|
|
1732
|
+
},
|
|
1733
|
+
outputMode: {
|
|
1734
|
+
...COMMON_DIMMER_ATTRIBUTES.outputMode,
|
|
1735
|
+
description: "Use device in ceiling fan (3-Speed) or in exhaust fan (On/Off) mode.",
|
|
1736
|
+
},
|
|
1737
|
+
};
|
|
1738
|
+
exports.VZM36_ATTRIBUTES = {
|
|
1739
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1740
|
+
dimmingSpeedUpRemote_1: { ...COMMON_ATTRIBUTES.dimmingSpeedUpRemote },
|
|
1741
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1742
|
+
rampRateOffToOnRemote_1: { ...COMMON_ATTRIBUTES.rampRateOffToOnRemote },
|
|
1743
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1744
|
+
dimmingSpeedDownRemote_1: { ...COMMON_ATTRIBUTES.dimmingSpeedDownRemote },
|
|
1745
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1746
|
+
rampRateOnToOffRemote_1: { ...COMMON_ATTRIBUTES.rampRateOnToOffRemote },
|
|
1747
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1748
|
+
minimumLevel_1: { ...COMMON_DIMMER_ATTRIBUTES.minimumLevel },
|
|
1749
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1750
|
+
maximumLevel_1: { ...COMMON_DIMMER_ATTRIBUTES.maximumLevel },
|
|
1751
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1752
|
+
autoTimerOff_1: {
|
|
1753
|
+
...COMMON_ATTRIBUTES.autoTimerOff,
|
|
1754
|
+
description: "Automatically turns the light off after this many seconds." +
|
|
1755
|
+
" When the light is turned on a timer is started. When the timer expires, the light is turned off. 0 = Auto off is disabled.",
|
|
1756
|
+
},
|
|
1757
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1758
|
+
defaultLevelRemote_1: {
|
|
1759
|
+
...COMMON_ATTRIBUTES.defaultLevelRemote,
|
|
1760
|
+
description: "Default level for the light when it is turned on from the hub." +
|
|
1761
|
+
" A setting of 255 means that the light will return to the level that it was on before it was turned off.",
|
|
1762
|
+
},
|
|
1763
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1764
|
+
stateAfterPowerRestored_1: {
|
|
1765
|
+
...COMMON_ATTRIBUTES.stateAfterPowerRestored,
|
|
1766
|
+
description: "The state the light should return to when power is restored after power failure. 0 = off, 1-254 = level, 255 = previous.",
|
|
1767
|
+
},
|
|
1768
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1769
|
+
quickStartTime_1: { ...COMMON_DIMMABLE_LIGHT_ATTRIBUTES.quickStartTime },
|
|
1770
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1771
|
+
quickStartLevel_1: { ...COMMON_DIMMABLE_LIGHT_ATTRIBUTES.quickStartLevel },
|
|
1772
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1773
|
+
higherOutputInNonNeutral_1: {
|
|
1774
|
+
...COMMON_DIMMABLE_LIGHT_ATTRIBUTES.higherOutputInNonNeutral,
|
|
1775
|
+
description: "Increase level in non-neutral mode for light.",
|
|
1776
|
+
},
|
|
1777
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1778
|
+
dimmingMode_1: {
|
|
1779
|
+
...COMMON_DIMMABLE_LIGHT_ATTRIBUTES.dimmingMode,
|
|
1780
|
+
readOnly: false,
|
|
1781
|
+
description: "Switches the dimming mode from leading edge (default) to trailing edge. " +
|
|
1782
|
+
"1. Trailing Edge is only available on neutral single-pole and neutral multi-way with an " +
|
|
1783
|
+
"aux/add-on switch (multi-way with a dumb/existing switch and non-neutral setups are not supported and " +
|
|
1784
|
+
"will default back to Leading Edge).",
|
|
1785
|
+
},
|
|
1786
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1787
|
+
smartBulbMode_1: { ...COMMON_ATTRIBUTES.smartBulbMode },
|
|
1788
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1789
|
+
ledColorWhenOn_1: { ...COMMON_ATTRIBUTES.ledColorWhenOn },
|
|
1790
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1791
|
+
ledIntensityWhenOn_1: { ...COMMON_ATTRIBUTES.ledIntensityWhenOn },
|
|
1792
|
+
// remote protection is readonly...
|
|
1793
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1794
|
+
outputMode_1: { ...COMMON_DIMMER_ATTRIBUTES.outputMode },
|
|
1795
|
+
// Endpoint 2 (Fan)
|
|
1796
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1797
|
+
dimmingSpeedUpRemote_2: {
|
|
1798
|
+
...COMMON_ATTRIBUTES.dimmingSpeedUpRemote,
|
|
1799
|
+
description: "This changes the speed that the fan ramps up when controlled from the hub. " +
|
|
1800
|
+
"A setting of 0 turns the fan immediately on. Increasing the value slows down the transition speed. " +
|
|
1801
|
+
"Every number represents 100ms. Default = 25 (2.5s)",
|
|
1802
|
+
},
|
|
1803
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1804
|
+
rampRateOffToOnRemote_2: {
|
|
1805
|
+
...COMMON_ATTRIBUTES.rampRateOffToOnRemote,
|
|
1806
|
+
description: "This changes the speed that the fan turns on when controlled from the hub. " +
|
|
1807
|
+
"A setting of 0 turns the fan immediately on. Increasing the value slows down the transition speed. " +
|
|
1808
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
|
|
1809
|
+
},
|
|
1810
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1811
|
+
dimmingSpeedDownRemote_2: {
|
|
1812
|
+
...COMMON_ATTRIBUTES.dimmingSpeedDownRemote,
|
|
1813
|
+
description: "This changes the speed that the fan ramps down when controlled from the hub. " +
|
|
1814
|
+
"A setting of 0 turns the fan immediately off. Increasing the value slows down the transition speed. " +
|
|
1815
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
|
|
1816
|
+
},
|
|
1817
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1818
|
+
rampRateOnToOffRemote_2: {
|
|
1819
|
+
...COMMON_ATTRIBUTES.rampRateOnToOffRemote,
|
|
1820
|
+
description: "This changes the speed that the fan turns off when controlled from the hub. " +
|
|
1821
|
+
"A setting of 'instant' turns the fan immediately off. Increasing the value slows down the transition speed. " +
|
|
1822
|
+
"Every number represents 100ms. Default = 127 - Keep in sync with rampRateOffToOnRemote setting.",
|
|
1823
|
+
},
|
|
1824
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1825
|
+
minimumLevel_2: {
|
|
1826
|
+
...COMMON_DIMMER_ATTRIBUTES.minimumLevel,
|
|
1827
|
+
description: "The minimum level that the fan can be set to.",
|
|
1828
|
+
},
|
|
1829
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1830
|
+
maximumLevel_2: {
|
|
1831
|
+
...COMMON_DIMMER_ATTRIBUTES.maximumLevel,
|
|
1832
|
+
description: "The maximum level that the fan can be set to.",
|
|
1833
|
+
},
|
|
1834
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1835
|
+
autoTimerOff_2: {
|
|
1836
|
+
...COMMON_ATTRIBUTES.autoTimerOff,
|
|
1837
|
+
description: "Automatically turns the fan off after this many seconds." +
|
|
1838
|
+
" When the fan is turned on a timer is started. When the timer expires, the switch is turned off. 0 = Auto off is disabled.",
|
|
1839
|
+
},
|
|
1840
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1841
|
+
defaultLevelRemote_2: {
|
|
1842
|
+
...COMMON_ATTRIBUTES.defaultLevelRemote,
|
|
1843
|
+
description: "Default level for the fan when it is turned on from the hub." +
|
|
1844
|
+
" A setting of 255 means that the fan will return to the level that it was on before it was turned off.",
|
|
1845
|
+
},
|
|
1846
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1847
|
+
stateAfterPowerRestored_2: {
|
|
1848
|
+
...COMMON_ATTRIBUTES.stateAfterPowerRestored,
|
|
1849
|
+
description: "The state the fan should return to when power is restored after power failure. 0 = off, 1-254 = level, 255 = previous.",
|
|
1850
|
+
},
|
|
1851
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1852
|
+
quickStartTime_2: {
|
|
1853
|
+
...COMMON_DIMMABLE_LIGHT_ATTRIBUTES.quickStartTime,
|
|
1854
|
+
description: "Duration of full power output while fan transitions from Off to On. In 60th of second. 0 = disable, 1 = 1/60s, 60 = 1s",
|
|
1855
|
+
},
|
|
1856
|
+
// power type readonly
|
|
1857
|
+
// internal temp readonly
|
|
1858
|
+
// overheat readonly
|
|
1859
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1860
|
+
smartBulbMode_2: {
|
|
1861
|
+
...COMMON_DIMMER_ATTRIBUTES.smartBulbMode,
|
|
1862
|
+
modelValues: { default: { values: { Disabled: 0, "Smart Fan Mode": 1 } } },
|
|
1863
|
+
description: "For use with Smart Fans that need constant power and are controlled via commands rather than power.",
|
|
1864
|
+
},
|
|
1865
|
+
// remote protection readonly..
|
|
1866
|
+
// biome-ignore lint/style/useNamingConvention: endpoint-suffixed MQTT attribute key; changing it would break existing MQTT naming conventions
|
|
1867
|
+
outputMode_2: {
|
|
1868
|
+
...COMMON_DIMMER_ATTRIBUTES.outputMode,
|
|
1869
|
+
modelValues: { default: { values: { "Ceiling Fan (3-Speed)": 0, "Exhaust Fan (On/Off)": 1 } } },
|
|
1870
|
+
description: "Use device in ceiling fan (3-Speed) or in exhaust fan (On/Off) mode.",
|
|
1871
|
+
},
|
|
1872
|
+
};
|
|
1873
|
+
function createMmWaveCompositeAreaConverter(key, command) {
|
|
1874
|
+
return {
|
|
1875
|
+
key: [key],
|
|
1876
|
+
convertSet: async (entity, key, values, meta) => {
|
|
1877
|
+
utils.assertObject(values);
|
|
1878
|
+
// The composite structure has area1, area2, area3, area4 as keys
|
|
1879
|
+
const areaKeys = ["area1", "area2", "area3", "area4"];
|
|
1880
|
+
const state = { [key]: {} };
|
|
1881
|
+
const compositeState = state[key];
|
|
1882
|
+
// Process each area that's provided in the composite
|
|
1883
|
+
for (const areaKey of areaKeys) {
|
|
1884
|
+
if (areaKey in values && utils.isObject(values[areaKey])) {
|
|
1885
|
+
const areaData = values[areaKey];
|
|
1886
|
+
// Extract area number from "area1" -> 1, "area2" -> 2, etc.
|
|
1887
|
+
const areaId = Number.parseInt(areaKey.replace("area", ""), 10);
|
|
1888
|
+
const payload = {
|
|
1889
|
+
// areaID is zero indexed
|
|
1890
|
+
areaId: areaId - 1,
|
|
1891
|
+
xMin: areaData.width_min,
|
|
1892
|
+
xMax: areaData.width_max,
|
|
1893
|
+
yMin: areaData.depth_min,
|
|
1894
|
+
yMax: areaData.depth_max,
|
|
1895
|
+
zMin: areaData.height_min,
|
|
1896
|
+
zMax: areaData.height_max,
|
|
1897
|
+
};
|
|
1898
|
+
await entity.command(INOVELLI_MMWAVE_CLUSTER_NAME, command, payload, {
|
|
1899
|
+
disableResponse: true,
|
|
1900
|
+
disableDefaultResponse: true,
|
|
1901
|
+
});
|
|
1902
|
+
// Store the area data in the state
|
|
1903
|
+
compositeState[areaKey] = areaData;
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
// Query areas after all updates are complete
|
|
1907
|
+
if (Object.keys(compositeState).length > 0) {
|
|
1908
|
+
await entity.command(INOVELLI_MMWAVE_CLUSTER_NAME, "mmWaveControl", {
|
|
1909
|
+
controlID: mmWaveControlCommands.query_areas,
|
|
1910
|
+
}, { disableResponse: true, disableDefaultResponse: true });
|
|
1911
|
+
}
|
|
1912
|
+
return { state };
|
|
1913
|
+
},
|
|
1914
|
+
};
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* For devices with split values by endpoint (e.g. VZM36), parameter keys use the form "attributeName_endpointId"
|
|
1918
|
+
* (e.g. "brightness_1", "defaultLevelRemote_2"). This helper resolves such a key to the endpoint to use and the
|
|
1919
|
+
* base attribute name for cluster read/write. If the key has no underscore suffix, the original entity and key are returned.
|
|
1920
|
+
*/
|
|
1921
|
+
function resolveEndpointAndKey(entity, key, meta) {
|
|
1922
|
+
const keysplit = key.split("_");
|
|
1923
|
+
if (keysplit.length === 2) {
|
|
1924
|
+
return {
|
|
1925
|
+
entityToUse: meta.device.getEndpoint(Number(keysplit[1])),
|
|
1926
|
+
keyToUse: keysplit[0],
|
|
1927
|
+
};
|
|
1928
|
+
}
|
|
1929
|
+
return { entityToUse: entity, keyToUse: key };
|
|
1930
|
+
}
|
|
1931
|
+
const tzLocal = {
|
|
1932
|
+
inovelli_parameters: (attributes, cluster, model) => ({
|
|
1933
|
+
key: Object.keys(attributes).filter((a) => !attributes[a].readOnly),
|
|
1934
|
+
convertSet: async (entity, key, value, meta) => {
|
|
1935
|
+
// Walk meta.message rather than just `key`: Z2M dispatches this converter once per SET payload,
|
|
1936
|
+
// so writing only `key` silently drops every other Inovelli key (issue #11698). Bucket by the
|
|
1937
|
+
// resolved endpoint so VZM36 _1/_2 suffixed keys still route correctly.
|
|
1938
|
+
const buckets = new Map();
|
|
1939
|
+
for (const [msgKey, msgValue] of Object.entries(meta.message)) {
|
|
1940
|
+
const attribute = attributes[msgKey];
|
|
1941
|
+
if (!attribute || attribute.readOnly) {
|
|
1942
|
+
continue;
|
|
1943
|
+
}
|
|
1944
|
+
const { entityToUse } = resolveEndpointAndKey(entity, msgKey, meta);
|
|
1945
|
+
const valueMap = resolveValueMap(attribute, model);
|
|
1946
|
+
const writeValue = attribute.displayType === "enum" ? valueMap?.[msgValue] : msgValue;
|
|
1947
|
+
let bucket = buckets.get(entityToUse);
|
|
1948
|
+
if (!bucket) {
|
|
1949
|
+
bucket = { payload: {}, state: {} };
|
|
1950
|
+
buckets.set(entityToUse, bucket);
|
|
1951
|
+
}
|
|
1952
|
+
bucket.payload[attribute.id] = { value: writeValue, type: attribute.dataType };
|
|
1953
|
+
bucket.state[msgKey] = msgValue;
|
|
1954
|
+
}
|
|
1955
|
+
if (buckets.size === 0) {
|
|
1956
|
+
return;
|
|
1957
|
+
}
|
|
1958
|
+
const combinedState = {};
|
|
1959
|
+
for (const [entityToUse, bucket] of buckets) {
|
|
1960
|
+
await entityToUse.write(cluster, bucket.payload, {
|
|
1961
|
+
manufacturerCode: exports.INOVELLI,
|
|
1962
|
+
});
|
|
1963
|
+
Object.assign(combinedState, bucket.state);
|
|
1964
|
+
}
|
|
1965
|
+
return { state: combinedState };
|
|
1966
|
+
},
|
|
1967
|
+
convertGet: async (entity, key, meta) => {
|
|
1968
|
+
const { entityToUse, keyToUse } = resolveEndpointAndKey(entity, key, meta);
|
|
1969
|
+
// XXX: far too dynamic to properly type
|
|
1970
|
+
await entityToUse.read(cluster, [keyToUse], {
|
|
1971
|
+
manufacturerCode: exports.INOVELLI,
|
|
1972
|
+
});
|
|
1973
|
+
},
|
|
1974
|
+
}),
|
|
1975
|
+
inovelli_parameters_read_only: (attributes, cluster) => ({
|
|
1976
|
+
key: Object.keys(attributes).filter((a) => attributes[a].readOnly),
|
|
1977
|
+
convertGet: async (entity, key, meta) => {
|
|
1978
|
+
const { entityToUse, keyToUse } = resolveEndpointAndKey(entity, key, meta);
|
|
1979
|
+
// XXX: far too dynamic to properly type
|
|
1980
|
+
await entityToUse.read(cluster, [keyToUse], {
|
|
1981
|
+
manufacturerCode: exports.INOVELLI,
|
|
1982
|
+
});
|
|
1983
|
+
},
|
|
1984
|
+
}),
|
|
1985
|
+
inovelli_led_effect: {
|
|
1986
|
+
key: ["led_effect"],
|
|
1987
|
+
convertSet: async (entity, key, values, meta) => {
|
|
1988
|
+
utils.assertObject(values);
|
|
1989
|
+
await entity.command(INOVELLI_CLUSTER_NAME, "ledEffect", {
|
|
1990
|
+
effect: ledEffects[values.effect],
|
|
1991
|
+
color: Math.min(Math.max(0, values.color), 255),
|
|
1992
|
+
level: Math.min(Math.max(0, values.level), 100),
|
|
1993
|
+
duration: Math.min(Math.max(0, values.duration), 255),
|
|
1994
|
+
}, { disableResponse: true, disableDefaultResponse: true });
|
|
1995
|
+
return { state: { [key]: values } };
|
|
1996
|
+
},
|
|
1997
|
+
},
|
|
1998
|
+
inovelli_energy_reset: {
|
|
1999
|
+
key: ["energy_reset"],
|
|
2000
|
+
convertSet: async (entity, key, values, meta) => {
|
|
2001
|
+
await entity.command(INOVELLI_CLUSTER_NAME, "energyReset", {}, { disableResponse: true, disableDefaultResponse: true });
|
|
2002
|
+
},
|
|
2003
|
+
},
|
|
2004
|
+
inovelli_individual_led_effect: {
|
|
2005
|
+
key: ["individual_led_effect"],
|
|
2006
|
+
convertSet: async (entity, key, values, meta) => {
|
|
2007
|
+
utils.assertObject(values);
|
|
2008
|
+
await entity.command(INOVELLI_CLUSTER_NAME, "individualLedEffect", {
|
|
2009
|
+
led: Math.min(Math.max(1, Number.parseInt(values.led, 10)), 7) - 1,
|
|
2010
|
+
effect: individualLedEffects[values.effect],
|
|
2011
|
+
color: Math.min(Math.max(0, values.color), 255),
|
|
2012
|
+
level: Math.min(Math.max(0, values.level), 100),
|
|
2013
|
+
duration: Math.min(Math.max(0, values.duration), 255),
|
|
2014
|
+
}, { disableResponse: true, disableDefaultResponse: true });
|
|
2015
|
+
return { state: { [key]: values } };
|
|
2016
|
+
},
|
|
2017
|
+
},
|
|
2018
|
+
inovelli_mmwave_control_commands: {
|
|
2019
|
+
key: ["mmwave_control_commands"],
|
|
2020
|
+
convertSet: async (entity, key, values, meta) => {
|
|
2021
|
+
utils.assertObject(values);
|
|
2022
|
+
await entity.command(INOVELLI_MMWAVE_CLUSTER_NAME, "mmWaveControl", {
|
|
2023
|
+
controlID: mmWaveControlCommands[values.controlID],
|
|
2024
|
+
}, { disableResponse: true, disableDefaultResponse: true });
|
|
2025
|
+
return { state: { [key]: values } };
|
|
2026
|
+
},
|
|
2027
|
+
},
|
|
2028
|
+
mmwave_detection_areas: createMmWaveCompositeAreaConverter("mmwave_detection_areas", "setDetectionArea"),
|
|
2029
|
+
mmwave_interference_areas: createMmWaveCompositeAreaConverter("mmwave_interference_areas", "setInterferenceArea"),
|
|
2030
|
+
mmwave_stay_areas: createMmWaveCompositeAreaConverter("mmwave_stay_areas", "setStayArea"),
|
|
2031
|
+
/*
|
|
2032
|
+
* Inovelli devices have a default transition property that the device should
|
|
2033
|
+
* fallback to if a transition is not specified by passing 0xffff
|
|
2034
|
+
*
|
|
2035
|
+
*/
|
|
2036
|
+
light_onoff_brightness_inovelli: {
|
|
2037
|
+
...tz.light_onoff_brightness,
|
|
2038
|
+
convertSet: async (entity, key, value, meta) => {
|
|
2039
|
+
const { message } = meta;
|
|
2040
|
+
const transition = utils.getTransition(entity, "brightness", meta);
|
|
2041
|
+
const state = utils.isString(message.state) ? message.state.toLowerCase() : null;
|
|
2042
|
+
// If transition is not specified and command is on (with no brightness), off or toggle, use on_off converter
|
|
2043
|
+
let brightness;
|
|
2044
|
+
if (message.brightness != null) {
|
|
2045
|
+
brightness = Number(message.brightness);
|
|
2046
|
+
}
|
|
2047
|
+
else if (message.brightness_percent != null) {
|
|
2048
|
+
brightness = utils.mapNumberRange(Number(message.brightness_percent), 0, 100, 0, 255);
|
|
2049
|
+
}
|
|
2050
|
+
if ((state === "toggle" || state === "off" || (brightness === undefined && state === "on")) && !transition.specified) {
|
|
2051
|
+
const localMeta = {
|
|
2052
|
+
...meta,
|
|
2053
|
+
converterOptions: {
|
|
2054
|
+
ctrlbits: 0,
|
|
2055
|
+
ontime: message.on_time != null ? Math.round(message.on_time * 10) : 0xffff,
|
|
2056
|
+
offwaittime: message.off_wait_time != null ? Math.round(message.off_wait_time * 10) : 0xffff,
|
|
2057
|
+
},
|
|
2058
|
+
};
|
|
2059
|
+
return await tz.on_off.convertSet(entity, key, value, localMeta);
|
|
2060
|
+
}
|
|
2061
|
+
const localMeta = {
|
|
2062
|
+
...meta,
|
|
2063
|
+
message: {
|
|
2064
|
+
...message,
|
|
2065
|
+
transition: (!transition.specified ? 0xffff : transition.time) / 10,
|
|
2066
|
+
},
|
|
2067
|
+
};
|
|
2068
|
+
return await tz.light_onoff_brightness.convertSet(entity, key, value, localMeta);
|
|
2069
|
+
},
|
|
2070
|
+
},
|
|
2071
|
+
fan_mode: (endpointId) => ({
|
|
2072
|
+
key: ["fan_mode"],
|
|
2073
|
+
convertSet: async (entity, key, value, meta) => {
|
|
2074
|
+
utils.assertString(value);
|
|
2075
|
+
const endpoint = meta.device.getEndpoint(endpointId);
|
|
2076
|
+
await endpoint.command("genLevelCtrl", "moveToLevelWithOnOff", {
|
|
2077
|
+
level: FAN_MODES[value],
|
|
2078
|
+
transtime: 0xffff,
|
|
2079
|
+
optionsMask: 0,
|
|
2080
|
+
optionsOverride: 0,
|
|
2081
|
+
}, utils.getOptions(meta.mapped, entity));
|
|
2082
|
+
meta.state[key] = value;
|
|
2083
|
+
if (endpointId === 2) {
|
|
2084
|
+
return {
|
|
2085
|
+
state: {
|
|
2086
|
+
[key]: value,
|
|
2087
|
+
fan_state: "ON",
|
|
2088
|
+
},
|
|
2089
|
+
};
|
|
2090
|
+
}
|
|
2091
|
+
return {
|
|
2092
|
+
state: {
|
|
2093
|
+
[key]: value,
|
|
2094
|
+
state: "ON",
|
|
2095
|
+
},
|
|
2096
|
+
};
|
|
2097
|
+
},
|
|
2098
|
+
convertGet: async (entity, key, meta) => {
|
|
2099
|
+
const endpoint = meta.device.getEndpoint(endpointId);
|
|
2100
|
+
await endpoint.read("genLevelCtrl", ["currentLevel"]);
|
|
2101
|
+
},
|
|
2102
|
+
}),
|
|
2103
|
+
fan_state: (endpointId) => ({
|
|
2104
|
+
key: ["fan_state", "on_time", "off_wait_time"],
|
|
2105
|
+
convertSet: async (entity, key, value, meta) => {
|
|
2106
|
+
const targetEntity = endpointId != null ? meta.device.getEndpoint(endpointId) : entity;
|
|
2107
|
+
const localMeta = {
|
|
2108
|
+
...meta,
|
|
2109
|
+
message: {
|
|
2110
|
+
...meta.message,
|
|
2111
|
+
state: meta.message.fan_state,
|
|
2112
|
+
},
|
|
2113
|
+
state: {
|
|
2114
|
+
...meta.state,
|
|
2115
|
+
state: meta.state.fan_state,
|
|
2116
|
+
},
|
|
2117
|
+
};
|
|
2118
|
+
const result = (await tz.on_off.convertSet(targetEntity, key, value, localMeta));
|
|
2119
|
+
if (result?.state?.state != null) {
|
|
2120
|
+
return { state: { fan_state: result.state.state } };
|
|
2121
|
+
}
|
|
2122
|
+
return result ?? {};
|
|
2123
|
+
},
|
|
2124
|
+
convertGet: async (entity, key, meta) => {
|
|
2125
|
+
const targetEntity = endpointId != null ? meta.device.getEndpoint(endpointId) : entity;
|
|
2126
|
+
await tz.on_off.convertGet(targetEntity, key, meta);
|
|
2127
|
+
},
|
|
2128
|
+
}),
|
|
2129
|
+
breezeMode: (endpointId) => ({
|
|
2130
|
+
key: ["breezeMode"],
|
|
2131
|
+
convertSet: async (entity, key, value, meta) => {
|
|
2132
|
+
utils.assertObject(value);
|
|
2133
|
+
// Calculate the value..
|
|
2134
|
+
let configValue = 0;
|
|
2135
|
+
let term = false;
|
|
2136
|
+
configValue += speedToInt(value.speed1);
|
|
2137
|
+
configValue += (Number(value.time1) / 5) * 4;
|
|
2138
|
+
let speed = speedToInt(value.speed2);
|
|
2139
|
+
if (speed !== 0) {
|
|
2140
|
+
configValue += speed * 64;
|
|
2141
|
+
configValue += (value.time2 / 5) * 256;
|
|
2142
|
+
}
|
|
2143
|
+
else {
|
|
2144
|
+
term = true;
|
|
2145
|
+
}
|
|
2146
|
+
speed = speedToInt(value.speed3);
|
|
2147
|
+
if (speed !== 0 && !term) {
|
|
2148
|
+
configValue += speed * 4096;
|
|
2149
|
+
configValue += (value.time3 / 5) * 16384;
|
|
2150
|
+
}
|
|
2151
|
+
else {
|
|
2152
|
+
term = true;
|
|
2153
|
+
}
|
|
2154
|
+
speed = speedToInt(value.speed4);
|
|
2155
|
+
if (speed !== 0 && !term) {
|
|
2156
|
+
configValue += speed * 262144;
|
|
2157
|
+
configValue += (value.time4 / 5) * 1048576;
|
|
2158
|
+
}
|
|
2159
|
+
else {
|
|
2160
|
+
term = true;
|
|
2161
|
+
}
|
|
2162
|
+
speed = speedToInt(value.speed5);
|
|
2163
|
+
if (speed !== 0 && !term) {
|
|
2164
|
+
configValue += speed * 16777216;
|
|
2165
|
+
configValue += (value.time5 / 5) * 67108864;
|
|
2166
|
+
}
|
|
2167
|
+
else {
|
|
2168
|
+
term = true;
|
|
2169
|
+
}
|
|
2170
|
+
const endpoint = meta.device.getEndpoint(endpointId);
|
|
2171
|
+
const payload = { breezeMode: configValue.toString() };
|
|
2172
|
+
await endpoint.write(INOVELLI_CLUSTER_NAME, payload, {
|
|
2173
|
+
manufacturerCode: exports.INOVELLI,
|
|
2174
|
+
});
|
|
2175
|
+
return { state: { [key]: value } };
|
|
2176
|
+
},
|
|
2177
|
+
}),
|
|
2178
|
+
};
|
|
2179
|
+
const fzLocal = {
|
|
2180
|
+
inovelli: (attributes, cluster, splitValuesByEndpoint = false, deviceModel) => ({
|
|
2181
|
+
cluster: cluster,
|
|
2182
|
+
type: ["readResponse", "attributeReport"],
|
|
2183
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2184
|
+
const result = {};
|
|
2185
|
+
for (const c of Object.keys(msg.data)) {
|
|
2186
|
+
const key = splitValuesByEndpoint ? `${c}_${msg.endpoint.ID}` : c;
|
|
2187
|
+
const raw = msg.data[c];
|
|
2188
|
+
if (attributes[key] && attributes[key].displayType === "enum") {
|
|
2189
|
+
const valueMap = resolveValueMap(attributes[key], deviceModel);
|
|
2190
|
+
result[key] = valueMap ? Object.keys(valueMap).find((k) => valueMap[k] === raw) : raw;
|
|
2191
|
+
}
|
|
2192
|
+
else {
|
|
2193
|
+
result[key] = raw;
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
return result;
|
|
2197
|
+
},
|
|
2198
|
+
}),
|
|
2199
|
+
/**
|
|
2200
|
+
* Decodes raw button-tap scene frames sent by the device on endpoint 2 of `manuSpecificInovelli`.
|
|
2201
|
+
*
|
|
2202
|
+
* Frame layout (bytes 4-6 are the scene tuple, the rest of the frame is ignored here):
|
|
2203
|
+
* data[4]: marker — must be 0x00, otherwise the frame is a different opcode.
|
|
2204
|
+
* data[5]: button index (`buttonLookup`): 1=down, 2=up, 3=config, 4-6=aux_*.
|
|
2205
|
+
* data[6]: tap kind (`clickLookup`): 0=pressed, 1=released, 2=held, 3-6=2x..5x.
|
|
2206
|
+
*/
|
|
2207
|
+
button_taps: {
|
|
2208
|
+
cluster: INOVELLI_CLUSTER_NAME,
|
|
2209
|
+
type: ["raw"],
|
|
2210
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2211
|
+
if (msg.endpoint.ID !== 2 || msg.data[4] !== 0x00)
|
|
2212
|
+
return;
|
|
2213
|
+
const button = buttonLookup[msg.data[5]];
|
|
2214
|
+
const action = clickLookup[msg.data[6]];
|
|
2215
|
+
return { action: `${button}_${action}` };
|
|
2216
|
+
},
|
|
2217
|
+
},
|
|
2218
|
+
fan_mode: (endpointId) => ({
|
|
2219
|
+
cluster: "genLevelCtrl",
|
|
2220
|
+
type: ["attributeReport", "readResponse"],
|
|
2221
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2222
|
+
if (msg.endpoint.ID === endpointId) {
|
|
2223
|
+
if (msg.data.currentLevel !== undefined) {
|
|
2224
|
+
const mode = intToFanMode(msg.data.currentLevel || 1);
|
|
2225
|
+
return {
|
|
2226
|
+
fan_mode: mode,
|
|
2227
|
+
};
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
},
|
|
2231
|
+
}),
|
|
2232
|
+
fan_state: (endpointId) => ({
|
|
2233
|
+
cluster: "genOnOff",
|
|
2234
|
+
type: ["attributeReport", "readResponse"],
|
|
2235
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2236
|
+
if (msg.data.onOff === undefined) {
|
|
2237
|
+
return;
|
|
2238
|
+
}
|
|
2239
|
+
if (endpointId != null && msg.endpoint.ID !== endpointId) {
|
|
2240
|
+
return;
|
|
2241
|
+
}
|
|
2242
|
+
return { fan_state: msg.data.onOff === 1 ? "ON" : "OFF" };
|
|
2243
|
+
},
|
|
2244
|
+
}),
|
|
2245
|
+
on_off_for_endpoint: (endpointId, stateKey) => ({
|
|
2246
|
+
cluster: "genOnOff",
|
|
2247
|
+
type: ["attributeReport", "readResponse"],
|
|
2248
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2249
|
+
if (msg.endpoint.ID !== endpointId || msg.data.onOff === undefined) {
|
|
2250
|
+
return;
|
|
2251
|
+
}
|
|
2252
|
+
return { [stateKey]: msg.data.onOff === 1 ? "ON" : "OFF" };
|
|
2253
|
+
},
|
|
2254
|
+
}),
|
|
2255
|
+
brightness: {
|
|
2256
|
+
cluster: "genLevelCtrl",
|
|
2257
|
+
type: ["attributeReport", "readResponse"],
|
|
2258
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2259
|
+
if (msg.endpoint.ID === 1) {
|
|
2260
|
+
if (msg.data.currentLevel !== undefined) {
|
|
2261
|
+
return { brightness: msg.data.currentLevel };
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
},
|
|
2265
|
+
},
|
|
2266
|
+
/**
|
|
2267
|
+
* Decode breeze mode value:
|
|
2268
|
+
*
|
|
2269
|
+
* 0: disable
|
|
2270
|
+
* 1~0xffffffff: custom (using user configuration parameters) 4bytes
|
|
2271
|
+
* Up to 5 different options. First two bits determine the speed. Next four bits is time * 5 seconds.
|
|
2272
|
+
* 1111 11 1111 11 1111 11 1111 11 1111 11
|
|
2273
|
+
* Setting byte: 00-off, 01-low, 10-meduim, 11-high
|
|
2274
|
+
* Each 6 bit word is stored in ascending order, step one word being LSB
|
|
2275
|
+
*
|
|
2276
|
+
* Extract each nybble of the word, then reverse the calculation to get the setting for each.
|
|
2277
|
+
*/
|
|
2278
|
+
breeze_mode: (endpointId) => ({
|
|
2279
|
+
cluster: INOVELLI_CLUSTER_NAME,
|
|
2280
|
+
type: ["attributeReport", "readResponse"],
|
|
2281
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2282
|
+
if (msg.endpoint.ID === endpointId) {
|
|
2283
|
+
// TODO: typo?
|
|
2284
|
+
if (msg.data.breezeMode !== undefined) {
|
|
2285
|
+
const bitmasks = [3, 60, 192, 3840, 12288, 245760, 786432, 15728640, 50331648, 1006632960];
|
|
2286
|
+
const raw = msg.data.breezeMode;
|
|
2287
|
+
const s1 = BREEZE_MODES[raw & bitmasks[0]];
|
|
2288
|
+
const s2 = BREEZE_MODES[(raw & bitmasks[2]) / 64];
|
|
2289
|
+
const s3 = BREEZE_MODES[(raw & bitmasks[4]) / 4096];
|
|
2290
|
+
const s4 = BREEZE_MODES[(raw & bitmasks[6]) / 262144];
|
|
2291
|
+
const s5 = BREEZE_MODES[(raw & bitmasks[8]) / 16777216];
|
|
2292
|
+
const d1 = ((raw & bitmasks[1]) / 4) * 5;
|
|
2293
|
+
const d2 = ((raw & bitmasks[3]) / 256) * 5;
|
|
2294
|
+
const d3 = ((raw & bitmasks[5]) / 16384) * 5;
|
|
2295
|
+
const d4 = ((raw & bitmasks[7]) / 1048576) * 5;
|
|
2296
|
+
const d5 = ((raw & bitmasks[9]) / 67108864) * 5;
|
|
2297
|
+
return {
|
|
2298
|
+
breeze_mode: {
|
|
2299
|
+
speed1: s1,
|
|
2300
|
+
duration1: d1,
|
|
2301
|
+
speed2: s2,
|
|
2302
|
+
duration2: d2,
|
|
2303
|
+
speed3: s3,
|
|
2304
|
+
duration3: d3,
|
|
2305
|
+
speed4: s4,
|
|
2306
|
+
duration4: d4,
|
|
2307
|
+
speed5: s5,
|
|
2308
|
+
duration5: d5,
|
|
2309
|
+
},
|
|
2310
|
+
};
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
},
|
|
2314
|
+
}),
|
|
2315
|
+
led_effect_complete: {
|
|
2316
|
+
cluster: INOVELLI_CLUSTER_NAME,
|
|
2317
|
+
type: ["commandLedEffectComplete"],
|
|
2318
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2319
|
+
if (msg.data.notificationType in LED_NOTIFICATION_TYPES) {
|
|
2320
|
+
return { notificationComplete: LED_NOTIFICATION_TYPES[msg.data.notificationType] };
|
|
2321
|
+
}
|
|
2322
|
+
return { notificationComplete: "Unknown" };
|
|
2323
|
+
},
|
|
2324
|
+
},
|
|
2325
|
+
report_target_info: {
|
|
2326
|
+
cluster: INOVELLI_MMWAVE_CLUSTER_NAME,
|
|
2327
|
+
type: ["commandReportTargetInfo"],
|
|
2328
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2329
|
+
// Per Inovelli cluster docs: each target is x,y,z,dop (int16) + id (int8) = 9 bytes, after targetNum.
|
|
2330
|
+
const stride = 9;
|
|
2331
|
+
const buf = msg.data.targets;
|
|
2332
|
+
const targets = [];
|
|
2333
|
+
const count = Math.min(msg.data.targetNum, Math.floor(buf.length / stride));
|
|
2334
|
+
for (let i = 0; i < count; i++) {
|
|
2335
|
+
const o = i * stride;
|
|
2336
|
+
const x = buf.readInt16LE(o);
|
|
2337
|
+
const y = buf.readInt16LE(o + 2);
|
|
2338
|
+
const z = buf.readInt16LE(o + 4);
|
|
2339
|
+
const dop = buf.readInt16LE(o + 6);
|
|
2340
|
+
const id = buf.readInt8(o + 8);
|
|
2341
|
+
targets.push({ id, x, y, z, dop });
|
|
2342
|
+
}
|
|
2343
|
+
return { mmwave_targets: targets };
|
|
2344
|
+
},
|
|
2345
|
+
},
|
|
2346
|
+
report_areas: {
|
|
2347
|
+
cluster: INOVELLI_MMWAVE_CLUSTER_NAME,
|
|
2348
|
+
type: ["commandReportInterferenceArea", "commandReportDetectionArea", "commandReportStayArea"],
|
|
2349
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2350
|
+
const areas = {};
|
|
2351
|
+
const data = msg.data;
|
|
2352
|
+
for (let i = 1; i <= 4; i++) {
|
|
2353
|
+
areas[`area${i}`] = {
|
|
2354
|
+
width_min: data[`xMin${i}`],
|
|
2355
|
+
width_max: data[`xMax${i}`],
|
|
2356
|
+
height_min: data[`zMin${i}`],
|
|
2357
|
+
height_max: data[`zMax${i}`],
|
|
2358
|
+
depth_min: data[`yMin${i}`],
|
|
2359
|
+
depth_max: data[`yMax${i}`],
|
|
2360
|
+
};
|
|
2361
|
+
}
|
|
2362
|
+
const result = {};
|
|
2363
|
+
// Map command types to the new property names
|
|
2364
|
+
const propertyMap = {
|
|
2365
|
+
commandReportInterferenceArea: "mmwave_interference_areas",
|
|
2366
|
+
commandReportDetectionArea: "mmwave_detection_areas",
|
|
2367
|
+
commandReportStayArea: "mmwave_stay_areas",
|
|
2368
|
+
};
|
|
2369
|
+
result[propertyMap[msg.type]] = areas;
|
|
2370
|
+
return result;
|
|
2371
|
+
},
|
|
2372
|
+
},
|
|
2373
|
+
anyone_in_reporting_area: {
|
|
2374
|
+
cluster: INOVELLI_MMWAVE_CLUSTER_NAME,
|
|
2375
|
+
type: ["commandAnyoneInReportingArea"],
|
|
2376
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2377
|
+
return {
|
|
2378
|
+
mmwave_area1_occupancy: msg.data.area1 === 1,
|
|
2379
|
+
mmwave_area2_occupancy: msg.data.area2 === 1,
|
|
2380
|
+
mmwave_area3_occupancy: msg.data.area3 === 1,
|
|
2381
|
+
mmwave_area4_occupancy: msg.data.area4 === 1,
|
|
2382
|
+
};
|
|
2383
|
+
},
|
|
2384
|
+
},
|
|
2385
|
+
};
|
|
2386
|
+
const exposeLedEffects = () => {
|
|
2387
|
+
return e
|
|
2388
|
+
.composite("led_effect", "led_effect", ea.STATE_SET)
|
|
2389
|
+
.withFeature(e.enum("effect", ea.STATE_SET, Object.keys(ledEffects)).withDescription("Animation Effect to use for the LEDs"))
|
|
2390
|
+
.withFeature(e
|
|
2391
|
+
.numeric("color", ea.STATE_SET)
|
|
2392
|
+
.withValueMin(0)
|
|
2393
|
+
.withValueMax(255)
|
|
2394
|
+
.withDescription("Calculated by using a hue color circle(value/255*360) If color = 255 display white"))
|
|
2395
|
+
.withFeature(e.numeric("level", ea.STATE_SET).withValueMin(0).withValueMax(100).withDescription("Brightness of the LEDs"))
|
|
2396
|
+
.withFeature(e
|
|
2397
|
+
.numeric("duration", ea.STATE_SET)
|
|
2398
|
+
.withValueMin(0)
|
|
2399
|
+
.withValueMax(255)
|
|
2400
|
+
.withDescription("1-60 is in seconds calculated 61-120 is in minutes calculated by(value-60) " +
|
|
2401
|
+
"Example a value of 65 would be 65-60 = 5 minutes - 120-254 Is in hours calculated by(value-120) " +
|
|
2402
|
+
"Example a value of 132 would be 132-120 would be 12 hours. - 255 Indefinitely"))
|
|
2403
|
+
.withCategory("config");
|
|
2404
|
+
};
|
|
2405
|
+
const exposeIndividualLedEffects = () => {
|
|
2406
|
+
return e
|
|
2407
|
+
.composite("individual_led_effect", "individual_led_effect", ea.STATE_SET)
|
|
2408
|
+
.withFeature(e.enum("led", ea.STATE_SET, ["1", "2", "3", "4", "5", "6", "7"]).withDescription("Individual LED to target."))
|
|
2409
|
+
.withFeature(e.enum("effect", ea.STATE_SET, Object.keys(individualLedEffects)).withDescription("Animation Effect to use for the LED"))
|
|
2410
|
+
.withFeature(e
|
|
2411
|
+
.numeric("color", ea.STATE_SET)
|
|
2412
|
+
.withValueMin(0)
|
|
2413
|
+
.withValueMax(255)
|
|
2414
|
+
.withDescription("Calculated by using a hue color circle(value/255*360) If color = 255 display white"))
|
|
2415
|
+
.withFeature(e.numeric("level", ea.STATE_SET).withValueMin(0).withValueMax(100).withDescription("Brightness of the LED"))
|
|
2416
|
+
.withFeature(e
|
|
2417
|
+
.numeric("duration", ea.STATE_SET)
|
|
2418
|
+
.withValueMin(0)
|
|
2419
|
+
.withValueMax(255)
|
|
2420
|
+
.withDescription("1-60 is in seconds calculated 61-120 is in minutes calculated by(value-60) " +
|
|
2421
|
+
"Example a value of 65 would be 65-60 = 5 minutes - 120-254 Is in hours calculated by(value-120) " +
|
|
2422
|
+
" Example a value of 132 would be 132-120 would be 12 hours. - 255 Indefinitely"))
|
|
2423
|
+
.withCategory("config");
|
|
2424
|
+
};
|
|
2425
|
+
const exposeBreezeMode = () => {
|
|
2426
|
+
return e
|
|
2427
|
+
.composite("breeze mode", "breezeMode", ea.STATE_SET)
|
|
2428
|
+
.withFeature(e.enum("speed1", ea.STATE_SET, ["low", "medium", "high"]).withDescription("Step 1 Speed"))
|
|
2429
|
+
.withFeature(e.numeric("time1", ea.STATE_SET).withValueMin(1).withValueMax(80).withDescription("Duration (s) for fan in Step 1 "))
|
|
2430
|
+
.withFeature(e.enum("speed2", ea.STATE_SET, ["low", "medium", "high"]).withDescription("Step 2 Speed"))
|
|
2431
|
+
.withFeature(e.numeric("time2", ea.STATE_SET).withValueMin(1).withValueMax(80).withDescription("Duration (s) for fan in Step 2 "))
|
|
2432
|
+
.withFeature(e.enum("speed3", ea.STATE_SET, ["low", "medium", "high"]).withDescription("Step 3 Speed"))
|
|
2433
|
+
.withFeature(e.numeric("time3", ea.STATE_SET).withValueMin(1).withValueMax(80).withDescription("Duration (s) for fan in Step 3 "))
|
|
2434
|
+
.withFeature(e.enum("speed4", ea.STATE_SET, ["low", "medium", "high"]).withDescription("Step 4 Speed"))
|
|
2435
|
+
.withFeature(e.numeric("time4", ea.STATE_SET).withValueMin(1).withValueMax(80).withDescription("Duration (s) for fan in Step 4 "))
|
|
2436
|
+
.withFeature(e.enum("speed5", ea.STATE_SET, ["low", "medium", "high"]).withDescription("Step 5 Speed"))
|
|
2437
|
+
.withFeature(e.numeric("time5", ea.STATE_SET).withValueMin(1).withValueMax(80).withDescription("Duration (s) for fan in Step 5 "))
|
|
2438
|
+
.withCategory("config");
|
|
2439
|
+
};
|
|
2440
|
+
const exposeMMWaveControl = () => {
|
|
2441
|
+
return e
|
|
2442
|
+
.composite("mmwave_control_commands", "mmwave_control_commands", ea.STATE_SET)
|
|
2443
|
+
.withFeature(e.enum("controlID", ea.STATE_SET, Object.keys(mmWaveControlCommands)).withDescription("Which mmWave Control command to send"))
|
|
2444
|
+
.withCategory("config");
|
|
2445
|
+
};
|
|
2446
|
+
const exposeLedEffectComplete = () => {
|
|
2447
|
+
return e
|
|
2448
|
+
.enum("notificationComplete", ea.STATE, Object.values(LED_NOTIFICATION_TYPES))
|
|
2449
|
+
.withDescription("Indication that a specific notification has completed.")
|
|
2450
|
+
.withCategory("diagnostic");
|
|
2451
|
+
};
|
|
2452
|
+
const exposeEnergyReset = () => {
|
|
2453
|
+
return e.enum("energy_reset", ea.SET, ["reset"]).withDescription("Reset energy meter").withCategory("config");
|
|
2454
|
+
};
|
|
2455
|
+
const exposeMMWaveAreas = () => {
|
|
2456
|
+
return [
|
|
2457
|
+
e
|
|
2458
|
+
.binary("area1Occupancy", ea.STATE, true, false)
|
|
2459
|
+
.withProperty("mmwave_area1_occupancy")
|
|
2460
|
+
.withDescription("Indicates whether the device detected occupancy in Area 1"),
|
|
2461
|
+
e
|
|
2462
|
+
.binary("area2Occupancy", ea.STATE, true, false)
|
|
2463
|
+
.withProperty("mmwave_area2_occupancy")
|
|
2464
|
+
.withDescription("Indicates whether the device detected occupancy in Area 2"),
|
|
2465
|
+
e
|
|
2466
|
+
.binary("area3Occupancy", ea.STATE, true, false)
|
|
2467
|
+
.withProperty("mmwave_area3_occupancy")
|
|
2468
|
+
.withDescription("Indicates whether the device detected occupancy in Area 3"),
|
|
2469
|
+
e
|
|
2470
|
+
.binary("area4Occupancy", ea.STATE, true, false)
|
|
2471
|
+
.withProperty("mmwave_area4_occupancy")
|
|
2472
|
+
.withDescription("Indicates whether the device detected occupancy in Area 4"),
|
|
2473
|
+
];
|
|
2474
|
+
};
|
|
2475
|
+
const createAreaComposite = (areaName, property) => {
|
|
2476
|
+
return e
|
|
2477
|
+
.composite(areaName, property, ea.STATE)
|
|
2478
|
+
.withFeature(e
|
|
2479
|
+
.numeric("width_min", ea.STATE_SET)
|
|
2480
|
+
.withValueMin(-600)
|
|
2481
|
+
.withValueMax(600)
|
|
2482
|
+
.withDescription("Defines the area (negative values are left of the switch facing away from the wall, positive values are right)"))
|
|
2483
|
+
.withFeature(e
|
|
2484
|
+
.numeric("width_max", ea.STATE_SET)
|
|
2485
|
+
.withValueMin(-600)
|
|
2486
|
+
.withValueMax(600)
|
|
2487
|
+
.withDescription("Defines the area (negative values are left of the switch facing away from the wall, positive values are right)"))
|
|
2488
|
+
.withFeature(e
|
|
2489
|
+
.numeric("height_min", ea.STATE_SET)
|
|
2490
|
+
.withValueMin(-600)
|
|
2491
|
+
.withValueMax(600)
|
|
2492
|
+
.withDescription("Defines the area (negative values are below the switch, positive values are above)"))
|
|
2493
|
+
.withFeature(e
|
|
2494
|
+
.numeric("height_max", ea.STATE_SET)
|
|
2495
|
+
.withValueMin(-600)
|
|
2496
|
+
.withValueMax(600)
|
|
2497
|
+
.withDescription("Defines the area (negative values are below the switch, positive values are above)"))
|
|
2498
|
+
.withFeature(e.numeric("depth_min", ea.STATE_SET).withValueMin(0).withValueMax(600).withDescription("Defines the area in front of the switch"))
|
|
2499
|
+
.withFeature(e.numeric("depth_max", ea.STATE_SET).withValueMin(0).withValueMax(600).withDescription("Defines the area in front of the switch"));
|
|
2500
|
+
};
|
|
2501
|
+
const exposeDetectionAreas = () => {
|
|
2502
|
+
return e
|
|
2503
|
+
.composite("mmwave_detection_areas", "mmwave_detection_areas", ea.STATE_SET)
|
|
2504
|
+
.withDescription("Defines one or more active detection zones where the sensor reports movement or occupancy. Up to four detection zones can be set.")
|
|
2505
|
+
.withFeature(createAreaComposite("area_1", "area1"))
|
|
2506
|
+
.withFeature(createAreaComposite("area_2", "area2"))
|
|
2507
|
+
.withFeature(createAreaComposite("area_3", "area3"))
|
|
2508
|
+
.withFeature(createAreaComposite("area_4", "area4"))
|
|
2509
|
+
.withCategory("config");
|
|
2510
|
+
};
|
|
2511
|
+
const exposeInterferenceAreas = () => {
|
|
2512
|
+
return e
|
|
2513
|
+
.composite("mmwave_interference_areas", "mmwave_interference_areas", ea.STATE_SET)
|
|
2514
|
+
.withDescription("Manually defines the coordinates of an interference area, which is an ignored zone where targets are not reported as present. Up to four zones can be defined.")
|
|
2515
|
+
.withFeature(createAreaComposite("area_1", "area1"))
|
|
2516
|
+
.withFeature(createAreaComposite("area_2", "area2"))
|
|
2517
|
+
.withFeature(createAreaComposite("area_3", "area3"))
|
|
2518
|
+
.withFeature(createAreaComposite("area_4", "area4"))
|
|
2519
|
+
.withCategory("config");
|
|
2520
|
+
};
|
|
2521
|
+
const exposeStayAreas = () => {
|
|
2522
|
+
return e
|
|
2523
|
+
.composite("mmwave_stay_areas", "mmwave_stay_areas", ea.STATE_SET)
|
|
2524
|
+
.withDescription("Defines one or more stay areas where stationary presence should still be detected. Up to four stay zones can be configured.")
|
|
2525
|
+
.withFeature(createAreaComposite("area_1", "area1"))
|
|
2526
|
+
.withFeature(createAreaComposite("area_2", "area2"))
|
|
2527
|
+
.withFeature(createAreaComposite("area_3", "area3"))
|
|
2528
|
+
.withFeature(createAreaComposite("area_4", "area4"))
|
|
2529
|
+
.withCategory("config");
|
|
2530
|
+
};
|
|
2531
|
+
const exposeMMWaveTargets = () => {
|
|
2532
|
+
const targetComposite = e
|
|
2533
|
+
.composite("target", "target", ea.STATE)
|
|
2534
|
+
.withFeature(e.numeric("id", ea.STATE).withDescription("Target ID"))
|
|
2535
|
+
.withFeature(e.numeric("x", ea.STATE).withUnit("cm").withDescription("X-axis coordinate of the target in centimeters"))
|
|
2536
|
+
.withFeature(e.numeric("y", ea.STATE).withUnit("cm").withDescription("Y-axis coordinate of the target in centimeters"))
|
|
2537
|
+
.withFeature(e.numeric("z", ea.STATE).withUnit("cm").withDescription("Z-axis coordinate of the target in centimeters"))
|
|
2538
|
+
.withFeature(e.numeric("dop", ea.STATE).withDescription("Doppler shift speed of the target"));
|
|
2539
|
+
return e
|
|
2540
|
+
.list("mmwave_targets", ea.STATE, targetComposite)
|
|
2541
|
+
.withLengthMin(0)
|
|
2542
|
+
.withLengthMax(4)
|
|
2543
|
+
.withDescription("All of the detected mmWave targets")
|
|
2544
|
+
.withCategory("diagnostic");
|
|
2545
|
+
};
|
|
2546
|
+
const BUTTON_TAP_SEQUENCES = [
|
|
2547
|
+
"down_single",
|
|
2548
|
+
"up_single",
|
|
2549
|
+
"config_single",
|
|
2550
|
+
"down_release",
|
|
2551
|
+
"up_release",
|
|
2552
|
+
"config_release",
|
|
2553
|
+
"down_held",
|
|
2554
|
+
"up_held",
|
|
2555
|
+
"config_held",
|
|
2556
|
+
"down_double",
|
|
2557
|
+
"up_double",
|
|
2558
|
+
"config_double",
|
|
2559
|
+
"down_triple",
|
|
2560
|
+
"up_triple",
|
|
2561
|
+
"config_triple",
|
|
2562
|
+
"down_quadruple",
|
|
2563
|
+
"up_quadruple",
|
|
2564
|
+
"config_quadruple",
|
|
2565
|
+
"down_quintuple",
|
|
2566
|
+
"up_quintuple",
|
|
2567
|
+
"config_quintuple",
|
|
2568
|
+
];
|
|
2569
|
+
/*
|
|
2570
|
+
* Inovelli devices have a huge number of attributes. Calling endpoint.read() in a single call
|
|
2571
|
+
* for all attributes causes timeouts even with the timeout set to an absurdly high number (2 minutes)
|
|
2572
|
+
*/
|
|
2573
|
+
const chunkedRead = async (endpoint, attributes, cluster) => {
|
|
2574
|
+
const chunkSize = 10;
|
|
2575
|
+
for (let i = 0; i < attributes.length; i += chunkSize) {
|
|
2576
|
+
// XXX: far too dynamic to properly type
|
|
2577
|
+
await endpoint.read(cluster, attributes.slice(i, i + chunkSize));
|
|
2578
|
+
}
|
|
2579
|
+
};
|
|
2580
|
+
//# sourceMappingURL=inovelli.js.map
|