zigbee-herdsman-converters 25.69.0 → 25.70.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.
@@ -1 +1 @@
1
- {"version":3,"file":"slacky_diy.d.ts","sourceRoot":"","sources":["../../src/devices/slacky_diy.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAa,oBAAoB,EAA0D,MAAM,cAAc,CAAC;AA0nC5H,eAAO,MAAM,WAAW,EAAE,oBAAoB,EA64C7C,CAAC"}
1
+ {"version":3,"file":"slacky_diy.d.ts","sourceRoot":"","sources":["../../src/devices/slacky_diy.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAa,oBAAoB,EAA0D,MAAM,cAAc,CAAC;AAspC5H,eAAO,MAAM,WAAW,EAAE,oBAAoB,EA8oD7C,CAAC"}
@@ -97,6 +97,12 @@ const attrFeaturesSensors = 0xf009;
97
97
  const attrDisplayRotate = 0xf00a;
98
98
  const attrDisplayInversion = 0xf00b;
99
99
  const switchFeatures = ["nothing", "co2_forced_calibration", "co2_factory_reset", "bind_reset", ""];
100
+ const attrPlugKeyLock = 0xf000;
101
+ const attrPlugSwitchCurrentMax = 0xf002;
102
+ const attrPlugSwitchPowerMax = 0xf003;
103
+ const attrPlugSwitchTimeReload = 0xf004;
104
+ const attrPlugSwitchProtectCtrl = 0xf005;
105
+ const attrPlugSwitchAutoRestart = 0xf006;
100
106
  const fzLocal = {
101
107
  thermostat_custom_fw: {
102
108
  cluster: "hvacThermostat",
@@ -546,7 +552,7 @@ function localActionExtend(args = {}) {
546
552
  const result = { exposes, fromZigbee, isModernExtend: true };
547
553
  if (reporting)
548
554
  result.configure = [
549
- m.setupConfigureForBinding("genMultistateInput", "output", endpointNames),
555
+ m.setupConfigureForBinding("genMultistateInput", "input", endpointNames),
550
556
  m.setupConfigureForReporting("genMultistateInput", "presentValue", { config: reportingConfig, access: ea.GET, endpointNames }),
551
557
  ];
552
558
  return result;
@@ -711,6 +717,26 @@ async function configureCommon(device, coordinatorEndpoint, definition) {
711
717
  await endpoint1.configureReporting("hvacThermostat", payload_ext_temp_calibration);
712
718
  }
713
719
  }
720
+ const energyResetExtend = {
721
+ energyReset: () => {
722
+ const exposes = [e.enum("energy_reset", ea.SET, ["reset"]).withDescription("Reset of accumulated energy")];
723
+ const toZigbee = [
724
+ {
725
+ key: ["energy_reset"],
726
+ convertSet: async (entity, key, value, meta) => {
727
+ await entity.command("seMetering", 0x80, {}, utils.getOptions(meta.mapped, entity));
728
+ },
729
+ },
730
+ ];
731
+ // const fromZigbee = [];
732
+ return {
733
+ exposes,
734
+ fromZigbee: [],
735
+ toZigbee,
736
+ isModernExtend: true,
737
+ };
738
+ },
739
+ };
714
740
  const electricityMeterExtend = {
715
741
  elMeter: () => {
716
742
  const exposes = [
@@ -2488,6 +2514,41 @@ exports.definitions = [
2488
2514
  meta: {},
2489
2515
  ota: true,
2490
2516
  },
2517
+ {
2518
+ zigbeeModel: ["QS-Zigbee-SEC01-Mod"],
2519
+ model: "QS-Zigbee-SEC01-Mod",
2520
+ vendor: "Svetomaniya",
2521
+ description: "Smart light switch module 1 gang",
2522
+ extend: [
2523
+ m.onOff({ powerOnBehavior: true }),
2524
+ m.commandsOnOff(),
2525
+ localActionExtend(),
2526
+ m.enumLookup({
2527
+ name: "switch_actions",
2528
+ lookup: { off: 0, on: 1 },
2529
+ cluster: "genOnOffSwitchCfg",
2530
+ attribute: "switchActions",
2531
+ description: "Actions switch",
2532
+ }),
2533
+ m.enumLookup({
2534
+ name: "switch_type",
2535
+ lookup: { toggle: 0, momentary: 1, multifunction: 2 },
2536
+ cluster: "genOnOffSwitchCfg",
2537
+ attribute: { ID: 0xf000, type: 0x30 },
2538
+ description: "Switch type",
2539
+ }),
2540
+ m.enumLookup({
2541
+ name: "operation_mode",
2542
+ lookup: { control_relay: 0, decoupled: 1 },
2543
+ cluster: "genOnOffSwitchCfg",
2544
+ attribute: { ID: 0xf001, type: 0x30 },
2545
+ reporting: { min: 0, max: 65000, change: 0 },
2546
+ description: "Relay decoupled",
2547
+ }),
2548
+ ],
2549
+ meta: {},
2550
+ ota: true,
2551
+ },
2491
2552
  {
2492
2553
  zigbeeModel: ["QS-Zigbee-SEC02-Mod"],
2493
2554
  model: "QS-Zigbee-SEC02-Mod",
@@ -2552,5 +2613,227 @@ exports.definitions = [
2552
2613
  meta: { multiEndpoint: true },
2553
2614
  ota: true,
2554
2615
  },
2616
+ {
2617
+ zigbeeModel: ["TS011F-SlD"],
2618
+ model: "TS011F_plug-SlD",
2619
+ vendor: "Slacky-DIY",
2620
+ description: "Plug with power monitoring",
2621
+ extend: [
2622
+ m.onOff({ powerOnBehavior: true }),
2623
+ m.binary({
2624
+ name: "key_lock",
2625
+ valueOn: ["LOCK", 1],
2626
+ valueOff: ["UNLOCK", 0],
2627
+ cluster: "genOnOff",
2628
+ attribute: { ID: attrPlugKeyLock, type: 0x10 },
2629
+ description: "Key lock enable/disable",
2630
+ }),
2631
+ m.electricityMeter({
2632
+ current: { divisor: 100 },
2633
+ voltage: { divisor: 100 },
2634
+ power: { divisor: 1 },
2635
+ energy: { divisor: 100 },
2636
+ acFrequency: { divisor: 100 },
2637
+ }),
2638
+ m.deviceAddCustomCluster("seMetering", {
2639
+ ID: 0x0702,
2640
+ attributes: {},
2641
+ commands: {
2642
+ resetEnergyMeters: {
2643
+ ID: 0x80,
2644
+ parameters: [],
2645
+ },
2646
+ },
2647
+ commandsResponse: {},
2648
+ }),
2649
+ energyResetExtend.energyReset(),
2650
+ m.binary({
2651
+ name: "protect_control",
2652
+ valueOn: ["ON", 1],
2653
+ valueOff: ["OFF", 0],
2654
+ cluster: "haElectricalMeasurement",
2655
+ attribute: { ID: attrPlugSwitchProtectCtrl, type: 0x10 },
2656
+ description: "Protection control enable/disable",
2657
+ }),
2658
+ m.binary({
2659
+ name: "automatic_restart",
2660
+ valueOn: ["ON", 1],
2661
+ valueOff: ["OFF", 0],
2662
+ cluster: "haElectricalMeasurement",
2663
+ attribute: { ID: attrPlugSwitchAutoRestart, type: 0x10 },
2664
+ description: "Automatic restart enable/disable for voltage only",
2665
+ }),
2666
+ m.numeric({
2667
+ name: "voltage_min",
2668
+ unit: "V",
2669
+ cluster: "haElectricalMeasurement",
2670
+ attribute: "rmsExtremeUnderVoltage",
2671
+ description: "Minimum voltage value",
2672
+ valueMin: 0,
2673
+ valueMax: 300,
2674
+ scale: 100,
2675
+ }),
2676
+ m.numeric({
2677
+ name: "voltage_max",
2678
+ unit: "V",
2679
+ cluster: "haElectricalMeasurement",
2680
+ attribute: "rmsExtremeOverVoltage",
2681
+ description: "Maximum voltage value",
2682
+ valueMin: 0,
2683
+ valueMax: 300,
2684
+ scale: 100,
2685
+ }),
2686
+ m.numeric({
2687
+ name: "current_max",
2688
+ unit: "A",
2689
+ cluster: "haElectricalMeasurement",
2690
+ attribute: { ID: attrPlugSwitchCurrentMax, type: 0x21 },
2691
+ description: "Maximum current value",
2692
+ scale: 100,
2693
+ valueMin: 0,
2694
+ valueMax: 16,
2695
+ valueStep: 0.1,
2696
+ }),
2697
+ m.numeric({
2698
+ name: "power_max",
2699
+ unit: "W",
2700
+ cluster: "haElectricalMeasurement",
2701
+ attribute: { ID: attrPlugSwitchPowerMax, type: 0x29 },
2702
+ description: "Maximum power value",
2703
+ valueMin: 0,
2704
+ valueMax: 3600,
2705
+ }),
2706
+ m.numeric({
2707
+ name: "time_reload",
2708
+ unit: "sec",
2709
+ cluster: "haElectricalMeasurement",
2710
+ attribute: { ID: attrPlugSwitchTimeReload, type: 0x21 },
2711
+ description: "Reload time",
2712
+ valueMin: 5,
2713
+ valueMax: 60,
2714
+ }),
2715
+ ],
2716
+ meta: {},
2717
+ ota: true,
2718
+ },
2719
+ {
2720
+ zigbeeModel: ["TS0001_power-SlD"],
2721
+ model: "TS0001_power-SlD",
2722
+ vendor: "Slacky-DIY",
2723
+ description: "Switch with power monitoring",
2724
+ extend: [
2725
+ m.onOff({ powerOnBehavior: true }),
2726
+ m.commandsOnOff(),
2727
+ localActionExtend(),
2728
+ m.enumLookup({
2729
+ name: "switch_actions",
2730
+ lookup: { off: 0, on: 1 },
2731
+ cluster: "genOnOffSwitchCfg",
2732
+ attribute: "switchActions",
2733
+ description: "Actions switch",
2734
+ }),
2735
+ m.enumLookup({
2736
+ name: "switch_type",
2737
+ lookup: { toggle: 0, momentary: 1, multifunction: 2 },
2738
+ cluster: "genOnOffSwitchCfg",
2739
+ attribute: { ID: 0xf000, type: 0x30 },
2740
+ description: "Switch 1 type",
2741
+ }),
2742
+ m.enumLookup({
2743
+ name: "operation_mode",
2744
+ lookup: { control_relay: 0, decoupled: 1 },
2745
+ cluster: "genOnOffSwitchCfg",
2746
+ attribute: { ID: 0xf001, type: 0x30 },
2747
+ reporting: { min: 0, max: 65000, change: 0 },
2748
+ description: "Relay decoupled",
2749
+ }),
2750
+ m.electricityMeter({
2751
+ current: { divisor: 100 },
2752
+ voltage: { divisor: 100 },
2753
+ power: { divisor: 1 },
2754
+ energy: { divisor: 100 },
2755
+ acFrequency: { divisor: 100 },
2756
+ }),
2757
+ m.deviceAddCustomCluster("seMetering", {
2758
+ ID: 0x0702,
2759
+ attributes: {},
2760
+ commands: {
2761
+ resetEnergyMeters: {
2762
+ ID: 0x80,
2763
+ parameters: [],
2764
+ },
2765
+ },
2766
+ commandsResponse: {},
2767
+ }),
2768
+ energyResetExtend.energyReset(),
2769
+ m.binary({
2770
+ name: "protect_control",
2771
+ valueOn: ["ON", 1],
2772
+ valueOff: ["OFF", 0],
2773
+ cluster: "haElectricalMeasurement",
2774
+ attribute: { ID: attrPlugSwitchProtectCtrl, type: 0x10 },
2775
+ description: "Protection control enable/disable",
2776
+ }),
2777
+ m.binary({
2778
+ name: "automatic_restart",
2779
+ valueOn: ["ON", 1],
2780
+ valueOff: ["OFF", 0],
2781
+ cluster: "haElectricalMeasurement",
2782
+ attribute: { ID: attrPlugSwitchAutoRestart, type: 0x10 },
2783
+ description: "Automatic restart enable/disable for voltage only",
2784
+ }),
2785
+ m.numeric({
2786
+ name: "voltage_min",
2787
+ unit: "V",
2788
+ cluster: "haElectricalMeasurement",
2789
+ attribute: "rmsExtremeUnderVoltage",
2790
+ description: "Minimum voltage value",
2791
+ valueMin: 0,
2792
+ valueMax: 300,
2793
+ scale: 100,
2794
+ }),
2795
+ m.numeric({
2796
+ name: "voltage_max",
2797
+ unit: "V",
2798
+ cluster: "haElectricalMeasurement",
2799
+ attribute: "rmsExtremeOverVoltage",
2800
+ description: "Maximum voltage value",
2801
+ valueMin: 0,
2802
+ valueMax: 300,
2803
+ scale: 100,
2804
+ }),
2805
+ m.numeric({
2806
+ name: "current_max",
2807
+ unit: "A",
2808
+ cluster: "haElectricalMeasurement",
2809
+ attribute: { ID: attrPlugSwitchCurrentMax, type: 0x21 },
2810
+ description: "Maximum current value",
2811
+ scale: 100,
2812
+ valueMin: 0,
2813
+ valueMax: 16,
2814
+ valueStep: 0.1,
2815
+ }),
2816
+ m.numeric({
2817
+ name: "power_max",
2818
+ unit: "W",
2819
+ cluster: "haElectricalMeasurement",
2820
+ attribute: { ID: attrPlugSwitchPowerMax, type: 0x29 },
2821
+ description: "Maximum power value",
2822
+ valueMin: 0,
2823
+ valueMax: 3600,
2824
+ }),
2825
+ m.numeric({
2826
+ name: "time_reload",
2827
+ unit: "sec",
2828
+ cluster: "haElectricalMeasurement",
2829
+ attribute: { ID: attrPlugSwitchTimeReload, type: 0x21 },
2830
+ description: "Reload time",
2831
+ valueMin: 5,
2832
+ valueMax: 60,
2833
+ }),
2834
+ ],
2835
+ meta: {},
2836
+ ota: true,
2837
+ },
2555
2838
  ];
2556
2839
  //# sourceMappingURL=slacky_diy.js.map