zha-device-handlers icon indicating copy to clipboard operation
zha-device-handlers copied to clipboard

[BUG] TS0211 by _TZ1800_ladpngdx does not work correctly

Open moritzbeck13 opened this issue 2 years ago • 11 comments

Describe the bug As mentioned in https://github.com/zigpy/zha-device-handlers/issues/1168: It seems like pressing the normal button reports true, but releasing it reports nothing. In contrast, pressing the tamper button changes the same entity to false, releasing it does nothing aswell.

To Reproduce

  1. Doorbell entity is false
  2. Press the doorbell button
  3. Doorbell entity changes to true
  4. Release the doorbell button
  5. Doorbell entity does not change to false
  6. Press the tamper button
  7. Doorbell entity changes to false
  8. Release the tamper button

Expected behavior I press the doorbell button, the doorbell entity reports true. I release it, it reports false. There is no tamper entity (why?), but I would expect the same behavior with the tamper button and a potential tamper entity.

Device signature
{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4619, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0402",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0003",
        "0x0500",
        "0x0b05"
      ],
      "out_clusters": [
        "0x0019"
      ]
    }
  },
  "manufacturer": "_TZ1800_ladpngdx",
  "model": "TS0211",
  "class": "zhaquirks.tuya.ts0211.TuyaDoorbell0211"
}
Diagnostic information
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.1.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.7",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "5.15.80",
    "supervisor": "2022.12.1",
    "host_os": "Home Assistant OS 9.4",
    "docker_version": "20.10.19",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.29.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "homematicip_local": {
      "version": "1.26.1",
      "requirements": [
        "hahomematic==2023.1.2"
      ]
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "requirements": [
      "bellows==0.34.6",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.90",
      "zigpy-deconz==0.19.2",
      "zigpy==0.53.0",
      "zigpy-xbee==0.16.2",
      "zigpy-zigate==0.10.3",
      "zigpy-znp==0.9.2"
    ],
    "usb": [
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*2652*",
        "known_devices": [
          "slae.sh cc2652rb stick"
        ]
      },
      {
        "vid": "1A86",
        "pid": "55D4",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus v2"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*zigstar*",
        "known_devices": [
          "ZigStar Coordinators"
        ]
      },
      {
        "vid": "1CF1",
        "pid": "0030",
        "description": "*conbee*",
        "known_devices": [
          "Conbee II"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8A2A",
        "description": "*zigbee*",
        "known_devices": [
          "Nortek HUSBZB-1"
        ]
      },
      {
        "vid": "0403",
        "pid": "6015",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate+"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8B34",
        "description": "*bv 2010/10*",
        "known_devices": [
          "Bitron Video AV2010/10"
        ]
      }
    ],
    "codeowners": [
      "@dmulcahey",
      "@adminiuga",
      "@puddly"
    ],
    "zeroconf": [
      {
        "type": "_esphomelib._tcp.local.",
        "name": "tube*"
      },
      {
        "type": "_zigate-zigbee-gateway._tcp.local.",
        "name": "*zigate*"
      },
      {
        "type": "_zigstar_gw._tcp.local.",
        "name": "*zigstar*"
      },
      {
        "type": "_slzb-06._tcp.local.",
        "name": "slzb-06*"
      }
    ],
    "dependencies": [
      "file_upload"
    ],
    "after_dependencies": [
      "onboarding",
      "usb",
      "zeroconf"
    ],
    "iot_class": "local_polling",
    "loggers": [
      "aiosqlite",
      "bellows",
      "crccheck",
      "pure_pcapy3",
      "zhaquirks",
      "zigpy",
      "zigpy_deconz",
      "zigpy_xbee",
      "zigpy_zigate",
      "zigpy_znp"
    ],
    "is_built_in": true
  },
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 46036,
    "manufacturer": "_TZ1800_ladpngdx",
    "model": "TS0211",
    "name": "_TZ1800_ladpngdx TS0211",
    "quirk_applied": true,
    "quirk_class": "zhaquirks.tuya.ts0211.TuyaDoorbell0211",
    "manufacturer_code": 4619,
    "power_source": "Battery or Unknown",
    "lqi": 255,
    "rssi": -61,
    "last_seen": "2023-01-15T01:00:26",
    "available": true,
    "device_type": "EndDevice",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4619, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": 260,
          "device_type": "0x0402",
          "in_clusters": [
            "0x0000",
            "0x0001",
            "0x0003",
            "0x0500",
            "0x0b05"
          ],
          "out_clusters": [
            "0x0019"
          ]
        }
      }
    },
    "active_coordinator": false,
    "entities": [
      {
        "entity_id": "binary_sensor.schalter_alarmanlage_iaszone",
        "name": "_TZ1800_ladpngdx TS0211"
      },
      {
        "entity_id": "button.schalter_alarmanlage_identify",
        "name": "_TZ1800_ladpngdx TS0211"
      },
      {
        "entity_id": "sensor.schalter_alarmanlage_battery",
        "name": "_TZ1800_ladpngdx TS0211"
      }
    ],
    "neighbors": [],
    "routes": [],
    "endpoint_names": [
      {
        "name": "IAS_ZONE"
      }
    ],
    "user_given_name": "Schalter Alarmanlage",
    "device_reg_id": "f461037a8c12c5b0b35b665927357440",
    "area_id": "alarmanlage",
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "IAS_ZONE",
          "id": 1026
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "_TZ1800_ladpngdx"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "TS0211"
              }
            },
            "unsupported_attributes": {}
          },
          "0x0001": {
            "endpoint_attribute": "power",
            "attributes": {
              "0x0020": {
                "attribute_name": "battery_voltage",
                "value": 29
              },
              "0x0021": {
                "attribute_name": "battery_percentage_remaining",
                "value": 170
              }
            },
            "unsupported_attributes": {
              "0x0031": {
                "attribute_name": "battery_size"
              },
              "0x0033": {
                "attribute_name": "battery_quantity"
              }
            }
          },
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0500": {
            "endpoint_attribute": "ias_zone",
            "attributes": {
              "0x0000": {
                "attribute_name": "zone_state",
                "value": 1
              },
              "0x0001": {
                "attribute_name": "zone_type",
                "value": 21
              },
              "0x0002": {
                "attribute_name": "zone_status",
                "value": 0
              },
              "0x0010": {
                "attribute_name": "cie_addr",
                "value": "00:21:2e:ff:ff:07:7f:4e"
              }
            },
            "unsupported_attributes": {}
          },
          "0x0b05": {
            "endpoint_attribute": "diagnostic",
            "attributes": {},
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      }
    }
  }
}
Additional logs

Event 0:

event_type: zha_event
data:
  device_ieee: 84:2e:14:ff:fe:f6:d3:9b
  unique_id: 84:2e:14:ff:fe:f6:d3:9b:1:0x0500
  device_id: f461037a8c12c5b0b35b665927357440
  endpoint_id: 1
  cluster_id: 1280
  command: single
  args: []
  params: {}
origin: LOCAL
time_fired: "2023-01-04T20:07:14.527905+00:00"
context:
  id: 01GNZ6A7TZR278TNNSFC2AFT2Z
  parent_id: null
  user_id: null

Event 1:

event_type: zha_event
data:
  device_ieee: 84:2e:14:ff:fe:f6:d3:9b
  unique_id: 84:2e:14:ff:fe:f6:d3:9b:1:0x0500
  device_id: f461037a8c12c5b0b35b665927357440
  endpoint_id: 1
  cluster_id: 1280
  command: single
  args: []
  params: {}
origin: LOCAL
time_fired: "2023-01-04T20:07:16.646759+00:00"
context:
  id: 01GNZ6A9X6QZHBA42GH0MQP32A
  parent_id: null
  user_id: null

Event 2:

event_type: zha_event
data:
  device_ieee: 84:2e:14:ff:fe:f6:d3:9b
  unique_id: 84:2e:14:ff:fe:f6:d3:9b:1:0x0500
  device_id: f461037a8c12c5b0b35b665927357440
  endpoint_id: 1
  cluster_id: 1280
  command: single
  args: []
  params: {}
origin: LOCAL
time_fired: "2023-01-04T20:07:19.666115+00:00"
context:
  id: 01GNZ6ACVJQJQXJSJCQ1QDDZHV
  parent_id: null
  user_id: null

moritzbeck13 avatar Jan 15 '23 02:01 moritzbeck13