zigbee-herdsman-converters 20.44.0 → 21.0.0-pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/converters/fromZigbee.d.ts +4 -6
- package/converters/fromZigbee.d.ts.map +1 -1
- package/converters/fromZigbee.js +3 -32
- package/converters/fromZigbee.js.map +1 -1
- package/converters/toZigbee.d.ts +1 -49
- package/converters/toZigbee.d.ts.map +1 -1
- package/converters/toZigbee.js +38 -46
- package/converters/toZigbee.js.map +1 -1
- package/devices/adeo.d.ts.map +1 -1
- package/devices/adeo.js +1 -2
- package/devices/adeo.js.map +1 -1
- package/devices/adurosmart.d.ts.map +1 -1
- package/devices/adurosmart.js +1 -2
- package/devices/adurosmart.js.map +1 -1
- package/devices/aeotec.js +1 -1
- package/devices/aeotec.js.map +1 -1
- package/devices/airam.d.ts.map +1 -1
- package/devices/airam.js +1 -13
- package/devices/airam.js.map +1 -1
- package/devices/amina.d.ts.map +1 -1
- package/devices/amina.js +1 -2
- package/devices/amina.js.map +1 -1
- package/devices/aurora_lighting.d.ts.map +1 -1
- package/devices/aurora_lighting.js +2 -3
- package/devices/aurora_lighting.js.map +1 -1
- package/devices/bitron.d.ts.map +1 -1
- package/devices/bitron.js +1 -2
- package/devices/bitron.js.map +1 -1
- package/devices/bosch.d.ts.map +1 -1
- package/devices/bosch.js +10 -9
- package/devices/bosch.js.map +1 -1
- package/devices/bticino.d.ts.map +1 -1
- package/devices/bticino.js +2 -3
- package/devices/bticino.js.map +1 -1
- package/devices/busch_jaeger.d.ts.map +1 -1
- package/devices/busch_jaeger.js +1 -11
- package/devices/busch_jaeger.js.map +1 -1
- package/devices/chacon.js +1 -1
- package/devices/chacon.js.map +1 -1
- package/devices/ctm.d.ts.map +1 -1
- package/devices/ctm.js +5 -8
- package/devices/ctm.js.map +1 -1
- package/devices/custom_devices_diy.d.ts.map +1 -1
- package/devices/custom_devices_diy.js +6 -10
- package/devices/custom_devices_diy.js.map +1 -1
- package/devices/danalock.d.ts.map +1 -1
- package/devices/danalock.js +1 -2
- package/devices/danalock.js.map +1 -1
- package/devices/danfoss.d.ts.map +1 -1
- package/devices/danfoss.js +1 -2
- package/devices/danfoss.js.map +1 -1
- package/devices/datek.d.ts.map +1 -1
- package/devices/datek.js +2 -5
- package/devices/datek.js.map +1 -1
- package/devices/develco.d.ts.map +1 -1
- package/devices/develco.js +19 -20
- package/devices/develco.js.map +1 -1
- package/devices/diyruz.d.ts.map +1 -1
- package/devices/diyruz.js +1 -2
- package/devices/diyruz.js.map +1 -1
- package/devices/dresden_elektronik.d.ts.map +1 -1
- package/devices/dresden_elektronik.js +3 -27
- package/devices/dresden_elektronik.js.map +1 -1
- package/devices/ecodim.d.ts.map +1 -1
- package/devices/ecodim.js +1 -2
- package/devices/ecodim.js.map +1 -1
- package/devices/ecozy.d.ts.map +1 -1
- package/devices/ecozy.js +1 -2
- package/devices/ecozy.js.map +1 -1
- package/devices/eurotronic.d.ts.map +1 -1
- package/devices/eurotronic.js +1 -2
- package/devices/eurotronic.js.map +1 -1
- package/devices/fantem.d.ts.map +1 -1
- package/devices/fantem.js +0 -1
- package/devices/fantem.js.map +1 -1
- package/devices/frient.js +1 -1
- package/devices/frient.js.map +1 -1
- package/devices/futurehome.d.ts.map +1 -1
- package/devices/futurehome.js +1 -2
- package/devices/futurehome.js.map +1 -1
- package/devices/gledopto.d.ts.map +1 -1
- package/devices/gledopto.js +30 -31
- package/devices/gledopto.js.map +1 -1
- package/devices/gmmts.d.ts.map +1 -1
- package/devices/gmmts.js +1 -2
- package/devices/gmmts.js.map +1 -1
- package/devices/heiman.d.ts.map +1 -1
- package/devices/heiman.js +3 -4
- package/devices/heiman.js.map +1 -1
- package/devices/heimgard_technologies.d.ts.map +1 -1
- package/devices/heimgard_technologies.js +5 -6
- package/devices/heimgard_technologies.js.map +1 -1
- package/devices/icasa.d.ts.map +1 -1
- package/devices/icasa.js +2 -25
- package/devices/icasa.js.map +1 -1
- package/devices/ikea.d.ts.map +1 -1
- package/devices/ikea.js +37 -51
- package/devices/ikea.js.map +1 -1
- package/devices/iluminize.d.ts.map +1 -1
- package/devices/iluminize.js +1 -2
- package/devices/iluminize.js.map +1 -1
- package/devices/immax.d.ts.map +1 -1
- package/devices/immax.js +3 -4
- package/devices/immax.js.map +1 -1
- package/devices/index.d.ts +1 -0
- package/devices/index.d.ts.map +1 -1
- package/devices/innr.d.ts.map +1 -1
- package/devices/innr.js +34 -35
- package/devices/innr.js.map +1 -1
- package/devices/inovelli.d.ts.map +1 -1
- package/devices/inovelli.js +3 -11
- package/devices/inovelli.js.map +1 -1
- package/devices/insta.d.ts.map +1 -1
- package/devices/insta.js +3 -12
- package/devices/insta.js.map +1 -1
- package/devices/javis.js +1 -1
- package/devices/javis.js.map +1 -1
- package/devices/jethome.d.ts.map +1 -1
- package/devices/jethome.js +1 -2
- package/devices/jethome.js.map +1 -1
- package/devices/kmpcil.d.ts.map +1 -1
- package/devices/kmpcil.js +1 -10
- package/devices/kmpcil.js.map +1 -1
- package/devices/konke.d.ts.map +1 -1
- package/devices/konke.js +2 -3
- package/devices/konke.js.map +1 -1
- package/devices/leedarson.d.ts.map +1 -1
- package/devices/leedarson.js +3 -11
- package/devices/leedarson.js.map +1 -1
- package/devices/legrand.d.ts.map +1 -1
- package/devices/legrand.js +30 -32
- package/devices/legrand.js.map +1 -1
- package/devices/leviton.d.ts.map +1 -1
- package/devices/leviton.js +1 -2
- package/devices/leviton.js.map +1 -1
- package/devices/lidl.d.ts.map +1 -1
- package/devices/lidl.js +1 -2
- package/devices/lidl.js.map +1 -1
- package/devices/lixee.d.ts.map +1 -1
- package/devices/lixee.js +1 -2
- package/devices/lixee.js.map +1 -1
- package/devices/lumi.d.ts.map +1 -1
- package/devices/lumi.js +19 -82
- package/devices/lumi.js.map +1 -1
- package/devices/lupus.d.ts.map +1 -1
- package/devices/lupus.js +3 -4
- package/devices/lupus.js.map +1 -1
- package/devices/lutron.d.ts.map +1 -1
- package/devices/lutron.js +7 -5
- package/devices/lutron.js.map +1 -1
- package/devices/lytko.d.ts.map +1 -1
- package/devices/lytko.js +6 -7
- package/devices/lytko.js.map +1 -1
- package/devices/meazon.d.ts.map +1 -1
- package/devices/meazon.js +2 -3
- package/devices/meazon.js.map +1 -1
- package/devices/moes.js +2 -2
- package/devices/moes.js.map +1 -1
- package/devices/muller_licht.d.ts.map +1 -1
- package/devices/muller_licht.js +5 -6
- package/devices/muller_licht.js.map +1 -1
- package/devices/namron.d.ts.map +1 -1
- package/devices/namron.js +17 -18
- package/devices/namron.js.map +1 -1
- package/devices/net2grid.d.ts.map +1 -1
- package/devices/net2grid.js +1 -2
- package/devices/net2grid.js.map +1 -1
- package/devices/nodon.d.ts.map +1 -1
- package/devices/nodon.js +13 -14
- package/devices/nodon.js.map +1 -1
- package/devices/nue_3a.d.ts.map +1 -1
- package/devices/nue_3a.js +3 -4
- package/devices/nue_3a.js.map +1 -1
- package/devices/osram.d.ts.map +1 -1
- package/devices/osram.js +20 -27
- package/devices/osram.js.map +1 -1
- package/devices/owon.d.ts.map +1 -1
- package/devices/owon.js +2 -3
- package/devices/owon.js.map +1 -1
- package/devices/perenio.d.ts.map +1 -1
- package/devices/perenio.js +3 -4
- package/devices/perenio.js.map +1 -1
- package/devices/philips.d.ts.map +1 -1
- package/devices/philips.js +10 -16
- package/devices/philips.js.map +1 -1
- package/devices/pushok.d.ts.map +1 -1
- package/devices/pushok.js +13 -11
- package/devices/pushok.js.map +1 -1
- package/devices/salus_controls.d.ts.map +1 -1
- package/devices/salus_controls.js +9 -10
- package/devices/salus_controls.js.map +1 -1
- package/devices/saswell.js +1 -1
- package/devices/schneider_electric.d.ts.map +1 -1
- package/devices/schneider_electric.js +14 -17
- package/devices/schneider_electric.js.map +1 -1
- package/devices/securifi.d.ts.map +1 -1
- package/devices/securifi.js +1 -2
- package/devices/securifi.js.map +1 -1
- package/devices/sengled.d.ts.map +1 -1
- package/devices/sengled.js +46 -27
- package/devices/sengled.js.map +1 -1
- package/devices/shinasystem.d.ts.map +1 -1
- package/devices/shinasystem.js +22 -23
- package/devices/shinasystem.js.map +1 -1
- package/devices/sinope.d.ts.map +1 -1
- package/devices/sinope.js +17 -19
- package/devices/sinope.js.map +1 -1
- package/devices/smartthings.d.ts.map +1 -1
- package/devices/smartthings.js +3 -10
- package/devices/smartthings.js.map +1 -1
- package/devices/sonoff.d.ts.map +1 -1
- package/devices/sonoff.js +14 -11
- package/devices/sonoff.js.map +1 -1
- package/devices/stelpro.d.ts.map +1 -1
- package/devices/stelpro.js +4 -5
- package/devices/stelpro.js.map +1 -1
- package/devices/sunricher.d.ts.map +1 -1
- package/devices/sunricher.js +1 -14
- package/devices/sunricher.js.map +1 -1
- package/devices/swann.d.ts.map +1 -1
- package/devices/swann.js +1 -2
- package/devices/swann.js.map +1 -1
- package/devices/sylvania.d.ts.map +1 -1
- package/devices/sylvania.js +2 -11
- package/devices/sylvania.js.map +1 -1
- package/devices/terncy.d.ts.map +1 -1
- package/devices/terncy.js +5 -7
- package/devices/terncy.js.map +1 -1
- package/devices/third_reality.d.ts.map +1 -1
- package/devices/third_reality.js +18 -19
- package/devices/third_reality.js.map +1 -1
- package/devices/tplink.js +1 -1
- package/devices/tplink.js.map +1 -1
- package/devices/trust.d.ts.map +1 -1
- package/devices/trust.js +1 -2
- package/devices/trust.js.map +1 -1
- package/devices/tuya.d.ts.map +1 -1
- package/devices/tuya.js +61 -63
- package/devices/tuya.js.map +1 -1
- package/devices/ubisys.d.ts.map +1 -1
- package/devices/ubisys.js +8 -9
- package/devices/ubisys.js.map +1 -1
- package/devices/uhome.d.ts.map +1 -1
- package/devices/uhome.js +1 -2
- package/devices/uhome.js.map +1 -1
- package/devices/viessmann.d.ts.map +1 -1
- package/devices/viessmann.js +1 -2
- package/devices/viessmann.js.map +1 -1
- package/devices/weiser.d.ts.map +1 -1
- package/devices/weiser.js +0 -2
- package/devices/weiser.js.map +1 -1
- package/devices/wirenboard.d.ts.map +1 -1
- package/devices/wirenboard.js +3 -4
- package/devices/wirenboard.js.map +1 -1
- package/devices/xyzroe.d.ts.map +1 -1
- package/devices/xyzroe.js +1 -4
- package/devices/xyzroe.js.map +1 -1
- package/devices/zen.d.ts.map +1 -1
- package/devices/zen.js +2 -4
- package/devices/zen.js.map +1 -1
- package/devices/zigbeetlc.d.ts +1 -0
- package/devices/zigbeetlc.d.ts.map +1 -1
- package/devices/zigbeetlc.js +3 -3
- package/devices/zigbeetlc.js.map +1 -1
- package/index.d.ts +4 -3
- package/index.d.ts.map +1 -1
- package/index.js +15 -13
- package/index.js.map +1 -1
- package/lib/exposes.d.ts +2 -5
- package/lib/exposes.d.ts.map +1 -1
- package/lib/exposes.js +4 -9
- package/lib/exposes.js.map +1 -1
- package/lib/ikea.d.ts +1 -49
- package/lib/ikea.d.ts.map +1 -1
- package/lib/ikea.js +3 -72
- package/lib/ikea.js.map +1 -1
- package/lib/ledvance.d.ts.map +1 -1
- package/lib/ledvance.js +5 -3
- package/lib/ledvance.js.map +1 -1
- package/lib/legacy.d.ts +182 -915
- package/lib/legacy.d.ts.map +1 -1
- package/lib/legacy.js +177 -1924
- package/lib/legacy.js.map +1 -1
- package/lib/lumi.d.ts +0 -142
- package/lib/lumi.d.ts.map +1 -1
- package/lib/lumi.js +7 -293
- package/lib/lumi.js.map +1 -1
- package/lib/modernExtend.d.ts +3 -7
- package/lib/modernExtend.d.ts.map +1 -1
- package/lib/modernExtend.js +4 -73
- package/lib/modernExtend.js.map +1 -1
- package/lib/ota.d.ts +71 -0
- package/lib/ota.d.ts.map +1 -0
- package/lib/ota.js +663 -0
- package/lib/ota.js.map +1 -0
- package/lib/philips.d.ts.map +1 -1
- package/lib/philips.js +2 -3
- package/lib/philips.js.map +1 -1
- package/lib/types.d.ts +41 -30
- package/lib/types.d.ts.map +1 -1
- package/lib/utils.d.ts +0 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +1 -7
- package/lib/utils.js.map +1 -1
- package/package.json +23 -9
- package/lib/ota/common.d.ts +0 -31
- package/lib/ota/common.d.ts.map +0 -1
- package/lib/ota/common.js +0 -630
- package/lib/ota/common.js.map +0 -1
- package/lib/ota/gmmts.d.ts +0 -8
- package/lib/ota/gmmts.d.ts.map +0 -1
- package/lib/ota/gmmts.js +0 -62
- package/lib/ota/gmmts.js.map +0 -1
- package/lib/ota/index.d.ts +0 -15
- package/lib/ota/index.d.ts.map +0 -1
- package/lib/ota/index.js +0 -48
- package/lib/ota/index.js.map +0 -1
- package/lib/ota/inovelli.d.ts +0 -8
- package/lib/ota/inovelli.d.ts.map +0 -1
- package/lib/ota/inovelli.js +0 -91
- package/lib/ota/inovelli.js.map +0 -1
- package/lib/ota/jethome.d.ts +0 -9
- package/lib/ota/jethome.d.ts.map +0 -1
- package/lib/ota/jethome.js +0 -92
- package/lib/ota/jethome.js.map +0 -1
- package/lib/ota/ledvance.d.ts +0 -11
- package/lib/ota/ledvance.d.ts.map +0 -1
- package/lib/ota/ledvance.js +0 -75
- package/lib/ota/ledvance.js.map +0 -1
- package/lib/ota/salus.d.ts +0 -11
- package/lib/ota/salus.d.ts.map +0 -1
- package/lib/ota/salus.js +0 -99
- package/lib/ota/salus.js.map +0 -1
- package/lib/ota/securifi.d.ts +0 -4
- package/lib/ota/securifi.d.ts.map +0 -1
- package/lib/ota/securifi.js +0 -48
- package/lib/ota/securifi.js.map +0 -1
- package/lib/ota/tradfri.d.ts +0 -13
- package/lib/ota/tradfri.d.ts.map +0 -1
- package/lib/ota/tradfri.js +0 -72
- package/lib/ota/tradfri.js.map +0 -1
- package/lib/ota/ubisys.d.ts +0 -20
- package/lib/ota/ubisys.d.ts.map +0 -1
- package/lib/ota/ubisys.js +0 -93
- package/lib/ota/ubisys.js.map +0 -1
- package/lib/ota/zigbeeOTA.d.ts +0 -12
- package/lib/ota/zigbeeOTA.d.ts.map +0 -1
- package/lib/ota/zigbeeOTA.js +0 -143
- package/lib/ota/zigbeeOTA.js.map +0 -1
package/lib/lumi.d.ts
CHANGED
|
@@ -256,7 +256,6 @@ export declare const fromZigbee: {
|
|
|
256
256
|
lumi_action: {
|
|
257
257
|
cluster: string;
|
|
258
258
|
type: string[];
|
|
259
|
-
options: exposes.Binary[];
|
|
260
259
|
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
261
260
|
action: any;
|
|
262
261
|
};
|
|
@@ -301,7 +300,6 @@ export declare const fromZigbee: {
|
|
|
301
300
|
lumi_action_analog: {
|
|
302
301
|
cluster: string;
|
|
303
302
|
type: string[];
|
|
304
|
-
options: exposes.Binary[];
|
|
305
303
|
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => KeyValueAny;
|
|
306
304
|
};
|
|
307
305
|
lumi_temperature: {
|
|
@@ -478,7 +476,6 @@ export declare const fromZigbee: {
|
|
|
478
476
|
lumi_door_lock_report: {
|
|
479
477
|
cluster: string;
|
|
480
478
|
type: string[];
|
|
481
|
-
options: exposes.Binary[];
|
|
482
479
|
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => KeyValueAny;
|
|
483
480
|
};
|
|
484
481
|
lumi_action_on: {
|
|
@@ -505,10 +502,8 @@ export declare const fromZigbee: {
|
|
|
505
502
|
lumi_action_stop: {
|
|
506
503
|
cluster: string;
|
|
507
504
|
type: string;
|
|
508
|
-
options: exposes.Binary[];
|
|
509
505
|
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
510
506
|
action: string;
|
|
511
|
-
duration: number;
|
|
512
507
|
action_duration: number;
|
|
513
508
|
};
|
|
514
509
|
};
|
|
@@ -529,7 +524,6 @@ export declare const fromZigbee: {
|
|
|
529
524
|
lumi_action_move_color_temp: {
|
|
530
525
|
cluster: string;
|
|
531
526
|
type: string;
|
|
532
|
-
options: exposes.Binary[];
|
|
533
527
|
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
534
528
|
action: string;
|
|
535
529
|
duration: number;
|
|
@@ -956,140 +950,4 @@ export declare const toZigbee: {
|
|
|
956
950
|
}>;
|
|
957
951
|
};
|
|
958
952
|
};
|
|
959
|
-
export declare const legacyFromZigbee: {
|
|
960
|
-
WXKG01LM_click: {
|
|
961
|
-
cluster: string;
|
|
962
|
-
type: string[];
|
|
963
|
-
options: exposes.Binary[];
|
|
964
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => void;
|
|
965
|
-
};
|
|
966
|
-
WXKG11LM_click: {
|
|
967
|
-
cluster: string;
|
|
968
|
-
type: string[];
|
|
969
|
-
options: exposes.Binary[];
|
|
970
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
971
|
-
click: any;
|
|
972
|
-
};
|
|
973
|
-
};
|
|
974
|
-
lumi_action_click_multistate: {
|
|
975
|
-
cluster: string;
|
|
976
|
-
type: string[];
|
|
977
|
-
options: exposes.Binary[];
|
|
978
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => any;
|
|
979
|
-
};
|
|
980
|
-
WXKG12LM_action_click_multistate: {
|
|
981
|
-
cluster: string;
|
|
982
|
-
type: string[];
|
|
983
|
-
options: exposes.Binary[];
|
|
984
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => any;
|
|
985
|
-
};
|
|
986
|
-
WXKG03LM_click: {
|
|
987
|
-
cluster: string;
|
|
988
|
-
type: string[];
|
|
989
|
-
options: exposes.Binary[];
|
|
990
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
991
|
-
click: string;
|
|
992
|
-
};
|
|
993
|
-
};
|
|
994
|
-
WXKG02LM_click: {
|
|
995
|
-
cluster: string;
|
|
996
|
-
type: string[];
|
|
997
|
-
options: exposes.Binary[];
|
|
998
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
999
|
-
click: any;
|
|
1000
|
-
};
|
|
1001
|
-
};
|
|
1002
|
-
WXKG02LM_click_multistate: {
|
|
1003
|
-
cluster: string;
|
|
1004
|
-
type: string[];
|
|
1005
|
-
options: exposes.Binary[];
|
|
1006
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
1007
|
-
click: string;
|
|
1008
|
-
};
|
|
1009
|
-
};
|
|
1010
|
-
QBKG04LM_QBKG11LM_click: {
|
|
1011
|
-
cluster: string;
|
|
1012
|
-
type: string[];
|
|
1013
|
-
options: exposes.Binary[];
|
|
1014
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
1015
|
-
click: string;
|
|
1016
|
-
};
|
|
1017
|
-
};
|
|
1018
|
-
QBKG11LM_click: {
|
|
1019
|
-
cluster: string;
|
|
1020
|
-
type: string[];
|
|
1021
|
-
options: exposes.Binary[];
|
|
1022
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
1023
|
-
click: any;
|
|
1024
|
-
};
|
|
1025
|
-
};
|
|
1026
|
-
QBKG03LM_QBKG12LM_click: {
|
|
1027
|
-
cluster: string;
|
|
1028
|
-
type: string[];
|
|
1029
|
-
options: exposes.Binary[];
|
|
1030
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
1031
|
-
click: any;
|
|
1032
|
-
};
|
|
1033
|
-
};
|
|
1034
|
-
QBKG03LM_buttons: {
|
|
1035
|
-
cluster: string;
|
|
1036
|
-
type: string[];
|
|
1037
|
-
options: exposes.Binary[];
|
|
1038
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => KeyValueAny;
|
|
1039
|
-
};
|
|
1040
|
-
QBKG12LM_click: {
|
|
1041
|
-
cluster: string;
|
|
1042
|
-
type: string[];
|
|
1043
|
-
options: exposes.Binary[];
|
|
1044
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
1045
|
-
click: string;
|
|
1046
|
-
};
|
|
1047
|
-
};
|
|
1048
|
-
lumi_on_off_action: {
|
|
1049
|
-
cluster: string;
|
|
1050
|
-
type: string[];
|
|
1051
|
-
options: exposes.Binary[];
|
|
1052
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
1053
|
-
action: any;
|
|
1054
|
-
};
|
|
1055
|
-
};
|
|
1056
|
-
lumi_multistate_action: {
|
|
1057
|
-
cluster: string;
|
|
1058
|
-
type: string[];
|
|
1059
|
-
options: exposes.Binary[];
|
|
1060
|
-
convert: (model: Definition, msg: Fz.Message, publish: import("./types").Publish, options: KeyValue, meta: Fz.Meta) => {
|
|
1061
|
-
action: string;
|
|
1062
|
-
side: number;
|
|
1063
|
-
action_from_side?: undefined;
|
|
1064
|
-
action_to_side?: undefined;
|
|
1065
|
-
action_side?: undefined;
|
|
1066
|
-
from_side?: undefined;
|
|
1067
|
-
to_side?: undefined;
|
|
1068
|
-
} | {
|
|
1069
|
-
action: string;
|
|
1070
|
-
action_from_side: number;
|
|
1071
|
-
action_to_side: number;
|
|
1072
|
-
action_side: number;
|
|
1073
|
-
from_side: number;
|
|
1074
|
-
to_side: number;
|
|
1075
|
-
side: number;
|
|
1076
|
-
} | {
|
|
1077
|
-
action: string;
|
|
1078
|
-
side: number;
|
|
1079
|
-
action_from_side: number;
|
|
1080
|
-
action_to_side?: undefined;
|
|
1081
|
-
action_side?: undefined;
|
|
1082
|
-
from_side?: undefined;
|
|
1083
|
-
to_side?: undefined;
|
|
1084
|
-
} | {
|
|
1085
|
-
action: any;
|
|
1086
|
-
side?: undefined;
|
|
1087
|
-
action_from_side?: undefined;
|
|
1088
|
-
action_to_side?: undefined;
|
|
1089
|
-
action_side?: undefined;
|
|
1090
|
-
from_side?: undefined;
|
|
1091
|
-
to_side?: undefined;
|
|
1092
|
-
};
|
|
1093
|
-
};
|
|
1094
|
-
};
|
|
1095
953
|
//# sourceMappingURL=lumi.d.ts.map
|
package/lib/lumi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lumi.d.ts","sourceRoot":"","sources":["../src/lib/lumi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"lumi.d.ts","sourceRoot":"","sources":["../src/lib/lumi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EACH,oBAAoB,EACpB,uBAAuB,EAEvB,UAAU,EAEV,EAAE,EACF,QAAQ,EACR,WAAW,EAEX,YAAY,EAGZ,EAAE,EACL,MAAM,SAAS,CAAC;AA0BjB,OAAO,MAAM,GAAG,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEzE,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,EAAE,sBAAsB,EAAE,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,UAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mGA4rCyB,WAAW;;;;;;;CA6G1D,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAojDpB,CAAC"}
|
package/lib/lumi.js
CHANGED
|
@@ -26,17 +26,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.toZigbee = exports.fromZigbee = exports.modernExtend = exports.lumiModernExtend = exports.manufacturerCode = exports.trv = exports.presence = exports.numericAttributes2Payload = exports.buffer2DataObject = void 0;
|
|
30
30
|
const node_buffer_1 = require("node:buffer");
|
|
31
31
|
const fromZigbee_1 = __importDefault(require("../converters/fromZigbee"));
|
|
32
32
|
const exposes = __importStar(require("./exposes"));
|
|
33
33
|
const logger_1 = require("./logger");
|
|
34
34
|
const modernExtend = __importStar(require("./modernExtend"));
|
|
35
|
-
const ota = __importStar(require("./ota"));
|
|
36
35
|
const globalStore = __importStar(require("./store"));
|
|
37
36
|
const utils_1 = require("./utils");
|
|
38
37
|
const NS = 'zhc:lumi';
|
|
39
|
-
const legacyFromZigbeeStore = {};
|
|
40
38
|
const e = exposes.presets;
|
|
41
39
|
const ea = exposes.access;
|
|
42
40
|
const buffer2DataObject = (model, buffer) => {
|
|
@@ -249,8 +247,6 @@ const numericAttributes2Payload = async (msg, meta, model, options, dataObject)
|
|
|
249
247
|
if (['RTCGQ11LM'].includes(model.model)) {
|
|
250
248
|
(0, utils_1.assertNumber)(value);
|
|
251
249
|
payload.illuminance = value;
|
|
252
|
-
// DEPRECATED: remove illuminance_lux here.
|
|
253
|
-
payload.illuminance_lux = value;
|
|
254
250
|
}
|
|
255
251
|
break;
|
|
256
252
|
case '12':
|
|
@@ -340,9 +336,8 @@ const numericAttributes2Payload = async (msg, meta, model, options, dataObject)
|
|
|
340
336
|
payload.smoke_density = value;
|
|
341
337
|
}
|
|
342
338
|
else if (['GZCGQ01LM'].includes(model.model)) {
|
|
343
|
-
// DEPRECATED: change illuminance_lux -> illuminance
|
|
344
339
|
(0, utils_1.assertNumber)(value);
|
|
345
|
-
payload.
|
|
340
|
+
payload.illuminance = value;
|
|
346
341
|
}
|
|
347
342
|
else {
|
|
348
343
|
payload.state = value === 1 ? 'ON' : 'OFF';
|
|
@@ -866,7 +861,7 @@ const numericAttributes2Payload = async (msg, meta, model, options, dataObject)
|
|
|
866
861
|
case '1065':
|
|
867
862
|
if (['ZNCLBL01LM'].includes(model.model)) {
|
|
868
863
|
(0, utils_1.assertNumber)(value);
|
|
869
|
-
payload.
|
|
864
|
+
payload.illuminance = value * 50;
|
|
870
865
|
}
|
|
871
866
|
break;
|
|
872
867
|
case '1289':
|
|
@@ -1715,7 +1710,7 @@ exports.lumiModernExtend = {
|
|
|
1715
1710
|
endpointID: 1,
|
|
1716
1711
|
outputClusters: ['genOta'],
|
|
1717
1712
|
});
|
|
1718
|
-
result.ota =
|
|
1713
|
+
result.ota = true;
|
|
1719
1714
|
return result;
|
|
1720
1715
|
},
|
|
1721
1716
|
lumiPower: (args) => modernExtend.numeric({
|
|
@@ -2198,7 +2193,6 @@ exports.fromZigbee = {
|
|
|
2198
2193
|
lumi_action: {
|
|
2199
2194
|
cluster: 'genOnOff',
|
|
2200
2195
|
type: ['attributeReport'],
|
|
2201
|
-
options: [exposes.options.legacy()],
|
|
2202
2196
|
convert: (model, msg, publish, options, meta) => {
|
|
2203
2197
|
if (['QBKG04LM', 'QBKG11LM', 'QBKG21LM', 'QBKG03LM', 'QBKG12LM', 'QBKG22LM'].includes(model.model) && msg.data['61440']) {
|
|
2204
2198
|
return;
|
|
@@ -2225,7 +2219,7 @@ exports.fromZigbee = {
|
|
|
2225
2219
|
if (['WXKG02LM_rev1', 'WXKG02LM_rev2', 'WXKG07LM'].includes(model.model))
|
|
2226
2220
|
mapping = { 1: 'left', 2: 'right', 3: 'both' };
|
|
2227
2221
|
// Maybe other QKBG also support release/hold?
|
|
2228
|
-
const actionLookup =
|
|
2222
|
+
const actionLookup = ['QBKG03LM', 'QBKG22LM', 'QBKG04LM', 'QBKG21LM'].includes(model.model)
|
|
2229
2223
|
? { 0: 'hold', 1: 'release', 2: 'double' }
|
|
2230
2224
|
: { 0: 'single', 1: 'single' };
|
|
2231
2225
|
const action = actionLookup[msg.data['onOff']];
|
|
@@ -2293,10 +2287,6 @@ exports.fromZigbee = {
|
|
|
2293
2287
|
side: value % 8,
|
|
2294
2288
|
};
|
|
2295
2289
|
}
|
|
2296
|
-
if (result && !(0, utils_1.isLegacyEnabled)(options)) {
|
|
2297
|
-
delete result.to_side;
|
|
2298
|
-
delete result.from_side;
|
|
2299
|
-
}
|
|
2300
2290
|
return result ? result : null;
|
|
2301
2291
|
}
|
|
2302
2292
|
if (model.model === 'CTP-R01') {
|
|
@@ -2404,7 +2394,6 @@ exports.fromZigbee = {
|
|
|
2404
2394
|
lumi_action_analog: {
|
|
2405
2395
|
cluster: 'genAnalogInput',
|
|
2406
2396
|
type: ['attributeReport', 'readResponse'],
|
|
2407
|
-
options: [exposes.options.legacy()],
|
|
2408
2397
|
convert: (model, msg, publish, options, meta) => {
|
|
2409
2398
|
if (model.model === 'MFKZQ01LM') {
|
|
2410
2399
|
/*
|
|
@@ -2417,8 +2406,6 @@ exports.fromZigbee = {
|
|
|
2417
2406
|
angle: Math.floor(value * 100) / 100,
|
|
2418
2407
|
action_angle: Math.floor(value * 100) / 100,
|
|
2419
2408
|
};
|
|
2420
|
-
if (!(0, utils_1.isLegacyEnabled)(options))
|
|
2421
|
-
delete result.angle;
|
|
2422
2409
|
return result;
|
|
2423
2410
|
}
|
|
2424
2411
|
if (model.model === 'CTP-R01') {
|
|
@@ -2568,7 +2555,7 @@ exports.fromZigbee = {
|
|
|
2568
2555
|
result['valve_detection'] = (0, utils_1.getFromLookup)(value, { 1: true, 0: false });
|
|
2569
2556
|
break;
|
|
2570
2557
|
case 0x0277:
|
|
2571
|
-
result['child_lock'] = (0, utils_1.getFromLookup)(value, { 1:
|
|
2558
|
+
result['child_lock'] = (0, utils_1.getFromLookup)(value, { 1: 'LOCK', 0: 'UNLOCK' });
|
|
2572
2559
|
break;
|
|
2573
2560
|
case 0x0279:
|
|
2574
2561
|
(0, utils_1.assertNumber)(value);
|
|
@@ -2949,10 +2936,8 @@ exports.fromZigbee = {
|
|
|
2949
2936
|
msg.data.occupancy = 1;
|
|
2950
2937
|
const payload = fromZigbee_1.default.occupancy_with_timeout.convert(model, msg, publish, options, meta);
|
|
2951
2938
|
if (payload) {
|
|
2952
|
-
// DEPRECATED: remove illuminance_lux here.
|
|
2953
2939
|
const illuminance = msg.data['measuredValue'];
|
|
2954
2940
|
payload.illuminance = illuminance;
|
|
2955
|
-
payload.illuminance_lux = illuminance;
|
|
2956
2941
|
}
|
|
2957
2942
|
return payload;
|
|
2958
2943
|
},
|
|
@@ -3042,7 +3027,6 @@ exports.fromZigbee = {
|
|
|
3042
3027
|
lumi_door_lock_report: {
|
|
3043
3028
|
cluster: 'closuresDoorLock',
|
|
3044
3029
|
type: ['attributeReport', 'readResponse'],
|
|
3045
|
-
options: [exposes.options.legacy()],
|
|
3046
3030
|
convert: (model, msg, publish, options, meta) => {
|
|
3047
3031
|
const result = {};
|
|
3048
3032
|
const lockStatusLookup = {
|
|
@@ -3102,17 +3086,9 @@ exports.fromZigbee = {
|
|
|
3102
3086
|
const data = msg.data['65281']['1'].toString(16);
|
|
3103
3087
|
const command = data.substr(0, 1); // 1 add, 2 delete
|
|
3104
3088
|
const userId = data.substr(5, 2);
|
|
3105
|
-
result.data = data;
|
|
3106
3089
|
result.action = lockStatusLookup[6 + parseInt(command, 16)];
|
|
3107
3090
|
result.action_user = parseInt(userId, 16);
|
|
3108
3091
|
}
|
|
3109
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
3110
|
-
result.repeat = result.action_repeat;
|
|
3111
|
-
result.user = result.action_user;
|
|
3112
|
-
}
|
|
3113
|
-
else {
|
|
3114
|
-
delete result.data;
|
|
3115
|
-
}
|
|
3116
3092
|
}
|
|
3117
3093
|
if (['ZNMS12LM', 'ZNMS13LM'].includes(model.model)) {
|
|
3118
3094
|
if (msg.data['65526']) {
|
|
@@ -3227,10 +3203,6 @@ exports.fromZigbee = {
|
|
|
3227
3203
|
const langId = data.substr(6, 2); // 1 chinese, 2: english
|
|
3228
3204
|
result.action = lockStatusLookup[14] + (langId === '2' ? '_english' : '_chinese');
|
|
3229
3205
|
}
|
|
3230
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
3231
|
-
result.repeat = result.action_repeat;
|
|
3232
|
-
result.user = result.action_user;
|
|
3233
|
-
}
|
|
3234
3206
|
}
|
|
3235
3207
|
return result;
|
|
3236
3208
|
},
|
|
@@ -3266,16 +3238,13 @@ exports.fromZigbee = {
|
|
|
3266
3238
|
lumi_action_stop: {
|
|
3267
3239
|
cluster: 'genLevelCtrl',
|
|
3268
3240
|
type: 'commandStop',
|
|
3269
|
-
options: [exposes.options.legacy()],
|
|
3270
3241
|
convert: (model, msg, publish, options, meta) => {
|
|
3271
3242
|
if ((0, utils_1.hasAlreadyProcessedMessage)(msg, model))
|
|
3272
3243
|
return;
|
|
3273
3244
|
if (globalStore.hasValue(msg.endpoint, 'button')) {
|
|
3274
3245
|
const value = globalStore.getValue(msg.endpoint, 'button');
|
|
3275
3246
|
const duration = Date.now() - value.start;
|
|
3276
|
-
const payload = { action: `button_${value.button}_release`,
|
|
3277
|
-
if (!(0, utils_1.isLegacyEnabled)(options))
|
|
3278
|
-
delete payload.duration;
|
|
3247
|
+
const payload = { action: `button_${value.button}_release`, action_duration: duration };
|
|
3279
3248
|
return payload;
|
|
3280
3249
|
}
|
|
3281
3250
|
},
|
|
@@ -3312,7 +3281,6 @@ exports.fromZigbee = {
|
|
|
3312
3281
|
lumi_action_move_color_temp: {
|
|
3313
3282
|
cluster: 'lightingColorCtrl',
|
|
3314
3283
|
type: 'commandMoveColorTemp',
|
|
3315
|
-
options: [exposes.options.legacy()],
|
|
3316
3284
|
convert: (model, msg, publish, options, meta) => {
|
|
3317
3285
|
if ((0, utils_1.hasAlreadyProcessedMessage)(msg, model))
|
|
3318
3286
|
return;
|
|
@@ -3322,8 +3290,6 @@ exports.fromZigbee = {
|
|
|
3322
3290
|
const button = globalStore.getValue(msg.endpoint, 'button').button;
|
|
3323
3291
|
const duration = Date.now() - globalStore.getValue(msg.endpoint, 'button').start;
|
|
3324
3292
|
result = { action: `button_${button}_release`, duration, action_duration: duration };
|
|
3325
|
-
if (!(0, utils_1.isLegacyEnabled)(options))
|
|
3326
|
-
delete result.duration;
|
|
3327
3293
|
}
|
|
3328
3294
|
else {
|
|
3329
3295
|
const button = msg.data.movemode === 3 ? '6' : '5';
|
|
@@ -4987,258 +4953,6 @@ exports.toZigbee = {
|
|
|
4987
4953
|
},
|
|
4988
4954
|
},
|
|
4989
4955
|
};
|
|
4990
|
-
exports.legacyFromZigbee = {
|
|
4991
|
-
WXKG01LM_click: {
|
|
4992
|
-
cluster: 'genOnOff',
|
|
4993
|
-
type: ['attributeReport', 'readResponse'],
|
|
4994
|
-
options: [exposes.options.legacy()],
|
|
4995
|
-
convert: (model, msg, publish, options, meta) => {
|
|
4996
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
4997
|
-
const deviceID = msg.device.ieeeAddr;
|
|
4998
|
-
const state = msg.data['onOff'];
|
|
4999
|
-
const key = `${deviceID}_legacy`;
|
|
5000
|
-
if (!legacyFromZigbeeStore[key]) {
|
|
5001
|
-
legacyFromZigbeeStore[key] = {};
|
|
5002
|
-
}
|
|
5003
|
-
const current = msg.meta.zclTransactionSequenceNumber;
|
|
5004
|
-
if (legacyFromZigbeeStore[key].transaction === current)
|
|
5005
|
-
return;
|
|
5006
|
-
legacyFromZigbeeStore[key].transaction = current;
|
|
5007
|
-
// 0 = click down, 1 = click up, else = multiple clicks
|
|
5008
|
-
if (state === 0) {
|
|
5009
|
-
legacyFromZigbeeStore[key].timer = setTimeout(() => {
|
|
5010
|
-
publish({ click: 'long' });
|
|
5011
|
-
legacyFromZigbeeStore[key].timer = null;
|
|
5012
|
-
legacyFromZigbeeStore[key].long = Date.now();
|
|
5013
|
-
legacyFromZigbeeStore[key].long_timer = setTimeout(() => {
|
|
5014
|
-
legacyFromZigbeeStore[key].long = false;
|
|
5015
|
-
}, 4000); // After 4000 milliseconds of not receiving long_release we assume it will not happen.
|
|
5016
|
-
// @ts-expect-error ignore
|
|
5017
|
-
}, options.long_timeout || 1000); // After 1000 milliseconds of not releasing we assume long click.
|
|
5018
|
-
}
|
|
5019
|
-
else if (state === 1) {
|
|
5020
|
-
if (legacyFromZigbeeStore[key].long) {
|
|
5021
|
-
const duration = Date.now() - legacyFromZigbeeStore[key].long;
|
|
5022
|
-
publish({ click: 'long_release', duration: duration });
|
|
5023
|
-
legacyFromZigbeeStore[key].long = false;
|
|
5024
|
-
}
|
|
5025
|
-
if (legacyFromZigbeeStore[key].timer) {
|
|
5026
|
-
clearTimeout(legacyFromZigbeeStore[key].timer);
|
|
5027
|
-
legacyFromZigbeeStore[key].timer = null;
|
|
5028
|
-
publish({ click: 'single' });
|
|
5029
|
-
}
|
|
5030
|
-
}
|
|
5031
|
-
else {
|
|
5032
|
-
const clicks = msg.data['32768'];
|
|
5033
|
-
const actionLookup = { 1: 'single', 2: 'double', 3: 'triple', 4: 'quadruple' };
|
|
5034
|
-
const payload = actionLookup[clicks] ? actionLookup[clicks] : 'many';
|
|
5035
|
-
publish({ click: payload });
|
|
5036
|
-
}
|
|
5037
|
-
}
|
|
5038
|
-
},
|
|
5039
|
-
},
|
|
5040
|
-
WXKG11LM_click: {
|
|
5041
|
-
cluster: 'genOnOff',
|
|
5042
|
-
type: ['attributeReport', 'readResponse'],
|
|
5043
|
-
options: [exposes.options.legacy()],
|
|
5044
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5045
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5046
|
-
const data = msg.data;
|
|
5047
|
-
let clicks;
|
|
5048
|
-
if (data.onOff) {
|
|
5049
|
-
clicks = 1;
|
|
5050
|
-
}
|
|
5051
|
-
else if (data['32768']) {
|
|
5052
|
-
clicks = data['32768'];
|
|
5053
|
-
}
|
|
5054
|
-
const actionLookup = { 1: 'single', 2: 'double', 3: 'triple', 4: 'quadruple' };
|
|
5055
|
-
if (actionLookup[clicks]) {
|
|
5056
|
-
return { click: actionLookup[clicks] };
|
|
5057
|
-
}
|
|
5058
|
-
}
|
|
5059
|
-
},
|
|
5060
|
-
},
|
|
5061
|
-
lumi_action_click_multistate: {
|
|
5062
|
-
cluster: 'genMultistateInput',
|
|
5063
|
-
type: ['attributeReport', 'readResponse'],
|
|
5064
|
-
options: [exposes.options.legacy()],
|
|
5065
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5066
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5067
|
-
const value = msg.data['presentValue'];
|
|
5068
|
-
const lookup = {
|
|
5069
|
-
1: { click: 'single' }, // single click
|
|
5070
|
-
2: { click: 'double' }, // double click
|
|
5071
|
-
};
|
|
5072
|
-
return lookup[value] ? lookup[value] : null;
|
|
5073
|
-
}
|
|
5074
|
-
},
|
|
5075
|
-
},
|
|
5076
|
-
WXKG12LM_action_click_multistate: {
|
|
5077
|
-
cluster: 'genMultistateInput',
|
|
5078
|
-
type: ['attributeReport', 'readResponse'],
|
|
5079
|
-
options: [exposes.options.legacy()],
|
|
5080
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5081
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5082
|
-
const value = msg.data['presentValue'];
|
|
5083
|
-
const lookup = {
|
|
5084
|
-
1: { click: 'single' }, // single click
|
|
5085
|
-
2: { click: 'double' }, // double click
|
|
5086
|
-
};
|
|
5087
|
-
return lookup[value] ? lookup[value] : null;
|
|
5088
|
-
}
|
|
5089
|
-
},
|
|
5090
|
-
},
|
|
5091
|
-
WXKG03LM_click: {
|
|
5092
|
-
cluster: 'genOnOff',
|
|
5093
|
-
type: ['attributeReport', 'readResponse'],
|
|
5094
|
-
options: [exposes.options.legacy()],
|
|
5095
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5096
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5097
|
-
return { click: 'single' };
|
|
5098
|
-
}
|
|
5099
|
-
},
|
|
5100
|
-
},
|
|
5101
|
-
WXKG02LM_click: {
|
|
5102
|
-
cluster: 'genOnOff',
|
|
5103
|
-
type: ['attributeReport', 'readResponse'],
|
|
5104
|
-
options: [exposes.options.legacy()],
|
|
5105
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5106
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5107
|
-
const lookup = { 1: 'left', 2: 'right', 3: 'both' };
|
|
5108
|
-
return { click: lookup[msg.endpoint.ID] };
|
|
5109
|
-
}
|
|
5110
|
-
},
|
|
5111
|
-
},
|
|
5112
|
-
WXKG02LM_click_multistate: {
|
|
5113
|
-
cluster: 'genMultistateInput',
|
|
5114
|
-
type: ['attributeReport', 'readResponse'],
|
|
5115
|
-
options: [exposes.options.legacy()],
|
|
5116
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5117
|
-
// Somestime WXKG02LM sends multiple messages on a single click, this prevents handling
|
|
5118
|
-
// of a message with the same transaction sequence number twice.
|
|
5119
|
-
const current = msg.meta.zclTransactionSequenceNumber;
|
|
5120
|
-
if (legacyFromZigbeeStore[msg.device.ieeeAddr + 'legacy'] === current)
|
|
5121
|
-
return;
|
|
5122
|
-
legacyFromZigbeeStore[msg.device.ieeeAddr + 'legacy'] = current;
|
|
5123
|
-
const buttonLookup = { 1: 'left', 2: 'right', 3: 'both' };
|
|
5124
|
-
const button = buttonLookup[msg.endpoint.ID];
|
|
5125
|
-
const value = msg.data['presentValue'];
|
|
5126
|
-
const actionLookup = {
|
|
5127
|
-
0: 'long',
|
|
5128
|
-
1: null,
|
|
5129
|
-
2: 'double',
|
|
5130
|
-
};
|
|
5131
|
-
const action = actionLookup[value];
|
|
5132
|
-
if (button) {
|
|
5133
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5134
|
-
return { click: button + (action ? `_${action}` : '') };
|
|
5135
|
-
}
|
|
5136
|
-
}
|
|
5137
|
-
},
|
|
5138
|
-
},
|
|
5139
|
-
QBKG04LM_QBKG11LM_click: {
|
|
5140
|
-
cluster: 'genOnOff',
|
|
5141
|
-
type: ['attributeReport'],
|
|
5142
|
-
options: [exposes.options.legacy()],
|
|
5143
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5144
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5145
|
-
if (!msg.data['61440']) {
|
|
5146
|
-
return { click: 'single' };
|
|
5147
|
-
}
|
|
5148
|
-
}
|
|
5149
|
-
},
|
|
5150
|
-
},
|
|
5151
|
-
QBKG11LM_click: {
|
|
5152
|
-
cluster: 'genMultistateInput',
|
|
5153
|
-
type: ['attributeReport', 'readResponse'],
|
|
5154
|
-
options: [exposes.options.legacy()],
|
|
5155
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5156
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5157
|
-
if ([1, 2].includes(msg.data.presentValue)) {
|
|
5158
|
-
const times = { 1: 'single', 2: 'double' };
|
|
5159
|
-
return { click: times[msg.data.presentValue] };
|
|
5160
|
-
}
|
|
5161
|
-
}
|
|
5162
|
-
},
|
|
5163
|
-
},
|
|
5164
|
-
QBKG03LM_QBKG12LM_click: {
|
|
5165
|
-
cluster: 'genOnOff',
|
|
5166
|
-
type: ['attributeReport'],
|
|
5167
|
-
options: [exposes.options.legacy()],
|
|
5168
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5169
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5170
|
-
if (!msg.data['61440']) {
|
|
5171
|
-
const mapping = { 4: 'left', 5: 'right', 6: 'both' };
|
|
5172
|
-
const button = mapping[msg.endpoint.ID];
|
|
5173
|
-
return { click: button };
|
|
5174
|
-
}
|
|
5175
|
-
}
|
|
5176
|
-
},
|
|
5177
|
-
},
|
|
5178
|
-
QBKG03LM_buttons: {
|
|
5179
|
-
cluster: 'genOnOff',
|
|
5180
|
-
type: ['attributeReport'],
|
|
5181
|
-
options: [exposes.options.legacy()],
|
|
5182
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5183
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5184
|
-
const mapping = { 4: 'left', 5: 'right' };
|
|
5185
|
-
const button = mapping[msg.endpoint.ID];
|
|
5186
|
-
if (button) {
|
|
5187
|
-
const payload = {};
|
|
5188
|
-
payload[`button_${button}`] = msg.data['onOff'] === 1 ? 'release' : 'hold';
|
|
5189
|
-
return payload;
|
|
5190
|
-
}
|
|
5191
|
-
}
|
|
5192
|
-
},
|
|
5193
|
-
},
|
|
5194
|
-
QBKG12LM_click: {
|
|
5195
|
-
cluster: 'genMultistateInput',
|
|
5196
|
-
type: ['attributeReport', 'readResponse'],
|
|
5197
|
-
options: [exposes.options.legacy()],
|
|
5198
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5199
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5200
|
-
if ([1, 2].includes(msg.data.presentValue)) {
|
|
5201
|
-
const mapping = { 5: 'left', 6: 'right', 7: 'both' };
|
|
5202
|
-
const times = { 1: 'single', 2: 'double' };
|
|
5203
|
-
const button = mapping[msg.endpoint.ID];
|
|
5204
|
-
return { click: `${button}_${times[msg.data.presentValue]}` };
|
|
5205
|
-
}
|
|
5206
|
-
}
|
|
5207
|
-
},
|
|
5208
|
-
},
|
|
5209
|
-
lumi_on_off_action: {
|
|
5210
|
-
cluster: 'genOnOff',
|
|
5211
|
-
type: ['attributeReport'],
|
|
5212
|
-
options: [exposes.options.legacy()],
|
|
5213
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5214
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5215
|
-
return { action: (0, utils_1.getKey)(model.endpoint(msg.device), msg.endpoint.ID) };
|
|
5216
|
-
}
|
|
5217
|
-
else {
|
|
5218
|
-
return exports.fromZigbee.lumi_action.convert(model, msg, publish, options, meta);
|
|
5219
|
-
}
|
|
5220
|
-
},
|
|
5221
|
-
},
|
|
5222
|
-
lumi_multistate_action: {
|
|
5223
|
-
cluster: 'genMultistateInput',
|
|
5224
|
-
type: ['attributeReport', 'readResponse'],
|
|
5225
|
-
options: [exposes.options.legacy()],
|
|
5226
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5227
|
-
if ((0, utils_1.isLegacyEnabled)(options)) {
|
|
5228
|
-
const button = (0, utils_1.getKey)(model.endpoint(msg.device), msg.endpoint.ID);
|
|
5229
|
-
const value = msg.data['presentValue'];
|
|
5230
|
-
const actionLookup = { 0: 'long', 1: null, 2: 'double' };
|
|
5231
|
-
const action = actionLookup[value];
|
|
5232
|
-
if (button) {
|
|
5233
|
-
return { action: `${button}${action ? `_${action}` : ''}` };
|
|
5234
|
-
}
|
|
5235
|
-
}
|
|
5236
|
-
else {
|
|
5237
|
-
return exports.fromZigbee.lumi_action_multistate.convert(model, msg, publish, options, meta);
|
|
5238
|
-
}
|
|
5239
|
-
},
|
|
5240
|
-
},
|
|
5241
|
-
};
|
|
5242
4956
|
exports.buffer2DataObject = exports.buffer2DataObject;
|
|
5243
4957
|
exports.numericAttributes2Payload = exports.numericAttributes2Payload;
|
|
5244
4958
|
exports.manufacturerCode = exports.manufacturerCode;
|