zigbee-herdsman-converters 20.13.0 → 20.14.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 +23 -0
- package/converters/fromZigbee.d.ts.map +1 -1
- package/converters/fromZigbee.js +345 -334
- package/converters/fromZigbee.js.map +1 -1
- package/converters/toZigbee.d.ts +1 -1
- package/converters/toZigbee.d.ts.map +1 -1
- package/converters/toZigbee.js +80 -82
- package/converters/toZigbee.js.map +1 -1
- package/devices/ITCommander.d.ts.map +1 -1
- package/devices/ITCommander.js +1 -1
- package/devices/ITCommander.js.map +1 -1
- package/devices/acova.d.ts.map +1 -1
- package/devices/acova.js.map +1 -1
- package/devices/akuvox.d.ts.map +1 -1
- package/devices/akuvox.js.map +1 -1
- package/devices/aldi.d.ts.map +1 -1
- package/devices/aldi.js.map +1 -1
- package/devices/alecto.d.ts.map +1 -1
- package/devices/alecto.js.map +1 -1
- package/devices/atlantic.d.ts.map +1 -1
- package/devices/atlantic.js.map +1 -1
- package/devices/aubess.d.ts.map +1 -1
- package/devices/aubess.js.map +1 -1
- package/devices/aurora_lighting.d.ts.map +1 -1
- package/devices/aurora_lighting.js +2 -2
- package/devices/aurora_lighting.js.map +1 -1
- package/devices/avatto.js +0 -1
- package/devices/avatto.js.map +1 -1
- package/devices/axis.d.ts.map +1 -1
- package/devices/axis.js.map +1 -1
- package/devices/bitron.d.ts.map +1 -1
- package/devices/bitron.js +9 -9
- package/devices/bitron.js.map +1 -1
- package/devices/bituo_technik.d.ts.map +1 -1
- package/devices/bituo_technik.js +2 -2
- package/devices/bituo_technik.js.map +1 -1
- package/devices/blaupunkt.d.ts.map +1 -1
- package/devices/blaupunkt.js +1 -1
- package/devices/blaupunkt.js.map +1 -1
- package/devices/blitzwolf.d.ts.map +1 -1
- package/devices/blitzwolf.js.map +1 -1
- package/devices/bosch.d.ts.map +1 -1
- package/devices/bosch.js +25 -25
- package/devices/bosch.js.map +1 -1
- package/devices/brimate.d.ts.map +1 -1
- package/devices/brimate.js.map +1 -1
- package/devices/bseed.d.ts.map +1 -1
- package/devices/bseed.js.map +1 -1
- package/devices/bticino.d.ts.map +1 -1
- package/devices/bticino.js.map +1 -1
- package/devices/busch_jaeger.d.ts.map +1 -1
- package/devices/busch_jaeger.js.map +1 -1
- package/devices/byun.d.ts.map +1 -1
- package/devices/byun.js.map +1 -1
- package/devices/casaia.d.ts.map +1 -1
- package/devices/casaia.js +2 -2
- package/devices/casaia.js.map +1 -1
- package/devices/centralite.d.ts.map +1 -1
- package/devices/centralite.js +5 -5
- package/devices/centralite.js.map +1 -1
- package/devices/cleverio.d.ts.map +1 -1
- package/devices/cleverio.js.map +1 -1
- package/devices/ctm.d.ts.map +1 -1
- package/devices/ctm.js +62 -62
- package/devices/ctm.js.map +1 -1
- package/devices/current_products_corp.d.ts.map +1 -1
- package/devices/current_products_corp.js.map +1 -1
- package/devices/custom_devices_diy.d.ts.map +1 -1
- package/devices/custom_devices_diy.js +12 -12
- package/devices/custom_devices_diy.js.map +1 -1
- package/devices/danalock.d.ts.map +1 -1
- package/devices/danalock.js.map +1 -1
- package/devices/danfoss.d.ts.map +1 -1
- package/devices/danfoss.js +2 -2
- package/devices/danfoss.js.map +1 -1
- package/devices/datek.d.ts.map +1 -1
- package/devices/datek.js +1 -1
- package/devices/datek.js.map +1 -1
- package/devices/dawon_dns.d.ts.map +1 -1
- package/devices/dawon_dns.js.map +1 -1
- package/devices/develco.d.ts.map +1 -1
- package/devices/develco.js +15 -14
- package/devices/develco.js.map +1 -1
- package/devices/digi.d.ts.map +1 -1
- package/devices/digi.js.map +1 -1
- package/devices/dlink.d.ts.map +1 -1
- package/devices/dlink.js.map +1 -1
- package/devices/easyaccess.d.ts.map +1 -1
- package/devices/easyaccess.js.map +1 -1
- package/devices/easyiot.d.ts.map +1 -1
- package/devices/easyiot.js.map +1 -1
- package/devices/echostar.d.ts.map +1 -1
- package/devices/echostar.js.map +1 -1
- package/devices/ecodim.d.ts.map +1 -1
- package/devices/ecodim.js +1 -1
- package/devices/ecodim.js.map +1 -1
- package/devices/ecolink.d.ts.map +1 -1
- package/devices/ecolink.js.map +1 -1
- package/devices/ecozy.d.ts.map +1 -1
- package/devices/ecozy.js.map +1 -1
- package/devices/enocean.d.ts.map +1 -1
- package/devices/enocean.js.map +1 -1
- package/devices/envilar.d.ts.map +1 -1
- package/devices/envilar.js +2 -2
- package/devices/envilar.js.map +1 -1
- package/devices/eurotronic.d.ts.map +1 -1
- package/devices/eurotronic.js.map +1 -1
- package/devices/evanell.d.ts.map +1 -1
- package/devices/evanell.js.map +1 -1
- package/devices/evology.d.ts.map +1 -1
- package/devices/evology.js.map +1 -1
- package/devices/ewelink.d.ts.map +1 -1
- package/devices/ewelink.js +1 -1
- package/devices/ewelink.js.map +1 -1
- package/devices/fantem.d.ts.map +1 -1
- package/devices/fantem.js +2 -2
- package/devices/fantem.js.map +1 -1
- package/devices/fireangel.d.ts.map +1 -1
- package/devices/fireangel.js.map +1 -1
- package/devices/frankever.d.ts.map +1 -1
- package/devices/frankever.js.map +1 -1
- package/devices/frient.d.ts.map +1 -1
- package/devices/frient.js.map +1 -1
- package/devices/gewiss.d.ts.map +1 -1
- package/devices/gewiss.js.map +1 -1
- package/devices/giex.d.ts.map +1 -1
- package/devices/giex.js.map +1 -1
- package/devices/gledopto.js +2 -2
- package/devices/gledopto.js.map +1 -1
- package/devices/gmmts.d.ts.map +1 -1
- package/devices/gmmts.js +23 -23
- package/devices/gmmts.js.map +1 -1
- package/devices/gumax.d.ts +4 -0
- package/devices/gumax.d.ts.map +1 -0
- package/devices/gumax.js +15 -0
- package/devices/gumax.js.map +1 -0
- package/devices/heiman.d.ts.map +1 -1
- package/devices/heiman.js +2 -2
- package/devices/heiman.js.map +1 -1
- package/devices/heimgard_technologies.d.ts.map +1 -1
- package/devices/heimgard_technologies.js +2 -2
- package/devices/heimgard_technologies.js.map +1 -1
- package/devices/hive.js +1 -1
- package/devices/hive.js.map +1 -1
- package/devices/hommyn.d.ts.map +1 -1
- package/devices/hommyn.js.map +1 -1
- package/devices/hzc.d.ts.map +1 -1
- package/devices/hzc.js.map +1 -1
- package/devices/hzc_electric.d.ts.map +1 -1
- package/devices/hzc_electric.js.map +1 -1
- package/devices/ihorn.d.ts.map +1 -1
- package/devices/ihorn.js.map +1 -1
- package/devices/imhotepcreation.d.ts.map +1 -1
- package/devices/index.d.ts.map +1 -1
- package/devices/index.js +4 -2
- package/devices/index.js.map +1 -1
- package/devices/innr.d.ts.map +1 -1
- package/devices/innr.js +2 -2
- package/devices/innr.js.map +1 -1
- package/devices/inovelli.d.ts.map +1 -1
- package/devices/inovelli.js +38 -38
- package/devices/inovelli.js.map +1 -1
- package/devices/insta.d.ts.map +1 -1
- package/devices/insta.js.map +1 -1
- package/devices/iotperfect.d.ts.map +1 -1
- package/devices/iotperfect.js.map +1 -1
- package/devices/iris.d.ts.map +1 -1
- package/devices/iris.js +1 -1
- package/devices/iris.js.map +1 -1
- package/devices/javis.d.ts.map +1 -1
- package/devices/javis.js.map +1 -1
- package/devices/jxuan.d.ts.map +1 -1
- package/devices/jxuan.js +2 -2
- package/devices/jxuan.js.map +1 -1
- package/devices/kami.d.ts.map +1 -1
- package/devices/kami.js.map +1 -1
- package/devices/keen_home.d.ts.map +1 -1
- package/devices/keen_home.js.map +1 -1
- package/devices/kmpcil.d.ts.map +1 -1
- package/devices/kmpcil.js +5 -5
- package/devices/kmpcil.js.map +1 -1
- package/devices/kwikset.d.ts.map +1 -1
- package/devices/kwikset.js.map +1 -1
- package/devices/led_trading.d.ts.map +1 -1
- package/devices/led_trading.js +1 -8
- package/devices/led_trading.js.map +1 -1
- package/devices/legrand.d.ts.map +1 -1
- package/devices/legrand.js +2 -2
- package/devices/legrand.js.map +1 -1
- package/devices/lellki.d.ts.map +1 -1
- package/devices/lellki.js +2 -2
- package/devices/lellki.js.map +1 -1
- package/devices/letv.d.ts.map +1 -1
- package/devices/letv.js.map +1 -1
- package/devices/leviton.d.ts.map +1 -1
- package/devices/leviton.js +1 -1
- package/devices/leviton.js.map +1 -1
- package/devices/lidl.d.ts.map +1 -1
- package/devices/lidl.js +15 -15
- package/devices/lidl.js.map +1 -1
- package/devices/lifecontrol.d.ts.map +1 -1
- package/devices/lifecontrol.js +1 -1
- package/devices/lifecontrol.js.map +1 -1
- package/devices/linkind.d.ts.map +1 -1
- package/devices/linkind.js +2 -2
- package/devices/linkind.js.map +1 -1
- package/devices/linptech.d.ts.map +1 -1
- package/devices/linptech.js +5 -5
- package/devices/linptech.js.map +1 -1
- package/devices/livolo.d.ts.map +1 -1
- package/devices/livolo.js +1 -1
- package/devices/livolo.js.map +1 -1
- package/devices/lixee.d.ts.map +1 -1
- package/devices/lixee.js +29 -28
- package/devices/lixee.js.map +1 -1
- package/devices/ls.d.ts.map +1 -1
- package/devices/ls.js.map +1 -1
- package/devices/lumi.d.ts.map +1 -1
- package/devices/lumi.js +7 -7
- package/devices/lumi.js.map +1 -1
- package/devices/lupus.d.ts.map +1 -1
- package/devices/lupus.js +2 -2
- package/devices/lupus.js.map +1 -1
- package/devices/lutron.d.ts.map +1 -1
- package/devices/lutron.js.map +1 -1
- package/devices/lux.d.ts.map +1 -1
- package/devices/lux.js.map +1 -1
- package/devices/lytko.js +6 -6
- package/devices/lytko.js.map +1 -1
- package/devices/meazon.d.ts.map +1 -1
- package/devices/meazon.js.map +1 -1
- package/devices/mercator.d.ts.map +1 -1
- package/devices/mercator.js +2 -2
- package/devices/mercator.js.map +1 -1
- package/devices/miboxer.d.ts.map +1 -1
- package/devices/miboxer.js +1 -1
- package/devices/miboxer.js.map +1 -1
- package/devices/moes.d.ts.map +1 -1
- package/devices/moes.js +3 -3
- package/devices/moes.js.map +1 -1
- package/devices/multiterm.js +1 -1
- package/devices/multiterm.js.map +1 -1
- package/devices/namron.js +6 -6
- package/devices/namron.js.map +1 -1
- package/devices/neo.d.ts.map +1 -1
- package/devices/neo.js +1 -1
- package/devices/neo.js.map +1 -1
- package/devices/net2grid.d.ts.map +1 -1
- package/devices/net2grid.js.map +1 -1
- package/devices/netvox.d.ts.map +1 -1
- package/devices/netvox.js.map +1 -1
- package/devices/niko.d.ts.map +1 -1
- package/devices/niko.js +10 -10
- package/devices/niko.js.map +1 -1
- package/devices/ninja_blocks.d.ts.map +1 -1
- package/devices/ninja_blocks.js.map +1 -1
- package/devices/nodon.d.ts.map +1 -1
- package/devices/nodon.js +2 -2
- package/devices/nodon.js.map +1 -1
- package/devices/nous.d.ts.map +1 -1
- package/devices/nous.js.map +1 -1
- package/devices/novo.d.ts.map +1 -1
- package/devices/novo.js.map +1 -1
- package/devices/nue_3a.js +2 -2
- package/devices/nue_3a.js.map +1 -1
- package/devices/nyce.d.ts.map +1 -1
- package/devices/nyce.js.map +1 -1
- package/devices/onesti.d.ts.map +1 -1
- package/devices/onesti.js.map +1 -1
- package/devices/openlumi.d.ts.map +1 -1
- package/devices/openlumi.js.map +1 -1
- package/devices/oujiabao.d.ts.map +1 -1
- package/devices/oujiabao.js.map +1 -1
- package/devices/owon.d.ts.map +1 -1
- package/devices/owon.js +35 -26
- package/devices/owon.js.map +1 -1
- package/devices/peq.d.ts.map +1 -1
- package/devices/peq.js.map +1 -1
- package/devices/perenio.d.ts.map +1 -1
- package/devices/perenio.js +21 -21
- package/devices/perenio.js.map +1 -1
- package/devices/philips.d.ts.map +1 -1
- package/devices/philips.js +28 -0
- package/devices/philips.js.map +1 -1
- package/devices/plaid.d.ts.map +1 -1
- package/devices/plaid.js.map +1 -1
- package/devices/plugwise.d.ts.map +1 -1
- package/devices/plugwise.js +1 -1
- package/devices/plugwise.js.map +1 -1
- package/devices/qa.d.ts.map +1 -1
- package/devices/qa.js.map +1 -1
- package/devices/qmotion.d.ts.map +1 -1
- package/devices/qmotion.js +1 -1
- package/devices/qmotion.js.map +1 -1
- package/devices/qoto.d.ts.map +1 -1
- package/devices/qoto.js.map +1 -1
- package/devices/rgb_genie.d.ts.map +1 -1
- package/devices/rgb_genie.js +2 -2
- package/devices/rgb_genie.js.map +1 -1
- package/devices/roome.d.ts.map +1 -1
- package/devices/roome.js.map +1 -1
- package/devices/rtx.d.ts.map +1 -1
- package/devices/rtx.js.map +1 -1
- package/devices/salus_controls.d.ts.map +1 -1
- package/devices/salus_controls.js.map +1 -1
- package/devices/saswell.d.ts.map +1 -1
- package/devices/saswell.js +1 -1
- package/devices/saswell.js.map +1 -1
- package/devices/sber.d.ts.map +1 -1
- package/devices/sber.js.map +1 -1
- package/devices/schlage.d.ts.map +1 -1
- package/devices/schlage.js.map +1 -1
- package/devices/schneider_electric.d.ts.map +1 -1
- package/devices/schneider_electric.js +22 -22
- package/devices/schneider_electric.js.map +1 -1
- package/devices/securifi.d.ts.map +1 -1
- package/devices/securifi.js.map +1 -1
- package/devices/sengled.d.ts.map +1 -1
- package/devices/sercomm.d.ts.map +1 -1
- package/devices/sercomm.js.map +1 -1
- package/devices/shade_control.d.ts.map +1 -1
- package/devices/shade_control.js.map +1 -1
- package/devices/shinasystem.js +1 -1
- package/devices/shinasystem.js.map +1 -1
- package/devices/siglis.d.ts.map +1 -1
- package/devices/siglis.js +4 -5
- package/devices/siglis.js.map +1 -1
- package/devices/sinope.d.ts.map +1 -1
- package/devices/sinope.js +76 -84
- package/devices/sinope.js.map +1 -1
- package/devices/siterwell.d.ts.map +1 -1
- package/devices/siterwell.js.map +1 -1
- package/devices/skydance.d.ts.map +1 -1
- package/devices/skydance.js.map +1 -1
- package/devices/smart9.d.ts.map +1 -1
- package/devices/smart9.js.map +1 -1
- package/devices/smartenit.d.ts.map +1 -1
- package/devices/smartenit.js.map +1 -1
- package/devices/smartthings.js +1 -1
- package/devices/smartthings.js.map +1 -1
- package/devices/smartwings.d.ts.map +1 -1
- package/devices/smartwings.js.map +1 -1
- package/devices/somgoms.d.ts.map +1 -1
- package/devices/somgoms.js.map +1 -1
- package/devices/sonoff.d.ts.map +1 -1
- package/devices/sonoff.js +2 -2
- package/devices/sonoff.js.map +1 -1
- package/devices/stelpro.d.ts.map +1 -1
- package/devices/stelpro.js +3 -3
- package/devices/stelpro.js.map +1 -1
- package/devices/sunricher.d.ts.map +1 -1
- package/devices/sunricher.js +3 -8
- package/devices/sunricher.js.map +1 -1
- package/devices/swann.d.ts.map +1 -1
- package/devices/swann.js.map +1 -1
- package/devices/tapestry.d.ts.map +1 -1
- package/devices/tapestry.js.map +1 -1
- package/devices/technicolor.d.ts.map +1 -1
- package/devices/technicolor.js.map +1 -1
- package/devices/third_reality.d.ts.map +1 -1
- package/devices/third_reality.js +167 -15
- package/devices/third_reality.js.map +1 -1
- package/devices/titan_products.d.ts.map +1 -1
- package/devices/titan_products.js.map +1 -1
- package/devices/tplink.d.ts.map +1 -1
- package/devices/tplink.js.map +1 -1
- package/devices/tuya.d.ts.map +1 -1
- package/devices/tuya.js +20 -20
- package/devices/tuya.js.map +1 -1
- package/devices/ubisys.d.ts.map +1 -1
- package/devices/ubisys.js +30 -27
- package/devices/ubisys.js.map +1 -1
- package/devices/uhome.d.ts.map +1 -1
- package/devices/uhome.js.map +1 -1
- package/devices/universal_electronics_inc.d.ts.map +1 -1
- package/devices/universal_electronics_inc.js +1 -1
- package/devices/universal_electronics_inc.js.map +1 -1
- package/devices/vesternet.d.ts.map +1 -1
- package/devices/vesternet.js.map +1 -1
- package/devices/viessmann.d.ts.map +1 -1
- package/devices/viessmann.js.map +1 -1
- package/devices/vimar.d.ts.map +1 -1
- package/devices/vimar.js.map +1 -1
- package/devices/visonic.d.ts.map +1 -1
- package/devices/visonic.js.map +1 -1
- package/devices/wally.d.ts.map +1 -1
- package/devices/wally.js.map +1 -1
- package/devices/waxman.d.ts.map +1 -1
- package/devices/waxman.js.map +1 -1
- package/devices/weiser.d.ts.map +1 -1
- package/devices/weiser.js.map +1 -1
- package/devices/wirenboard.d.ts.map +1 -1
- package/devices/wirenboard.js +11 -11
- package/devices/wirenboard.js.map +1 -1
- package/devices/woolley.d.ts.map +1 -1
- package/devices/woolley.js +1 -1
- package/devices/woolley.js.map +1 -1
- package/devices/woox.d.ts.map +1 -1
- package/devices/woox.js.map +1 -1
- package/devices/wyze.d.ts.map +1 -1
- package/devices/wyze.js.map +1 -1
- package/devices/xyzroe.d.ts.map +1 -1
- package/devices/xyzroe.js +6 -6
- package/devices/xyzroe.js.map +1 -1
- package/devices/yale.d.ts.map +1 -1
- package/devices/yale.js +3 -3
- package/devices/yale.js.map +1 -1
- package/devices/yookee.d.ts.map +1 -1
- package/devices/yookee.js.map +1 -1
- package/devices/zemismart.d.ts.map +1 -1
- package/devices/zemismart.js +2 -2
- package/devices/zemismart.js.map +1 -1
- package/devices/zen.d.ts.map +1 -1
- package/devices/zen.js.map +1 -1
- package/index.d.ts +5 -5
- package/index.d.ts.map +1 -1
- package/index.js +31 -16
- package/index.js.map +1 -1
- package/lib/color.d.ts +1 -1
- package/lib/color.d.ts.map +1 -1
- package/lib/color.js +47 -50
- package/lib/color.js.map +1 -1
- package/lib/configureKey.js +2 -2
- package/lib/configureKey.js.map +1 -1
- package/lib/develco.d.ts.map +1 -1
- package/lib/develco.js +5 -6
- package/lib/develco.js.map +1 -1
- package/lib/ewelink.d.ts.map +1 -1
- package/lib/exposes.js +1 -1
- package/lib/exposes.js.map +1 -1
- package/lib/ikea.d.ts +1 -1
- package/lib/ikea.d.ts.map +1 -1
- package/lib/ikea.js +10 -10
- package/lib/ikea.js.map +1 -1
- package/lib/ledvance.d.ts +1 -1
- package/lib/ledvance.d.ts.map +1 -1
- package/lib/legacy.d.ts +3 -16
- package/lib/legacy.d.ts.map +1 -1
- package/lib/legacy.js +121 -131
- package/lib/legacy.js.map +1 -1
- package/lib/legrand.d.ts +1 -1
- package/lib/legrand.d.ts.map +1 -1
- package/lib/legrand.js +4 -4
- package/lib/legrand.js.map +1 -1
- package/lib/light.d.ts +1 -1
- package/lib/light.js +5 -5
- package/lib/light.js.map +1 -1
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js +4 -4
- package/lib/logger.js.map +1 -1
- package/lib/lumi.d.ts +1 -1
- package/lib/lumi.d.ts.map +1 -1
- package/lib/lumi.js +90 -92
- package/lib/lumi.js.map +1 -1
- package/lib/modernExtend.d.ts +1 -1
- package/lib/modernExtend.d.ts.map +1 -1
- package/lib/modernExtend.js +15 -15
- package/lib/modernExtend.js.map +1 -1
- package/lib/ota/common.d.ts +1 -1
- package/lib/ota/common.d.ts.map +1 -1
- package/lib/ota/common.js +5 -5
- package/lib/ota/common.js.map +1 -1
- package/lib/ota/gmmts.d.ts +1 -1
- package/lib/ota/gmmts.d.ts.map +1 -1
- package/lib/ota/gmmts.js +2 -2
- package/lib/ota/gmmts.js.map +1 -1
- package/lib/ota/index.d.ts +5 -5
- package/lib/ota/index.d.ts.map +1 -1
- package/lib/ota/index.js +7 -7
- package/lib/ota/index.js.map +1 -1
- package/lib/ota/inovelli.d.ts +1 -6
- package/lib/ota/inovelli.d.ts.map +1 -1
- package/lib/ota/inovelli.js +11 -11
- package/lib/ota/inovelli.js.map +1 -1
- package/lib/ota/jethome.d.ts +1 -1
- package/lib/ota/jethome.d.ts.map +1 -1
- package/lib/ota/jethome.js +4 -4
- package/lib/ota/jethome.js.map +1 -1
- package/lib/ota/ledvance.d.ts +1 -1
- package/lib/ota/ledvance.d.ts.map +1 -1
- package/lib/ota/ledvance.js +4 -4
- package/lib/ota/ledvance.js.map +1 -1
- package/lib/ota/lixee.d.ts +1 -1
- package/lib/ota/lixee.d.ts.map +1 -1
- package/lib/ota/lixee.js +3 -3
- package/lib/ota/lixee.js.map +1 -1
- package/lib/ota/salus.d.ts +1 -1
- package/lib/ota/salus.d.ts.map +1 -1
- package/lib/ota/salus.js +5 -5
- package/lib/ota/salus.js.map +1 -1
- package/lib/ota/securifi.d.ts +1 -1
- package/lib/ota/securifi.d.ts.map +1 -1
- package/lib/ota/securifi.js +2 -2
- package/lib/ota/securifi.js.map +1 -1
- package/lib/ota/tradfri.d.ts.map +1 -1
- package/lib/ota/tradfri.js +4 -4
- package/lib/ota/tradfri.js.map +1 -1
- package/lib/ota/ubisys.d.ts.map +1 -1
- package/lib/ota/ubisys.js +4 -4
- package/lib/ota/ubisys.js.map +1 -1
- package/lib/ota/zigbeeOTA.d.ts +1 -1
- package/lib/ota/zigbeeOTA.d.ts.map +1 -1
- package/lib/ota/zigbeeOTA.js +9 -9
- package/lib/ota/zigbeeOTA.js.map +1 -1
- package/lib/philips.js +12 -12
- package/lib/philips.js.map +1 -1
- package/lib/reporting.d.ts +1 -1
- package/lib/reporting.d.ts.map +1 -1
- package/lib/reporting.js +7 -7
- package/lib/reporting.js.map +1 -1
- package/lib/store.d.ts +1 -1
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +2 -2
- package/lib/store.js.map +1 -1
- package/lib/tuya.d.ts +1 -1
- package/lib/tuya.d.ts.map +1 -1
- package/lib/tuya.js +24 -56
- package/lib/tuya.js.map +1 -1
- package/lib/types.d.ts +4 -4
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -0
- package/lib/types.js.map +1 -1
- package/lib/ubisys.d.ts +1 -1
- package/lib/ubisys.d.ts.map +1 -1
- package/lib/ubisys.js +1 -1
- package/lib/ubisys.js.map +1 -1
- package/lib/utils.d.ts +1 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +26 -26
- package/lib/utils.js.map +1 -1
- package/package.json +8 -9
package/converters/fromZigbee.js
CHANGED
|
@@ -40,7 +40,7 @@ const converters1 = {
|
|
|
40
40
|
cluster: 'hvacFanCtrl',
|
|
41
41
|
type: ['attributeReport', 'readResponse'],
|
|
42
42
|
convert: (model, msg, publish, options, meta) => {
|
|
43
|
-
if (msg.data.
|
|
43
|
+
if (msg.data.fanMode !== undefined) {
|
|
44
44
|
const key = (0, utils_1.getKey)(constants.fanMode, msg.data.fanMode);
|
|
45
45
|
return { fan_mode: key, fan_state: key === 'off' ? 'OFF' : 'ON' };
|
|
46
46
|
}
|
|
@@ -52,58 +52,58 @@ const converters1 = {
|
|
|
52
52
|
convert: (model, msg, publish, options, meta) => {
|
|
53
53
|
const result = {};
|
|
54
54
|
const dontMapPIHeatingDemand = model.meta && model.meta.thermostat && model.meta.thermostat.dontMapPIHeatingDemand;
|
|
55
|
-
if (msg.data.
|
|
55
|
+
if (msg.data.localTemp !== undefined) {
|
|
56
56
|
const value = (0, utils_1.precisionRound)(msg.data['localTemp'], 2) / 100;
|
|
57
57
|
if (value >= -273.15) {
|
|
58
58
|
result[(0, utils_1.postfixWithEndpointName)('local_temperature', msg, model, meta)] = value;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
if (msg.data.
|
|
61
|
+
if (msg.data.localTemperatureCalibration !== undefined) {
|
|
62
62
|
result[(0, utils_1.postfixWithEndpointName)('local_temperature_calibration', msg, model, meta)] =
|
|
63
63
|
(0, utils_1.precisionRound)(msg.data['localTemperatureCalibration'], 2) / 10;
|
|
64
64
|
}
|
|
65
|
-
if (msg.data.
|
|
65
|
+
if (msg.data.outdoorTemp !== undefined) {
|
|
66
66
|
const value = (0, utils_1.precisionRound)(msg.data['outdoorTemp'], 2) / 100;
|
|
67
67
|
if (value >= -273.15) {
|
|
68
68
|
result[(0, utils_1.postfixWithEndpointName)('outdoor_temperature', msg, model, meta)] = value;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
if (msg.data.
|
|
71
|
+
if (msg.data.occupancy !== undefined) {
|
|
72
72
|
result[(0, utils_1.postfixWithEndpointName)('occupancy', msg, model, meta)] = msg.data.occupancy % 2 > 0;
|
|
73
73
|
}
|
|
74
|
-
if (msg.data.
|
|
74
|
+
if (msg.data.occupiedHeatingSetpoint !== undefined) {
|
|
75
75
|
const value = (0, utils_1.precisionRound)(msg.data['occupiedHeatingSetpoint'], 2) / 100;
|
|
76
76
|
// Stelpro will return -325.65 when set to off, value is not realistic anyway
|
|
77
77
|
if (value >= -273.15) {
|
|
78
78
|
result[(0, utils_1.postfixWithEndpointName)('occupied_heating_setpoint', msg, model, meta)] = value;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
if (msg.data.
|
|
81
|
+
if (msg.data.unoccupiedHeatingSetpoint !== undefined) {
|
|
82
82
|
result[(0, utils_1.postfixWithEndpointName)('unoccupied_heating_setpoint', msg, model, meta)] =
|
|
83
83
|
(0, utils_1.precisionRound)(msg.data['unoccupiedHeatingSetpoint'], 2) / 100;
|
|
84
84
|
}
|
|
85
|
-
if (msg.data.
|
|
85
|
+
if (msg.data.occupiedCoolingSetpoint !== undefined) {
|
|
86
86
|
result[(0, utils_1.postfixWithEndpointName)('occupied_cooling_setpoint', msg, model, meta)] =
|
|
87
87
|
(0, utils_1.precisionRound)(msg.data['occupiedCoolingSetpoint'], 2) / 100;
|
|
88
88
|
}
|
|
89
|
-
if (msg.data.
|
|
89
|
+
if (msg.data.unoccupiedCoolingSetpoint !== undefined) {
|
|
90
90
|
result[(0, utils_1.postfixWithEndpointName)('unoccupied_cooling_setpoint', msg, model, meta)] =
|
|
91
91
|
(0, utils_1.precisionRound)(msg.data['unoccupiedCoolingSetpoint'], 2) / 100;
|
|
92
92
|
}
|
|
93
|
-
if (msg.data.
|
|
93
|
+
if (msg.data.setpointChangeAmount !== undefined) {
|
|
94
94
|
result[(0, utils_1.postfixWithEndpointName)('setpoint_change_amount', msg, model, meta)] = msg.data['setpointChangeAmount'] / 100;
|
|
95
95
|
}
|
|
96
|
-
if (msg.data.
|
|
96
|
+
if (msg.data.setpointChangeSource !== undefined) {
|
|
97
97
|
const lookup = { 0: 'manual', 1: 'schedule', 2: 'externally' };
|
|
98
98
|
result[(0, utils_1.postfixWithEndpointName)('setpoint_change_source', msg, model, meta)] = lookup[msg.data['setpointChangeSource']];
|
|
99
99
|
}
|
|
100
|
-
if (msg.data.
|
|
100
|
+
if (msg.data.setpointChangeSourceTimeStamp !== undefined) {
|
|
101
101
|
const date = new Date(2000, 0, 1);
|
|
102
102
|
date.setSeconds(msg.data['setpointChangeSourceTimeStamp']);
|
|
103
103
|
const value = (0, utils_1.toLocalISOString)(date);
|
|
104
104
|
result[(0, utils_1.postfixWithEndpointName)('setpoint_change_source_timestamp', msg, model, meta)] = value;
|
|
105
105
|
}
|
|
106
|
-
if (msg.data.
|
|
106
|
+
if (msg.data.remoteSensing !== undefined) {
|
|
107
107
|
const value = msg.data['remoteSensing'];
|
|
108
108
|
result[(0, utils_1.postfixWithEndpointName)('remote_sensing', msg, model, meta)] = {
|
|
109
109
|
local_temperature: (value & 1) > 0 ? 'remotely' : 'internally',
|
|
@@ -111,79 +111,79 @@ const converters1 = {
|
|
|
111
111
|
occupancy: (value & (1 << 2)) > 0 ? 'remotely' : 'internally',
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
if (msg.data.
|
|
114
|
+
if (msg.data.ctrlSeqeOfOper !== undefined) {
|
|
115
115
|
result[(0, utils_1.postfixWithEndpointName)('control_sequence_of_operation', msg, model, meta)] =
|
|
116
116
|
constants.thermostatControlSequenceOfOperations[msg.data['ctrlSeqeOfOper']];
|
|
117
117
|
}
|
|
118
|
-
if (msg.data.
|
|
118
|
+
if (msg.data.programingOperMode !== undefined) {
|
|
119
119
|
result[(0, utils_1.postfixWithEndpointName)('programming_operation_mode', msg, model, meta)] =
|
|
120
120
|
constants.thermostatProgrammingOperationModes[msg.data['programingOperMode']];
|
|
121
121
|
}
|
|
122
|
-
if (msg.data.
|
|
122
|
+
if (msg.data.systemMode !== undefined) {
|
|
123
123
|
result[(0, utils_1.postfixWithEndpointName)('system_mode', msg, model, meta)] = constants.thermostatSystemModes[msg.data['systemMode']];
|
|
124
124
|
}
|
|
125
|
-
if (msg.data.
|
|
125
|
+
if (msg.data.runningMode !== undefined) {
|
|
126
126
|
result[(0, utils_1.postfixWithEndpointName)('running_mode', msg, model, meta)] = constants.thermostatRunningMode[msg.data['runningMode']];
|
|
127
127
|
}
|
|
128
|
-
if (msg.data.
|
|
128
|
+
if (msg.data.runningState !== undefined) {
|
|
129
129
|
result[(0, utils_1.postfixWithEndpointName)('running_state', msg, model, meta)] = constants.thermostatRunningStates[msg.data['runningState']];
|
|
130
130
|
}
|
|
131
|
-
if (msg.data.
|
|
131
|
+
if (msg.data.pIHeatingDemand !== undefined) {
|
|
132
132
|
result[(0, utils_1.postfixWithEndpointName)('pi_heating_demand', msg, model, meta)] = (0, utils_1.mapNumberRange)(msg.data['pIHeatingDemand'], 0, dontMapPIHeatingDemand ? 100 : 255, 0, 100);
|
|
133
133
|
}
|
|
134
|
-
if (msg.data.
|
|
134
|
+
if (msg.data.pICoolingDemand !== undefined) {
|
|
135
135
|
// we assume the behavior is consistent for pIHeatingDemand + pICoolingDemand for the same vendor
|
|
136
136
|
result[(0, utils_1.postfixWithEndpointName)('pi_cooling_demand', msg, model, meta)] = (0, utils_1.mapNumberRange)(msg.data['pICoolingDemand'], 0, dontMapPIHeatingDemand ? 100 : 255, 0, 100);
|
|
137
137
|
}
|
|
138
|
-
if (msg.data.
|
|
138
|
+
if (msg.data.tempSetpointHold !== undefined) {
|
|
139
139
|
result[(0, utils_1.postfixWithEndpointName)('temperature_setpoint_hold', msg, model, meta)] = msg.data['tempSetpointHold'] == 1;
|
|
140
140
|
}
|
|
141
|
-
if (msg.data.
|
|
141
|
+
if (msg.data.tempSetpointHoldDuration !== undefined) {
|
|
142
142
|
result[(0, utils_1.postfixWithEndpointName)('temperature_setpoint_hold_duration', msg, model, meta)] = msg.data['tempSetpointHoldDuration'];
|
|
143
143
|
}
|
|
144
|
-
if (msg.data.
|
|
144
|
+
if (msg.data.minHeatSetpointLimit !== undefined) {
|
|
145
145
|
const value = (0, utils_1.precisionRound)(msg.data['minHeatSetpointLimit'], 2) / 100;
|
|
146
146
|
if (value >= -273.15) {
|
|
147
147
|
result[(0, utils_1.postfixWithEndpointName)('min_heat_setpoint_limit', msg, model, meta)] = value;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
if (msg.data.
|
|
150
|
+
if (msg.data.maxHeatSetpointLimit !== undefined) {
|
|
151
151
|
const value = (0, utils_1.precisionRound)(msg.data['maxHeatSetpointLimit'], 2) / 100;
|
|
152
152
|
if (value >= -273.15) {
|
|
153
153
|
result[(0, utils_1.postfixWithEndpointName)('max_heat_setpoint_limit', msg, model, meta)] = value;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
if (msg.data.
|
|
156
|
+
if (msg.data.absMinHeatSetpointLimit !== undefined) {
|
|
157
157
|
const value = (0, utils_1.precisionRound)(msg.data['absMinHeatSetpointLimit'], 2) / 100;
|
|
158
158
|
if (value >= -273.15) {
|
|
159
159
|
result[(0, utils_1.postfixWithEndpointName)('abs_min_heat_setpoint_limit', msg, model, meta)] = value;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
if (msg.data.
|
|
162
|
+
if (msg.data.absMaxHeatSetpointLimit !== undefined) {
|
|
163
163
|
const value = (0, utils_1.precisionRound)(msg.data['absMaxHeatSetpointLimit'], 2) / 100;
|
|
164
164
|
if (value >= -273.15) {
|
|
165
165
|
result[(0, utils_1.postfixWithEndpointName)('abs_max_heat_setpoint_limit', msg, model, meta)] = value;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
if (msg.data.
|
|
168
|
+
if (msg.data.absMinCoolSetpointLimit !== undefined) {
|
|
169
169
|
const value = (0, utils_1.precisionRound)(msg.data['absMinCoolSetpointLimit'], 2) / 100;
|
|
170
170
|
if (value >= -273.15) {
|
|
171
171
|
result[(0, utils_1.postfixWithEndpointName)('abs_min_cool_setpoint_limit', msg, model, meta)] = value;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
if (msg.data.
|
|
174
|
+
if (msg.data.absMaxCoolSetpointLimit !== undefined) {
|
|
175
175
|
const value = (0, utils_1.precisionRound)(msg.data['absMaxCoolSetpointLimit'], 2) / 100;
|
|
176
176
|
if (value >= -273.15) {
|
|
177
177
|
result[(0, utils_1.postfixWithEndpointName)('abs_max_cool_setpoint_limit', msg, model, meta)] = value;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
if (msg.data.
|
|
180
|
+
if (msg.data.minSetpointDeadBand !== undefined) {
|
|
181
181
|
const value = (0, utils_1.precisionRound)(msg.data['minSetpointDeadBand'], 2) / 100;
|
|
182
182
|
if (value >= -273.15) {
|
|
183
183
|
result[(0, utils_1.postfixWithEndpointName)('min_setpoint_dead_band', msg, model, meta)] = value;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
if (msg.data.
|
|
186
|
+
if (msg.data.acLouverPosition !== undefined) {
|
|
187
187
|
result[(0, utils_1.postfixWithEndpointName)('ac_louver_position', msg, model, meta)] =
|
|
188
188
|
constants.thermostatAcLouverPositions[msg.data['acLouverPosition']];
|
|
189
189
|
}
|
|
@@ -203,10 +203,10 @@ const converters1 = {
|
|
|
203
203
|
const transitions = [];
|
|
204
204
|
for (const transition of msg.data.transitions) {
|
|
205
205
|
const entry = { time: transition.transitionTime };
|
|
206
|
-
if (transition.
|
|
206
|
+
if (transition.heatSetpoint !== undefined) {
|
|
207
207
|
entry['heating_setpoint'] = transition['heatSetpoint'] / 100;
|
|
208
208
|
}
|
|
209
|
-
if (transition.
|
|
209
|
+
if (transition.coolSetpoint !== undefined) {
|
|
210
210
|
entry['cooling_setpoint'] = transition['coolSetpoint'] / 100;
|
|
211
211
|
}
|
|
212
212
|
transitions.push(entry);
|
|
@@ -219,15 +219,17 @@ const converters1 = {
|
|
|
219
219
|
type: ['attributeReport', 'readResponse'],
|
|
220
220
|
convert: (model, msg, publish, options, meta) => {
|
|
221
221
|
const result = {};
|
|
222
|
-
if (msg.data.
|
|
223
|
-
result.keypad_lockout =
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
222
|
+
if (msg.data.keypadLockout !== undefined) {
|
|
223
|
+
result.keypad_lockout =
|
|
224
|
+
constants.keypadLockoutMode[msg.data['keypadLockout']] !== undefined
|
|
225
|
+
? constants.keypadLockoutMode[msg.data['keypadLockout']]
|
|
226
|
+
: msg.data['keypadLockout'];
|
|
227
|
+
}
|
|
228
|
+
if (msg.data.tempDisplayMode !== undefined) {
|
|
229
|
+
result.temperature_display_mode =
|
|
230
|
+
constants.temperatureDisplayMode[msg.data['tempDisplayMode']] !== undefined
|
|
231
|
+
? constants.temperatureDisplayMode[msg.data['tempDisplayMode']]
|
|
232
|
+
: msg.data['tempDisplayMode'];
|
|
231
233
|
}
|
|
232
234
|
return result;
|
|
233
235
|
},
|
|
@@ -288,18 +290,18 @@ const converters1 = {
|
|
|
288
290
|
type: ['attributeReport', 'readResponse'],
|
|
289
291
|
convert: (model, msg, publish, options, meta) => {
|
|
290
292
|
const result = {};
|
|
291
|
-
if (msg.data.
|
|
293
|
+
if (msg.data.lockState !== undefined) {
|
|
292
294
|
result.state = msg.data.lockState == 1 ? 'LOCK' : 'UNLOCK';
|
|
293
295
|
const lookup = ['not_fully_locked', 'locked', 'unlocked'];
|
|
294
296
|
result.lock_state = lookup[msg.data['lockState']];
|
|
295
297
|
}
|
|
296
|
-
if (msg.data.
|
|
298
|
+
if (msg.data.autoRelockTime !== undefined) {
|
|
297
299
|
result.auto_relock_time = msg.data.autoRelockTime;
|
|
298
300
|
}
|
|
299
|
-
if (msg.data.
|
|
301
|
+
if (msg.data.soundVolume !== undefined) {
|
|
300
302
|
result.sound_volume = constants.lockSoundVolume[msg.data.soundVolume];
|
|
301
303
|
}
|
|
302
|
-
if (msg.data.
|
|
304
|
+
if (msg.data.doorState !== undefined) {
|
|
303
305
|
const lookup = {
|
|
304
306
|
0: 'open',
|
|
305
307
|
1: 'closed',
|
|
@@ -366,7 +368,7 @@ const converters1 = {
|
|
|
366
368
|
// If voltageToPercentage is specified, it means we do not trust the percentage
|
|
367
369
|
// returned by the device and are instead calculating it ourselves.
|
|
368
370
|
if (model.meta?.battery?.voltageToPercentage == null &&
|
|
369
|
-
msg.data.
|
|
371
|
+
msg.data.batteryPercentageRemaining !== undefined &&
|
|
370
372
|
msg.data['batteryPercentageRemaining'] < 255) {
|
|
371
373
|
// Some devices do not comply to the ZCL and report a
|
|
372
374
|
// batteryPercentageRemaining of 100 when the battery is full (should be 200).
|
|
@@ -375,14 +377,14 @@ const converters1 = {
|
|
|
375
377
|
percentage = dontDividePercentage ? percentage : percentage / 2;
|
|
376
378
|
payload.battery = (0, utils_1.precisionRound)(percentage, 2);
|
|
377
379
|
}
|
|
378
|
-
if (msg.data.
|
|
380
|
+
if (msg.data.batteryVoltage !== undefined && msg.data['batteryVoltage'] < 255) {
|
|
379
381
|
// Deprecated: voltage is = mV now but should be V
|
|
380
382
|
payload.voltage = msg.data['batteryVoltage'] * 100;
|
|
381
383
|
if (model.meta && model.meta.battery && model.meta.battery.voltageToPercentage) {
|
|
382
384
|
payload.battery = (0, utils_1.batteryVoltageToPercentage)(payload.voltage, model.meta.battery.voltageToPercentage);
|
|
383
385
|
}
|
|
384
386
|
}
|
|
385
|
-
if (msg.data.
|
|
387
|
+
if (msg.data.batteryAlarmState !== undefined) {
|
|
386
388
|
const battery1Low = (msg.data.batteryAlarmState & (1 << 0) ||
|
|
387
389
|
msg.data.batteryAlarmState & (1 << 1) ||
|
|
388
390
|
msg.data.batteryAlarmState & (1 << 2) ||
|
|
@@ -404,7 +406,7 @@ const converters1 = {
|
|
|
404
406
|
cluster: 'msTemperatureMeasurement',
|
|
405
407
|
type: ['attributeReport', 'readResponse'],
|
|
406
408
|
convert: (model, msg, publish, options, meta) => {
|
|
407
|
-
if (msg.data.
|
|
409
|
+
if (msg.data.measuredValue !== undefined) {
|
|
408
410
|
const temperature = parseFloat(msg.data['measuredValue']) / 100.0;
|
|
409
411
|
const property = (0, utils_1.postfixWithEndpointName)('temperature', msg, model, meta);
|
|
410
412
|
return { [property]: temperature };
|
|
@@ -415,7 +417,7 @@ const converters1 = {
|
|
|
415
417
|
cluster: 'genDeviceTempCfg',
|
|
416
418
|
type: ['attributeReport', 'readResponse'],
|
|
417
419
|
convert: (model, msg, publish, options, meta) => {
|
|
418
|
-
if (msg.data.
|
|
420
|
+
if (msg.data.currentTemperature !== undefined) {
|
|
419
421
|
const value = parseInt(msg.data['currentTemperature']);
|
|
420
422
|
return { device_temperature: value };
|
|
421
423
|
}
|
|
@@ -439,7 +441,7 @@ const converters1 = {
|
|
|
439
441
|
cluster: 'pm25Measurement',
|
|
440
442
|
type: ['attributeReport', 'readResponse'],
|
|
441
443
|
convert: (model, msg, publish, options, meta) => {
|
|
442
|
-
if (msg.data.
|
|
444
|
+
if (msg.data.measuredValue !== undefined) {
|
|
443
445
|
return { pm25: msg.data['measuredValue'] };
|
|
444
446
|
}
|
|
445
447
|
},
|
|
@@ -450,7 +452,7 @@ const converters1 = {
|
|
|
450
452
|
convert: (model, msg, publish, options, meta) => {
|
|
451
453
|
const flow = parseFloat(msg.data['measuredValue']) / 10.0;
|
|
452
454
|
const property = (0, utils_1.postfixWithEndpointName)('flow', msg, model, meta);
|
|
453
|
-
if (msg.data.
|
|
455
|
+
if (msg.data.measuredValue !== undefined) {
|
|
454
456
|
return { [property]: flow };
|
|
455
457
|
}
|
|
456
458
|
},
|
|
@@ -478,7 +480,7 @@ const converters1 = {
|
|
|
478
480
|
type: ['attributeReport', 'readResponse'],
|
|
479
481
|
convert: (model, msg, publish, options, meta) => {
|
|
480
482
|
let pressure = 0;
|
|
481
|
-
if (msg.data.
|
|
483
|
+
if (msg.data.scaledValue !== undefined) {
|
|
482
484
|
const scale = msg.endpoint.getClusterAttributeValue('msPressureMeasurement', 'scale');
|
|
483
485
|
pressure = msg.data['scaledValue'] / Math.pow(10, scale) / 100.0; // convert to hPa
|
|
484
486
|
}
|
|
@@ -501,7 +503,7 @@ const converters1 = {
|
|
|
501
503
|
type: ['attributeReport', 'readResponse'],
|
|
502
504
|
options: [exposes.options.no_occupancy_since_false()],
|
|
503
505
|
convert: (model, msg, publish, options, meta) => {
|
|
504
|
-
if (msg.data.
|
|
506
|
+
if (msg.data.occupancy !== undefined) {
|
|
505
507
|
const payload = { occupancy: msg.data.occupancy % 2 > 0 };
|
|
506
508
|
utils.noOccupancySince(msg.endpoint, options, publish, payload.occupancy ? 'stop' : 'start');
|
|
507
509
|
return payload;
|
|
@@ -523,7 +525,7 @@ const converters1 = {
|
|
|
523
525
|
}
|
|
524
526
|
// The occupancy sensor only sends a message when motion detected.
|
|
525
527
|
// Therefore we need to publish the no_motion detected by ourselves.
|
|
526
|
-
const timeout = options && options.
|
|
528
|
+
const timeout = options && options.occupancy_timeout !== undefined ? Number(options.occupancy_timeout) : 90;
|
|
527
529
|
// Stop existing timers because motion is detected and set a new one.
|
|
528
530
|
clearTimeout(globalStore.getValue(msg.endpoint, 'occupancy_timer', null));
|
|
529
531
|
if (timeout !== 0) {
|
|
@@ -541,7 +543,7 @@ const converters1 = {
|
|
|
541
543
|
cluster: 'msOccupancySensing',
|
|
542
544
|
type: ['attributeReport', 'readResponse'],
|
|
543
545
|
convert: (model, msg, publish, options, meta) => {
|
|
544
|
-
if (msg.data.
|
|
546
|
+
if (msg.data.pirOToUDelay !== undefined) {
|
|
545
547
|
return { occupancy_timeout: msg.data.pirOToUDelay };
|
|
546
548
|
}
|
|
547
549
|
},
|
|
@@ -550,7 +552,7 @@ const converters1 = {
|
|
|
550
552
|
cluster: 'genLevelCtrl',
|
|
551
553
|
type: ['attributeReport', 'readResponse'],
|
|
552
554
|
convert: (model, msg, publish, options, meta) => {
|
|
553
|
-
if (msg.data.
|
|
555
|
+
if (msg.data.currentLevel !== undefined) {
|
|
554
556
|
const property = (0, utils_1.postfixWithEndpointName)('brightness', msg, model, meta);
|
|
555
557
|
return { [property]: msg.data['currentLevel'] };
|
|
556
558
|
}
|
|
@@ -562,12 +564,12 @@ const converters1 = {
|
|
|
562
564
|
convert: (model, msg, publish, options, meta) => {
|
|
563
565
|
const result = { level_config: {} };
|
|
564
566
|
// onOffTransitionTime - range 0x0000 to 0xffff - optional
|
|
565
|
-
if (msg.data.
|
|
567
|
+
if (msg.data.onOffTransitionTime !== undefined && msg.data['onOffTransitionTime'] !== undefined) {
|
|
566
568
|
result.level_config.on_off_transition_time = Number(msg.data['onOffTransitionTime']);
|
|
567
569
|
}
|
|
568
570
|
// onTransitionTime - range 0x0000 to 0xffff - optional
|
|
569
571
|
// 0xffff = use onOffTransitionTime
|
|
570
|
-
if (msg.data.
|
|
572
|
+
if (msg.data.onTransitionTime !== undefined && msg.data['onTransitionTime'] !== undefined) {
|
|
571
573
|
result.level_config.on_transition_time = Number(msg.data['onTransitionTime']);
|
|
572
574
|
if (result.level_config.on_transition_time == 65535) {
|
|
573
575
|
result.level_config.on_transition_time = 'disabled';
|
|
@@ -575,7 +577,7 @@ const converters1 = {
|
|
|
575
577
|
}
|
|
576
578
|
// offTransitionTime - range 0x0000 to 0xffff - optional
|
|
577
579
|
// 0xffff = use onOffTransitionTime
|
|
578
|
-
if (msg.data.
|
|
580
|
+
if (msg.data.offTransitionTime !== undefined && msg.data['offTransitionTime'] !== undefined) {
|
|
579
581
|
result.level_config.off_transition_time = Number(msg.data['offTransitionTime']);
|
|
580
582
|
if (result.level_config.off_transition_time == 65535) {
|
|
581
583
|
result.level_config.off_transition_time = 'disabled';
|
|
@@ -584,7 +586,7 @@ const converters1 = {
|
|
|
584
586
|
// startUpCurrentLevel - range 0x00 to 0xff - optional
|
|
585
587
|
// 0x00 = return to minimum supported level
|
|
586
588
|
// 0xff - return to previous previous
|
|
587
|
-
if (msg.data.
|
|
589
|
+
if (msg.data.startUpCurrentLevel !== undefined && msg.data['startUpCurrentLevel'] !== undefined) {
|
|
588
590
|
result.level_config.current_level_startup = Number(msg.data['startUpCurrentLevel']);
|
|
589
591
|
if (result.level_config.current_level_startup == 255) {
|
|
590
592
|
result.level_config.current_level_startup = 'previous';
|
|
@@ -595,7 +597,7 @@ const converters1 = {
|
|
|
595
597
|
}
|
|
596
598
|
// onLevel - range 0x00 to 0xff - optional
|
|
597
599
|
// Any value outside of MinLevel to MaxLevel, including 0xff and 0x00, is interpreted as "previous".
|
|
598
|
-
if (msg.data.
|
|
600
|
+
if (msg.data.onLevel !== undefined && msg.data['onLevel'] !== undefined) {
|
|
599
601
|
result.level_config.on_level = Number(msg.data['onLevel']);
|
|
600
602
|
if (result.level_config.on_level === 255) {
|
|
601
603
|
result.level_config.on_level = 'previous';
|
|
@@ -606,7 +608,7 @@ const converters1 = {
|
|
|
606
608
|
// when 1, CurrentLevel can be changed while the device is off.
|
|
607
609
|
// bit 1: CoupleColorTempToLevel - when 1, changes to level also change color temperature.
|
|
608
610
|
// (What this means is not defined, but it's most likely to be "dim to warm".)
|
|
609
|
-
if (msg.data.
|
|
611
|
+
if (msg.data.options !== undefined && msg.data['options'] !== undefined) {
|
|
610
612
|
result.level_config.execute_if_off = !!(Number(msg.data['options']) & 1);
|
|
611
613
|
}
|
|
612
614
|
if (Object.keys(result.level_config).length > 0) {
|
|
@@ -620,40 +622,41 @@ const converters1 = {
|
|
|
620
622
|
options: [exposes.options.color_sync()],
|
|
621
623
|
convert: (model, msg, publish, options, meta) => {
|
|
622
624
|
const result = {};
|
|
623
|
-
if (msg.data.
|
|
625
|
+
if (msg.data.colorTemperature !== undefined) {
|
|
624
626
|
result.color_temp = msg.data['colorTemperature'];
|
|
625
627
|
}
|
|
626
|
-
if (msg.data.
|
|
628
|
+
if (msg.data.startUpColorTemperature !== undefined) {
|
|
627
629
|
result.color_temp_startup = msg.data['startUpColorTemperature'];
|
|
628
630
|
}
|
|
629
|
-
if (msg.data.
|
|
630
|
-
result.color_mode =
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
msg.data.
|
|
637
|
-
msg.data.
|
|
638
|
-
msg.data.
|
|
631
|
+
if (msg.data.colorMode !== undefined) {
|
|
632
|
+
result.color_mode =
|
|
633
|
+
constants.colorModeLookup[msg.data['colorMode']] !== undefined
|
|
634
|
+
? constants.colorModeLookup[msg.data['colorMode']]
|
|
635
|
+
: msg.data['colorMode'];
|
|
636
|
+
}
|
|
637
|
+
if (msg.data.currentX !== undefined ||
|
|
638
|
+
msg.data.currentY !== undefined ||
|
|
639
|
+
msg.data.currentSaturation !== undefined ||
|
|
640
|
+
msg.data.currentHue !== undefined ||
|
|
641
|
+
msg.data.enhancedCurrentHue !== undefined) {
|
|
639
642
|
result.color = {};
|
|
640
|
-
if (msg.data.
|
|
643
|
+
if (msg.data.currentX !== undefined) {
|
|
641
644
|
result.color.x = (0, utils_1.mapNumberRange)(msg.data['currentX'], 0, 65535, 0, 1, 4);
|
|
642
645
|
}
|
|
643
|
-
if (msg.data.
|
|
646
|
+
if (msg.data.currentY !== undefined) {
|
|
644
647
|
result.color.y = (0, utils_1.mapNumberRange)(msg.data['currentY'], 0, 65535, 0, 1, 4);
|
|
645
648
|
}
|
|
646
|
-
if (msg.data.
|
|
649
|
+
if (msg.data.currentSaturation !== undefined) {
|
|
647
650
|
result.color.saturation = (0, utils_1.mapNumberRange)(msg.data['currentSaturation'], 0, 254, 0, 100);
|
|
648
651
|
}
|
|
649
|
-
if (msg.data.
|
|
652
|
+
if (msg.data.currentHue !== undefined) {
|
|
650
653
|
result.color.hue = (0, utils_1.mapNumberRange)(msg.data['currentHue'], 0, 254, 0, 360, 0);
|
|
651
654
|
}
|
|
652
|
-
if (msg.data.
|
|
655
|
+
if (msg.data.enhancedCurrentHue !== undefined) {
|
|
653
656
|
result.color.hue = (0, utils_1.mapNumberRange)(msg.data['enhancedCurrentHue'], 0, 65535, 0, 360, 1);
|
|
654
657
|
}
|
|
655
658
|
}
|
|
656
|
-
if (msg.data.
|
|
659
|
+
if (msg.data.options !== undefined) {
|
|
657
660
|
/*
|
|
658
661
|
* Bit | Value & Summary
|
|
659
662
|
* --------------------------
|
|
@@ -700,7 +703,7 @@ const converters1 = {
|
|
|
700
703
|
const multiplier = msg.endpoint.getClusterAttributeValue('seMetering', 'multiplier');
|
|
701
704
|
const divisor = msg.endpoint.getClusterAttributeValue('seMetering', 'divisor');
|
|
702
705
|
const factor = multiplier && divisor ? multiplier / divisor : null;
|
|
703
|
-
if (msg.data.
|
|
706
|
+
if (msg.data.instantaneousDemand !== undefined) {
|
|
704
707
|
let power = msg.data['instantaneousDemand'];
|
|
705
708
|
if (factor != null) {
|
|
706
709
|
power = power * factor * 1000; // kWh to Watt
|
|
@@ -708,14 +711,14 @@ const converters1 = {
|
|
|
708
711
|
const property = (0, utils_1.postfixWithEndpointName)('power', msg, model, meta);
|
|
709
712
|
payload[property] = power;
|
|
710
713
|
}
|
|
711
|
-
if (factor != null && (msg.data.
|
|
712
|
-
if (msg.data.
|
|
714
|
+
if (factor != null && (msg.data.currentSummDelivered !== undefined || msg.data.currentSummReceived !== undefined)) {
|
|
715
|
+
if (msg.data.currentSummDelivered !== undefined) {
|
|
713
716
|
const data = msg.data['currentSummDelivered'];
|
|
714
717
|
const value = (parseInt(data[0]) << 32) + parseInt(data[1]);
|
|
715
718
|
const property = (0, utils_1.postfixWithEndpointName)('energy', msg, model, meta);
|
|
716
719
|
payload[property] = value * factor;
|
|
717
720
|
}
|
|
718
|
-
if (msg.data.
|
|
721
|
+
if (msg.data.currentSummReceived !== undefined) {
|
|
719
722
|
const data = msg.data['currentSummReceived'];
|
|
720
723
|
const value = (parseInt(data[0]) << 32) + parseInt(data[1]);
|
|
721
724
|
const property = (0, utils_1.postfixWithEndpointName)('produced_energy', msg, model, meta);
|
|
@@ -764,22 +767,22 @@ const converters1 = {
|
|
|
764
767
|
];
|
|
765
768
|
const payload = {};
|
|
766
769
|
for (const entry of lookup) {
|
|
767
|
-
if (msg.data
|
|
770
|
+
if (msg.data[entry.key] !== undefined) {
|
|
768
771
|
const factor = getFactor(entry.factor);
|
|
769
772
|
const property = (0, utils_1.postfixWithEndpointName)(entry.name, msg, model, meta);
|
|
770
773
|
const value = msg.data[entry.key] * factor;
|
|
771
774
|
payload[property] = value;
|
|
772
775
|
}
|
|
773
776
|
}
|
|
774
|
-
if (msg.data.
|
|
777
|
+
if (msg.data.powerFactor !== undefined) {
|
|
775
778
|
const property = (0, utils_1.postfixWithEndpointName)('power_factor', msg, model, meta);
|
|
776
779
|
payload[property] = (0, utils_1.precisionRound)(msg.data['powerFactor'] / 100, 2);
|
|
777
780
|
}
|
|
778
|
-
if (msg.data.
|
|
781
|
+
if (msg.data.powerFactorPhB !== undefined) {
|
|
779
782
|
const property = (0, utils_1.postfixWithEndpointName)('power_factor_phase_b', msg, model, meta);
|
|
780
783
|
payload[property] = (0, utils_1.precisionRound)(msg.data['powerFactorPhB'] / 100, 2);
|
|
781
784
|
}
|
|
782
|
-
if (msg.data.
|
|
785
|
+
if (msg.data.powerFactorPhC !== undefined) {
|
|
783
786
|
const property = (0, utils_1.postfixWithEndpointName)('power_factor_phase_c', msg, model, meta);
|
|
784
787
|
payload[property] = (0, utils_1.precisionRound)(msg.data['powerFactorPhC'] / 100, 2);
|
|
785
788
|
}
|
|
@@ -791,7 +794,7 @@ const converters1 = {
|
|
|
791
794
|
type: ['attributeReport', 'readResponse'],
|
|
792
795
|
options: [exposes.options.state_action()],
|
|
793
796
|
convert: (model, msg, publish, options, meta) => {
|
|
794
|
-
if (msg.data.
|
|
797
|
+
if (msg.data.onOff !== undefined) {
|
|
795
798
|
const payload = {};
|
|
796
799
|
const property = (0, utils_1.postfixWithEndpointName)('state', msg, model, meta);
|
|
797
800
|
const state = msg.data['onOff'] === 1 ? 'ON' : 'OFF';
|
|
@@ -811,9 +814,9 @@ const converters1 = {
|
|
|
811
814
|
// This converted is need instead of `fz.on_off` when no meta: {multiEndpoint: true} can be defined for this device
|
|
812
815
|
// but it is needed for the `state`. E.g. when a switch has 3 channels (state_l1, state_l2, state_l3) but
|
|
813
816
|
// has combined power measurements (power, energy))
|
|
814
|
-
if (msg.data.
|
|
817
|
+
if (msg.data.onOff !== undefined) {
|
|
815
818
|
const payload = {};
|
|
816
|
-
const endpointName = model.
|
|
819
|
+
const endpointName = model.endpoint !== undefined ? utils.getKey(model.endpoint(meta.device), msg.endpoint.ID) : msg.endpoint.ID;
|
|
817
820
|
const state = msg.data['onOff'] === 1 ? 'ON' : 'OFF';
|
|
818
821
|
payload[`state_${endpointName}`] = state;
|
|
819
822
|
if (options && options.state_action) {
|
|
@@ -831,7 +834,7 @@ const converters1 = {
|
|
|
831
834
|
// Device sends multiple messages with the same transactionSequenceNumber,
|
|
832
835
|
// prevent that multiple messages get send.
|
|
833
836
|
// https://github.com/Koenkk/zigbee2mqtt/issues/3687
|
|
834
|
-
if (msg.data.
|
|
837
|
+
if (msg.data.onOff !== undefined && !(0, utils_1.hasAlreadyProcessedMessage)(msg, model)) {
|
|
835
838
|
const payload = {};
|
|
836
839
|
const property = (0, utils_1.postfixWithEndpointName)('state', msg, model, meta);
|
|
837
840
|
const state = msg.data['onOff'] === 1 ? 'ON' : 'OFF';
|
|
@@ -848,7 +851,7 @@ const converters1 = {
|
|
|
848
851
|
type: ['attributeReport', 'readResponse'],
|
|
849
852
|
convert: (model, msg, publish, options, meta) => {
|
|
850
853
|
const lookup = { 0: 'off', 1: 'on', 2: 'toggle', 255: 'previous' };
|
|
851
|
-
if (msg.data.
|
|
854
|
+
if (msg.data.startUpOnOff !== undefined) {
|
|
852
855
|
const property = (0, utils_1.postfixWithEndpointName)('power_on_behavior', msg, model, meta);
|
|
853
856
|
return { [property]: lookup[msg.data['startUpOnOff']] };
|
|
854
857
|
}
|
|
@@ -923,7 +926,7 @@ const converters1 = {
|
|
|
923
926
|
options: [exposes.options.vibration_timeout()],
|
|
924
927
|
convert: (model, msg, publish, options, meta) => {
|
|
925
928
|
const zoneStatus = msg.data.zonestatus;
|
|
926
|
-
const timeout = options && options.
|
|
929
|
+
const timeout = options && options.vibration_timeout !== undefined ? Number(options.vibration_timeout) : 90;
|
|
927
930
|
// Stop existing timers because vibration is detected and set a new one.
|
|
928
931
|
globalStore.getValue(msg.endpoint, 'timers', []).forEach((t) => clearTimeout(t));
|
|
929
932
|
globalStore.putValue(msg.endpoint, 'timers', []);
|
|
@@ -1112,7 +1115,7 @@ const converters1 = {
|
|
|
1112
1115
|
options: [exposes.options.occupancy_timeout()],
|
|
1113
1116
|
convert: (model, msg, publish, options, meta) => {
|
|
1114
1117
|
const zoneStatus = msg.data.zonestatus;
|
|
1115
|
-
const timeout = options && options.
|
|
1118
|
+
const timeout = options && options.occupancy_timeout !== undefined ? Number(options.occupancy_timeout) : 90;
|
|
1116
1119
|
clearTimeout(globalStore.getValue(msg.endpoint, 'timer'));
|
|
1117
1120
|
if (timeout !== 0) {
|
|
1118
1121
|
const timer = setTimeout(() => publish({ occupancy: false }), timeout * 1000);
|
|
@@ -1288,8 +1291,8 @@ const converters1 = {
|
|
|
1288
1291
|
(0, utils_1.addActionGroup)(payload, msg, model);
|
|
1289
1292
|
if (options.simulated_brightness) {
|
|
1290
1293
|
const opts = options.simulated_brightness;
|
|
1291
|
-
const deltaOpts = typeof opts === 'object' && opts.
|
|
1292
|
-
const intervalOpts = typeof opts === 'object' && opts.
|
|
1294
|
+
const deltaOpts = typeof opts === 'object' && opts.delta !== undefined ? opts.delta : 20;
|
|
1295
|
+
const intervalOpts = typeof opts === 'object' && opts.interval !== undefined ? opts.interval : 200;
|
|
1293
1296
|
globalStore.putValue(msg.endpoint, 'simulated_brightness_direction', direction);
|
|
1294
1297
|
if (globalStore.getValue(msg.endpoint, 'simulated_brightness_timer') === undefined) {
|
|
1295
1298
|
const timer = setInterval(() => {
|
|
@@ -1376,7 +1379,7 @@ const converters1 = {
|
|
|
1376
1379
|
action: (0, utils_1.postfixWithEndpointName)(`color_temperature_step_${direction}`, msg, model, meta),
|
|
1377
1380
|
action_step_size: msg.data.stepsize,
|
|
1378
1381
|
};
|
|
1379
|
-
if (msg.data.
|
|
1382
|
+
if (msg.data.transtime !== undefined) {
|
|
1380
1383
|
payload.action_transition_time = msg.data.transtime / 100;
|
|
1381
1384
|
}
|
|
1382
1385
|
(0, utils_1.addActionGroup)(payload, msg, model);
|
|
@@ -1605,7 +1608,7 @@ const converters1 = {
|
|
|
1605
1608
|
const metaInvert = model.meta && model.meta.coverInverted;
|
|
1606
1609
|
const invert = metaInvert ? !options.invert_cover : options.invert_cover;
|
|
1607
1610
|
const coverStateFromTilt = model.meta && model.meta.coverStateFromTilt;
|
|
1608
|
-
if (msg.data.
|
|
1611
|
+
if (msg.data.currentPositionLiftPercentage !== undefined && msg.data['currentPositionLiftPercentage'] <= 100) {
|
|
1609
1612
|
const value = msg.data['currentPositionLiftPercentage'];
|
|
1610
1613
|
result[(0, utils_1.postfixWithEndpointName)('position', msg, model, meta)] = invert ? value : 100 - value;
|
|
1611
1614
|
if (!coverStateFromTilt) {
|
|
@@ -1618,7 +1621,7 @@ const converters1 = {
|
|
|
1618
1621
|
: 'OPEN';
|
|
1619
1622
|
}
|
|
1620
1623
|
}
|
|
1621
|
-
if (msg.data.
|
|
1624
|
+
if (msg.data.currentPositionTiltPercentage !== undefined && msg.data['currentPositionTiltPercentage'] <= 100) {
|
|
1622
1625
|
const value = msg.data['currentPositionTiltPercentage'];
|
|
1623
1626
|
result[(0, utils_1.postfixWithEndpointName)('tilt', msg, model, meta)] = invert ? value : 100 - value;
|
|
1624
1627
|
if (coverStateFromTilt) {
|
|
@@ -1631,7 +1634,7 @@ const converters1 = {
|
|
|
1631
1634
|
: 'CLOSE';
|
|
1632
1635
|
}
|
|
1633
1636
|
}
|
|
1634
|
-
if (msg.data.
|
|
1637
|
+
if (msg.data.windowCoveringMode !== undefined) {
|
|
1635
1638
|
result[(0, utils_1.postfixWithEndpointName)('cover_mode', msg, model, meta)] = {
|
|
1636
1639
|
reversed: (msg.data.windowCoveringMode & (1 << 0)) > 0,
|
|
1637
1640
|
calibration: (msg.data.windowCoveringMode & (1 << 1)) > 0,
|
|
@@ -1658,7 +1661,7 @@ const converters1 = {
|
|
|
1658
1661
|
cluster: 'genOnOff',
|
|
1659
1662
|
type: ['attributeReport', 'readResponse'],
|
|
1660
1663
|
convert: (model, msg, publish, options, meta) => {
|
|
1661
|
-
if (msg.data.
|
|
1664
|
+
if (msg.data.onOff !== undefined) {
|
|
1662
1665
|
return { state: msg.data['onOff'] === 1 ? 'OPEN' : 'CLOSE' };
|
|
1663
1666
|
}
|
|
1664
1667
|
},
|
|
@@ -1678,49 +1681,49 @@ const converters1 = {
|
|
|
1678
1681
|
type: ['attributeReport', 'readResponse'],
|
|
1679
1682
|
convert: (model, msg, publish, options, meta) => {
|
|
1680
1683
|
const result = {};
|
|
1681
|
-
if (msg.data.
|
|
1684
|
+
if (msg.data.ballastStatus !== undefined) {
|
|
1682
1685
|
const ballastStatus = msg.data.ballastStatus;
|
|
1683
1686
|
result['ballast_status_non_operational'] = ballastStatus & 1 ? true : false;
|
|
1684
1687
|
result['ballast_status_lamp_failure'] = ballastStatus & 2 ? true : false;
|
|
1685
1688
|
}
|
|
1686
|
-
if (msg.data.
|
|
1689
|
+
if (msg.data.minLevel !== undefined) {
|
|
1687
1690
|
result['ballast_minimum_level'] = msg.data.minLevel;
|
|
1688
1691
|
}
|
|
1689
|
-
if (msg.data.
|
|
1692
|
+
if (msg.data.maxLevel !== undefined) {
|
|
1690
1693
|
result['ballast_maximum_level'] = msg.data.maxLevel;
|
|
1691
1694
|
}
|
|
1692
|
-
if (msg.data.
|
|
1695
|
+
if (msg.data.powerOnLevel !== undefined) {
|
|
1693
1696
|
result['ballast_power_on_level'] = msg.data.powerOnLevel;
|
|
1694
1697
|
}
|
|
1695
|
-
if (msg.data.
|
|
1698
|
+
if (msg.data.powerOnFadeTime !== undefined) {
|
|
1696
1699
|
result['ballast_power_on_fade_time'] = msg.data.powerOnFadeTime;
|
|
1697
1700
|
}
|
|
1698
|
-
if (msg.data.
|
|
1701
|
+
if (msg.data.intrinsicBallastFactor !== undefined) {
|
|
1699
1702
|
result['ballast_intrinsic_ballast_factor'] = msg.data.intrinsicBallastFactor;
|
|
1700
1703
|
}
|
|
1701
|
-
if (msg.data.
|
|
1704
|
+
if (msg.data.ballastFactorAdjustment !== undefined) {
|
|
1702
1705
|
result['ballast_ballast_factor_adjustment'] = msg.data.ballastFactorAdjustment;
|
|
1703
1706
|
}
|
|
1704
|
-
if (msg.data.
|
|
1707
|
+
if (msg.data.lampQuantity !== undefined) {
|
|
1705
1708
|
result['ballast_lamp_quantity'] = msg.data.lampQuantity;
|
|
1706
1709
|
}
|
|
1707
|
-
if (msg.data.
|
|
1710
|
+
if (msg.data.lampType !== undefined) {
|
|
1708
1711
|
result['ballast_lamp_type'] = msg.data.lampType;
|
|
1709
1712
|
}
|
|
1710
|
-
if (msg.data.
|
|
1713
|
+
if (msg.data.lampManufacturer !== undefined) {
|
|
1711
1714
|
result['ballast_lamp_manufacturer'] = msg.data.lampManufacturer;
|
|
1712
1715
|
}
|
|
1713
|
-
if (msg.data.
|
|
1716
|
+
if (msg.data.lampRatedHours !== undefined) {
|
|
1714
1717
|
result['ballast_lamp_rated_hours'] = msg.data.lampRatedHours;
|
|
1715
1718
|
}
|
|
1716
|
-
if (msg.data.
|
|
1719
|
+
if (msg.data.lampBurnHours !== undefined) {
|
|
1717
1720
|
result['ballast_lamp_burn_hours'] = msg.data.lampBurnHours;
|
|
1718
1721
|
}
|
|
1719
|
-
if (msg.data.
|
|
1722
|
+
if (msg.data.lampAlarmMode !== undefined) {
|
|
1720
1723
|
const lampAlarmMode = msg.data.lampAlarmMode;
|
|
1721
1724
|
result['ballast_lamp_alarm_lamp_burn_hours'] = lampAlarmMode & 1 ? true : false;
|
|
1722
1725
|
}
|
|
1723
|
-
if (msg.data.
|
|
1726
|
+
if (msg.data.lampBurnHoursTripPoint !== undefined) {
|
|
1724
1727
|
result['ballast_lamp_burn_hours_trip_point'] = msg.data.lampBurnHoursTripPoint;
|
|
1725
1728
|
}
|
|
1726
1729
|
return result;
|
|
@@ -1731,7 +1734,7 @@ const converters1 = {
|
|
|
1731
1734
|
type: ['commandCheckin'],
|
|
1732
1735
|
options: [exposes.options.presence_timeout()],
|
|
1733
1736
|
convert: (model, msg, publish, options, meta) => {
|
|
1734
|
-
const useOptionsTimeout = options && options.
|
|
1737
|
+
const useOptionsTimeout = options && options.presence_timeout !== undefined;
|
|
1735
1738
|
const timeout = useOptionsTimeout ? Number(options.presence_timeout) : 100; // 100 seconds by default
|
|
1736
1739
|
// Stop existing timer because presence is detected and set a new one.
|
|
1737
1740
|
clearTimeout(globalStore.getValue(msg.endpoint, 'timer'));
|
|
@@ -1759,7 +1762,7 @@ const converters1 = {
|
|
|
1759
1762
|
type: ['attributeReport', 'readResponse'],
|
|
1760
1763
|
convert: (model, msg, publish, options, meta) => {
|
|
1761
1764
|
const result = {};
|
|
1762
|
-
if (msg.data.
|
|
1765
|
+
if (msg.data.maxDuration !== undefined)
|
|
1763
1766
|
result['max_duration'] = msg.data.maxDuration;
|
|
1764
1767
|
return result;
|
|
1765
1768
|
},
|
|
@@ -1769,7 +1772,7 @@ const converters1 = {
|
|
|
1769
1772
|
type: ['attributeReport', 'readResponse'],
|
|
1770
1773
|
convert: (model, msg, publish, options, meta) => {
|
|
1771
1774
|
const payload = {};
|
|
1772
|
-
if (msg.data.
|
|
1775
|
+
if (msg.data.powerSource !== undefined) {
|
|
1773
1776
|
const value = msg.data['powerSource'];
|
|
1774
1777
|
const lookup = {
|
|
1775
1778
|
0: 'unknown',
|
|
@@ -1799,66 +1802,66 @@ const converters1 = {
|
|
|
1799
1802
|
convert: (model, msg, publish, options, meta) => {
|
|
1800
1803
|
const result = {};
|
|
1801
1804
|
const data = msg.data;
|
|
1802
|
-
if (data
|
|
1805
|
+
if (data[0x1000] !== undefined) {
|
|
1803
1806
|
// Display brightness
|
|
1804
1807
|
const lookup = { 0: 'low', 1: 'mid', 2: 'high' };
|
|
1805
1808
|
result.lcd_brightness = lookup[data[0x1000]];
|
|
1806
1809
|
}
|
|
1807
|
-
if (data
|
|
1810
|
+
if (data[0x1001] !== undefined) {
|
|
1808
1811
|
// Button vibration level
|
|
1809
1812
|
const lookup = { 0: 'off', 1: 'low', 2: 'high' };
|
|
1810
1813
|
result.button_vibration_level = lookup[data[0x1001]];
|
|
1811
1814
|
}
|
|
1812
|
-
if (data
|
|
1815
|
+
if (data[0x1002] !== undefined) {
|
|
1813
1816
|
// Floor sensor type
|
|
1814
1817
|
const lookup = { 1: '10k', 2: '15k', 3: '50k', 4: '100k', 5: '12k' };
|
|
1815
1818
|
result.floor_sensor_type = lookup[data[0x1002]];
|
|
1816
1819
|
}
|
|
1817
|
-
if (data
|
|
1820
|
+
if (data[0x1003] !== undefined) {
|
|
1818
1821
|
// Sensor
|
|
1819
1822
|
const lookup = { 0: 'air', 1: 'floor', 2: 'both' };
|
|
1820
1823
|
result.sensor = lookup[data[0x1003]];
|
|
1821
1824
|
}
|
|
1822
|
-
if (data
|
|
1825
|
+
if (data[0x1004] !== undefined) {
|
|
1823
1826
|
// PowerUpStatus
|
|
1824
1827
|
const lookup = { 0: 'default', 1: 'last_status' };
|
|
1825
1828
|
result.powerup_status = lookup[data[0x1004]];
|
|
1826
1829
|
}
|
|
1827
|
-
if (data
|
|
1830
|
+
if (data[0x1005] !== undefined) {
|
|
1828
1831
|
// FloorSensorCalibration
|
|
1829
1832
|
result.floor_sensor_calibration = (0, utils_1.precisionRound)(data[0x1005], 2) / 10;
|
|
1830
1833
|
}
|
|
1831
|
-
if (data
|
|
1834
|
+
if (data[0x1006] !== undefined) {
|
|
1832
1835
|
// DryTime
|
|
1833
1836
|
result.dry_time = data[0x1006];
|
|
1834
1837
|
}
|
|
1835
|
-
if (data
|
|
1838
|
+
if (data[0x1007] !== undefined) {
|
|
1836
1839
|
// ModeAfterDry
|
|
1837
1840
|
const lookup = { 0: 'off', 1: 'manual', 2: 'auto', 3: 'away' };
|
|
1838
1841
|
result.mode_after_dry = lookup[data[0x1007]];
|
|
1839
1842
|
}
|
|
1840
|
-
if (data
|
|
1843
|
+
if (data[0x1008] !== undefined) {
|
|
1841
1844
|
// TemperatureDisplay
|
|
1842
1845
|
const lookup = { 0: 'room', 1: 'floor' };
|
|
1843
1846
|
result.temperature_display = lookup[data[0x1008]];
|
|
1844
1847
|
}
|
|
1845
|
-
if (data
|
|
1848
|
+
if (data[0x1009] !== undefined) {
|
|
1846
1849
|
// WindowOpenCheck
|
|
1847
1850
|
result.window_open_check = data[0x1009] / 2;
|
|
1848
1851
|
}
|
|
1849
|
-
if (data
|
|
1852
|
+
if (data[0x100a] !== undefined) {
|
|
1850
1853
|
// Hysterersis
|
|
1851
1854
|
result.hysterersis = (0, utils_1.precisionRound)(data[0x100a], 2) / 10;
|
|
1852
1855
|
}
|
|
1853
|
-
if (data
|
|
1856
|
+
if (data[0x100b] !== undefined) {
|
|
1854
1857
|
// DisplayAutoOffEnable
|
|
1855
1858
|
result.display_auto_off_enabled = data[0x100b] ? 'enabled' : 'disabled';
|
|
1856
1859
|
}
|
|
1857
|
-
if (data
|
|
1860
|
+
if (data[0x2001] !== undefined) {
|
|
1858
1861
|
// AlarmAirTempOverValue
|
|
1859
1862
|
result.alarm_airtemp_overvalue = data[0x2001];
|
|
1860
1863
|
}
|
|
1861
|
-
if (data
|
|
1864
|
+
if (data[0x2002] !== undefined) {
|
|
1862
1865
|
// Away Mode Set
|
|
1863
1866
|
result.away_mode = data[0x2002] ? 'ON' : 'OFF';
|
|
1864
1867
|
}
|
|
@@ -1870,7 +1873,7 @@ const converters1 = {
|
|
|
1870
1873
|
type: ['attributeReport', 'readResponse'],
|
|
1871
1874
|
convert: (model, msg, publish, options, meta) => {
|
|
1872
1875
|
const result = {};
|
|
1873
|
-
if (msg.data.
|
|
1876
|
+
if (msg.data.keypadLockout !== undefined) {
|
|
1874
1877
|
// Set as child lock instead as keypadlockout
|
|
1875
1878
|
result.child_lock = msg.data['keypadLockout'] === 0 ? 'UNLOCK' : 'LOCK';
|
|
1876
1879
|
}
|
|
@@ -1883,23 +1886,23 @@ const converters1 = {
|
|
|
1883
1886
|
convert: (model, msg, publish, options, meta) => {
|
|
1884
1887
|
const result = {};
|
|
1885
1888
|
const data = msg.data;
|
|
1886
|
-
if (data.
|
|
1889
|
+
if (data.elkoDisplayText !== undefined) {
|
|
1887
1890
|
// Display text
|
|
1888
1891
|
result.display_text = data['elkoDisplayText'];
|
|
1889
1892
|
}
|
|
1890
|
-
if (data.
|
|
1893
|
+
if (data.elkoPowerStatus !== undefined) {
|
|
1891
1894
|
// Power status
|
|
1892
1895
|
result.system_mode = data['elkoPowerStatus'] ? 'heat' : 'off';
|
|
1893
1896
|
}
|
|
1894
|
-
if (data.
|
|
1897
|
+
if (data.elkoExternalTemp !== undefined) {
|
|
1895
1898
|
// External temp (floor)
|
|
1896
1899
|
result.floor_temp = utils.precisionRound(data['elkoExternalTemp'], 2) / 100;
|
|
1897
1900
|
}
|
|
1898
|
-
if (data.
|
|
1901
|
+
if (data.elkoRelayState !== undefined) {
|
|
1899
1902
|
// Relay state
|
|
1900
1903
|
result.running_state = data['elkoRelayState'] ? 'heat' : 'idle';
|
|
1901
1904
|
}
|
|
1902
|
-
if (data.
|
|
1905
|
+
if (data.elkoCalibration !== undefined) {
|
|
1903
1906
|
// Calibration
|
|
1904
1907
|
result.local_temperature_calibration = (0, utils_1.precisionRound)(data['elkoCalibration'], 2) / 10;
|
|
1905
1908
|
}
|
|
@@ -1925,23 +1928,23 @@ const converters1 = {
|
|
|
1925
1928
|
type: ['attributeReport', 'readResponse'],
|
|
1926
1929
|
convert: (model, msg, publish, options, meta) => {
|
|
1927
1930
|
const result = {};
|
|
1928
|
-
if (msg.data.
|
|
1931
|
+
if (msg.data.alarm_temperature_max !== undefined) {
|
|
1929
1932
|
result.alarm_temperature_max = msg.data['alarm_temperature_max'];
|
|
1930
1933
|
}
|
|
1931
|
-
if (msg.data.
|
|
1934
|
+
if (msg.data.alarm_temperature_min !== undefined) {
|
|
1932
1935
|
result.alarm_temperature_min = msg.data['alarm_temperature_min'];
|
|
1933
1936
|
}
|
|
1934
|
-
if (msg.data.
|
|
1937
|
+
if (msg.data.alarm_humidity_max !== undefined) {
|
|
1935
1938
|
result.alarm_humidity_max = msg.data['alarm_humidity_max'];
|
|
1936
1939
|
}
|
|
1937
|
-
if (msg.data.
|
|
1940
|
+
if (msg.data.alarm_humidity_min !== undefined) {
|
|
1938
1941
|
result.alarm_humidity_min = msg.data['alarm_humidity_min'];
|
|
1939
1942
|
}
|
|
1940
|
-
if (msg.data.
|
|
1943
|
+
if (msg.data.alarm_humidity !== undefined) {
|
|
1941
1944
|
const sensorAlarmLookup = { '0': 'below_min_humdity', '1': 'over_humidity', '2': 'off' };
|
|
1942
1945
|
result.alarm_humidity = sensorAlarmLookup[msg.data['alarm_humidity']];
|
|
1943
1946
|
}
|
|
1944
|
-
if (msg.data.
|
|
1947
|
+
if (msg.data.alarm_temperature !== undefined) {
|
|
1945
1948
|
const sensorAlarmLookup = { '0': 'below_min_temperature', '1': 'over_temperature', '2': 'off' };
|
|
1946
1949
|
result.alarm_temperature = sensorAlarmLookup[msg.data['alarm_temperature']];
|
|
1947
1950
|
}
|
|
@@ -1954,14 +1957,14 @@ const converters1 = {
|
|
|
1954
1957
|
options: [exposes.options.color_sync()],
|
|
1955
1958
|
convert: (model, msg, publish, options, meta) => {
|
|
1956
1959
|
const result = {};
|
|
1957
|
-
if (msg.data.
|
|
1960
|
+
if (msg.data.colorTemperature !== undefined) {
|
|
1958
1961
|
const value = Number(msg.data['colorTemperature']);
|
|
1959
1962
|
result.color_temp = (0, utils_1.mapNumberRange)(value, 0, 255, 500, 153);
|
|
1960
1963
|
}
|
|
1961
|
-
if (msg.data.
|
|
1964
|
+
if (msg.data.tuyaBrightness !== undefined) {
|
|
1962
1965
|
result.brightness = msg.data['tuyaBrightness'];
|
|
1963
1966
|
}
|
|
1964
|
-
if (msg.data.
|
|
1967
|
+
if (msg.data.tuyaRgbMode !== undefined) {
|
|
1965
1968
|
if (msg.data['tuyaRgbMode'] === 1) {
|
|
1966
1969
|
result.color_mode = constants.colorModeLookup[0];
|
|
1967
1970
|
}
|
|
@@ -1970,11 +1973,11 @@ const converters1 = {
|
|
|
1970
1973
|
}
|
|
1971
1974
|
}
|
|
1972
1975
|
result.color = {};
|
|
1973
|
-
if (msg.data.
|
|
1976
|
+
if (msg.data.currentHue !== undefined) {
|
|
1974
1977
|
result.color.hue = (0, utils_1.mapNumberRange)(msg.data['currentHue'], 0, 254, 0, 360);
|
|
1975
1978
|
result.color.h = result.color.hue;
|
|
1976
1979
|
}
|
|
1977
|
-
if (msg.data.
|
|
1980
|
+
if (msg.data.currentSaturation !== undefined) {
|
|
1978
1981
|
result.color.saturation = (0, utils_1.mapNumberRange)(msg.data['currentSaturation'], 0, 254, 0, 100);
|
|
1979
1982
|
result.color.s = result.color.saturation;
|
|
1980
1983
|
}
|
|
@@ -2112,12 +2115,12 @@ const converters1 = {
|
|
|
2112
2115
|
type: ['attributeReport', 'readResponse'],
|
|
2113
2116
|
convert: (model, msg, publish, options, meta) => {
|
|
2114
2117
|
const result = {};
|
|
2115
|
-
if (msg.data.
|
|
2118
|
+
if (msg.data.maxDuration !== undefined)
|
|
2116
2119
|
result['duration'] = msg.data.maxDuration;
|
|
2117
|
-
if (msg.data
|
|
2120
|
+
if (msg.data['2'] !== undefined) {
|
|
2118
2121
|
result['volume'] = (0, utils_1.mapNumberRange)(msg.data['2'], 100, 10, 0, 100);
|
|
2119
2122
|
}
|
|
2120
|
-
if (msg.data
|
|
2123
|
+
if (msg.data['61440'] !== undefined) {
|
|
2121
2124
|
result['alarm'] = msg.data['61440'] == 0 ? false : true;
|
|
2122
2125
|
}
|
|
2123
2126
|
return result;
|
|
@@ -2128,11 +2131,11 @@ const converters1 = {
|
|
|
2128
2131
|
type: ['attributeReport', 'readResponse'],
|
|
2129
2132
|
convert: (model, msg, publish, options, meta) => {
|
|
2130
2133
|
const result = {};
|
|
2131
|
-
if (msg.data.
|
|
2134
|
+
if (msg.data.moesCalibrationTime !== undefined) {
|
|
2132
2135
|
const value = parseFloat(msg.data['moesCalibrationTime']) / 100;
|
|
2133
2136
|
result[(0, utils_1.postfixWithEndpointName)('calibration_time', msg, model, meta)] = value;
|
|
2134
2137
|
}
|
|
2135
|
-
if (msg.data.
|
|
2138
|
+
if (msg.data.tuyaMotorReversal !== undefined) {
|
|
2136
2139
|
const value = msg.data['tuyaMotorReversal'];
|
|
2137
2140
|
const reversalLookup = { 0: 'OFF', 1: 'ON' };
|
|
2138
2141
|
result[(0, utils_1.postfixWithEndpointName)('motor_reversal', msg, model, meta)] = reversalLookup[value];
|
|
@@ -2145,22 +2148,22 @@ const converters1 = {
|
|
|
2145
2148
|
type: ['attributeReport', 'readResponse'],
|
|
2146
2149
|
convert: (model, msg, publish, options, meta) => {
|
|
2147
2150
|
const result = {};
|
|
2148
|
-
if (msg.data.
|
|
2151
|
+
if (msg.data.tuyaMovingState !== undefined) {
|
|
2149
2152
|
const value = msg.data['tuyaMovingState'];
|
|
2150
2153
|
const movingLookup = { 0: 'UP', 1: 'STOP', 2: 'DOWN' };
|
|
2151
2154
|
result[(0, utils_1.postfixWithEndpointName)('moving', msg, model, meta)] = movingLookup[value];
|
|
2152
2155
|
}
|
|
2153
|
-
if (msg.data.
|
|
2156
|
+
if (msg.data.tuyaCalibration !== undefined) {
|
|
2154
2157
|
const value = msg.data['tuyaCalibration'];
|
|
2155
2158
|
const calibrationLookup = { 0: 'ON', 1: 'OFF' };
|
|
2156
2159
|
result[(0, utils_1.postfixWithEndpointName)('calibration', msg, model, meta)] = calibrationLookup[value];
|
|
2157
2160
|
}
|
|
2158
|
-
if (msg.data.
|
|
2161
|
+
if (msg.data.tuyaMotorReversal !== undefined) {
|
|
2159
2162
|
const value = msg.data['tuyaMotorReversal'];
|
|
2160
2163
|
const reversalLookup = { 0: 'OFF', 1: 'ON' };
|
|
2161
2164
|
result[(0, utils_1.postfixWithEndpointName)('motor_reversal', msg, model, meta)] = reversalLookup[value];
|
|
2162
2165
|
}
|
|
2163
|
-
if (msg.data.
|
|
2166
|
+
if (msg.data.moesCalibrationTime !== undefined) {
|
|
2164
2167
|
const value = parseFloat(msg.data['moesCalibrationTime']) / 10.0;
|
|
2165
2168
|
result[(0, utils_1.postfixWithEndpointName)('calibration_time', msg, model, meta)] = value;
|
|
2166
2169
|
}
|
|
@@ -2311,8 +2314,7 @@ const converters1 = {
|
|
|
2311
2314
|
convert: (model, msg, publish, options, meta) => {
|
|
2312
2315
|
const dp = msg.data[10];
|
|
2313
2316
|
const defaults = { motor_direction: 'FORWARD', motor_speed: 40 };
|
|
2314
|
-
|
|
2315
|
-
if ((msg.data[0] === 0x7a) & (msg.data[1] === 0xd1)) {
|
|
2317
|
+
if (msg.data[0] === 0x7a && msg.data[1] === 0xd1) {
|
|
2316
2318
|
const reportType = msg.data[12];
|
|
2317
2319
|
switch (dp) {
|
|
2318
2320
|
case 0x0c:
|
|
@@ -2584,7 +2586,7 @@ const converters1 = {
|
|
|
2584
2586
|
if (endpoint && (endpoint.supportsInputCluster(cluster) || endpoint.supportsOutputCluster(cluster))) {
|
|
2585
2587
|
payload['brightness_' + name] = msg.data['presentValue'];
|
|
2586
2588
|
}
|
|
2587
|
-
else if (msg.data.
|
|
2589
|
+
else if (msg.data.description !== undefined) {
|
|
2588
2590
|
const data1 = msg.data['description'];
|
|
2589
2591
|
if (data1) {
|
|
2590
2592
|
const data2 = data1.split(',');
|
|
@@ -2668,7 +2670,7 @@ const converters1 = {
|
|
|
2668
2670
|
type: ['readResponse', 'attributeReport'],
|
|
2669
2671
|
convert: (model, msg, publish, options, meta) => {
|
|
2670
2672
|
const payload = {};
|
|
2671
|
-
if (msg.data.
|
|
2673
|
+
if (msg.data.mainsVoltage !== undefined) {
|
|
2672
2674
|
payload.voltage = msg.data['mainsVoltage'];
|
|
2673
2675
|
if (model.meta && model.meta.battery && model.meta.battery.voltageToPercentage) {
|
|
2674
2676
|
payload.battery = (0, utils_1.batteryVoltageToPercentage)(payload.voltage, model.meta.battery.voltageToPercentage);
|
|
@@ -2736,50 +2738,50 @@ const converters1 = {
|
|
|
2736
2738
|
convert: (model, msg, publish, options, meta) => {
|
|
2737
2739
|
const result = {};
|
|
2738
2740
|
// typo on property name to stick with zcl definition
|
|
2739
|
-
if (msg.data.
|
|
2741
|
+
if (msg.data.inletTempreature !== undefined) {
|
|
2740
2742
|
result.inlet_temperature = (0, utils_1.precisionRound)(msg.data['inletTempreature'], 2);
|
|
2741
2743
|
result.inletTemperature = result.inlet_temperature; // deprecated
|
|
2742
2744
|
}
|
|
2743
|
-
if (msg.data.
|
|
2745
|
+
if (msg.data.status !== undefined) {
|
|
2744
2746
|
result.status = (0, utils_1.precisionRound)(msg.data['status'], 2);
|
|
2745
2747
|
}
|
|
2746
|
-
if (msg.data
|
|
2748
|
+
if (msg.data['8192'] !== undefined) {
|
|
2747
2749
|
result.line_frequency = (0, utils_1.precisionRound)(parseFloat(msg.data['8192']) / 100.0, 2);
|
|
2748
2750
|
result.linefrequency = result.line_frequency; // deprecated
|
|
2749
2751
|
}
|
|
2750
|
-
if (msg.data
|
|
2752
|
+
if (msg.data['8193'] !== undefined) {
|
|
2751
2753
|
result.power = (0, utils_1.precisionRound)(msg.data['8193'], 2);
|
|
2752
2754
|
}
|
|
2753
|
-
if (msg.data
|
|
2755
|
+
if (msg.data['8196'] !== undefined) {
|
|
2754
2756
|
result.voltage = (0, utils_1.precisionRound)(msg.data['8196'], 2);
|
|
2755
2757
|
}
|
|
2756
|
-
if (msg.data
|
|
2758
|
+
if (msg.data['8213'] !== undefined) {
|
|
2757
2759
|
result.voltage = (0, utils_1.precisionRound)(msg.data['8213'], 2);
|
|
2758
2760
|
}
|
|
2759
|
-
if (msg.data
|
|
2761
|
+
if (msg.data['8199'] !== undefined) {
|
|
2760
2762
|
result.current = (0, utils_1.precisionRound)(msg.data['8199'], 2);
|
|
2761
2763
|
}
|
|
2762
|
-
if (msg.data
|
|
2764
|
+
if (msg.data['8216'] !== undefined) {
|
|
2763
2765
|
result.current = (0, utils_1.precisionRound)(msg.data['8216'], 2);
|
|
2764
2766
|
}
|
|
2765
|
-
if (msg.data
|
|
2767
|
+
if (msg.data['8202'] !== undefined) {
|
|
2766
2768
|
result.reactive_power = (0, utils_1.precisionRound)(msg.data['8202'], 2);
|
|
2767
2769
|
result.reactivepower = result.reactive_power; // deprecated
|
|
2768
2770
|
}
|
|
2769
|
-
if (msg.data
|
|
2771
|
+
if (msg.data['12288'] !== undefined) {
|
|
2770
2772
|
result.energy_consumed = (0, utils_1.precisionRound)(msg.data['12288'], 2); // deprecated
|
|
2771
2773
|
result.energyconsumed = result.energy_consumed; // deprecated
|
|
2772
2774
|
result.energy = result.energy_consumed;
|
|
2773
2775
|
}
|
|
2774
|
-
if (msg.data
|
|
2776
|
+
if (msg.data['12291'] !== undefined) {
|
|
2775
2777
|
result.energy_produced = (0, utils_1.precisionRound)(msg.data['12291'], 2);
|
|
2776
2778
|
result.energyproduced = result.energy_produced; // deprecated
|
|
2777
2779
|
}
|
|
2778
|
-
if (msg.data
|
|
2780
|
+
if (msg.data['12294'] !== undefined) {
|
|
2779
2781
|
result.reactive_summation = (0, utils_1.precisionRound)(msg.data['12294'], 2);
|
|
2780
2782
|
result.reactivesummation = result.reactive_summation; // deprecated
|
|
2781
2783
|
}
|
|
2782
|
-
if (msg.data
|
|
2784
|
+
if (msg.data['16408'] !== undefined) {
|
|
2783
2785
|
result.measure_serial = (0, utils_1.precisionRound)(msg.data['16408'], 2);
|
|
2784
2786
|
result.measureserial = result.measure_serial; // deprecated
|
|
2785
2787
|
}
|
|
@@ -2791,50 +2793,52 @@ const converters1 = {
|
|
|
2791
2793
|
type: ['attributeReport', 'readResponse'],
|
|
2792
2794
|
convert: (model, msg, publish, options, meta) => {
|
|
2793
2795
|
const result = {};
|
|
2794
|
-
if (msg.data.
|
|
2796
|
+
if (msg.data.danfossWindowOpenFeatureEnable !== undefined) {
|
|
2795
2797
|
result[(0, utils_1.postfixWithEndpointName)('window_open_feature', msg, model, meta)] = msg.data['danfossWindowOpenFeatureEnable'] === 1;
|
|
2796
2798
|
}
|
|
2797
|
-
if (msg.data.
|
|
2798
|
-
result[(0, utils_1.postfixWithEndpointName)('window_open_internal', msg, model, meta)] =
|
|
2799
|
-
|
|
2800
|
-
|
|
2799
|
+
if (msg.data.danfossWindowOpenInternal !== undefined) {
|
|
2800
|
+
result[(0, utils_1.postfixWithEndpointName)('window_open_internal', msg, model, meta)] =
|
|
2801
|
+
constants.danfossWindowOpen[msg.data['danfossWindowOpenInternal']] !== undefined
|
|
2802
|
+
? constants.danfossWindowOpen[msg.data['danfossWindowOpenInternal']]
|
|
2803
|
+
: msg.data['danfossWindowOpenInternal'];
|
|
2801
2804
|
}
|
|
2802
|
-
if (msg.data.
|
|
2805
|
+
if (msg.data.danfossWindowOpenExternal !== undefined) {
|
|
2803
2806
|
result[(0, utils_1.postfixWithEndpointName)('window_open_external', msg, model, meta)] = msg.data['danfossWindowOpenExternal'] === 1;
|
|
2804
2807
|
}
|
|
2805
|
-
if (msg.data.
|
|
2806
|
-
result[(0, utils_1.postfixWithEndpointName)('day_of_week', msg, model, meta)] =
|
|
2807
|
-
|
|
2808
|
-
|
|
2808
|
+
if (msg.data.danfossDayOfWeek !== undefined) {
|
|
2809
|
+
result[(0, utils_1.postfixWithEndpointName)('day_of_week', msg, model, meta)] =
|
|
2810
|
+
constants.thermostatDayOfWeek[msg.data['danfossDayOfWeek']] !== undefined
|
|
2811
|
+
? constants.thermostatDayOfWeek[msg.data['danfossDayOfWeek']]
|
|
2812
|
+
: msg.data['danfossDayOfWeek'];
|
|
2809
2813
|
}
|
|
2810
|
-
if (msg.data.
|
|
2814
|
+
if (msg.data.danfossTriggerTime !== undefined) {
|
|
2811
2815
|
result[(0, utils_1.postfixWithEndpointName)('trigger_time', msg, model, meta)] = msg.data['danfossTriggerTime'];
|
|
2812
2816
|
}
|
|
2813
|
-
if (msg.data.
|
|
2817
|
+
if (msg.data.danfossMountedModeActive !== undefined) {
|
|
2814
2818
|
result[(0, utils_1.postfixWithEndpointName)('mounted_mode_active', msg, model, meta)] = msg.data['danfossMountedModeActive'] === 1;
|
|
2815
2819
|
}
|
|
2816
|
-
if (msg.data.
|
|
2820
|
+
if (msg.data.danfossMountedModeControl !== undefined) {
|
|
2817
2821
|
result[(0, utils_1.postfixWithEndpointName)('mounted_mode_control', msg, model, meta)] = msg.data['danfossMountedModeControl'] === 1;
|
|
2818
2822
|
}
|
|
2819
|
-
if (msg.data.
|
|
2823
|
+
if (msg.data.danfossThermostatOrientation !== undefined) {
|
|
2820
2824
|
result[(0, utils_1.postfixWithEndpointName)('thermostat_vertical_orientation', msg, model, meta)] = msg.data['danfossThermostatOrientation'] === 1;
|
|
2821
2825
|
}
|
|
2822
|
-
if (msg.data.
|
|
2826
|
+
if (msg.data.danfossExternalMeasuredRoomSensor !== undefined) {
|
|
2823
2827
|
result[(0, utils_1.postfixWithEndpointName)('external_measured_room_sensor', msg, model, meta)] = msg.data['danfossExternalMeasuredRoomSensor'];
|
|
2824
2828
|
}
|
|
2825
|
-
if (msg.data.
|
|
2829
|
+
if (msg.data.danfossRadiatorCovered !== undefined) {
|
|
2826
2830
|
result[(0, utils_1.postfixWithEndpointName)('radiator_covered', msg, model, meta)] = msg.data['danfossRadiatorCovered'] === 1;
|
|
2827
2831
|
}
|
|
2828
|
-
if (msg.data.
|
|
2832
|
+
if (msg.data.danfossViewingDirection !== undefined) {
|
|
2829
2833
|
result[(0, utils_1.postfixWithEndpointName)('viewing_direction', msg, model, meta)] = msg.data['danfossViewingDirection'] === 1;
|
|
2830
2834
|
}
|
|
2831
|
-
if (msg.data.
|
|
2835
|
+
if (msg.data.danfossAlgorithmScaleFactor !== undefined) {
|
|
2832
2836
|
result[(0, utils_1.postfixWithEndpointName)('algorithm_scale_factor', msg, model, meta)] = msg.data['danfossAlgorithmScaleFactor'];
|
|
2833
2837
|
}
|
|
2834
|
-
if (msg.data.
|
|
2838
|
+
if (msg.data.danfossHeatAvailable !== undefined) {
|
|
2835
2839
|
result[(0, utils_1.postfixWithEndpointName)('heat_available', msg, model, meta)] = msg.data['danfossHeatAvailable'] === 1;
|
|
2836
2840
|
}
|
|
2837
|
-
if (msg.data.
|
|
2841
|
+
if (msg.data.danfossHeatRequired !== undefined) {
|
|
2838
2842
|
if (msg.data['danfossHeatRequired'] === 1) {
|
|
2839
2843
|
result[(0, utils_1.postfixWithEndpointName)('heat_required', msg, model, meta)] = true;
|
|
2840
2844
|
result[(0, utils_1.postfixWithEndpointName)('running_state', msg, model, meta)] = 'heat';
|
|
@@ -2844,39 +2848,40 @@ const converters1 = {
|
|
|
2844
2848
|
result[(0, utils_1.postfixWithEndpointName)('running_state', msg, model, meta)] = 'idle';
|
|
2845
2849
|
}
|
|
2846
2850
|
}
|
|
2847
|
-
if (msg.data.
|
|
2851
|
+
if (msg.data.danfossLoadBalancingEnable !== undefined) {
|
|
2848
2852
|
result[(0, utils_1.postfixWithEndpointName)('load_balancing_enable', msg, model, meta)] = msg.data['danfossLoadBalancingEnable'] === 1;
|
|
2849
2853
|
}
|
|
2850
|
-
if (msg.data.
|
|
2854
|
+
if (msg.data.danfossLoadRoomMean !== undefined) {
|
|
2851
2855
|
result[(0, utils_1.postfixWithEndpointName)('load_room_mean', msg, model, meta)] = msg.data['danfossLoadRoomMean'];
|
|
2852
2856
|
}
|
|
2853
|
-
if (msg.data.
|
|
2857
|
+
if (msg.data.danfossLoadEstimate !== undefined) {
|
|
2854
2858
|
result[(0, utils_1.postfixWithEndpointName)('load_estimate', msg, model, meta)] = msg.data['danfossLoadEstimate'];
|
|
2855
2859
|
}
|
|
2856
|
-
if (msg.data.
|
|
2860
|
+
if (msg.data.danfossPreheatStatus !== undefined) {
|
|
2857
2861
|
result[(0, utils_1.postfixWithEndpointName)('preheat_status', msg, model, meta)] = msg.data['danfossPreheatStatus'] === 1;
|
|
2858
2862
|
}
|
|
2859
|
-
if (msg.data.
|
|
2863
|
+
if (msg.data.danfossAdaptionRunStatus !== undefined) {
|
|
2860
2864
|
result[(0, utils_1.postfixWithEndpointName)('adaptation_run_status', msg, model, meta)] =
|
|
2861
2865
|
constants.danfossAdaptionRunStatus[msg.data['danfossAdaptionRunStatus']];
|
|
2862
2866
|
}
|
|
2863
|
-
if (msg.data.
|
|
2867
|
+
if (msg.data.danfossAdaptionRunSettings !== undefined) {
|
|
2864
2868
|
result[(0, utils_1.postfixWithEndpointName)('adaptation_run_settings', msg, model, meta)] = msg.data['danfossAdaptionRunSettings'] === 1;
|
|
2865
2869
|
}
|
|
2866
|
-
if (msg.data.
|
|
2870
|
+
if (msg.data.danfossAdaptionRunControl !== undefined) {
|
|
2867
2871
|
result[(0, utils_1.postfixWithEndpointName)('adaptation_run_control', msg, model, meta)] =
|
|
2868
2872
|
constants.danfossAdaptionRunControl[msg.data['danfossAdaptionRunControl']];
|
|
2869
2873
|
}
|
|
2870
|
-
if (msg.data.
|
|
2874
|
+
if (msg.data.danfossRegulationSetpointOffset !== undefined) {
|
|
2871
2875
|
result[(0, utils_1.postfixWithEndpointName)('regulation_setpoint_offset', msg, model, meta)] = msg.data['danfossRegulationSetpointOffset'];
|
|
2872
2876
|
}
|
|
2873
2877
|
// Danfoss Icon Converters
|
|
2874
|
-
if (msg.data.
|
|
2875
|
-
result[(0, utils_1.postfixWithEndpointName)('room_status_code', msg, model, meta)] =
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
+
if (msg.data.danfossRoomStatusCode !== undefined) {
|
|
2879
|
+
result[(0, utils_1.postfixWithEndpointName)('room_status_code', msg, model, meta)] =
|
|
2880
|
+
constants.danfossRoomStatusCode[msg.data['danfossRoomStatusCode']] !== undefined
|
|
2881
|
+
? constants.danfossRoomStatusCode[msg.data['danfossRoomStatusCode']]
|
|
2882
|
+
: msg.data['danfossRoomStatusCode'];
|
|
2878
2883
|
}
|
|
2879
|
-
if (msg.data.
|
|
2884
|
+
if (msg.data.danfossOutputStatus !== undefined) {
|
|
2880
2885
|
if (msg.data['danfossOutputStatus'] === 1) {
|
|
2881
2886
|
result[(0, utils_1.postfixWithEndpointName)('output_status', msg, model, meta)] = 'active';
|
|
2882
2887
|
result[(0, utils_1.postfixWithEndpointName)('running_state', msg, model, meta)] = 'heat';
|
|
@@ -2894,7 +2899,7 @@ const converters1 = {
|
|
|
2894
2899
|
type: ['attributeReport', 'readResponse'],
|
|
2895
2900
|
convert: (model, msg, publish, options, meta) => {
|
|
2896
2901
|
const result = {};
|
|
2897
|
-
if (msg.data.
|
|
2902
|
+
if (msg.data.occupiedHeatingSetpoint !== undefined) {
|
|
2898
2903
|
result[(0, utils_1.postfixWithEndpointName)('occupied_heating_setpoint_scheduled', msg, model, meta)] =
|
|
2899
2904
|
(0, utils_1.precisionRound)(msg.data['occupiedHeatingSetpoint'], 2) / 100;
|
|
2900
2905
|
}
|
|
@@ -2906,18 +2911,19 @@ const converters1 = {
|
|
|
2906
2911
|
type: ['attributeReport', 'readResponse'],
|
|
2907
2912
|
convert: (model, msg, publish, options, meta) => {
|
|
2908
2913
|
const result = {};
|
|
2909
|
-
if (msg.data.
|
|
2910
|
-
result[(0, utils_1.postfixWithEndpointName)('room_floor_sensor_mode', msg, model, meta)] =
|
|
2911
|
-
|
|
2912
|
-
|
|
2914
|
+
if (msg.data.danfossRoomFloorSensorMode !== undefined) {
|
|
2915
|
+
result[(0, utils_1.postfixWithEndpointName)('room_floor_sensor_mode', msg, model, meta)] =
|
|
2916
|
+
constants.danfossRoomFloorSensorMode[msg.data['danfossRoomFloorSensorMode']] !== undefined
|
|
2917
|
+
? constants.danfossRoomFloorSensorMode[msg.data['danfossRoomFloorSensorMode']]
|
|
2918
|
+
: msg.data['danfossRoomFloorSensorMode'];
|
|
2913
2919
|
}
|
|
2914
|
-
if (msg.data.
|
|
2920
|
+
if (msg.data.danfossFloorMinSetpoint !== undefined) {
|
|
2915
2921
|
const value = (0, utils_1.precisionRound)(msg.data['danfossFloorMinSetpoint'], 2) / 100;
|
|
2916
2922
|
if (value >= -273.15) {
|
|
2917
2923
|
result[(0, utils_1.postfixWithEndpointName)('floor_min_setpoint', msg, model, meta)] = value;
|
|
2918
2924
|
}
|
|
2919
2925
|
}
|
|
2920
|
-
if (msg.data.
|
|
2926
|
+
if (msg.data.danfossFloorMaxSetpoint !== undefined) {
|
|
2921
2927
|
const value = (0, utils_1.precisionRound)(msg.data['danfossFloorMaxSetpoint'], 2) / 100;
|
|
2922
2928
|
if (value >= -273.15) {
|
|
2923
2929
|
result[(0, utils_1.postfixWithEndpointName)('floor_max_setpoint', msg, model, meta)] = value;
|
|
@@ -2931,7 +2937,7 @@ const converters1 = {
|
|
|
2931
2937
|
type: ['attributeReport', 'readResponse'],
|
|
2932
2938
|
convert: (model, msg, publish, options, meta) => {
|
|
2933
2939
|
const result = {};
|
|
2934
|
-
if (msg.data.
|
|
2940
|
+
if (msg.data.batteryPercentageRemaining !== undefined) {
|
|
2935
2941
|
// Some devices do not comply to the ZCL and report a
|
|
2936
2942
|
// batteryPercentageRemaining of 100 when the battery is full (should be 200).
|
|
2937
2943
|
const dontDividePercentage = model.meta && model.meta.battery && model.meta.battery.dontDividePercentage;
|
|
@@ -2947,20 +2953,23 @@ const converters1 = {
|
|
|
2947
2953
|
type: ['attributeReport', 'readResponse'],
|
|
2948
2954
|
convert: (model, msg, publish, options, meta) => {
|
|
2949
2955
|
const result = {};
|
|
2950
|
-
if (msg.data.
|
|
2951
|
-
result[(0, utils_1.postfixWithEndpointName)('system_status_code', msg, model, meta)] =
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2956
|
+
if (msg.data.danfossSystemStatusCode !== undefined) {
|
|
2957
|
+
result[(0, utils_1.postfixWithEndpointName)('system_status_code', msg, model, meta)] =
|
|
2958
|
+
constants.danfossSystemStatusCode[msg.data['danfossSystemStatusCode']] !== undefined
|
|
2959
|
+
? constants.danfossSystemStatusCode[msg.data['danfossSystemStatusCode']]
|
|
2960
|
+
: msg.data['danfossSystemStatusCode'];
|
|
2961
|
+
}
|
|
2962
|
+
if (msg.data.danfossSystemStatusWater !== undefined) {
|
|
2963
|
+
result[(0, utils_1.postfixWithEndpointName)('system_status_water', msg, model, meta)] =
|
|
2964
|
+
constants.danfossSystemStatusWater[msg.data['danfossSystemStatusWater']] !== undefined
|
|
2965
|
+
? constants.danfossSystemStatusWater[msg.data['danfossSystemStatusWater']]
|
|
2966
|
+
: msg.data['danfossSystemStatusWater'];
|
|
2967
|
+
}
|
|
2968
|
+
if (msg.data.danfossMultimasterRole !== undefined) {
|
|
2969
|
+
result[(0, utils_1.postfixWithEndpointName)('multimaster_role', msg, model, meta)] =
|
|
2970
|
+
constants.danfossMultimasterRole[msg.data['danfossMultimasterRole']] !== undefined
|
|
2971
|
+
? constants.danfossMultimasterRole[msg.data['danfossMultimasterRole']]
|
|
2972
|
+
: msg.data['danfossMultimasterRole'];
|
|
2964
2973
|
}
|
|
2965
2974
|
return result;
|
|
2966
2975
|
},
|
|
@@ -2970,15 +2979,17 @@ const converters1 = {
|
|
|
2970
2979
|
type: ['attributeReport', 'readResponse'],
|
|
2971
2980
|
convert: (model, msg, publish, options, meta) => {
|
|
2972
2981
|
const result = {};
|
|
2973
|
-
if (msg.data.
|
|
2974
|
-
result[(0, utils_1.postfixWithEndpointName)('keypad_lockout', msg, model, meta)] =
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
+
if (msg.data.keypadLockout !== undefined) {
|
|
2983
|
+
result[(0, utils_1.postfixWithEndpointName)('keypad_lockout', msg, model, meta)] =
|
|
2984
|
+
constants.keypadLockoutMode[msg.data['keypadLockout']] !== undefined
|
|
2985
|
+
? constants.keypadLockoutMode[msg.data['keypadLockout']]
|
|
2986
|
+
: msg.data['keypadLockout'];
|
|
2987
|
+
}
|
|
2988
|
+
if (msg.data.tempDisplayMode !== undefined) {
|
|
2989
|
+
result[(0, utils_1.postfixWithEndpointName)('temperature_display_mode', msg, model, meta)] =
|
|
2990
|
+
constants.temperatureDisplayMode[msg.data['tempDisplayMode']] !== undefined
|
|
2991
|
+
? constants.temperatureDisplayMode[msg.data['tempDisplayMode']]
|
|
2992
|
+
: msg.data['tempDisplayMode'];
|
|
2982
2993
|
}
|
|
2983
2994
|
return result;
|
|
2984
2995
|
},
|
|
@@ -3091,7 +3102,7 @@ const converters1 = {
|
|
|
3091
3102
|
cluster: 'genLevelCtrl',
|
|
3092
3103
|
type: ['attributeReport', 'readResponse'],
|
|
3093
3104
|
convert: (model, msg, publish, options, meta) => {
|
|
3094
|
-
if (msg.data.
|
|
3105
|
+
if (msg.data.currentLevel !== undefined) {
|
|
3095
3106
|
// Ignore brightness = 0, which only happens when state is OFF
|
|
3096
3107
|
if (Number(msg.data['currentLevel']) > 0) {
|
|
3097
3108
|
return { brightness: msg.data['currentLevel'] };
|
|
@@ -3164,7 +3175,7 @@ const converters1 = {
|
|
|
3164
3175
|
0x63: 'release_2_and_4',
|
|
3165
3176
|
0x22: 'press_energy_bar',
|
|
3166
3177
|
};
|
|
3167
|
-
const action = lookup
|
|
3178
|
+
const action = lookup[commandID] !== undefined ? lookup[commandID] : `unknown_${commandID}`;
|
|
3168
3179
|
return { action };
|
|
3169
3180
|
},
|
|
3170
3181
|
},
|
|
@@ -3210,7 +3221,7 @@ const converters1 = {
|
|
|
3210
3221
|
0x52: 'half_open',
|
|
3211
3222
|
0x53: 'tilt',
|
|
3212
3223
|
};
|
|
3213
|
-
if (
|
|
3224
|
+
if (lookup[commandID] === undefined) {
|
|
3214
3225
|
logger_1.logger.error(`PTM 215ZE: missing command '${commandID}'`, NS);
|
|
3215
3226
|
}
|
|
3216
3227
|
else {
|
|
@@ -3252,7 +3263,7 @@ const converters1 = {
|
|
|
3252
3263
|
'104_': 'short_press_2_of_2',
|
|
3253
3264
|
};
|
|
3254
3265
|
const ID = `${commandID}_${msg.data.commandFrame.raw?.slice(0, 1).join('_') ?? ''}`;
|
|
3255
|
-
if (
|
|
3266
|
+
if (lookup[ID] === undefined) {
|
|
3256
3267
|
logger_1.logger.error(`PTM 216Z: missing command '${ID}'`, NS);
|
|
3257
3268
|
}
|
|
3258
3269
|
else {
|
|
@@ -3308,7 +3319,7 @@ const converters1 = {
|
|
|
3308
3319
|
type: ['attributeReport', 'readResponse'],
|
|
3309
3320
|
convert: (model, msg, publish, options, meta) => {
|
|
3310
3321
|
const payload = {};
|
|
3311
|
-
if (msg.data.
|
|
3322
|
+
if (msg.data.acceleration !== undefined)
|
|
3312
3323
|
payload.moving = msg.data['acceleration'] === 1;
|
|
3313
3324
|
// https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/master/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy#L222
|
|
3314
3325
|
/*
|
|
@@ -3318,11 +3329,11 @@ const converters1 = {
|
|
|
3318
3329
|
xyzResults.y = y
|
|
3319
3330
|
xyzResults.z = -x
|
|
3320
3331
|
*/
|
|
3321
|
-
if (msg.data.
|
|
3332
|
+
if (msg.data.z_axis !== undefined)
|
|
3322
3333
|
payload.x_axis = msg.data['z_axis'];
|
|
3323
|
-
if (msg.data.
|
|
3334
|
+
if (msg.data.y_axis !== undefined)
|
|
3324
3335
|
payload.y_axis = msg.data['y_axis'];
|
|
3325
|
-
if (msg.data.
|
|
3336
|
+
if (msg.data.x_axis !== undefined)
|
|
3326
3337
|
payload.z_axis = -msg.data['x_axis'];
|
|
3327
3338
|
return payload;
|
|
3328
3339
|
},
|
|
@@ -3454,16 +3465,16 @@ const converters1 = {
|
|
|
3454
3465
|
const payload = {};
|
|
3455
3466
|
// 0xf000 = 61440
|
|
3456
3467
|
// This attribute returns usually 2 when power is over the defined threshold.
|
|
3457
|
-
if (msg.data
|
|
3468
|
+
if (msg.data['61440'] !== undefined) {
|
|
3458
3469
|
payload.power_alarm_active_value = msg.data['61440'];
|
|
3459
3470
|
payload.power_alarm_active = payload.power_alarm_active_value > 0;
|
|
3460
3471
|
}
|
|
3461
3472
|
// 0xf001 = 61441
|
|
3462
|
-
if (msg.data
|
|
3473
|
+
if (msg.data['61441'] !== undefined) {
|
|
3463
3474
|
payload.power_alarm_enabled = msg.data['61441'];
|
|
3464
3475
|
}
|
|
3465
3476
|
// 0xf002 = 61442, wh = watt hour
|
|
3466
|
-
if (msg.data
|
|
3477
|
+
if (msg.data['61442'] !== undefined) {
|
|
3467
3478
|
payload.power_alarm_wh_threshold = msg.data['61442'];
|
|
3468
3479
|
}
|
|
3469
3480
|
return payload;
|
|
@@ -3493,7 +3504,7 @@ const converters1 = {
|
|
|
3493
3504
|
0x35: 'up',
|
|
3494
3505
|
0x36: 'down', // 600087l
|
|
3495
3506
|
};
|
|
3496
|
-
if (
|
|
3507
|
+
if (lookup[commandID] === undefined) {
|
|
3497
3508
|
logger_1.logger.error(`Legrand GreenPower: missing command '${commandID}'`, NS);
|
|
3498
3509
|
}
|
|
3499
3510
|
else {
|
|
@@ -3555,7 +3566,7 @@ const converters1 = {
|
|
|
3555
3566
|
cluster: 'msPressureMeasurement',
|
|
3556
3567
|
type: ['attributeReport', 'readResponse'],
|
|
3557
3568
|
convert: (model, msg, publish, options, meta) => {
|
|
3558
|
-
const pressure = msg.data.
|
|
3569
|
+
const pressure = msg.data.measuredValue !== undefined ? msg.data.measuredValue : parseFloat(msg.data['32']) / 1000.0;
|
|
3559
3570
|
return { pressure };
|
|
3560
3571
|
},
|
|
3561
3572
|
},
|
|
@@ -3691,13 +3702,13 @@ const converters1 = {
|
|
|
3691
3702
|
const timeCoverSetMiddle = 60;
|
|
3692
3703
|
// https://github.com/Koenkk/zigbee-herdsman-converters/pull/1336
|
|
3693
3704
|
// Need to add time_close and time_open in your configuration.yaml after friendly_name (and set your time)
|
|
3694
|
-
if (options.
|
|
3705
|
+
if (options.time_close !== undefined && options.time_open !== undefined) {
|
|
3695
3706
|
if (!globalStore.hasValue(msg.endpoint, 'position')) {
|
|
3696
3707
|
globalStore.putValue(msg.endpoint, 'position', { lastPreviousAction: -1, CurrentPosition: -1, since: false });
|
|
3697
3708
|
}
|
|
3698
3709
|
const entry = globalStore.getValue(msg.endpoint, 'position');
|
|
3699
3710
|
// ignore if first action is middle and ignore action middle if previous action is middle
|
|
3700
|
-
if (msg.data.
|
|
3711
|
+
if (msg.data.currentPositionLiftPercentage !== undefined && msg.data['currentPositionLiftPercentage'] == 50) {
|
|
3701
3712
|
if ((entry.CurrentPosition == -1 && entry.lastPreviousAction == -1) || entry.lastPreviousAction == 50) {
|
|
3702
3713
|
logger_1.logger.warning(`ZMCSW032D ignore action`, NS);
|
|
3703
3714
|
return;
|
|
@@ -3708,7 +3719,7 @@ const converters1 = {
|
|
|
3708
3719
|
const deltaTimeSec = Math.floor((Date.now() - entry.since) / 1000); // convert to sec
|
|
3709
3720
|
entry.since = Date.now();
|
|
3710
3721
|
entry.lastPreviousAction = msg.data['currentPositionLiftPercentage'];
|
|
3711
|
-
if (msg.data.
|
|
3722
|
+
if (msg.data.currentPositionLiftPercentage !== undefined && msg.data['currentPositionLiftPercentage'] == 50) {
|
|
3712
3723
|
if (deltaTimeSec < timeCoverSetMiddle || deltaTimeSec > timeCoverSetMiddle) {
|
|
3713
3724
|
if (lastPreviousAction == 100) {
|
|
3714
3725
|
// Open
|
|
@@ -3725,7 +3736,7 @@ const converters1 = {
|
|
|
3725
3736
|
}
|
|
3726
3737
|
}
|
|
3727
3738
|
entry.CurrentPosition = currentPosition;
|
|
3728
|
-
if (msg.data.
|
|
3739
|
+
if (msg.data.currentPositionLiftPercentage !== undefined && msg.data['currentPositionLiftPercentage'] !== 50) {
|
|
3729
3740
|
// position cast float to int
|
|
3730
3741
|
result.position = currentPosition | 0;
|
|
3731
3742
|
}
|
|
@@ -3743,7 +3754,7 @@ const converters1 = {
|
|
|
3743
3754
|
}
|
|
3744
3755
|
else {
|
|
3745
3756
|
// Previous solution without time_close and time_open
|
|
3746
|
-
if (msg.data.
|
|
3757
|
+
if (msg.data.currentPositionLiftPercentage !== undefined && msg.data['currentPositionLiftPercentage'] !== 50) {
|
|
3747
3758
|
const liftPercentage = msg.data['currentPositionLiftPercentage'];
|
|
3748
3759
|
result.position = liftPercentage;
|
|
3749
3760
|
result.position = options.invert_cover ? 100 - result.position : result.position;
|
|
@@ -3761,7 +3772,7 @@ const converters1 = {
|
|
|
3761
3772
|
type: 'commandArrivalSensorNotify',
|
|
3762
3773
|
options: [exposes.options.presence_timeout()],
|
|
3763
3774
|
convert: (model, msg, publish, options, meta) => {
|
|
3764
|
-
const useOptionsTimeout = options && options.
|
|
3775
|
+
const useOptionsTimeout = options && options.presence_timeout !== undefined;
|
|
3765
3776
|
const timeout = useOptionsTimeout ? Number(options.presence_timeout) : 100; // 100 seconds by default
|
|
3766
3777
|
// Stop existing timer because motion is detected and set a new one.
|
|
3767
3778
|
clearTimeout(globalStore.getValue(msg.endpoint, 'timer'));
|
|
@@ -3775,7 +3786,7 @@ const converters1 = {
|
|
|
3775
3786
|
type: ['attributeReport', 'readResponse'],
|
|
3776
3787
|
options: [exposes.options.presence_timeout()],
|
|
3777
3788
|
convert: (model, msg, publish, options, meta) => {
|
|
3778
|
-
const useOptionsTimeout = options && options.
|
|
3789
|
+
const useOptionsTimeout = options && options.presence_timeout !== undefined;
|
|
3779
3790
|
const timeout = useOptionsTimeout ? Number(options.presence_timeout) : 100; // 100 seconds by default
|
|
3780
3791
|
// Stop existing timer because motion is detected and set a new one.
|
|
3781
3792
|
clearTimeout(globalStore.getValue(msg.endpoint, 'timer'));
|
|
@@ -3795,7 +3806,7 @@ const converters1 = {
|
|
|
3795
3806
|
commandGoOut: 'go_out',
|
|
3796
3807
|
commandRepast: 'repast',
|
|
3797
3808
|
};
|
|
3798
|
-
if (lookup
|
|
3809
|
+
if (lookup[msg.type] !== undefined)
|
|
3799
3810
|
return { action: lookup[msg.type] };
|
|
3800
3811
|
},
|
|
3801
3812
|
},
|
|
@@ -3863,22 +3874,22 @@ const converters1 = {
|
|
|
3863
3874
|
type: 'readResponse',
|
|
3864
3875
|
convert: (model, msg, publish, options, meta) => {
|
|
3865
3876
|
const result = {};
|
|
3866
|
-
if (msg.data
|
|
3877
|
+
if (msg.data[0xf001] !== undefined) {
|
|
3867
3878
|
result.led_feedback = ['OFF', 'ON'][msg.data[0xf001]];
|
|
3868
3879
|
}
|
|
3869
|
-
if (msg.data
|
|
3880
|
+
if (msg.data[0xf002] !== undefined) {
|
|
3870
3881
|
result.buzzer_feedback = ['OFF', 'ON'][msg.data[0xf002]];
|
|
3871
3882
|
}
|
|
3872
|
-
if (msg.data
|
|
3883
|
+
if (msg.data[0xf000] !== undefined) {
|
|
3873
3884
|
result.sensitivity = msg.data[0xf000];
|
|
3874
3885
|
}
|
|
3875
|
-
if (msg.data
|
|
3886
|
+
if (msg.data[0xf003] !== undefined) {
|
|
3876
3887
|
result.sensors_count = msg.data[0xf003];
|
|
3877
3888
|
}
|
|
3878
|
-
if (msg.data
|
|
3889
|
+
if (msg.data[0xf004] !== undefined) {
|
|
3879
3890
|
result.sensors_type = ['СБМ-20/СТС-5/BOI-33', 'СБМ-19/СТС-6', 'Others'][msg.data[0xf004]];
|
|
3880
3891
|
}
|
|
3881
|
-
if (msg.data
|
|
3892
|
+
if (msg.data[0xf005] !== undefined) {
|
|
3882
3893
|
result.alert_threshold = msg.data[0xf005];
|
|
3883
3894
|
}
|
|
3884
3895
|
return result;
|
|
@@ -3889,16 +3900,16 @@ const converters1 = {
|
|
|
3889
3900
|
type: 'readResponse',
|
|
3890
3901
|
convert: (model, msg, publish, options, meta) => {
|
|
3891
3902
|
const result = {};
|
|
3892
|
-
if (msg.data
|
|
3903
|
+
if (msg.data[0x0203] !== undefined) {
|
|
3893
3904
|
result.led_feedback = ['OFF', 'ON'][msg.data[0x0203]];
|
|
3894
3905
|
}
|
|
3895
|
-
if (msg.data
|
|
3906
|
+
if (msg.data[0x0202] !== undefined) {
|
|
3896
3907
|
result.enable_abc = ['OFF', 'ON'][msg.data[0x0202]];
|
|
3897
3908
|
}
|
|
3898
|
-
if (msg.data
|
|
3909
|
+
if (msg.data[0x0204] !== undefined) {
|
|
3899
3910
|
result.threshold1 = msg.data[0x0204];
|
|
3900
3911
|
}
|
|
3901
|
-
if (msg.data
|
|
3912
|
+
if (msg.data[0x0205] !== undefined) {
|
|
3902
3913
|
result.threshold2 = msg.data[0x0205];
|
|
3903
3914
|
}
|
|
3904
3915
|
return result;
|
|
@@ -3909,7 +3920,7 @@ const converters1 = {
|
|
|
3909
3920
|
type: 'readResponse',
|
|
3910
3921
|
convert: (model, msg, publish, options, meta) => {
|
|
3911
3922
|
const result = {};
|
|
3912
|
-
if (msg.data
|
|
3923
|
+
if (msg.data[0x0210] !== undefined) {
|
|
3913
3924
|
result.temperature_offset = msg.data[0x0210];
|
|
3914
3925
|
}
|
|
3915
3926
|
return result;
|
|
@@ -3920,7 +3931,7 @@ const converters1 = {
|
|
|
3920
3931
|
type: 'readResponse',
|
|
3921
3932
|
convert: (model, msg, publish, options, meta) => {
|
|
3922
3933
|
const result = {};
|
|
3923
|
-
if (msg.data
|
|
3934
|
+
if (msg.data[0x0210] !== undefined) {
|
|
3924
3935
|
result.pressure_offset = msg.data[0x0210];
|
|
3925
3936
|
}
|
|
3926
3937
|
return result;
|
|
@@ -3931,7 +3942,7 @@ const converters1 = {
|
|
|
3931
3942
|
type: 'readResponse',
|
|
3932
3943
|
convert: (model, msg, publish, options, meta) => {
|
|
3933
3944
|
const result = {};
|
|
3934
|
-
if (msg.data
|
|
3945
|
+
if (msg.data[0x0210] !== undefined) {
|
|
3935
3946
|
result.humidity_offset = msg.data[0x0210];
|
|
3936
3947
|
}
|
|
3937
3948
|
return result;
|
|
@@ -3942,28 +3953,28 @@ const converters1 = {
|
|
|
3942
3953
|
type: ['attributeReport', 'readResponse'],
|
|
3943
3954
|
convert: (model, msg, publish, options, meta) => {
|
|
3944
3955
|
const result = {};
|
|
3945
|
-
if (msg.data
|
|
3956
|
+
if (msg.data[0x0050] !== undefined) {
|
|
3946
3957
|
result.state = ['idle', 'ring', 'talk', 'open', 'drop'][msg.data[0x0050]];
|
|
3947
3958
|
}
|
|
3948
|
-
if (msg.data
|
|
3959
|
+
if (msg.data[0x0051] !== undefined) {
|
|
3949
3960
|
result.mode = ['never', 'once', 'always', 'drop'][msg.data[0x0051]];
|
|
3950
3961
|
}
|
|
3951
|
-
if (msg.data
|
|
3962
|
+
if (msg.data[0x0052] !== undefined) {
|
|
3952
3963
|
result.sound = ['OFF', 'ON'][msg.data[0x0052]];
|
|
3953
3964
|
}
|
|
3954
|
-
if (msg.data
|
|
3965
|
+
if (msg.data[0x0053] !== undefined) {
|
|
3955
3966
|
result.time_ring = msg.data[0x0053];
|
|
3956
3967
|
}
|
|
3957
|
-
if (msg.data
|
|
3968
|
+
if (msg.data[0x0054] !== undefined) {
|
|
3958
3969
|
result.time_talk = msg.data[0x0054];
|
|
3959
3970
|
}
|
|
3960
|
-
if (msg.data
|
|
3971
|
+
if (msg.data[0x0055] !== undefined) {
|
|
3961
3972
|
result.time_open = msg.data[0x0055];
|
|
3962
3973
|
}
|
|
3963
|
-
if (msg.data
|
|
3974
|
+
if (msg.data[0x0057] !== undefined) {
|
|
3964
3975
|
result.time_bell = msg.data[0x0057];
|
|
3965
3976
|
}
|
|
3966
|
-
if (msg.data
|
|
3977
|
+
if (msg.data[0x0056] !== undefined) {
|
|
3967
3978
|
result.time_report = msg.data[0x0056];
|
|
3968
3979
|
}
|
|
3969
3980
|
return result;
|
|
@@ -4022,7 +4033,7 @@ const converters1 = {
|
|
|
4022
4033
|
cluster: 'msOccupancySensing',
|
|
4023
4034
|
type: ['attributeReport', 'readResponse'],
|
|
4024
4035
|
convert: (model, msg, publish, options, meta) => {
|
|
4025
|
-
if (msg.data
|
|
4036
|
+
if (msg.data['48'] !== undefined) {
|
|
4026
4037
|
const lookup = ['low', 'medium', 'high', 'very_high', 'max'];
|
|
4027
4038
|
return { motion_sensitivity: lookup[msg.data['48']] };
|
|
4028
4039
|
}
|
|
@@ -4032,7 +4043,7 @@ const converters1 = {
|
|
|
4032
4043
|
cluster: 'genBasic',
|
|
4033
4044
|
type: ['attributeReport', 'readResponse'],
|
|
4034
4045
|
convert: (model, msg, publish, options, meta) => {
|
|
4035
|
-
if (msg.data
|
|
4046
|
+
if (msg.data['51'] !== undefined) {
|
|
4036
4047
|
return { led_indication: msg.data['51'] === 1 };
|
|
4037
4048
|
}
|
|
4038
4049
|
},
|
|
@@ -4041,7 +4052,7 @@ const converters1 = {
|
|
|
4041
4052
|
cluster: 'genBasic',
|
|
4042
4053
|
type: ['attributeReport', 'readResponse'],
|
|
4043
4054
|
convert: (model, msg, publish, options, meta) => {
|
|
4044
|
-
if (msg.data
|
|
4055
|
+
if (msg.data['52'] !== undefined) {
|
|
4045
4056
|
const values = ['single_rocker', 'single_push_button', 'dual_rocker', 'dual_push_button'];
|
|
4046
4057
|
return { device_mode: values[msg.data['52']] };
|
|
4047
4058
|
}
|
|
@@ -4228,7 +4239,7 @@ const converters1 = {
|
|
|
4228
4239
|
// simulated brightness
|
|
4229
4240
|
if (options.simulated_brightness && (button === 'down' || button === 'up') && type !== 'release') {
|
|
4230
4241
|
const opts = options.simulated_brightness;
|
|
4231
|
-
const deltaOpts = typeof opts === 'object' && opts.
|
|
4242
|
+
const deltaOpts = typeof opts === 'object' && opts.delta !== undefined ? opts.delta : 35;
|
|
4232
4243
|
const delta = button === 'up' ? deltaOpts : deltaOpts * -1;
|
|
4233
4244
|
const brightness = globalStore.getValue(msg.endpoint, 'brightness', 255) + delta;
|
|
4234
4245
|
payload.brightness = (0, utils_1.numberWithinRange)(brightness, 0, 255);
|
|
@@ -4259,7 +4270,7 @@ const converters1 = {
|
|
|
4259
4270
|
0x64: 'press_1_and_2',
|
|
4260
4271
|
0x65: 'release_1_and_2',
|
|
4261
4272
|
};
|
|
4262
|
-
if (
|
|
4273
|
+
if (lookup[commandID] === undefined) {
|
|
4263
4274
|
logger_1.logger.error(`Hue Tap: missing command '${commandID}'`, NS);
|
|
4264
4275
|
}
|
|
4265
4276
|
else {
|
|
@@ -4272,10 +4283,10 @@ const converters1 = {
|
|
|
4272
4283
|
type: ['attributeReport', 'readResponse'],
|
|
4273
4284
|
convert: (model, msg, publish, options, meta) => {
|
|
4274
4285
|
const property = 0x8001;
|
|
4275
|
-
if (msg.data
|
|
4286
|
+
if (msg.data[property] !== undefined) {
|
|
4276
4287
|
const dict = { 0x00: 'off', 0x01: 'on_off', 0x02: 'off_on' };
|
|
4277
4288
|
const value = msg.data[property];
|
|
4278
|
-
if (dict
|
|
4289
|
+
if (dict[value] !== undefined) {
|
|
4279
4290
|
return { [(0, utils_1.postfixWithEndpointName)('indicator_mode', msg, model, meta)]: dict[value] };
|
|
4280
4291
|
}
|
|
4281
4292
|
}
|
|
@@ -4310,11 +4321,11 @@ const converters1 = {
|
|
|
4310
4321
|
const data = msg.data;
|
|
4311
4322
|
const senslookup = { '0': 'low', '1': 'medium', '2': 'high' };
|
|
4312
4323
|
const keeptimelookup = { '0': 0, '1': 30, '2': 60, '3': 120, '4': 240, '5': 480 };
|
|
4313
|
-
if (data && data.
|
|
4324
|
+
if (data && data.currentZoneSensitivityLevel !== undefined) {
|
|
4314
4325
|
const value = data.currentZoneSensitivityLevel;
|
|
4315
4326
|
return { sensitivity: senslookup[value] };
|
|
4316
4327
|
}
|
|
4317
|
-
if (data && data
|
|
4328
|
+
if (data && data['61441'] !== undefined) {
|
|
4318
4329
|
const value = data['61441'];
|
|
4319
4330
|
return { keep_time: keeptimelookup[value] };
|
|
4320
4331
|
}
|
|
@@ -4531,7 +4542,7 @@ const converters1 = {
|
|
|
4531
4542
|
cluster: 'genOnOff',
|
|
4532
4543
|
type: ['attributeReport', 'readResponse'],
|
|
4533
4544
|
convert: (model, msg, publish, options, meta) => {
|
|
4534
|
-
if (msg.data.
|
|
4545
|
+
if (msg.data.tuyaOperationMode !== undefined) {
|
|
4535
4546
|
const value = msg.data['tuyaOperationMode'];
|
|
4536
4547
|
const lookup = { 0: 'command', 1: 'event' };
|
|
4537
4548
|
return { operation_mode: lookup[value] };
|
|
@@ -4548,7 +4559,7 @@ const converters1 = {
|
|
|
4548
4559
|
if (commandID === 224)
|
|
4549
4560
|
return;
|
|
4550
4561
|
const lookup = { 0x21: 'press_on', 0x20: 'press_off', 0x34: 'release', 0x35: 'hold_on', 0x36: 'hold_off' };
|
|
4551
|
-
if (
|
|
4562
|
+
if (lookup[commandID] === undefined) {
|
|
4552
4563
|
logger_1.logger.error(`Sunricher: missing command '${commandID}'`, NS);
|
|
4553
4564
|
}
|
|
4554
4565
|
else {
|
|
@@ -4574,7 +4585,7 @@ const converters1 = {
|
|
|
4574
4585
|
0x36: 'hold_low',
|
|
4575
4586
|
0x34: 'release',
|
|
4576
4587
|
};
|
|
4577
|
-
if (
|
|
4588
|
+
if (lookup[commandID] === undefined) {
|
|
4578
4589
|
logger_1.logger.error(`Sunricher: missing command '${commandID}'`, NS);
|
|
4579
4590
|
}
|
|
4580
4591
|
else {
|
|
@@ -4632,7 +4643,7 @@ const converters1 = {
|
|
|
4632
4643
|
type: ['attributeReport', 'readResponse'],
|
|
4633
4644
|
convert: (model, msg, publish, options, meta) => {
|
|
4634
4645
|
const result = {};
|
|
4635
|
-
if (msg.data.
|
|
4646
|
+
if (msg.data.hwVersion !== undefined)
|
|
4636
4647
|
result['hw_version'] = msg.data.hwVersion;
|
|
4637
4648
|
return result;
|
|
4638
4649
|
},
|
|
@@ -4884,7 +4895,7 @@ const converters2 = {
|
|
|
4884
4895
|
cluster: 'ssIasAce',
|
|
4885
4896
|
type: 'commandArm',
|
|
4886
4897
|
convert: async (model, msg, publish, options, meta) => {
|
|
4887
|
-
const payload =
|
|
4898
|
+
const payload = converters1.command_arm.convert(model, msg, publish, options, meta);
|
|
4888
4899
|
if (!payload)
|
|
4889
4900
|
return;
|
|
4890
4901
|
payload.action_transaction = msg.meta.zclTransactionSequenceNumber;
|
|
@@ -4895,7 +4906,7 @@ const converters2 = {
|
|
|
4895
4906
|
cluster: 'seMetering',
|
|
4896
4907
|
type: ['attributeReport', 'readResponse'],
|
|
4897
4908
|
convert: async (model, msg, publish, options, meta) => {
|
|
4898
|
-
const result =
|
|
4909
|
+
const result = converters1.metering.convert(model, msg, publish, options, meta);
|
|
4899
4910
|
// Filter incorrect 0 energy values reported by the device:
|
|
4900
4911
|
// https://github.com/Koenkk/zigbee2mqtt/issues/7852
|
|
4901
4912
|
if (result && result.energy === 0) {
|
|
@@ -4911,8 +4922,8 @@ const converters2 = {
|
|
|
4911
4922
|
cluster: 'seMetering',
|
|
4912
4923
|
type: ['attributeReport', 'readResponse'],
|
|
4913
4924
|
convert: async (model, msg, publish, options, meta) => {
|
|
4914
|
-
const result =
|
|
4915
|
-
if (result && result.
|
|
4925
|
+
const result = converters1.metering.convert(model, msg, publish, options, meta);
|
|
4926
|
+
if (result && result.power !== undefined) {
|
|
4916
4927
|
result.power /= 1000;
|
|
4917
4928
|
}
|
|
4918
4929
|
return result;
|
|
@@ -4922,8 +4933,8 @@ const converters2 = {
|
|
|
4922
4933
|
cluster: 'genOnOff',
|
|
4923
4934
|
type: 'commandOn',
|
|
4924
4935
|
convert: async (model, msg, publish, options, meta) => {
|
|
4925
|
-
const payload1 =
|
|
4926
|
-
const payload2 =
|
|
4936
|
+
const payload1 = converters1.checkin_presence.convert(model, msg, publish, options, meta);
|
|
4937
|
+
const payload2 = converters1.command_on.convert(model, msg, publish, options, meta);
|
|
4927
4938
|
return { ...payload1, ...payload2 };
|
|
4928
4939
|
},
|
|
4929
4940
|
},
|
|
@@ -4945,11 +4956,11 @@ const converters2 = {
|
|
|
4945
4956
|
// https://github.com/Koenkk/zigbee2mqtt/issues/2233
|
|
4946
4957
|
// https://github.com/Koenkk/zigbee-herdsman-converters/issues/915
|
|
4947
4958
|
const result = {};
|
|
4948
|
-
if (msg.data.
|
|
4959
|
+
if (msg.data.instantaneousDemand !== undefined) {
|
|
4949
4960
|
result.power = msg.data['instantaneousDemand'];
|
|
4950
4961
|
}
|
|
4951
4962
|
// Summation is reported in Watthours
|
|
4952
|
-
if (msg.data.
|
|
4963
|
+
if (msg.data.currentSummDelivered !== undefined) {
|
|
4953
4964
|
const data = msg.data['currentSummDelivered'];
|
|
4954
4965
|
const value = (parseInt(data[0]) << 32) + parseInt(data[1]);
|
|
4955
4966
|
result.energy = value / 1000.0;
|
|
@@ -4965,12 +4976,12 @@ const converters2 = {
|
|
|
4965
4976
|
cluster: 'hvacThermostat',
|
|
4966
4977
|
type: ['attributeReport', 'readResponse'],
|
|
4967
4978
|
convert: async (model, msg, publish, options, meta) => {
|
|
4968
|
-
const result =
|
|
4979
|
+
const result = converters1.thermostat.convert(model, msg, publish, options, meta);
|
|
4969
4980
|
if (result && msg.data['StelproSystemMode'] === 5) {
|
|
4970
4981
|
// 'Eco' mode is translated into 'auto' here
|
|
4971
4982
|
result.system_mode = constants.thermostatSystemModes[1];
|
|
4972
4983
|
}
|
|
4973
|
-
if (result && msg.data.
|
|
4984
|
+
if (result && msg.data.pIHeatingDemand !== undefined) {
|
|
4974
4985
|
result.running_state = msg.data['pIHeatingDemand'] >= 10 ? 'heat' : 'idle';
|
|
4975
4986
|
}
|
|
4976
4987
|
return result;
|
|
@@ -4980,7 +4991,7 @@ const converters2 = {
|
|
|
4980
4991
|
cluster: 'hvacThermostat',
|
|
4981
4992
|
type: ['attributeReport', 'readResponse'],
|
|
4982
4993
|
convert: async (model, msg, publish, options, meta) => {
|
|
4983
|
-
const result =
|
|
4994
|
+
const result = converters1.thermostat.convert(model, msg, publish, options, meta);
|
|
4984
4995
|
if (result) {
|
|
4985
4996
|
// ViessMann TRVs report piHeatingDemand from 0-5
|
|
4986
4997
|
// NOTE: remove the result for now, but leave it configure for reporting
|
|
@@ -4991,17 +5002,17 @@ const converters2 = {
|
|
|
4991
5002
|
// 0-2, 5: unknown
|
|
4992
5003
|
// 3: window open (OO on display, no heating)
|
|
4993
5004
|
// 4: window open (OO on display, heating)
|
|
4994
|
-
if (msg.data.
|
|
5005
|
+
if (msg.data.viessmannWindowOpenInternal !== undefined) {
|
|
4995
5006
|
result.window_open = msg.data['viessmannWindowOpenInternal'] == 3 || msg.data['viessmannWindowOpenInternal'] == 4;
|
|
4996
5007
|
}
|
|
4997
5008
|
// viessmannWindowOpenForce (rw, bool)
|
|
4998
|
-
if (msg.data.
|
|
5009
|
+
if (msg.data.viessmannWindowOpenForce !== undefined) {
|
|
4999
5010
|
result.window_open_force = msg.data['viessmannWindowOpenForce'] == 1;
|
|
5000
5011
|
}
|
|
5001
5012
|
// viessmannAssemblyMode (ro, bool)
|
|
5002
5013
|
// 0: TRV installed
|
|
5003
5014
|
// 1: TRV ready to install (-- on display)
|
|
5004
|
-
if (msg.data.
|
|
5015
|
+
if (msg.data.viessmannAssemblyMode !== undefined) {
|
|
5005
5016
|
result.assembly_mode = msg.data['viessmannAssemblyMode'] == 1;
|
|
5006
5017
|
}
|
|
5007
5018
|
}
|
|
@@ -5012,7 +5023,7 @@ const converters2 = {
|
|
|
5012
5023
|
cluster: 'hvacThermostat',
|
|
5013
5024
|
type: ['attributeReport', 'readResponse'],
|
|
5014
5025
|
convert: async (model, msg, publish, options, meta) => {
|
|
5015
|
-
const result =
|
|
5026
|
+
const result = converters1.thermostat.convert(model, msg, publish, options, meta);
|
|
5016
5027
|
if (result) {
|
|
5017
5028
|
if (typeof msg.data[0x4003] == 'number') {
|
|
5018
5029
|
result.current_heating_setpoint = (0, utils_1.precisionRound)(msg.data[0x4003], 2) / 100;
|
|
@@ -5045,7 +5056,7 @@ const converters2 = {
|
|
|
5045
5056
|
if (typeof msg.data[0x4001] == 'number') {
|
|
5046
5057
|
result.valve_position = msg.data[0x4001];
|
|
5047
5058
|
}
|
|
5048
|
-
if (msg.data.
|
|
5059
|
+
if (msg.data.pIHeatingDemand !== undefined) {
|
|
5049
5060
|
result.running_state = msg.data['pIHeatingDemand'] >= 10 ? 'heat' : 'idle';
|
|
5050
5061
|
}
|
|
5051
5062
|
}
|
|
@@ -5088,7 +5099,7 @@ const converters2 = {
|
|
|
5088
5099
|
const sidelookup = { 5: 'right', 7: 'right', 40: 'left', 56: 'left' };
|
|
5089
5100
|
if (sidelookup[value]) {
|
|
5090
5101
|
msg.data.occupancy = 1;
|
|
5091
|
-
const payload =
|
|
5102
|
+
const payload = converters1.occupancy_with_timeout.convert(model, msg, publish, options, meta);
|
|
5092
5103
|
if (payload) {
|
|
5093
5104
|
payload.action_side = sidelookup[value];
|
|
5094
5105
|
payload.side = sidelookup[value]; /* legacy: remove this line (replaced by action_side) */
|
|
@@ -5104,15 +5115,15 @@ const converters2 = {
|
|
|
5104
5115
|
convert: async (model, msg, publish, options, meta) => {
|
|
5105
5116
|
let result = {};
|
|
5106
5117
|
const data = msg.data;
|
|
5107
|
-
if (data && data.
|
|
5108
|
-
const result1 =
|
|
5118
|
+
if (data && data.zoneStatus !== undefined) {
|
|
5119
|
+
const result1 = converters1.ias_occupancy_alarm_1_report.convert(model, msg, publish, options, meta);
|
|
5109
5120
|
result = { ...result1 };
|
|
5110
5121
|
}
|
|
5111
|
-
if (data && data.
|
|
5122
|
+
if (data && data.currentZoneSensitivityLevel !== undefined) {
|
|
5112
5123
|
const senslookup = { '0': 'low', '1': 'medium', '2': 'high' };
|
|
5113
5124
|
result.sensitivity = senslookup[data.currentZoneSensitivityLevel];
|
|
5114
5125
|
}
|
|
5115
|
-
if (data && data
|
|
5126
|
+
if (data && data['61441'] !== undefined) {
|
|
5116
5127
|
const keeptimelookup = { '0': 30, '1': 60, '2': 120 };
|
|
5117
5128
|
result.keep_time = keeptimelookup[data['61441']];
|
|
5118
5129
|
}
|
|
@@ -5123,9 +5134,9 @@ const converters2 = {
|
|
|
5123
5134
|
cluster: 'lightingBallastCfg',
|
|
5124
5135
|
type: ['attributeReport', 'readResponse'],
|
|
5125
5136
|
convert: async (model, msg, publish, options, meta) => {
|
|
5126
|
-
const result =
|
|
5137
|
+
const result = converters1.lighting_ballast_configuration.convert(model, msg, publish, options, meta);
|
|
5127
5138
|
const lookup = { 1: 'RC', 2: 'RL' };
|
|
5128
|
-
if (result && msg.data
|
|
5139
|
+
if (result && msg.data[0xe000] !== undefined) {
|
|
5129
5140
|
result.dimmer_mode = lookup[msg.data[0xe000]];
|
|
5130
5141
|
}
|
|
5131
5142
|
return result;
|
|
@@ -5135,8 +5146,8 @@ const converters2 = {
|
|
|
5135
5146
|
cluster: 'lightingBallastCfg',
|
|
5136
5147
|
type: ['attributeReport', 'readResponse'],
|
|
5137
5148
|
convert: async (model, msg, publish, options, meta) => {
|
|
5138
|
-
const result =
|
|
5139
|
-
if (result && msg.data.
|
|
5149
|
+
const result = converters1.lighting_ballast_configuration.convert(model, msg, publish, options, meta);
|
|
5150
|
+
if (result && msg.data.wiserControlMode !== undefined) {
|
|
5140
5151
|
result.dimmer_mode = constants.wiserDimmerControlMode[msg.data['wiserControlMode']];
|
|
5141
5152
|
}
|
|
5142
5153
|
return result;
|
|
@@ -5146,28 +5157,28 @@ const converters2 = {
|
|
|
5146
5157
|
cluster: 'hvacThermostat',
|
|
5147
5158
|
type: ['attributeReport', 'readResponse'],
|
|
5148
5159
|
convert: async (model, msg, publish, options, meta) => {
|
|
5149
|
-
const result =
|
|
5160
|
+
const result = converters1.thermostat.convert(model, msg, publish, options, meta);
|
|
5150
5161
|
if (result) {
|
|
5151
|
-
if (msg.data
|
|
5162
|
+
if (msg.data[0xe010] !== undefined) {
|
|
5152
5163
|
// wiserSmartZoneMode
|
|
5153
5164
|
const lookup = { 1: 'manual', 2: 'schedule', 3: 'energy_saver', 6: 'holiday' };
|
|
5154
5165
|
result['zone_mode'] = lookup[msg.data[0xe010]];
|
|
5155
5166
|
}
|
|
5156
|
-
if (msg.data
|
|
5167
|
+
if (msg.data[0xe011] !== undefined) {
|
|
5157
5168
|
// wiserSmartHactConfig
|
|
5158
5169
|
const lookup = { 0x00: 'unconfigured', 0x80: 'setpoint_switch', 0x82: 'setpoint_fip', 0x83: 'fip_fip' };
|
|
5159
5170
|
result['hact_config'] = lookup[msg.data[0xe011]];
|
|
5160
5171
|
}
|
|
5161
|
-
if (msg.data
|
|
5172
|
+
if (msg.data[0xe020] !== undefined) {
|
|
5162
5173
|
// wiserSmartCurrentFilPiloteMode
|
|
5163
5174
|
const lookup = { 0: 'comfort', 1: 'comfort_-1', 2: 'comfort_-2', 3: 'energy_saving', 4: 'frost_protection', 5: 'off' };
|
|
5164
5175
|
result['fip_setting'] = lookup[msg.data[0xe020]];
|
|
5165
5176
|
}
|
|
5166
|
-
if (msg.data
|
|
5177
|
+
if (msg.data[0xe030] !== undefined) {
|
|
5167
5178
|
// wiserSmartValvePosition
|
|
5168
5179
|
result['pi_heating_demand'] = msg.data[0xe030];
|
|
5169
5180
|
}
|
|
5170
|
-
if (msg.data
|
|
5181
|
+
if (msg.data[0xe031] !== undefined) {
|
|
5171
5182
|
// wiserSmartValveCalibrationStatus
|
|
5172
5183
|
const lookup = { 0: 'ongoing', 1: 'successful', 2: 'uncalibrated', 3: 'failed_e1', 4: 'failed_e2', 5: 'failed_e3' };
|
|
5173
5184
|
result['valve_calibration_status'] = lookup[msg.data[0xe031]];
|
|
@@ -5175,8 +5186,8 @@ const converters2 = {
|
|
|
5175
5186
|
// Radiator thermostats command changes from UI, but report value periodically for sync,
|
|
5176
5187
|
// force an update of the value if it doesn't match the current existing value
|
|
5177
5188
|
if (meta.device.modelID === 'EH-ZB-VACT' &&
|
|
5178
|
-
msg.data.
|
|
5179
|
-
meta.state.
|
|
5189
|
+
msg.data.occupiedHeatingSetpoint !== undefined &&
|
|
5190
|
+
meta.state.occupied_heating_setpoint !== undefined) {
|
|
5180
5191
|
if (result.occupied_heating_setpoint != meta.state.occupied_heating_setpoint) {
|
|
5181
5192
|
const lookup = { manual: 1, schedule: 2, energy_saver: 3, holiday: 6 };
|
|
5182
5193
|
const zonemodeNum = lookup[Number(meta.state.zone_mode)];
|
|
@@ -5230,13 +5241,13 @@ const converters2 = {
|
|
|
5230
5241
|
type: ['attributeReport', 'readResponse'],
|
|
5231
5242
|
convert: (model, msg, publish, options, meta) => {
|
|
5232
5243
|
const result = {};
|
|
5233
|
-
if (msg.data
|
|
5244
|
+
if (msg.data['64515'] !== undefined) {
|
|
5234
5245
|
result['min_brightness'] = utils.mapNumberRange(msg.data['64515'], 0, 1000, 1, 255);
|
|
5235
5246
|
}
|
|
5236
|
-
if (msg.data
|
|
5247
|
+
if (msg.data['64516'] !== undefined) {
|
|
5237
5248
|
result['max_brightness'] = utils.mapNumberRange(msg.data['64516'], 0, 1000, 1, 255);
|
|
5238
5249
|
}
|
|
5239
|
-
if (msg.data
|
|
5250
|
+
if (msg.data['61440'] !== undefined) {
|
|
5240
5251
|
const propertyName = utils.postfixWithEndpointName('brightness', msg, model, meta);
|
|
5241
5252
|
result[propertyName] = utils.mapNumberRange(msg.data['61440'], 0, 1000, 0, 255);
|
|
5242
5253
|
}
|
|
@@ -5248,7 +5259,7 @@ const converters2 = {
|
|
|
5248
5259
|
type: ['attributeReport', 'readResponse'],
|
|
5249
5260
|
convert: (model, msg, publish, options, meta) => {
|
|
5250
5261
|
const result = {};
|
|
5251
|
-
if (msg.data
|
|
5262
|
+
if (msg.data['64514'] !== undefined) {
|
|
5252
5263
|
const lookup = { 0: 'led', 1: 'incandescent', 2: 'halogen' };
|
|
5253
5264
|
result['light_type'] = lookup[msg.data['64514']];
|
|
5254
5265
|
}
|
|
@@ -5260,7 +5271,7 @@ const converters2 = {
|
|
|
5260
5271
|
type: ['attributeReport', 'readResponse'],
|
|
5261
5272
|
convert: (model, msg, publish, options, meta) => {
|
|
5262
5273
|
const result = {};
|
|
5263
|
-
if (msg.data
|
|
5274
|
+
if (msg.data['64514'] !== undefined) {
|
|
5264
5275
|
const lookup = { 0: 'momentary', 1: 'toggle', 2: 'state' };
|
|
5265
5276
|
const propertyName = utils.postfixWithEndpointName('switch_type', msg, model, meta);
|
|
5266
5277
|
result[propertyName] = lookup[msg.data['64514']];
|