#ZHA Quirk for the "TS0601 / _TZE284_cjbofhxw" energy clamp (MatSeePlus Store)

1 messages · Page 1 of 1 (latest)

chilly fulcrum
#

I've seen a lot of quirks posted for the TZE204 energy clamp but not for the (seemingly identical) TZE284. I'm trying to adapt the TZE204 quirk for the TZE284 but I can't even get ZHA to apply the quirk to my device, despite changing the MODELS_INFO: to [("_TZE284_cjbofhxw", "TS0601"),],

Could I please get some advice on what else do I need to change to have ZHA apply the quirk to the specified device? I've attempted restarting HA and clearing __pycache__

wide pier
#

What is your device signature?

chilly fulcrum
#

Heads up, I eventually found the code which makes it work, kinda?
https://github.com/zigpy/zha-device-handlers/issues/3152#issuecomment-2175429312
The "full code" makes this device output "Instantaneous power" among other things which I'm not too interested in. I'm looking forward to any updates if they are ever released but for now I got my base functionality working.

GitHub

Problem description The energy meter doesn't display any measurements. Solution description It's time for some new quirks Screenshots/Video Screenshots/Video Device signature Device signatu...

chilly fulcrum
# wide pier What is your device signature?

Here is the device signature for TS0601_TZE284_cjbofhxw

{
  "node_descriptor": {
    "logical_type": 1,
    "complex_descriptor_available": 0,
    "user_descriptor_available": 0,
    "reserved": 0,
    "aps_flags": 0,
    "frequency_band": 8,
    "mac_capability_flags": 142,
    "manufacturer_code": 4098,
    "maximum_buffer_size": 82,
    "maximum_incoming_transfer_size": 82,
    "server_mask": 11264,
    "maximum_outgoing_transfer_size": 82,
    "descriptor_capability_field": 0
  },
  "endpoints": {
    "1": {
      "profile_id": "0x0104",
      "device_type": "0x0053",
      "input_clusters": [
        "0x0000",
        "0x0004",
        "0x0005",
        "0x0702",
        "0x0b04",
        "0xef00"
      ],
      "output_clusters": [
        "0x000a",
        "0x0019"
      ]
    }
  },
  "manufacturer": "_TZE284_cjbofhxw",
  "model": "TS0601",
  "class": "ts0601_din_power_new.TuyaEnergyMeter_1CH"
}
wide pier
#

Just for completeness, the reason your quirk didn't match is that your quirk matches input clusters 0x0000, 0x0004, 0x0005, 0xef00 and your device has 0x0000, 0x0004, 0x0005, 0x0702, 0x0b04, 0xef00

chilly fulcrum
wide pier
#

It's actually this

1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaManufClusterDinPower.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            }```

The commented out is portion is just to make it more readable
chilly fulcrum
#

I'm confused as to how is it matching those values? Is it getting the cluster_id from some zhaquirks database? Nowhere in the file except in the comment are the cluster hex codes mentioned.

wide pier
#

Those are defined in the ZCL, the basic cluster is always 0x0000, Groups is 0x0004, etc

#

If you are planning on building your own, the V2 quirk builder is easier to work with than the legacy V1 quirk you have here.

chilly fulcrum
wide pier
#

Correct

chilly fulcrum
#

Ah, I thought I was on the wrong track completely. I'll take a peek at the V2 spec, this looks very daunting. Thank you for taking the time to clarify! ✨

wide pier