@willieee802/zigbee-herdsman-converters 19.44.3 → 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 +3143 -815
- 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,918 @@
|
|
|
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.definitions = void 0;
|
|
37
|
+
const zigbee_herdsman_1 = require("@willieee802/zigbee-herdsman");
|
|
38
|
+
const fz = __importStar(require("../converters/fromZigbee"));
|
|
39
|
+
const exposes = __importStar(require("../lib/exposes"));
|
|
40
|
+
const m = __importStar(require("../lib/modernExtend"));
|
|
41
|
+
const reporting = __importStar(require("../lib/reporting"));
|
|
42
|
+
const e = exposes.presets;
|
|
43
|
+
const ea = exposes.access;
|
|
44
|
+
const HALO_MANUFACTURER_CODE = 0x1201;
|
|
45
|
+
const CLUSTER_HALO_STATUS = 0xfd00;
|
|
46
|
+
const CLUSTER_HALO_CONTROL = 0xfd01;
|
|
47
|
+
const CLUSTER_HALO_SENSORS = 0xfd02;
|
|
48
|
+
const CLUSTER_HALO_WEATHER = 0xfd03;
|
|
49
|
+
const HALO_COMMAND_TEST = 0x00;
|
|
50
|
+
const HALO_COMMAND_HUSH = 0x01;
|
|
51
|
+
const HALO_TEST_START = 0x01;
|
|
52
|
+
const HALO_TEST_CANCEL = 0x00;
|
|
53
|
+
const HALO_HUSH_START = 0x00;
|
|
54
|
+
const HALO_HUSH_STOP = 0x01;
|
|
55
|
+
const WEATHER_ALERT_CODES = [
|
|
56
|
+
"NONE",
|
|
57
|
+
"AVA",
|
|
58
|
+
"AVW",
|
|
59
|
+
"BZW",
|
|
60
|
+
"CFA",
|
|
61
|
+
"CFW",
|
|
62
|
+
"DSW",
|
|
63
|
+
"EQW",
|
|
64
|
+
"FFA",
|
|
65
|
+
"FFS",
|
|
66
|
+
"FFW",
|
|
67
|
+
"FLA",
|
|
68
|
+
"FLS",
|
|
69
|
+
"FLW",
|
|
70
|
+
"FRW",
|
|
71
|
+
"FSW",
|
|
72
|
+
"FZW",
|
|
73
|
+
"HLS",
|
|
74
|
+
"HUA",
|
|
75
|
+
"HUW",
|
|
76
|
+
"HWA",
|
|
77
|
+
"HWW",
|
|
78
|
+
"SPS",
|
|
79
|
+
"SVA",
|
|
80
|
+
"SVR",
|
|
81
|
+
"SVS",
|
|
82
|
+
"TOA",
|
|
83
|
+
"TOR",
|
|
84
|
+
"TRA",
|
|
85
|
+
"TRW",
|
|
86
|
+
"TSA",
|
|
87
|
+
"TSW",
|
|
88
|
+
"VOW",
|
|
89
|
+
"WSA",
|
|
90
|
+
"WSW",
|
|
91
|
+
"ADR",
|
|
92
|
+
"NIC",
|
|
93
|
+
"NMN",
|
|
94
|
+
"CAE",
|
|
95
|
+
"LAE",
|
|
96
|
+
"TOE",
|
|
97
|
+
"DMO",
|
|
98
|
+
"NAT",
|
|
99
|
+
"NPT",
|
|
100
|
+
"NST",
|
|
101
|
+
"RMT",
|
|
102
|
+
"RWT",
|
|
103
|
+
"CDW",
|
|
104
|
+
"CEM",
|
|
105
|
+
"EAN",
|
|
106
|
+
"EAT",
|
|
107
|
+
"EVI",
|
|
108
|
+
"HMW",
|
|
109
|
+
"NUW",
|
|
110
|
+
"RHW",
|
|
111
|
+
"SPW",
|
|
112
|
+
"LEW",
|
|
113
|
+
"SMW",
|
|
114
|
+
"??S",
|
|
115
|
+
"??M",
|
|
116
|
+
"??E",
|
|
117
|
+
"??A",
|
|
118
|
+
"??W",
|
|
119
|
+
"BHW",
|
|
120
|
+
"BWW",
|
|
121
|
+
"CHW",
|
|
122
|
+
"CWW",
|
|
123
|
+
"DBA",
|
|
124
|
+
"DBW",
|
|
125
|
+
"DEW",
|
|
126
|
+
"EVA",
|
|
127
|
+
"FCW",
|
|
128
|
+
"IBW",
|
|
129
|
+
"IFW",
|
|
130
|
+
"LSW",
|
|
131
|
+
"POS",
|
|
132
|
+
"WFA",
|
|
133
|
+
"WFW",
|
|
134
|
+
"EWW",
|
|
135
|
+
"SSA",
|
|
136
|
+
"SSW",
|
|
137
|
+
];
|
|
138
|
+
const WEATHER_ALERT_STATE_CODES = [...WEATHER_ALERT_CODES, "UNKNOWN"];
|
|
139
|
+
const WEATHER_ALERT_CODE_SET = new Set(WEATHER_ALERT_CODES);
|
|
140
|
+
const WEATHER_ALERT_TO_ID = WEATHER_ALERT_CODES.reduce((acc, code, index) => {
|
|
141
|
+
acc[code] = index;
|
|
142
|
+
return acc;
|
|
143
|
+
}, {});
|
|
144
|
+
const WEATHER_ID_TO_ALERT = WEATHER_ALERT_CODES.reduce((acc, code, index) => {
|
|
145
|
+
acc[index] = code;
|
|
146
|
+
return acc;
|
|
147
|
+
}, {});
|
|
148
|
+
const WEATHER_PLAYING_STATE_VALUES = ["quiet", "playing"];
|
|
149
|
+
const WEATHER_PLAYBACK_ACTIONS = ["play", "stop"];
|
|
150
|
+
const HALO_WEATHER_COMMAND_SCAN = 0x00;
|
|
151
|
+
const HALO_WEATHER_COMMAND_PLAY = 0x03;
|
|
152
|
+
const WEATHER_STATION_MIN = 1;
|
|
153
|
+
const WEATHER_STATION_MAX = 7;
|
|
154
|
+
const WEATHER_STATION_FREQUENCIES = {
|
|
155
|
+
1: "162.400 MHz",
|
|
156
|
+
2: "162.425 MHz",
|
|
157
|
+
3: "162.450 MHz",
|
|
158
|
+
4: "162.475 MHz",
|
|
159
|
+
5: "162.500 MHz",
|
|
160
|
+
6: "162.525 MHz",
|
|
161
|
+
7: "162.550 MHz",
|
|
162
|
+
};
|
|
163
|
+
const HALO_ALERT_STATES = [
|
|
164
|
+
"safe",
|
|
165
|
+
"pre_smoke",
|
|
166
|
+
"smoke",
|
|
167
|
+
"carbon_monoxide",
|
|
168
|
+
"weather",
|
|
169
|
+
"interconnect_smoke",
|
|
170
|
+
"interconnect_carbon_monoxide",
|
|
171
|
+
"silenced",
|
|
172
|
+
"low_battery",
|
|
173
|
+
"very_low_battery",
|
|
174
|
+
"failed_battery",
|
|
175
|
+
"end_of_life",
|
|
176
|
+
"other",
|
|
177
|
+
"co_test",
|
|
178
|
+
"smoke_test",
|
|
179
|
+
];
|
|
180
|
+
const HALO_TEST_STATES = [
|
|
181
|
+
"idle",
|
|
182
|
+
"running",
|
|
183
|
+
"success",
|
|
184
|
+
"fail_ion",
|
|
185
|
+
"fail_photo",
|
|
186
|
+
"fail_co",
|
|
187
|
+
"fail_temperature",
|
|
188
|
+
"fail_weather",
|
|
189
|
+
"fail_other",
|
|
190
|
+
];
|
|
191
|
+
const HALO_HUSH_STATES = ["ready", "success", "timeout", "disabled"];
|
|
192
|
+
const HALO_ROOMS = [
|
|
193
|
+
"none",
|
|
194
|
+
"basement",
|
|
195
|
+
"bedroom",
|
|
196
|
+
"den",
|
|
197
|
+
"dining_room",
|
|
198
|
+
"downstairs",
|
|
199
|
+
"entryway",
|
|
200
|
+
"family_room",
|
|
201
|
+
"game_room",
|
|
202
|
+
"guest_bedroom",
|
|
203
|
+
"hallway",
|
|
204
|
+
"kids_bedroom",
|
|
205
|
+
"living_room",
|
|
206
|
+
"master_bedroom",
|
|
207
|
+
"office",
|
|
208
|
+
"study",
|
|
209
|
+
"upstairs",
|
|
210
|
+
"workout_room",
|
|
211
|
+
];
|
|
212
|
+
const HALO_ROOM_ID_BY_NAME = {
|
|
213
|
+
none: 0xff,
|
|
214
|
+
basement: 0x00,
|
|
215
|
+
bedroom: 0x01,
|
|
216
|
+
den: 0x02,
|
|
217
|
+
dining_room: 0x03,
|
|
218
|
+
downstairs: 0x04,
|
|
219
|
+
entryway: 0x05,
|
|
220
|
+
family_room: 0x06,
|
|
221
|
+
game_room: 0x07,
|
|
222
|
+
guest_bedroom: 0x08,
|
|
223
|
+
hallway: 0x09,
|
|
224
|
+
kids_bedroom: 0x0a,
|
|
225
|
+
living_room: 0x0b,
|
|
226
|
+
master_bedroom: 0x0c,
|
|
227
|
+
office: 0x0d,
|
|
228
|
+
study: 0x0e,
|
|
229
|
+
upstairs: 0x0f,
|
|
230
|
+
workout_room: 0x10,
|
|
231
|
+
};
|
|
232
|
+
const HALO_ROOM_NAME_BY_ID = Object.entries(HALO_ROOM_ID_BY_NAME).reduce((acc, [name, id]) => {
|
|
233
|
+
acc[id] = name;
|
|
234
|
+
return acc;
|
|
235
|
+
}, {});
|
|
236
|
+
function ensureHaloWeatherMetaState(meta) {
|
|
237
|
+
if (!meta.state.haloWeather) {
|
|
238
|
+
meta.state.haloWeather = {};
|
|
239
|
+
}
|
|
240
|
+
return meta.state.haloWeather;
|
|
241
|
+
}
|
|
242
|
+
function normalizeWeatherStation(value) {
|
|
243
|
+
const parsed = Number(value);
|
|
244
|
+
if (!Number.isInteger(parsed)) {
|
|
245
|
+
throw new Error("weather_station must be an integer between 1 and 7");
|
|
246
|
+
}
|
|
247
|
+
if (parsed < WEATHER_STATION_MIN || parsed > WEATHER_STATION_MAX) {
|
|
248
|
+
throw new Error(`weather_station must be between ${WEATHER_STATION_MIN} and ${WEATHER_STATION_MAX}`);
|
|
249
|
+
}
|
|
250
|
+
return parsed;
|
|
251
|
+
}
|
|
252
|
+
function normalizeWeatherLocation(value) {
|
|
253
|
+
const raw = typeof value === "number" ? value.toString() : String(value ?? "").trim();
|
|
254
|
+
if (!/^\d{1,6}$/.test(raw)) {
|
|
255
|
+
throw new Error("weather_location must be a numeric SAME code up to 6 digits");
|
|
256
|
+
}
|
|
257
|
+
const padded = raw.padStart(6, "0");
|
|
258
|
+
return { numeric: Number(padded), padded };
|
|
259
|
+
}
|
|
260
|
+
function normalizeWeatherAlertCode(value) {
|
|
261
|
+
const upper = value.toUpperCase();
|
|
262
|
+
if (!WEATHER_ALERT_CODE_SET.has(upper)) {
|
|
263
|
+
throw new Error(`Unsupported weather alert code: ${value}`);
|
|
264
|
+
}
|
|
265
|
+
return upper;
|
|
266
|
+
}
|
|
267
|
+
function normalizeHaloRoom(value) {
|
|
268
|
+
if (value === undefined || value === null) {
|
|
269
|
+
throw new Error("room value is required");
|
|
270
|
+
}
|
|
271
|
+
const normalized = String(value).trim().toLowerCase().replace(/\s+/g, "_");
|
|
272
|
+
if (!(normalized in HALO_ROOM_ID_BY_NAME)) {
|
|
273
|
+
throw new Error(`Unsupported room value '${value}'`);
|
|
274
|
+
}
|
|
275
|
+
return normalized;
|
|
276
|
+
}
|
|
277
|
+
function haloRoomIdToName(id) {
|
|
278
|
+
if (id === undefined)
|
|
279
|
+
return "none";
|
|
280
|
+
return HALO_ROOM_NAME_BY_ID[id] ?? "none";
|
|
281
|
+
}
|
|
282
|
+
function parseWeatherAlertList(value) {
|
|
283
|
+
if (value === undefined || value === null) {
|
|
284
|
+
return [];
|
|
285
|
+
}
|
|
286
|
+
let rawList;
|
|
287
|
+
if (Array.isArray(value)) {
|
|
288
|
+
rawList = value.map((entry) => (typeof entry === "string" ? entry : String(entry ?? "")));
|
|
289
|
+
}
|
|
290
|
+
else if (typeof value === "string") {
|
|
291
|
+
const trimmed = value.trim();
|
|
292
|
+
if (trimmed.startsWith("[") && trimmed.endsWith("]")) {
|
|
293
|
+
try {
|
|
294
|
+
const parsed = JSON.parse(trimmed);
|
|
295
|
+
if (Array.isArray(parsed)) {
|
|
296
|
+
rawList = parsed.map((entry) => (typeof entry === "string" ? entry : String(entry ?? "")));
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
catch {
|
|
300
|
+
// fall back to simple splitting
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
if (!rawList) {
|
|
304
|
+
rawList = trimmed
|
|
305
|
+
.split(/[,\s]+/)
|
|
306
|
+
.map((entry) => entry.trim())
|
|
307
|
+
.filter((entry) => entry.length > 0);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
rawList = [String(value)];
|
|
312
|
+
}
|
|
313
|
+
const unique = [];
|
|
314
|
+
for (const entry of rawList) {
|
|
315
|
+
const code = normalizeWeatherAlertCode(entry);
|
|
316
|
+
if (!unique.includes(code)) {
|
|
317
|
+
unique.push(code);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return unique;
|
|
321
|
+
}
|
|
322
|
+
function encodeWeatherAlertBitmaps(alerts) {
|
|
323
|
+
let event1 = 0;
|
|
324
|
+
let event2 = 0;
|
|
325
|
+
let event3 = 0;
|
|
326
|
+
for (const alert of alerts) {
|
|
327
|
+
const id = WEATHER_ALERT_TO_ID[alert];
|
|
328
|
+
if (id <= 0)
|
|
329
|
+
continue;
|
|
330
|
+
if (id <= 32) {
|
|
331
|
+
event1 = (event1 | (1 << (id - 1))) >>> 0;
|
|
332
|
+
}
|
|
333
|
+
else if (id <= 62) {
|
|
334
|
+
event2 = (event2 | (1 << (id - 33))) >>> 0;
|
|
335
|
+
}
|
|
336
|
+
else if (id <= 80) {
|
|
337
|
+
event3 = (event3 | (1 << (id - 63))) >>> 0;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return { event1, event2, event3 };
|
|
341
|
+
}
|
|
342
|
+
function decodeWeatherAlertBitmaps(state) {
|
|
343
|
+
const result = new Set();
|
|
344
|
+
const addFromBitmap = (bitmap, startId) => {
|
|
345
|
+
if (bitmap === undefined)
|
|
346
|
+
return;
|
|
347
|
+
const unsigned = bitmap >>> 0;
|
|
348
|
+
for (let bit = 0; bit < 32; bit += 1) {
|
|
349
|
+
if ((unsigned & (1 << bit)) !== 0) {
|
|
350
|
+
const id = startId + bit;
|
|
351
|
+
const code = WEATHER_ID_TO_ALERT[id];
|
|
352
|
+
if (code) {
|
|
353
|
+
result.add(code);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
addFromBitmap(state.event1, 1);
|
|
359
|
+
addFromBitmap(state.event2, 33);
|
|
360
|
+
addFromBitmap(state.event3, 63);
|
|
361
|
+
return [...result].sort((a, b) => WEATHER_ALERT_TO_ID[a] - WEATHER_ALERT_TO_ID[b]);
|
|
362
|
+
}
|
|
363
|
+
const DEVICE_STATUS_LOOKUP = {
|
|
364
|
+
0: "safe",
|
|
365
|
+
1: "low_battery",
|
|
366
|
+
2: "end_of_life",
|
|
367
|
+
4: "pre_smoke",
|
|
368
|
+
5: "weather",
|
|
369
|
+
6: "carbon_monoxide",
|
|
370
|
+
7: "smoke",
|
|
371
|
+
8: "other",
|
|
372
|
+
9: "silenced",
|
|
373
|
+
10: "very_low_battery",
|
|
374
|
+
11: "failed_battery",
|
|
375
|
+
14: "co_test",
|
|
376
|
+
16: "smoke_test",
|
|
377
|
+
18: "interconnect_carbon_monoxide",
|
|
378
|
+
19: "interconnect_smoke",
|
|
379
|
+
};
|
|
380
|
+
const TEST_STATUS_LOOKUP = {
|
|
381
|
+
0: "success",
|
|
382
|
+
1: "fail_ion",
|
|
383
|
+
2: "fail_photo",
|
|
384
|
+
3: "fail_co",
|
|
385
|
+
4: "fail_temperature",
|
|
386
|
+
5: "fail_weather",
|
|
387
|
+
6: "fail_other",
|
|
388
|
+
7: "running",
|
|
389
|
+
};
|
|
390
|
+
const HUSH_STATUS_LOOKUP = {
|
|
391
|
+
0: "success",
|
|
392
|
+
1: "timeout",
|
|
393
|
+
2: "ready",
|
|
394
|
+
3: "disabled",
|
|
395
|
+
};
|
|
396
|
+
function haloZoneStatus() {
|
|
397
|
+
return {
|
|
398
|
+
exposes: [
|
|
399
|
+
e.smoke(),
|
|
400
|
+
e.carbon_monoxide(),
|
|
401
|
+
e.tamper(),
|
|
402
|
+
e.battery_low(),
|
|
403
|
+
e.test(),
|
|
404
|
+
e
|
|
405
|
+
.binary("mains_power_connected", ea.STATE, true, false)
|
|
406
|
+
.withDescription("Indicates whether mains power is currently available")
|
|
407
|
+
.withCategory("diagnostic"),
|
|
408
|
+
],
|
|
409
|
+
fromZigbee: [
|
|
410
|
+
fz.ias_enroll,
|
|
411
|
+
{
|
|
412
|
+
cluster: "ssIasZone",
|
|
413
|
+
type: ["commandStatusChangeNotification", "attributeReport", "readResponse"],
|
|
414
|
+
convert: (model, msg, publish, options, meta) => {
|
|
415
|
+
const zoneStatus = "zonestatus" in msg.data ? msg.data.zonestatus : msg.data.zoneStatus;
|
|
416
|
+
if (zoneStatus === undefined)
|
|
417
|
+
return;
|
|
418
|
+
const payload = {};
|
|
419
|
+
if (msg.endpoint.ID === 1) {
|
|
420
|
+
payload.smoke = (zoneStatus & 1) > 0;
|
|
421
|
+
payload.tamper = (zoneStatus & (1 << 2)) > 0;
|
|
422
|
+
payload.battery_low = (zoneStatus & (1 << 3)) > 0;
|
|
423
|
+
payload.test = (zoneStatus & (1 << 8)) > 0;
|
|
424
|
+
const acFault = (zoneStatus & (1 << 7)) > 0;
|
|
425
|
+
payload.mains_power_connected = !acFault;
|
|
426
|
+
}
|
|
427
|
+
else if (msg.endpoint.ID === 3) {
|
|
428
|
+
payload.carbon_monoxide = (zoneStatus & 1) > 0;
|
|
429
|
+
}
|
|
430
|
+
if (Object.keys(payload).length > 0) {
|
|
431
|
+
return payload;
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
configure: [
|
|
437
|
+
async (device, coordinatorEndpoint) => {
|
|
438
|
+
const endpoint1 = device.getEndpoint(1);
|
|
439
|
+
if (endpoint1) {
|
|
440
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ["ssIasZone"]);
|
|
441
|
+
await endpoint1.read("ssIasZone", ["zoneStatus"]);
|
|
442
|
+
}
|
|
443
|
+
const endpoint3 = device.getEndpoint(3);
|
|
444
|
+
if (endpoint3) {
|
|
445
|
+
await reporting.bind(endpoint3, coordinatorEndpoint, ["ssIasZone"]);
|
|
446
|
+
await endpoint3.read("ssIasZone", ["zoneStatus"]);
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
],
|
|
450
|
+
isModernExtend: true,
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
function haloDeviceStatus() {
|
|
454
|
+
return {
|
|
455
|
+
exposes: [
|
|
456
|
+
e
|
|
457
|
+
.enum("halo_alert_state", ea.STATE, [...HALO_ALERT_STATES])
|
|
458
|
+
.withDescription("Device state reported by the manufacturer cluster")
|
|
459
|
+
.withCategory("diagnostic"),
|
|
460
|
+
e.enum("room", ea.STATE_SET, [...HALO_ROOMS]).withDescription("Spoken room name used in Halo announcements"),
|
|
461
|
+
],
|
|
462
|
+
fromZigbee: [
|
|
463
|
+
{
|
|
464
|
+
cluster: "haloDeviceStatus",
|
|
465
|
+
type: ["attributeReport", "readResponse"],
|
|
466
|
+
convert: (model, msg, publish, options, meta) => {
|
|
467
|
+
const payload = {};
|
|
468
|
+
const status = msg.data.deviceStatus;
|
|
469
|
+
if (status !== undefined) {
|
|
470
|
+
const mapped = DEVICE_STATUS_LOOKUP[status] ?? "other";
|
|
471
|
+
payload.halo_alert_state = mapped;
|
|
472
|
+
payload.weather_alert = mapped === "weather";
|
|
473
|
+
}
|
|
474
|
+
if (msg.data.room !== undefined) {
|
|
475
|
+
payload.room = haloRoomIdToName(msg.data.room);
|
|
476
|
+
}
|
|
477
|
+
if (Object.keys(payload).length > 0) {
|
|
478
|
+
return payload;
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
],
|
|
483
|
+
toZigbee: [
|
|
484
|
+
{
|
|
485
|
+
key: ["room"],
|
|
486
|
+
convertSet: async (entity, key, value, meta) => {
|
|
487
|
+
const roomName = normalizeHaloRoom(value);
|
|
488
|
+
const roomId = HALO_ROOM_ID_BY_NAME[roomName];
|
|
489
|
+
const endpoint = meta.device.getEndpoint(4);
|
|
490
|
+
if (!endpoint) {
|
|
491
|
+
throw new Error(`Failed to find endpoint 4 on Halo device ${meta.device.ieeeAddr}`);
|
|
492
|
+
}
|
|
493
|
+
await endpoint.write("haloDeviceStatus", { room: roomId }, { manufacturerCode: HALO_MANUFACTURER_CODE });
|
|
494
|
+
return { state: { room: roomName } };
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
],
|
|
498
|
+
configure: [
|
|
499
|
+
async (device, coordinatorEndpoint) => {
|
|
500
|
+
const endpoint4 = device.getEndpoint(4);
|
|
501
|
+
if (endpoint4) {
|
|
502
|
+
await reporting.bind(endpoint4, coordinatorEndpoint, [CLUSTER_HALO_STATUS]);
|
|
503
|
+
await endpoint4.read("haloDeviceStatus", ["deviceStatus", "room"], {
|
|
504
|
+
manufacturerCode: HALO_MANUFACTURER_CODE,
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
],
|
|
509
|
+
isModernExtend: true,
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
function haloControl() {
|
|
513
|
+
return {
|
|
514
|
+
exposes: [
|
|
515
|
+
e
|
|
516
|
+
.enum("halo_test_result", ea.STATE, [...HALO_TEST_STATES])
|
|
517
|
+
.withDescription("Result of the most recent self-test")
|
|
518
|
+
.withCategory("diagnostic"),
|
|
519
|
+
e.binary("test_in_progress", ea.STATE, true, false).withDescription("Indicates whether a test is running").withCategory("diagnostic"),
|
|
520
|
+
e
|
|
521
|
+
.enum("halo_hush_state", ea.STATE, [...HALO_HUSH_STATES])
|
|
522
|
+
.withDescription("Current hush status")
|
|
523
|
+
.withCategory("diagnostic"),
|
|
524
|
+
e.binary("hush_active", ea.STATE, true, false).withDescription("Indicates whether the alarm is hushed").withCategory("diagnostic"),
|
|
525
|
+
e.enum("hush", ea.SET, ["start", "stop"]).withDescription("Start or cancel hush mode"),
|
|
526
|
+
e.enum("test_cycle", ea.SET, ["start", "cancel"]).withDescription("Start or cancel the built-in test"),
|
|
527
|
+
],
|
|
528
|
+
fromZigbee: [
|
|
529
|
+
{
|
|
530
|
+
cluster: "haloControl",
|
|
531
|
+
type: ["attributeReport", "readResponse"],
|
|
532
|
+
convert: (model, msg, publish, options, meta) => {
|
|
533
|
+
const payload = {};
|
|
534
|
+
if (msg.data.testStatus !== undefined) {
|
|
535
|
+
const mapped = TEST_STATUS_LOOKUP[msg.data.testStatus] ?? "idle";
|
|
536
|
+
payload.halo_test_result = mapped;
|
|
537
|
+
payload.test_in_progress = mapped === "running";
|
|
538
|
+
}
|
|
539
|
+
if (msg.data.hushStatus !== undefined) {
|
|
540
|
+
const mapped = HUSH_STATUS_LOOKUP[msg.data.hushStatus] ?? "ready";
|
|
541
|
+
payload.halo_hush_state = mapped;
|
|
542
|
+
payload.hush_active = mapped === "success";
|
|
543
|
+
}
|
|
544
|
+
if (Object.keys(payload).length > 0) {
|
|
545
|
+
return payload;
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
},
|
|
549
|
+
],
|
|
550
|
+
toZigbee: [
|
|
551
|
+
{
|
|
552
|
+
key: ["hush"],
|
|
553
|
+
convertSet: async (entity, key, value, meta) => {
|
|
554
|
+
if (value === undefined)
|
|
555
|
+
throw new Error("Value must be provided");
|
|
556
|
+
const normalized = String(value).toLowerCase();
|
|
557
|
+
if (!["start", "stop"].includes(normalized)) {
|
|
558
|
+
throw new Error("Value must be one of 'start' or 'stop'");
|
|
559
|
+
}
|
|
560
|
+
const payloadValue = normalized === "start" ? HALO_HUSH_START : HALO_HUSH_STOP;
|
|
561
|
+
const endpoint = meta.device.getEndpoint(4);
|
|
562
|
+
if (!endpoint) {
|
|
563
|
+
throw new Error(`Failed to find endpoint 4 on Halo device ${meta.device.ieeeAddr}`);
|
|
564
|
+
}
|
|
565
|
+
await endpoint.command("haloControl", "haloHush", { value: payloadValue }, { manufacturerCode: HALO_MANUFACTURER_CODE, disableDefaultResponse: true });
|
|
566
|
+
return { state: { hush: normalized } };
|
|
567
|
+
},
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
key: ["test_cycle"],
|
|
571
|
+
convertSet: async (entity, key, value, meta) => {
|
|
572
|
+
if (value === undefined)
|
|
573
|
+
throw new Error("Value must be provided");
|
|
574
|
+
const normalized = String(value).toLowerCase();
|
|
575
|
+
if (!["start", "cancel"].includes(normalized)) {
|
|
576
|
+
throw new Error("Value must be one of 'start' or 'cancel'");
|
|
577
|
+
}
|
|
578
|
+
const payloadValue = normalized === "start" ? HALO_TEST_START : HALO_TEST_CANCEL;
|
|
579
|
+
const endpoint = meta.device.getEndpoint(4);
|
|
580
|
+
if (!endpoint) {
|
|
581
|
+
throw new Error(`Failed to find endpoint 4 on Halo device ${meta.device.ieeeAddr}`);
|
|
582
|
+
}
|
|
583
|
+
await endpoint.command("haloControl", "haloTest", { value: payloadValue }, { manufacturerCode: HALO_MANUFACTURER_CODE, disableDefaultResponse: true });
|
|
584
|
+
return { state: { test_cycle: normalized } };
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
|
+
],
|
|
588
|
+
configure: [
|
|
589
|
+
async (device, coordinatorEndpoint) => {
|
|
590
|
+
const endpoint4 = device.getEndpoint(4);
|
|
591
|
+
if (endpoint4) {
|
|
592
|
+
await reporting.bind(endpoint4, coordinatorEndpoint, [CLUSTER_HALO_CONTROL]);
|
|
593
|
+
await endpoint4.read("haloControl", ["testStatus", "hushStatus"], {
|
|
594
|
+
manufacturerCode: HALO_MANUFACTURER_CODE,
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
],
|
|
599
|
+
isModernExtend: true,
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
function haloSensors() {
|
|
603
|
+
return {
|
|
604
|
+
exposes: [
|
|
605
|
+
e
|
|
606
|
+
.numeric("co_ppm", ea.STATE)
|
|
607
|
+
.withDescription("Current CO concentration reported by the detector")
|
|
608
|
+
.withUnit("ppm")
|
|
609
|
+
.withCategory("diagnostic"),
|
|
610
|
+
],
|
|
611
|
+
fromZigbee: [
|
|
612
|
+
{
|
|
613
|
+
cluster: "haloSensors",
|
|
614
|
+
type: ["attributeReport", "readResponse"],
|
|
615
|
+
convert: (model, msg, publish, options, meta) => {
|
|
616
|
+
if (msg.data.coPpm !== undefined) {
|
|
617
|
+
return { co_ppm: msg.data.coPpm };
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
],
|
|
622
|
+
configure: [
|
|
623
|
+
async (device, coordinatorEndpoint) => {
|
|
624
|
+
const endpoint4 = device.getEndpoint(4);
|
|
625
|
+
if (endpoint4) {
|
|
626
|
+
await reporting.bind(endpoint4, coordinatorEndpoint, [CLUSTER_HALO_SENSORS]);
|
|
627
|
+
await endpoint4.read("haloSensors", ["coPpm"], {
|
|
628
|
+
manufacturerCode: HALO_MANUFACTURER_CODE,
|
|
629
|
+
});
|
|
630
|
+
await m.setupAttributes(endpoint4, coordinatorEndpoint, "haloSensors", [
|
|
631
|
+
{ attribute: { ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.INT16 }, min: "10_SECONDS", max: "1_HOUR", change: 1 },
|
|
632
|
+
]);
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
],
|
|
636
|
+
isModernExtend: true,
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
function haloWeather() {
|
|
640
|
+
return {
|
|
641
|
+
exposes: [
|
|
642
|
+
e
|
|
643
|
+
.binary("weather_alert", ea.STATE, true, false)
|
|
644
|
+
.withDescription("Indicates an active NOAA/SAME weather alert")
|
|
645
|
+
.withCategory("diagnostic"),
|
|
646
|
+
e
|
|
647
|
+
.enum("current_weather_alert", ea.STATE, [...WEATHER_ALERT_STATE_CODES])
|
|
648
|
+
.withDescription("Current NOAA/SAME event code reported by the detector")
|
|
649
|
+
.withCategory("diagnostic"),
|
|
650
|
+
e
|
|
651
|
+
.list("weather_alerts_interest", ea.STATE_SET, e.enum("alert", ea.STATE_SET, [...WEATHER_ALERT_CODES]).withDescription("Alert code"))
|
|
652
|
+
.withDescription("NOAA/SAME event codes that should trigger the Halo+ speaker")
|
|
653
|
+
.withCategory("config"),
|
|
654
|
+
e
|
|
655
|
+
.text("weather_location", ea.STATE_SET)
|
|
656
|
+
.withDescription("SAME location code (000000-999999) announced by the weather radio")
|
|
657
|
+
.withCategory("config"),
|
|
658
|
+
e
|
|
659
|
+
.numeric("weather_station", ea.STATE_SET)
|
|
660
|
+
.withValueMin(WEATHER_STATION_MIN)
|
|
661
|
+
.withValueMax(WEATHER_STATION_MAX)
|
|
662
|
+
.withDescription("Weather radio preset (1-7)")
|
|
663
|
+
.withCategory("config"),
|
|
664
|
+
e.text("weather_frequency", ea.STATE).withDescription("Frequency of the selected weather radio preset").withCategory("diagnostic"),
|
|
665
|
+
e
|
|
666
|
+
.enum("weather_playing_state", ea.STATE, [...WEATHER_PLAYING_STATE_VALUES])
|
|
667
|
+
.withDescription("Current playback state of the weather radio")
|
|
668
|
+
.withCategory("diagnostic"),
|
|
669
|
+
e.enum("weather_playback", ea.SET, [...WEATHER_PLAYBACK_ACTIONS]).withDescription("Start or stop the weather radio audio"),
|
|
670
|
+
],
|
|
671
|
+
fromZigbee: [
|
|
672
|
+
{
|
|
673
|
+
cluster: "haloWeather",
|
|
674
|
+
type: ["attributeReport", "readResponse"],
|
|
675
|
+
convert: (model, msg, publish, options, meta) => {
|
|
676
|
+
const payload = {};
|
|
677
|
+
const weatherState = ensureHaloWeatherMetaState(meta);
|
|
678
|
+
if (msg.data.weatherAlertStatus !== undefined) {
|
|
679
|
+
const code = (WEATHER_ID_TO_ALERT[msg.data.weatherAlertStatus] ?? "UNKNOWN");
|
|
680
|
+
payload.current_weather_alert = code;
|
|
681
|
+
payload.weather_alert = msg.data.weatherAlertStatus !== 0;
|
|
682
|
+
}
|
|
683
|
+
if (msg.data.weatherMute !== undefined) {
|
|
684
|
+
const playing = Number(msg.data.weatherMute) === 1;
|
|
685
|
+
payload.weather_playing_state = playing ? "playing" : "quiet";
|
|
686
|
+
}
|
|
687
|
+
if (msg.data.weatherLocation !== undefined) {
|
|
688
|
+
payload.weather_location = msg.data.weatherLocation.toString().padStart(6, "0");
|
|
689
|
+
}
|
|
690
|
+
if (msg.data.weatherStation !== undefined) {
|
|
691
|
+
const station = msg.data.weatherStation;
|
|
692
|
+
if (station >= WEATHER_STATION_MIN && station <= WEATHER_STATION_MAX) {
|
|
693
|
+
payload.weather_station = station;
|
|
694
|
+
payload.weather_frequency = WEATHER_STATION_FREQUENCIES[station];
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
let eventsChanged = false;
|
|
698
|
+
if (msg.data.weatherEvent1 !== undefined) {
|
|
699
|
+
weatherState.event1 = msg.data.weatherEvent1;
|
|
700
|
+
eventsChanged = true;
|
|
701
|
+
}
|
|
702
|
+
if (msg.data.weatherEvent2 !== undefined) {
|
|
703
|
+
weatherState.event2 = msg.data.weatherEvent2;
|
|
704
|
+
eventsChanged = true;
|
|
705
|
+
}
|
|
706
|
+
if (msg.data.weatherEvent3 !== undefined) {
|
|
707
|
+
weatherState.event3 = msg.data.weatherEvent3;
|
|
708
|
+
eventsChanged = true;
|
|
709
|
+
}
|
|
710
|
+
if (eventsChanged) {
|
|
711
|
+
payload.weather_alerts_interest = decodeWeatherAlertBitmaps(weatherState);
|
|
712
|
+
}
|
|
713
|
+
if (Object.keys(payload).length > 0) {
|
|
714
|
+
return payload;
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
],
|
|
719
|
+
toZigbee: [
|
|
720
|
+
{
|
|
721
|
+
key: ["weather_playback"],
|
|
722
|
+
convertSet: async (entity, key, value, meta) => {
|
|
723
|
+
if (value === undefined)
|
|
724
|
+
throw new Error("Value must be provided");
|
|
725
|
+
const normalized = typeof value === "boolean" ? (value ? "play" : "stop") : String(value).toLowerCase();
|
|
726
|
+
if (!WEATHER_PLAYBACK_ACTIONS.includes(normalized)) {
|
|
727
|
+
throw new Error("Value must be 'play' or 'stop'");
|
|
728
|
+
}
|
|
729
|
+
const commandValue = normalized === "play" ? 0x01 : 0x00;
|
|
730
|
+
const endpoint = meta.device.getEndpoint(5);
|
|
731
|
+
if (!endpoint) {
|
|
732
|
+
throw new Error(`Failed to find endpoint 5 on Halo device ${meta.device.ieeeAddr}`);
|
|
733
|
+
}
|
|
734
|
+
await endpoint.command("haloWeather", "weatherRadioPlay", { value: commandValue }, { manufacturerCode: HALO_MANUFACTURER_CODE, disableDefaultResponse: true });
|
|
735
|
+
return { state: { weather_playback: normalized, weather_playing_state: normalized === "play" ? "playing" : "quiet" } };
|
|
736
|
+
},
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
key: ["weather_station"],
|
|
740
|
+
convertSet: async (entity, key, value, meta) => {
|
|
741
|
+
if (value === undefined)
|
|
742
|
+
throw new Error("Value must be provided");
|
|
743
|
+
const station = normalizeWeatherStation(value);
|
|
744
|
+
const endpoint = meta.device.getEndpoint(5);
|
|
745
|
+
if (!endpoint) {
|
|
746
|
+
throw new Error(`Failed to find endpoint 5 on Halo device ${meta.device.ieeeAddr}`);
|
|
747
|
+
}
|
|
748
|
+
await endpoint.write("haloWeather", { weatherStation: station }, { manufacturerCode: HALO_MANUFACTURER_CODE });
|
|
749
|
+
return { state: { weather_station: station, weather_frequency: WEATHER_STATION_FREQUENCIES[station] } };
|
|
750
|
+
},
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
key: ["weather_location"],
|
|
754
|
+
convertSet: async (entity, key, value, meta) => {
|
|
755
|
+
if (value === undefined)
|
|
756
|
+
throw new Error("Value must be provided");
|
|
757
|
+
const location = normalizeWeatherLocation(value);
|
|
758
|
+
const endpoint = meta.device.getEndpoint(5);
|
|
759
|
+
if (!endpoint) {
|
|
760
|
+
throw new Error(`Failed to find endpoint 5 on Halo device ${meta.device.ieeeAddr}`);
|
|
761
|
+
}
|
|
762
|
+
await endpoint.write("haloWeather", { weatherLocation: location.numeric }, { manufacturerCode: HALO_MANUFACTURER_CODE });
|
|
763
|
+
return { state: { weather_location: location.padded } };
|
|
764
|
+
},
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
key: ["weather_alerts_interest"],
|
|
768
|
+
convertSet: async (entity, key, value, meta) => {
|
|
769
|
+
if (value === undefined)
|
|
770
|
+
throw new Error("Value must be provided");
|
|
771
|
+
const alerts = parseWeatherAlertList(value);
|
|
772
|
+
const { event1, event2, event3 } = encodeWeatherAlertBitmaps(alerts);
|
|
773
|
+
const endpoint = meta.device.getEndpoint(5);
|
|
774
|
+
if (!endpoint) {
|
|
775
|
+
throw new Error(`Failed to find endpoint 5 on Halo device ${meta.device.ieeeAddr}`);
|
|
776
|
+
}
|
|
777
|
+
await endpoint.write("haloWeather", { weatherEvent1: event1, weatherEvent2: event2, weatherEvent3: event3 }, { manufacturerCode: HALO_MANUFACTURER_CODE });
|
|
778
|
+
return { state: { weather_alerts_interest: alerts } };
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
],
|
|
782
|
+
configure: [
|
|
783
|
+
async (device, coordinatorEndpoint) => {
|
|
784
|
+
const endpoint5 = device.getEndpoint(5);
|
|
785
|
+
if (endpoint5) {
|
|
786
|
+
await reporting.bind(endpoint5, coordinatorEndpoint, [CLUSTER_HALO_WEATHER]);
|
|
787
|
+
await endpoint5.read("haloWeather", ["weatherAlertStatus", "weatherMute", "weatherLocation", "weatherEvent1", "weatherEvent2", "weatherEvent3", "weatherStation"], { manufacturerCode: HALO_MANUFACTURER_CODE });
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
],
|
|
791
|
+
isModernExtend: true,
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
const haloCommonExtend = [
|
|
795
|
+
m.deviceEndpoints({ endpoints: { default: 1, light: 2 } }),
|
|
796
|
+
m.deviceAddCustomCluster("haloDeviceStatus", {
|
|
797
|
+
name: "haloDeviceStatus",
|
|
798
|
+
ID: CLUSTER_HALO_STATUS,
|
|
799
|
+
manufacturerCode: HALO_MANUFACTURER_CODE,
|
|
800
|
+
attributes: {
|
|
801
|
+
deviceStatus: { name: "deviceStatus", ID: 0x0000, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
|
|
802
|
+
room: { name: "room", ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
|
|
803
|
+
},
|
|
804
|
+
commands: {},
|
|
805
|
+
commandsResponse: {},
|
|
806
|
+
}),
|
|
807
|
+
m.deviceAddCustomCluster("haloControl", {
|
|
808
|
+
name: "haloControl",
|
|
809
|
+
ID: CLUSTER_HALO_CONTROL,
|
|
810
|
+
manufacturerCode: HALO_MANUFACTURER_CODE,
|
|
811
|
+
attributes: {
|
|
812
|
+
testStatus: { name: "testStatus", ID: 0x0000, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
|
|
813
|
+
hushStatus: { name: "hushStatus", ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
|
|
814
|
+
},
|
|
815
|
+
commands: {
|
|
816
|
+
haloTest: { name: "haloTest", ID: HALO_COMMAND_TEST, parameters: [{ name: "value", type: zigbee_herdsman_1.Zcl.DataType.UINT8 }] },
|
|
817
|
+
haloHush: { name: "haloHush", ID: HALO_COMMAND_HUSH, parameters: [{ name: "value", type: zigbee_herdsman_1.Zcl.DataType.UINT8 }] },
|
|
818
|
+
},
|
|
819
|
+
commandsResponse: {},
|
|
820
|
+
}),
|
|
821
|
+
m.deviceAddCustomCluster("haloSensors", {
|
|
822
|
+
name: "haloSensors",
|
|
823
|
+
ID: CLUSTER_HALO_SENSORS,
|
|
824
|
+
manufacturerCode: HALO_MANUFACTURER_CODE,
|
|
825
|
+
attributes: {
|
|
826
|
+
coPpm: { name: "coPpm", ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
|
|
827
|
+
},
|
|
828
|
+
commands: {},
|
|
829
|
+
commandsResponse: {},
|
|
830
|
+
}),
|
|
831
|
+
haloZoneStatus(),
|
|
832
|
+
haloDeviceStatus(),
|
|
833
|
+
haloControl(),
|
|
834
|
+
haloSensors(),
|
|
835
|
+
m.light({
|
|
836
|
+
color: { modes: ["hs"], enhancedHue: false },
|
|
837
|
+
configureReporting: true,
|
|
838
|
+
effect: false,
|
|
839
|
+
powerOnBehavior: false,
|
|
840
|
+
endpointNames: ["light"],
|
|
841
|
+
}),
|
|
842
|
+
m.battery({ percentage: true, voltage: true, voltageReporting: true }),
|
|
843
|
+
m.temperature(),
|
|
844
|
+
m.humidity(),
|
|
845
|
+
m.pressure(),
|
|
846
|
+
];
|
|
847
|
+
exports.definitions = [
|
|
848
|
+
{
|
|
849
|
+
zigbeeModel: ["halo"],
|
|
850
|
+
model: "HALO",
|
|
851
|
+
vendor: "Halo Smart Labs",
|
|
852
|
+
description: "Halo smart smoke & CO detector",
|
|
853
|
+
extend: [...haloCommonExtend],
|
|
854
|
+
meta: { disableDefaultResponse: true },
|
|
855
|
+
configure: (device) => {
|
|
856
|
+
const endpoint2 = device.getEndpoint(2);
|
|
857
|
+
if (endpoint2) {
|
|
858
|
+
endpoint2.saveClusterAttributeKeyValue("lightingColorCtrl", {
|
|
859
|
+
colorCapabilities: 0x09,
|
|
860
|
+
colorTempPhysicalMin: 153,
|
|
861
|
+
colorTempPhysicalMax: 500,
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
zigbeeModel: ["halo+", "haloWX", "SABDA1"],
|
|
868
|
+
model: "HALO+",
|
|
869
|
+
vendor: "Halo Smart Labs",
|
|
870
|
+
description: "Halo+ smart smoke & CO detector with weather radio",
|
|
871
|
+
extend: [
|
|
872
|
+
...haloCommonExtend,
|
|
873
|
+
m.deviceAddCustomCluster("haloWeather", {
|
|
874
|
+
name: "haloWeather",
|
|
875
|
+
ID: CLUSTER_HALO_WEATHER,
|
|
876
|
+
manufacturerCode: HALO_MANUFACTURER_CODE,
|
|
877
|
+
attributes: {
|
|
878
|
+
weatherAlertStatus: { name: "weatherAlertStatus", ID: 0x0000, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
|
|
879
|
+
weatherMute: { name: "weatherMute", ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
|
|
880
|
+
weatherLocation: { name: "weatherLocation", ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
|
|
881
|
+
weatherEvent1: { name: "weatherEvent1", ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.BITMAP32 },
|
|
882
|
+
weatherEvent2: { name: "weatherEvent2", ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.BITMAP32 },
|
|
883
|
+
weatherEvent3: { name: "weatherEvent3", ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.BITMAP32 },
|
|
884
|
+
weatherStation: { name: "weatherStation", ID: 0x0006, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
885
|
+
weatherStationRssi1: { name: "weatherStationRssi1", ID: 0x0007, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
886
|
+
weatherStationRssi2: { name: "weatherStationRssi2", ID: 0x0008, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
887
|
+
weatherStationRssi3: { name: "weatherStationRssi3", ID: 0x0009, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
888
|
+
weatherStationRssi4: { name: "weatherStationRssi4", ID: 0x000a, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
889
|
+
weatherStationRssi5: { name: "weatherStationRssi5", ID: 0x000b, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
890
|
+
weatherStationRssi6: { name: "weatherStationRssi6", ID: 0x000c, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
891
|
+
weatherStationRssi7: { name: "weatherStationRssi7", ID: 0x000d, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
892
|
+
},
|
|
893
|
+
commands: {
|
|
894
|
+
weatherScan: { name: "weatherScan", ID: HALO_WEATHER_COMMAND_SCAN, parameters: [] },
|
|
895
|
+
weatherRadioPlay: {
|
|
896
|
+
name: "weatherRadioPlay",
|
|
897
|
+
ID: HALO_WEATHER_COMMAND_PLAY,
|
|
898
|
+
parameters: [{ name: "value", type: zigbee_herdsman_1.Zcl.DataType.UINT8 }],
|
|
899
|
+
},
|
|
900
|
+
},
|
|
901
|
+
commandsResponse: {},
|
|
902
|
+
}),
|
|
903
|
+
haloWeather(),
|
|
904
|
+
],
|
|
905
|
+
meta: { disableDefaultResponse: true },
|
|
906
|
+
configure: (device) => {
|
|
907
|
+
const endpoint2 = device.getEndpoint(2);
|
|
908
|
+
if (endpoint2) {
|
|
909
|
+
endpoint2.saveClusterAttributeKeyValue("lightingColorCtrl", {
|
|
910
|
+
colorCapabilities: 0x09,
|
|
911
|
+
colorTempPhysicalMin: 153,
|
|
912
|
+
colorTempPhysicalMax: 500,
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
},
|
|
917
|
+
];
|
|
918
|
+
//# sourceMappingURL=halo_smart_labs.js.map
|