Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Device Support Request] _TZE200_v6ossqfy mmwave sensor #2059

Closed
jimmyeao opened this issue Jan 3, 2023 · 76 comments
Closed

[Device Support Request] _TZE200_v6ossqfy mmwave sensor #2059

jimmyeao opened this issue Jan 3, 2023 · 76 comments
Labels
custom quirk available A custom quirk is available to solve the issue, but it's not merged in the repo yet Tuya Request/PR regarding a Tuya device

Comments

@jimmyeao
Copy link

jimmyeao commented Jan 3, 2023

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.
_TZE200_v6ossqfy mmwave sensor is detected as a plug this is a MMwave sensor https://zigbee.blakadder.com/Tuya_PS-HPS.html

Device signature
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0051",
      "in_clusters": [
        "0x0000",
        "0x0004",
        "0x0005",
        "0xef00"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "_TZE200_v6ossqfy",
  "model": "TS0601",
  "class": "zigpy.device.Device"
}
Diagnostic information
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.12.9",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.7",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/London",
    "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": {
    "matter_experimental": {
      "version": "0.3.0",
      "requirements": [
        "python-matter-server==0.3.0"
      ]
    },
    "alexa_media": {
      "version": "4.4.0",
      "requirements": [
        "alexapy==1.26.4",
        "packaging>=20.3",
        "wrapt>=1.12.1"
      ]
    },
    "philips_ambilight_hue": {
      "version": "1.0.1",
      "requirements": [
        "ha-philipsjs==2.7.6"
      ]
    },
    "philips_ambilight+hue": {
      "version": "0.0.4",
      "requirements": []
    },
    "entities_calendar": {
      "version": "0.0.9",
      "requirements": []
    },
    "dualmode_generic": {
      "version": "0.2",
      "requirements": []
    },
    "auto_backup": {
      "version": "1.3.0",
      "requirements": []
    },
    "govee": {
      "version": "1.1.2",
      "requirements": [
        "govee-api-laggat==0.1.23",
        "dacite==1.5.1"
      ]
    },
    "watchman": {
      "version": "0.5.1",
      "requirements": [
        "prettytable==3.0.0"
      ]
    },
    "garbage_collection": {
      "version": "4.10.2",
      "requirements": [
        "python-dateutil>=2.8.2"
      ]
    },
    "deebot": {
      "version": "1.5.0",
      "requirements": [
        "deebot-client==1.6.0",
        "numpy>=1.21.2"
      ]
    },
    "scheduler": {
      "version": "v0.0.0",
      "requirements": []
    },
    "mbapi2020": {
      "version": "0.7.4",
      "requirements": [
        "protobuf>=3.19.1,<4"
      ]
    },
    "variable": {
      "version": "1.0.0.0",
      "requirements": []
    },
    "skyq": {
      "version": "v2.10.8",
      "requirements": [
        "pyskyqremote==0.3.23"
      ]
    },
    "hacs": {
      "version": "1.29.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "circadian_lighting": {
      "version": "2.1.3",
      "requirements": []
    },
    "fullykiosk": {
      "version": "1.1.0",
      "requirements": [
        "python-fullykiosk==0.0.11"
      ]
    },
    "alarmo": {
      "version": "v1.9.7",
      "requirements": []
    },
    "pod_point": {
      "version": "0.4.1",
      "requirements": [
        "podpointclient==1.0.0",
        "StrEnum>=0.4,<0.5"
      ]
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "requirements": [
      "bellows==0.34.5",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.89",
      "zigpy-deconz==0.19.2",
      "zigpy==0.52.3",
      "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*"
      }
    ],
    "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": 16235,
    "manufacturer": "_TZE200_v6ossqfy",
    "model": "TS0601",
    "name": "_TZE200_v6ossqfy TS0601",
    "quirk_applied": false,
    "quirk_class": "zigpy.device.Device",
    "manufacturer_code": 4417,
    "power_source": "Mains",
    "lqi": 147,
    "rssi": null,
    "last_seen": "2023-01-03T10:28:32",
    "available": true,
    "device_type": "Router",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": 260,
          "device_type": "0x0051",
          "in_clusters": [
            "0x0000",
            "0x0004",
            "0x0005",
            "0xef00"
          ],
          "out_clusters": [
            "0x000a",
            "0x0019"
          ]
        },
        "242": {
          "profile_id": 41440,
          "device_type": "0x0061",
          "in_clusters": [],
          "out_clusters": [
            "0x0021"
          ]
        }
      }
    },
    "active_coordinator": false,
    "entities": [],
    "neighbors": [],
    "routes": [],
    "endpoint_names": [
      {
        "name": "SMART_PLUG"
      },
      {
        "name": "unknown 97 device_type of 0xa1e0 profile id"
      }
    ],
    "user_given_name": "officemmwave",
    "device_reg_id": "b1fca55bccea9f0446cd0171e2962922",
    "area_id": "72b6c263acdf4c31b94534ef5e09646d",
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "SMART_PLUG",
          "id": 81
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0xef00": {
            "endpoint_attribute": null,
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0001": {
                "attribute_name": "app_version",
                "value": 70
              },
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "_TZE200_v6ossqfy"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "TS0601"
              }
            },
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x000a": {
            "endpoint_attribute": "time",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      },
      "242": {
        "device_type": {
          "name": "unknown",
          "id": 97
        },
        "profile_id": 41440,
        "in_clusters": {},
        "out_clusters": {
          "0x0021": {
            "endpoint_attribute": "green_power",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      }
    }
  }
}
Additional logs
Paste any additional debug logs here.
Don't remove the extra line breaks outside the ``` marks.

Additional context
Add any other context or screenshots about the feature request here.

@javicalle
Copy link
Collaborator

It seems to be another MmwRadarMotionGPP device.
I suggest to you to follow the indications from here:

Probably it is not fully functional, but once applied we can obtain more information from the logs that still allow us to adjust the operation.

@jimmyeao
Copy link
Author

jimmyeao commented Jan 3, 2023

Unfortunately this does not work, ZHA is ignoring my custom quirks it seems

@jimmyeao
Copy link
Author

jimmyeao commented Jan 3, 2023

Logs are filling up with

2023-01-03 13:39:17.729 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe2f\x02\x00\x04\x00\x00\x00\x00'
2023-01-03 13:39:18.129 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe2g\x01\x00\x01\x01'
2023-01-03 13:39:18.599 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:18.800 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.000 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.202 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.402 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.602 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.802 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:20.002 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:20.203 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:20.403 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:20.810 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3e\x02\x00\x04\x00\x00\x00\x02'
2023-01-03 13:39:21.218 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3f\x02\x00\x04\x00\x00\x00\x00'

Pastebin of debug logs https://pastebin.com/CpiZRzy8

@jimmyeao
Copy link
Author

jimmyeao commented Jan 3, 2023

Ok, managed to get it added, it is only exposing Motion now, was expecting it to expose other settings and sensors..
sensor:

  • duration_of_attendance: How long was the room occupied in minutes
  • duration_of_absence: How long was the room clear in minutes

switch: Toggle the onboard LED On/Off

@jimmyeao
Copy link
Author

jimmyeao commented Jan 3, 2023

new Pastebin of debug logs
https://pastebin.com/beN00bCZ

@javicalle
Copy link
Collaborator

If you are using it, the MmwRadarMotionGPP quirk should expose 4 entities:

  • OccupancySensing
  • AnalogInput
  • Illuminance

I don't remember the AnalogInput value meaning.
Not sure where comes from that LED switch.

Your device logs is reporting (in addition to the occupancy and analog entities) the next DP:

  • dp=101, value=23
  • dp=102, value=0
  • dp=103, value=True (Boolean=1)

No one have mapped the DPs to their function.

  • duration_of_attendance: How long was the room occupied in minutes
  • duration_of_absence: How long was the room clear in minutes

Not sure if that are the meanings of the attributes. I believe that these attributes are the one of the u_to_o_delay and o_to_u_delay attributes (occupied <--> unoccupied):

Maybe these are the DP 101 and 102 (in seconds?) Would match with your observations?
You can try to update its values from the device view, 'Admin zigbee device', select MmwRadarManufCluster cluster, select the attribute (ie: dp_101)

First of all, read and write the current value. Then try to update with another value and check the behavior to understand the function.

@TheJulianJES TheJulianJES added the Tuya Request/PR regarding a Tuya device label Jan 4, 2023
@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

  • dp=101, value=23
  • dp=102, value=0
  • dp=103, value=True (Boolean=1)

No one have mapped the DPs to their function.

through testing I can see that
dp_101 = occupied time
dp_102 = unoccupied time
I tried setting dp_103 to Bool.false, but get a service error when I try and write the value - I suspect this may be the LED setting though

edit, dp_103 is definitely the LED, confirmed by setting it through ZZigbee2mqtt then re-adding to ZHA and observing the value

@javicalle
Copy link
Collaborator

javicalle commented Jan 4, 2023

Just to be sure, are the attributes mapped as?:

  • dp_101 -> pir_o_to_u_delay
  • dp_102 -> pir_u_to_o_delay

(Not sure here if they are pir or infrared, 24GHz doesn't seem to match any of both)

That would be my proposal for your device:

24Ghz mmWave radar
"""Mmw radar occupancy sensor."""

import math
from typing import Dict

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
import zigpy.types as t
from zigpy.zcl.clusters.general import (
    AnalogInput,
    Basic,
    GreenPowerProxy,
    Groups,
    Ota,
    Scenes,
    Time,
)
from zigpy.zcl.clusters.measurement import IlluminanceMeasurement, OccupancySensing

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import (
    DPToAttributeMapping,
    TuyaDPType,
    TuyaLocalCluster,
    TuyaNewManufCluster,
)
from zhaquirks.tuya.mcu import TuyaMCUCluster, TuyaOnOff


class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster):
    """Tuya local OccupancySensing cluster."""


class TuyaAnalogInput(AnalogInput, TuyaLocalCluster):
    """Tuya local AnalogInput cluster."""


class TuyaIlluminanceMeasurement(IlluminanceMeasurement, TuyaLocalCluster):
    """Tuya local IlluminanceMeasurement cluster."""


class MmwRadarManufCluster(TuyaMCUCluster):
    """Mmw radar manufacturer cluster."""

    # # Possible DPs and values
    # presence_state: presence
    # target distance: 1.61m
    # illuminance: 250lux
    # sensitivity: 9
    # minimum_detection_distance: 0.00m
    # maximum_detection_distance: 4.05m
    # dp_detection_delay: 0.1
    # dp_fading_time: 5.0
    # ¿illuminance?: 255lux
    # presence_brightness: no control
    # no_one_brightness: no control
    # current_brightness: off

    attributes = TuyaMCUCluster.attributes.copy()
    attributes.update(
        {
            # ramdom attribute IDs
            0xEF02: ("dp_2", t.uint32_t, True),
            0xEF03: ("dp_3", t.uint32_t, True),
            0xEF04: ("dp_4", t.uint32_t, True),
            0xEF06: ("dp_6", t.enum8, True),
            0xEF69: ("dp_105", t.enum8, True),
            0xEF6A: ("dp_106", t.enum8, True),
            0xEF6B: ("dp_107", t.enum8, True),
            0xEF6C: ("dp_108", t.uint32_t, True),
        }
    )

    dp_to_attribute: Dict[int, DPToAttributeMapping] = {
        1: DPToAttributeMapping(
            TuyaOccupancySensing.ep_attribute,
            "occupancy",
        ),
        2: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_2",
        ),
        3: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_3",
        ),
        4: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_4",
        ),
        6: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_6",
        ),
        9: DPToAttributeMapping(
            TuyaAnalogInput.ep_attribute,
            "present_value",
            lambda x: x / 100,
        ),
        101: DPToAttributeMapping(
            TuyaAnalogInput.ep_attribute,
            "present_value",
        ),
        102: DPToAttributeMapping(
            TuyaAnalogInput.ep_attribute,
            "present_value",
            endpoint_id=2,
        ),
        103: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
        ),
        104: DPToAttributeMapping(
            TuyaIlluminanceMeasurement.ep_attribute,
            "measured_value",
            lambda x: 10000 * math.log10(x) + 1,
        ),
        105: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_105",
        ),
        106: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_106",
        ),
        107: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_107",
        ),
        108: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_108",
        ),
    }

    data_point_handlers = {
        1: "_dp_2_attr_update",
        2: "_dp_2_attr_update",
        3: "_dp_2_attr_update",
        4: "_dp_2_attr_update",
        6: "_dp_2_attr_update",
        9: "_dp_2_attr_update",
        101: "_dp_2_attr_update",
        102: "_dp_2_attr_update",
        103: "_dp_2_attr_update",
        104: "_dp_2_attr_update",
        105: "_dp_2_attr_update",
        106: "_dp_2_attr_update",
        107: "_dp_2_attr_update",
        108: "_dp_2_attr_update",
    }


class MmwRadarMotion_var03(CustomDevice):
    """Millimeter wave occupancy sensor."""

    signature = {
        #  endpoint=1, profile=260, device_type=81, device_version=1,
        #  input_clusters=[4, 5, 61184, 0], output_clusters=[25, 10])
        MODELS_INFO: [
            ("_TZE200_0u3bj3rc", "TS0601"),
            ("_TZE200_mx6u6l4y", "TS0601"),
            ("_TZE200_v6ossqfy", "TS0601"),
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaNewManufCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
                # input_clusters=[]
                # output_clusters=[33]
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    MmwRadarManufCluster,
                    TuyaOccupancySensing,
                    TuyaOnOff,
                    TuyaAnalogInput,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR,
                INPUT_CLUSTERS: [
                    TuyaAnalogInput,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        }
    }
There would be a new switch for the led status. If not working, enable the debug logs and attach the relevant info.

Not sure about the AnalogInput.

Edit: fix dp_type

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

The above quirk has the device detected with a switch, however the switch will not stay toggled, and does not affect the LED state.
I don't think this bit is correct either:

dp_101 -> pir_o_to_u_delay
dp_102 -> pir_u_to_o_delay

the values are minutes (integer values, seem to max out at 60) I think the one you mention are related to sensitivity
image

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

logs are here

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

Should this section have definitions for dp_101 - 103?

 attributes. Update(
        {
            # ramdom attribute IDs
            0xEF02: ("dp_2", t.uint32_t, True),
            0xEF03: ("dp_3", t.uint32_t, True),
            0xEF04: ("dp_4", t.uint32_t, True),
            0xEF06: ("dp_6", t.enum8, True),
            0xEF69: ("dp_105", t.enum8, True),
            0xEF6A: ("dp_106", t.enum8, True),
            0xEF6B: ("dp_107", t.enum8, True),
            0xEF6C: ("dp_108", t.uint32_t, True),
        }
    )

Also device signature has changed?

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0107",
      "in_clusters": [
        "0x0000",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x000c",
        "0x0406",
        "0xef00"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0107",
      "in_clusters": [
        "0x000c"
      ],
      "out_clusters": []
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "_TZE200_v6ossqfy",
  "model": "TS0601",
  "class": "ts0601_mmwave.MmwRadarMotion_var03"
}

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

If I edit your quirk to add in DP_101 and DP_102, I can query those and see the correct integer values, not sure how I add to the quirk to expose those values back to HA though

"""BlitzWolf IS-3/Tuya motion rechargeable occupancy sensor."""

import math
from typing import Dict

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
import zigpy.types as t
from zigpy.zcl.clusters.general import (
    AnalogInput,
    Basic,
    GreenPowerProxy,
    Groups,
    Ota,
    Scenes,
    Time,
)
from zigpy.zcl.clusters.measurement import IlluminanceMeasurement, OccupancySensing

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import DPToAttributeMapping, TuyaLocalCluster, TuyaNewManufCluster
from zhaquirks.tuya.mcu import TuyaMCUCluster, TuyaOnOff


class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster):
    """Tuya local OccupancySensing cluster."""


class TuyaAnalogInput(AnalogInput, TuyaLocalCluster):
    """Tuya local AnalogInput cluster."""


class TuyaIlluminanceMeasurement(IlluminanceMeasurement, TuyaLocalCluster):
    """Tuya local IlluminanceMeasurement cluster."""


class MmwRadarManufCluster(TuyaMCUCluster):
    """Neo manufacturer cluster."""

    # # Possible DPs and values
    # presence_state: presence
    # target distance: 1.61m
    # illuminance: 250lux
    # sensitivity: 9
    # minimum_detection_distance: 0.00m
    # maximum_detection_distance: 4.05m
    # dp_detection_delay: 0.1
    # dp_fading_time: 5.0
    # ¿illuminance?: 255lux
    # presence_brightness: no control
    # no_one_brightness: no control
    # current_brightness: off

    attributes = TuyaMCUCluster.attributes.copy()
    attributes.update(
        {
            # ramdom attribute IDs
            0xEF02: ("dp_2", t.uint32_t, True),
            0xEF03: ("dp_3", t.uint32_t, True),
            0xEF04: ("dp_4", t.uint32_t, True),
            0xEF06: ("dp_6", t.enum8, True),
            0xEF65: ("dp_101", t.uint32_t, True),
            0xEF66: ("dp_102", t.uint32_t, True),
            0xEF69: ("dp_105", t.enum8, True),
            0xEF6A: ("dp_106", t.enum8, True),
            0xEF6B: ("dp_107", t.enum8, True),
            0xEF6C: ("dp_108", t.uint32_t, True),
        }
    )

    dp_to_attribute: Dict[int, DPToAttributeMapping] = {
        1: DPToAttributeMapping(
            TuyaOccupancySensing.ep_attribute,
            "occupancy",
        ),
        2: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_2",
        ),
        3: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_3",
        ),
        4: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_4",
        ),
        6: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_6",
        ),
        9: DPToAttributeMapping(
            TuyaAnalogInput.ep_attribute,
            "present_value",
            lambda x: x / 100,
        ),
        101: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_101",
        ),
        102: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_102",
        ),
        103: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
        ),
        104: DPToAttributeMapping(
            TuyaIlluminanceMeasurement.ep_attribute,
            "measured_value",
            lambda x: 10000 * math.log10(x) + 1,
        ),
        105: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_105",
        ),
        106: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_106",
        ),
        107: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_107",
        ),
        108: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "dp_108",
        ),
    }

    data_point_handlers = {
        1: "_dp_2_attr_update",
        2: "_dp_2_attr_update",
        3: "_dp_2_attr_update",
        4: "_dp_2_attr_update",
        6: "_dp_2_attr_update",
        9: "_dp_2_attr_update",
        101: "_dp_2_attr_update",
        102: "_dp_2_attr_update",
        103: "_dp_2_attr_update",
        104: "_dp_2_attr_update",
        105: "_dp_2_attr_update",
        106: "_dp_2_attr_update",
        107: "_dp_2_attr_update",
        108: "_dp_2_attr_update",
    }


class MmwRadarMotion_var03(CustomDevice):
    """Millimeter wave occupancy sensor."""

    signature = {
        #  endpoint=1, profile=260, device_type=81, device_version=1,
        #  input_clusters=[4, 5, 61184, 0], output_clusters=[25, 10])
        MODELS_INFO: [
            ("_TZE200_0u3bj3rc", "TS0601"),
            ("_TZE200_mx6u6l4y", "TS0601"),
            ("_TZE200_v6ossqfy", "TS0601"),
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaNewManufCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
                # input_clusters=[]
                # output_clusters=[33]
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    MmwRadarManufCluster,
                    TuyaOccupancySensing,
                    TuyaOnOff,
                    TuyaAnalogInput,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR,
                INPUT_CLUSTERS: [
                    TuyaAnalogInput,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        }
    }

@javicalle
Copy link
Collaborator

javicalle commented Jan 4, 2023

Should this section have definitions for dp_101 - 103?

No if we want to expose as new entities.
These are attributes of the MmwRadarManufCluster.
DP=103 is mapped to the switch here:

        103: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
        ),

I have edit the code to fix the switch problem.

Looking for a way to expose the dp_102 and dp_103.

@javicalle
Copy link
Collaborator

No direct way to get the values in HA.
Analog input is only mapped for some devices:

Probably the way would by to create custom sensors just like these:

But that will require to create the quirk and then modify HA.

@javicalle
Copy link
Collaborator

javicalle commented Jan 4, 2023

After looking at Z2M my final proposal would be:

24Ghz mmWave radar
"""Human Presence Sensor 24GHz."""

from typing import Dict

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
import zigpy.types as t
from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time
from zigpy.zcl.clusters.measurement import OccupancySensing

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import TuyaLocalCluster
from zhaquirks.tuya.mcu import (
    DPToAttributeMapping,
    TuyaDPType,
    TuyaMCUCluster,
    TuyaOnOffNM,
)


class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster):
    """Tuya local OccupancySensing cluster."""


class MmwRadarManufCluster(TuyaMCUCluster):
    """Human Presence Sensor 24GHz."""

    attributes = TuyaMCUCluster.attributes.copy()
    attributes.update(
        {
            # ramdom attribute IDs
            0xEF65: ("duration_of_attendance", t.uint32_t, True),
            0xEF66: ("duration_of_absence", t.uint32_t, True),
        }
    )

    dp_to_attribute: Dict[int, DPToAttributeMapping] = {
        1: DPToAttributeMapping(
            TuyaOccupancySensing.ep_attribute,
            "occupancy",
            dp_type=TuyaDPType.VALUE,
        ),
        101: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "duration_of_attendance",
            dp_type=TuyaDPType.VALUE,
        ),
        102: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "duration_of_absence",
            dp_type=TuyaDPType.VALUE,
        ),
        103: DPToAttributeMapping(
            TuyaOnOffNM.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
        ),
    }

    data_point_handlers = {
        1: "_dp_2_attr_update",
        101: "_dp_2_attr_update",
        102: "_dp_2_attr_update",
        103: "_dp_2_attr_update",
    }


class MmwRadarMotion_var03(CustomDevice):
    """Millimeter wave occupancy sensor."""

    signature = {
        #  endpoint=1, profile=260, device_type=81, device_version=1,
        #  input_clusters=[4, 5, 61184, 0], output_clusters=[25, 10])
        MODELS_INFO: [
            ("_TZE200_0u3bj3rc", "TS0601"),
            ("_TZE200_mx6u6l4y", "TS0601"),
            ("_TZE200_v6ossqfy", "TS0601"),
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaMCUCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
                # input_clusters=[]
                # output_clusters=[33]
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    MmwRadarManufCluster,
                    TuyaOccupancySensing,
                    TuyaOnOffNM,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        }
    }

If the quirk is working for you, then we can try to create the entities in HA.

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

That throws an error, just looking now

  File "/config/custom_zha_quirks/ts0601_mmwave.py", line 32, in <module>
    class MmwRadarManufCluster(TuyaMCUCluster):
  File "/config/custom_zha_quirks/ts0601_mmwave.py", line 57, in MmwRadarManufCluster
    103: DPToAttributeMapping(
TypeError: DPToAttributeMapping.__init__() got an unexpected keyword argument 'dp_type'

@javicalle
Copy link
Collaborator

I have updated the import statement for the DPToAttributeMapping class.

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

Appreciate all your help, however it still errors

Error setting up entry Sonoff Zigbee 3.0 USB Dongle Plus - Sonoff Zigbee 3.0 USB Dongle Plus for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 372, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 100, in async_setup_entry
    setup_quirks(config)
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/__init__.py", line 409, in setup
    importer.find_module(modname).load_module(modname)
  File "<frozen importlib._bootstrap_external>", line 548, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1063, in load_module
  File "<frozen importlib._bootstrap_external>", line 888, in load_module
  File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 719, in _load
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_zha_quirks/ts0601_mmwave.py", line 31, in <module>
    class MmwRadarManufCluster(TuyaMCUCluster):
  File "/config/custom_zha_quirks/ts0601_mmwave.py", line 44, in MmwRadarManufCluster
    1: DPToAttributeMapping(
TypeError: DPToAttributeMapping.__init__() missing 1 required positional argument: 'dp_type'

@javicalle
Copy link
Collaborator

I have updated the rest of dp_to_attribute definitions.
Sorry for the troubles.

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

No need to apologise :)
the file is working now, but still the same issue with the toggle button

@javicalle
Copy link
Collaborator

Could you attach the log error?
All the dp_type must had been fixed already.

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

2023-01-04 16:35:51.715 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:51.731 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=24)
2023-01-04 16:35:51.748 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x9D67, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=195, SecurityUse=<Bool.false: 0>, TimeStamp=10829651, TSN=0, Data=b'\x09\x19\x02\x00\x55\x67\x01\x00\x01\x00', MacSrcAddr=0x9D67, MsgResultRadius=29)
2023-01-04 16:35:51.748 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x19\x02\x00Ug\x01\x00\x01\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=195, rssi=None)
2023-01-04 16:35:51.748 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received ZCL frame: b'\t\x19\x02\x00Ug\x01\x00\x01\x00'
2023-01-04 16:35:51.749 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=25, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:51.749 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=85, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 16:35:51.749 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received command 0x02 (TSN 25): set_data_response(data=TuyaCommand(status=0, tsn=85, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 16:35:51.750 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=25, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:51.750 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:51.750 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), dst_ep=1, source_route=None, extended_timeout=False, tsn=25, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x19\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:51.750 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=25, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x19\x0B\x02\x00')
2023-01-04 16:35:51.751 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850151.748809, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:51.751 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850151.748809, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:51.751 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:51.752 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:51.752 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>))
2023-01-04 16:35:51.752 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>)) completed
2023-01-04 16:35:51.753 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:51.753 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:51.761 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:51.776 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=25)
2023-01-04 16:35:53.350 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0x0006] Sending Tuya Cluster Command... Cluster Command is 1, Arguments are ()
2023-01-04 16:35:53.350 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] tuya_mcu_command: cluster_data=TuyaClusterData(endpoint_id=1, cluster_attr='on_off', attr_value=1, expect_reply=True)
2023-01-04 16:35:53.351 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] get_dp_mapping --> found DP: 103
2023-01-04 16:35:53.351 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] from_cluster_data: {103: DPToAttributeMapping(ep_attribute='on_off', attribute_name='on_off', dp_type=<TuyaDPType.BOOL: 1>, converter=None, dp_converter=None, endpoint_id=None)}
2023-01-04 16:35:53.351 WARNING (MainThread) [zigpy.util] Error calling listener <bound method TuyaMCUCluster.tuya_mcu_command of <ts0601_mmwave.MmwRadarManufCluster object at 0x7fbe319a9180>> with args (TuyaClusterData(endpoint_id=1, cluster_attr='on_off', attr_value=1, expect_reply=True),): AttributeError("'TuyaDPType' object has no attribute 'ztype'")
2023-01-04 16:35:53.351 DEBUG (MainThread) [zigpy.util] Error calling listener <bound method TuyaMCUCluster.tuya_mcu_command of <ts0601_mmwave.MmwRadarManufCluster object at 0x7fbe319a9180>> with args (TuyaClusterData(endpoint_id=1, cluster_attr='on_off', attr_value=1, expect_reply=True),)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy/util.py", line 55, in listener_event
    result.append(method(*args))
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/tuya/mcu/__init__.py", line 259, in tuya_mcu_command
    tuya_commands = self.from_cluster_data(cluster_data)
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/tuya/mcu/__init__.py", line 234, in from_cluster_data
    if datapoint_type.ztype:
AttributeError: 'TuyaDPType' object has no attribute 'ztype'
2023-01-04 16:35:53.352 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x9D67:1:0x0006]: executed 'on' command with args: '()' kwargs: '{}' result: Default_Response(command_id=1, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:53.352 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0x0006] no such attribute: 0
2023-01-04 16:35:53.865 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=99, SecurityUse=<Bool.false: 0>, TimeStamp=10961937, TSN=0, Data=b'\x09\x7D\x02\x00\x6E\x09\x02\x00\x04\x00\x00\x00\xC4', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 16:35:53.865 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t}\x02\x00n\t\x02\x00\x04\x00\x00\x00\xc4'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=99, rssi=None)
2023-01-04 16:35:53.865 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t}\x02\x00n\t\x02\x00\x04\x00\x00\x00\xc4'
2023-01-04 16:35:53.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=125, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:53.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=110, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xc4\x00\x00\x00', *payload=196))]))
2023-01-04 16:35:53.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 125): set_data_response(data=TuyaCommand(status=0, tsn=110, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xc4\x00\x00\x00', *payload=196))]))
2023-01-04 16:35:53.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=125, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:53.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:53.867 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=125, profile_id=260, cluster_id=61184, data=Serialized[b'\x18}\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:53.868 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=125, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x7D\x0B\x02\x00')
2023-01-04 16:35:53.868 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850153.865925, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:53.868 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850153.865925, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:53.869 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:53.869 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:53.869 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 196))
2023-01-04 16:35:53.869 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 196)) completed
2023-01-04 16:35:53.870 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:53.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:53.879 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:53.894 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=125)
2023-01-04 16:35:54.109 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x9D67](TS0601): Device seen - marking the device available and resetting counter
2023-01-04 16:35:54.109 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x9D67](TS0601): Update device availability -  device available: True - new availability: True - changed: False
2023-01-04 16:35:54.865 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=99, SecurityUse=<Bool.false: 0>, TimeStamp=11024417, TSN=0, Data=b'\x09\x7E\x02\x00\x6F\x09\x02\x00\x04\x00\x00\x00\xBA', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 16:35:54.865 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t~\x02\x00o\t\x02\x00\x04\x00\x00\x00\xba'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=99, rssi=None)
2023-01-04 16:35:54.865 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t~\x02\x00o\t\x02\x00\x04\x00\x00\x00\xba'
2023-01-04 16:35:54.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=126, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:54.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=111, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xba\x00\x00\x00', *payload=186))]))
2023-01-04 16:35:54.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 126): set_data_response(data=TuyaCommand(status=0, tsn=111, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xba\x00\x00\x00', *payload=186))]))
2023-01-04 16:35:54.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=126, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:54.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:54.867 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=126, profile_id=260, cluster_id=61184, data=Serialized[b'\x18~\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:54.867 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=126, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x7E\x0B\x02\x00')
2023-01-04 16:35:54.868 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850154.865709, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:54.868 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850154.865709, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:54.869 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:54.869 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:54.870 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 186))
2023-01-04 16:35:54.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 186)) completed
2023-01-04 16:35:54.870 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:54.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:54.878 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:54.891 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=126)
2023-01-04 16:35:55.120 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x9D67, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=198, SecurityUse=<Bool.false: 0>, TimeStamp=11040390, TSN=0, Data=b'\x09\x1A\x02\x00\x58\x01\x04\x00\x01\x01', MacSrcAddr=0x9D67, MsgResultRadius=29)
2023-01-04 16:35:55.120 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1a\x02\x00X\x01\x04\x00\x01\x01'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=198, rssi=None)
2023-01-04 16:35:55.120 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received ZCL frame: b'\t\x1a\x02\x00X\x01\x04\x00\x01\x01'
2023-01-04 16:35:55.120 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=26, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.121 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=88, datapoints=[TuyaDatapointData(dp=1, data=TuyaData(dp_type=<TuyaDPType.ENUM: 4>, function=0, raw=b'\x01', *payload=<enum8.undefined_0x01: 1>))]))
2023-01-04 16:35:55.121 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received command 0x02 (TSN 26): set_data_response(data=TuyaCommand(status=0, tsn=88, datapoints=[TuyaDatapointData(dp=1, data=TuyaData(dp_type=<TuyaDPType.ENUM: 4>, function=0, raw=b'\x01', *payload=<enum8.undefined_0x01: 1>))]))
2023-01-04 16:35:55.122 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=26, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.122 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.122 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), dst_ep=1, source_route=None, extended_timeout=False, tsn=26, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1a\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:55.122 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.120655, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:55.123 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=26, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1A\x0B\x02\x00')
2023-01-04 16:35:55.123 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.120655, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:55.124 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.124 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.124 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 1030, 0, <enum8.undefined_0x01: 1>))
2023-01-04 16:35:55.125 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 1030, 0, <enum8.undefined_0x01: 1>)) completed
2023-01-04 16:35:55.125 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.125 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.134 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.149 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=26)
2023-01-04 16:35:55.167 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x9D67, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=195, SecurityUse=<Bool.false: 0>, TimeStamp=11043304, TSN=0, Data=b'\x09\x1B\x02\x00\x58\x65\x02\x00\x04\x00\x00\x00\x3B', MacSrcAddr=0x9D67, MsgResultRadius=29)
2023-01-04 16:35:55.167 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1b\x02\x00Xe\x02\x00\x04\x00\x00\x00;'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=195, rssi=None)
2023-01-04 16:35:55.167 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received ZCL frame: b'\t\x1b\x02\x00Xe\x02\x00\x04\x00\x00\x00;'
2023-01-04 16:35:55.167 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=27, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.168 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=88, datapoints=[TuyaDatapointData(dp=101, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b';\x00\x00\x00', *payload=59))]))
2023-01-04 16:35:55.168 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received command 0x02 (TSN 27): set_data_response(data=TuyaCommand(status=0, tsn=88, datapoints=[TuyaDatapointData(dp=101, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b';\x00\x00\x00', *payload=59))]))
2023-01-04 16:35:55.168 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=27, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.169 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.169 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), dst_ep=1, source_route=None, extended_timeout=False, tsn=27, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1b\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:55.169 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=27, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1B\x0B\x02\x00')
2023-01-04 16:35:55.170 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.167659, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:55.170 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.167659, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:55.170 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.170 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.171 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61285, 59))
2023-01-04 16:35:55.171 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61285, 59)) completed
2023-01-04 16:35:55.171 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.171 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.180 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.194 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=27)
2023-01-04 16:35:55.212 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x9D67, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=195, SecurityUse=<Bool.false: 0>, TimeStamp=11046142, TSN=0, Data=b'\x09\x1C\x02\x00\x58\x66\x02\x00\x04\x00\x00\x00\x00', MacSrcAddr=0x9D67, MsgResultRadius=29)
2023-01-04 16:35:55.212 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1c\x02\x00Xf\x02\x00\x04\x00\x00\x00\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=195, rssi=None)
2023-01-04 16:35:55.213 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received ZCL frame: b'\t\x1c\x02\x00Xf\x02\x00\x04\x00\x00\x00\x00'
2023-01-04 16:35:55.213 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=28, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.213 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=88, datapoints=[TuyaDatapointData(dp=102, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]))
2023-01-04 16:35:55.213 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received command 0x02 (TSN 28): set_data_response(data=TuyaCommand(status=0, tsn=88, datapoints=[TuyaDatapointData(dp=102, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]))
2023-01-04 16:35:55.214 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=28, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.214 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.214 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), dst_ep=1, source_route=None, extended_timeout=False, tsn=28, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1c\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:55.215 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=28, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1C\x0B\x02\x00')
2023-01-04 16:35:55.215 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.212996, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:55.216 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.212996, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:55.216 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.216 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.216 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61286, 0))
2023-01-04 16:35:55.217 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61286, 0)) completed
2023-01-04 16:35:55.217 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.217 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.226 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.240 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=28)
2023-01-04 16:35:55.257 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x9D67, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=198, SecurityUse=<Bool.false: 0>, TimeStamp=11048958, TSN=0, Data=b'\x09\x1D\x02\x00\x58\x67\x01\x00\x01\x00', MacSrcAddr=0x9D67, MsgResultRadius=29)
2023-01-04 16:35:55.257 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1d\x02\x00Xg\x01\x00\x01\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=198, rssi=None)
2023-01-04 16:35:55.257 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received ZCL frame: b'\t\x1d\x02\x00Xg\x01\x00\x01\x00'
2023-01-04 16:35:55.257 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=29, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.258 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=88, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 16:35:55.258 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Received command 0x02 (TSN 29): set_data_response(data=TuyaCommand(status=0, tsn=88, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 16:35:55.259 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=29, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.259 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.259 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9D67), dst_ep=1, source_route=None, extended_timeout=False, tsn=29, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1d\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:55.259 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=29, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1D\x0B\x02\x00')
2023-01-04 16:35:55.260 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.257601, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:55.260 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.257601, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:55.261 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.261 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.262 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>))
2023-01-04 16:35:55.262 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>)) completed
2023-01-04 16:35:55.263 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.263 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.270 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.286 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=29)
2023-01-04 16:35:55.866 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=99, SecurityUse=<Bool.false: 0>, TimeStamp=11086980, TSN=0, Data=b'\x09\x7F\x02\x00\x70\x09\x02\x00\x04\x00\x00\x00\xB5', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 16:35:55.866 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x7f\x02\x00p\t\x02\x00\x04\x00\x00\x00\xb5'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=99, rssi=None)
2023-01-04 16:35:55.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x7f\x02\x00p\t\x02\x00\x04\x00\x00\x00\xb5'
2023-01-04 16:35:55.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=127, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=112, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xb5\x00\x00\x00', *payload=181))]))
2023-01-04 16:35:55.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 127): set_data_response(data=TuyaCommand(status=0, tsn=112, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xb5\x00\x00\x00', *payload=181))]))
2023-01-04 16:35:55.868 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=127, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:55.868 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.868 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=127, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x7f\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:55.868 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=127, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x7F\x0B\x02\x00')
2023-01-04 16:35:55.869 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.86665, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:55.869 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850155.86665, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:55.869 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.870 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 181))
2023-01-04 16:35:55.871 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 181)) completed
2023-01-04 16:35:55.872 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:55.873 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:55.880 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.893 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=127)
2023-01-04 16:35:55.912 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0x0006] Sending Tuya Cluster Command... Cluster Command is 1, Arguments are ()
2023-01-04 16:35:55.912 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] tuya_mcu_command: cluster_data=TuyaClusterData(endpoint_id=1, cluster_attr='on_off', attr_value=1, expect_reply=True)
2023-01-04 16:35:55.912 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] get_dp_mapping --> found DP: 103
2023-01-04 16:35:55.912 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] from_cluster_data: {103: DPToAttributeMapping(ep_attribute='on_off', attribute_name='on_off', dp_type=<TuyaDPType.BOOL: 1>, converter=None, dp_converter=None, endpoint_id=None)}
2023-01-04 16:35:55.912 WARNING (MainThread) [zigpy.util] Error calling listener <bound method TuyaMCUCluster.tuya_mcu_command of <ts0601_mmwave.MmwRadarManufCluster object at 0x7fbe319a9180>> with args (TuyaClusterData(endpoint_id=1, cluster_attr='on_off', attr_value=1, expect_reply=True),): AttributeError("'TuyaDPType' object has no attribute 'ztype'")
2023-01-04 16:35:55.913 DEBUG (MainThread) [zigpy.util] Error calling listener <bound method TuyaMCUCluster.tuya_mcu_command of <ts0601_mmwave.MmwRadarManufCluster object at 0x7fbe319a9180>> with args (TuyaClusterData(endpoint_id=1, cluster_attr='on_off', attr_value=1, expect_reply=True),)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy/util.py", line 55, in listener_event
    result.append(method(*args))
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/tuya/mcu/__init__.py", line 259, in tuya_mcu_command
    tuya_commands = self.from_cluster_data(cluster_data)
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/tuya/mcu/__init__.py", line 234, in from_cluster_data
    if datapoint_type.ztype:
AttributeError: 'TuyaDPType' object has no attribute 'ztype'
2023-01-04 16:35:55.913 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x9D67:1:0x0006]: executed 'on' command with args: '()' kwargs: '{}' result: Default_Response(command_id=1, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:55.913 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0x0006] no such attribute: 0
2023-01-04 16:35:56.865 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=102, SecurityUse=<Bool.false: 0>, TimeStamp=11149460, TSN=0, Data=b'\x09\x00\x02\x00\x71\x09\x02\x00\x04\x00\x00\x00\xD7', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 16:35:56.866 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x00\x02\x00q\t\x02\x00\x04\x00\x00\x00\xd7'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=102, rssi=None)
2023-01-04 16:35:56.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x00\x02\x00q\t\x02\x00\x04\x00\x00\x00\xd7'
2023-01-04 16:35:56.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=0, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:56.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=113, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd7\x00\x00\x00', *payload=215))]))
2023-01-04 16:35:56.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 0): set_data_response(data=TuyaCommand(status=0, tsn=113, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd7\x00\x00\x00', *payload=215))]))
2023-01-04 16:35:56.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=0, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:56.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:56.868 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x00\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:56.868 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=0, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x00\x0B\x02\x00')
2023-01-04 16:35:56.868 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850156.86615, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:56.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850156.86615, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:56.870 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:56.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:56.871 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 215))
2023-01-04 16:35:56.871 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 215)) completed
2023-01-04 16:35:56.872 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:56.872 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:56.878 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:56.892 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=0)
2023-01-04 16:35:57.866 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=105, SecurityUse=<Bool.false: 0>, TimeStamp=11211982, TSN=0, Data=b'\x09\x01\x02\x00\x72\x09\x02\x00\x04\x00\x00\x00\x94', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 16:35:57.866 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x01\x02\x00r\t\x02\x00\x04\x00\x00\x00\x94'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=105, rssi=None)
2023-01-04 16:35:57.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x01\x02\x00r\t\x02\x00\x04\x00\x00\x00\x94'
2023-01-04 16:35:57.866 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=1, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:57.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=114, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x94\x00\x00\x00', *payload=148))]))
2023-01-04 16:35:57.867 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 1): set_data_response(data=TuyaCommand(status=0, tsn=114, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x94\x00\x00\x00', *payload=148))]))
2023-01-04 16:35:57.868 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=1, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 16:35:57.868 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 16:35:57.868 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=1, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x01\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 16:35:57.868 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=1, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x01\x0B\x02\x00')
2023-01-04 16:35:57.869 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850157.866575, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 16:35:57.869 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672850157.866575, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 16:35:57.871 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:57.871 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:57.871 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 148))
2023-01-04 16:35:57.872 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbe08d1a740>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 148)) completed
2023-01-04 16:35:57.872 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>)
2023-01-04 16:35:57.872 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbe08d1a740>) completed
2023-01-04 16:35:57.880 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 16:35:57.893 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=1)

@javicalle
Copy link
Collaborator

Arrrrrgh!
Already fixed the TuyaDPType import.

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

Well, the good news is there is no error anymore that I can see, however the button still doesn't do anything :(

2023-01-04 17:03:17.771 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=99, SecurityUse=<Bool.false: 0>, TimeStamp=2917995, TSN=0, Data=b'\x09\x19\x02\x00\x7F\x09\x02\x00\x04\x00\x00\x00\xDD', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 17:03:17.771 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x19\x02\x00\x7f\t\x02\x00\x04\x00\x00\x00\xdd'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=99, rssi=None)
2023-01-04 17:03:17.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x19\x02\x00\x7f\t\x02\x00\x04\x00\x00\x00\xdd'
2023-01-04 17:03:17.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=25, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=127, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xdd\x00\x00\x00', *payload=221))]))
2023-01-04 17:03:17.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 25): set_data_response(data=TuyaCommand(status=0, tsn=127, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xdd\x00\x00\x00', *payload=221))]))
2023-01-04 17:03:17.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=25, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:17.773 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=25, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x19\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:17.773 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=25, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x19\x0B\x02\x00')
2023-01-04 17:03:17.773 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.771991, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:17.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.771991, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:17.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:17.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 221))
2023-01-04 17:03:17.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 221)) completed
2023-01-04 17:03:17.776 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.776 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:17.790 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:17.807 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=201, SecurityUse=<Bool.false: 0>, TimeStamp=2920257, TSN=0, Data=b'\x09\x53\x02\x00\x21\x01\x04\x00\x01\x01', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:17.807 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\tS\x02\x00!\x01\x04\x00\x01\x01'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=201, rssi=None)
2023-01-04 17:03:17.807 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\tS\x02\x00!\x01\x04\x00\x01\x01'
2023-01-04 17:03:17.808 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=83, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.808 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=33, datapoints=[TuyaDatapointData(dp=1, data=TuyaData(dp_type=<TuyaDPType.ENUM: 4>, function=0, raw=b'\x01', *payload=<enum8.undefined_0x01: 1>))]))
2023-01-04 17:03:17.808 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 83): set_data_response(data=TuyaCommand(status=0, tsn=33, datapoints=[TuyaDatapointData(dp=1, data=TuyaData(dp_type=<TuyaDPType.ENUM: 4>, function=0, raw=b'\x01', *payload=<enum8.undefined_0x01: 1>))]))
2023-01-04 17:03:17.808 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=83, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.809 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:17.809 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=83, profile_id=260, cluster_id=61184, data=Serialized[b'\x18S\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:17.809 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=83, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x53\x0B\x02\x00')
2023-01-04 17:03:17.809 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.807935, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:17.810 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.807935, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:17.810 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.810 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:17.810 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 1030, 0, <enum8.undefined_0x01: 1>))
2023-01-04 17:03:17.810 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 1030, 0, <enum8.undefined_0x01: 1>)) completed
2023-01-04 17:03:17.811 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.811 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:17.818 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=25)
2023-01-04 17:03:17.830 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:17.851 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=83)
2023-01-04 17:03:17.868 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=198, SecurityUse=<Bool.false: 0>, TimeStamp=2924077, TSN=0, Data=b'\x09\x54\x02\x00\x21\x65\x02\x00\x04\x00\x00\x00\x3C', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:17.868 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\tT\x02\x00!e\x02\x00\x04\x00\x00\x00<'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=198, rssi=None)
2023-01-04 17:03:17.869 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\tT\x02\x00!e\x02\x00\x04\x00\x00\x00<'
2023-01-04 17:03:17.869 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=84, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.869 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=33, datapoints=[TuyaDatapointData(dp=101, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'<\x00\x00\x00', *payload=60))]))
2023-01-04 17:03:17.869 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 84): set_data_response(data=TuyaCommand(status=0, tsn=33, datapoints=[TuyaDatapointData(dp=101, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'<\x00\x00\x00', *payload=60))]))
2023-01-04 17:03:17.870 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=84, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.870 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:17.870 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=84, profile_id=260, cluster_id=61184, data=Serialized[b'\x18T\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:17.870 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=84, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x54\x0B\x02\x00')
2023-01-04 17:03:17.870 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.869099, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:17.871 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.869099, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:17.871 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.871 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:17.872 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61285, 60))
2023-01-04 17:03:17.872 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61285, 60)) completed
2023-01-04 17:03:17.873 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.873 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:17.887 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:17.908 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=84)
2023-01-04 17:03:17.925 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=201, SecurityUse=<Bool.false: 0>, TimeStamp=2927630, TSN=0, Data=b'\x09\x55\x02\x00\x21\x66\x02\x00\x04\x00\x00\x00\x00', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:17.925 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\tU\x02\x00!f\x02\x00\x04\x00\x00\x00\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=201, rssi=None)
2023-01-04 17:03:17.926 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\tU\x02\x00!f\x02\x00\x04\x00\x00\x00\x00'
2023-01-04 17:03:17.926 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=85, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.926 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=33, datapoints=[TuyaDatapointData(dp=102, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]))
2023-01-04 17:03:17.926 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 85): set_data_response(data=TuyaCommand(status=0, tsn=33, datapoints=[TuyaDatapointData(dp=102, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]))
2023-01-04 17:03:17.926 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=85, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.927 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:17.927 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=85, profile_id=260, cluster_id=61184, data=Serialized[b'\x18U\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:17.927 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=85, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x55\x0B\x02\x00')
2023-01-04 17:03:17.927 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.925963, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:17.927 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.925963, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:17.928 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.929 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:17.929 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61286, 0))
2023-01-04 17:03:17.929 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61286, 0)) completed
2023-01-04 17:03:17.929 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.930 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:17.944 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:17.965 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=85)
2023-01-04 17:03:17.983 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=198, SecurityUse=<Bool.false: 0>, TimeStamp=2931236, TSN=0, Data=b'\x09\x56\x02\x00\x21\x67\x01\x00\x01\x00', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:17.983 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\tV\x02\x00!g\x01\x00\x01\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=198, rssi=None)
2023-01-04 17:03:17.983 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\tV\x02\x00!g\x01\x00\x01\x00'
2023-01-04 17:03:17.983 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=86, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.984 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=33, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 17:03:17.984 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 86): set_data_response(data=TuyaCommand(status=0, tsn=33, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 17:03:17.984 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=86, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:17.985 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:17.985 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=86, profile_id=260, cluster_id=61184, data=Serialized[b'\x18V\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:17.985 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=86, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x56\x0B\x02\x00')
2023-01-04 17:03:17.986 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.983493, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:17.986 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851797.983493, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:17.986 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.986 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:17.987 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>))
2023-01-04 17:03:17.987 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>)) completed
2023-01-04 17:03:17.987 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:17.987 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:18.002 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:18.022 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=86)
2023-01-04 17:03:18.772 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=99, SecurityUse=<Bool.false: 0>, TimeStamp=2980553, TSN=0, Data=b'\x09\x1A\x02\x00\x80\x09\x02\x00\x04\x00\x00\x00\xD6', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 17:03:18.772 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1a\x02\x00\x80\t\x02\x00\x04\x00\x00\x00\xd6'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=99, rssi=None)
2023-01-04 17:03:18.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x1a\x02\x00\x80\t\x02\x00\x04\x00\x00\x00\xd6'
2023-01-04 17:03:18.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=26, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:18.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=128, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd6\x00\x00\x00', *payload=214))]))
2023-01-04 17:03:18.774 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 26): set_data_response(data=TuyaCommand(status=0, tsn=128, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd6\x00\x00\x00', *payload=214))]))
2023-01-04 17:03:18.774 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=26, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:18.774 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:18.774 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=26, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1a\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:18.775 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=26, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1A\x0B\x02\x00')
2023-01-04 17:03:18.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851798.773127, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:18.776 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851798.773127, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:18.776 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:18.776 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:18.777 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 214))
2023-01-04 17:03:18.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 214)) completed
2023-01-04 17:03:18.777 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:18.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:18.791 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:18.812 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=26)
2023-01-04 17:03:19.772 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=99, SecurityUse=<Bool.false: 0>, TimeStamp=3043054, TSN=0, Data=b'\x09\x1B\x02\x00\x81\x09\x02\x00\x04\x00\x00\x00\xD8', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 17:03:19.772 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1b\x02\x00\x81\t\x02\x00\x04\x00\x00\x00\xd8'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=99, rssi=None)
2023-01-04 17:03:19.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x1b\x02\x00\x81\t\x02\x00\x04\x00\x00\x00\xd8'
2023-01-04 17:03:19.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=27, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:19.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=129, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd8\x00\x00\x00', *payload=216))]))
2023-01-04 17:03:19.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 27): set_data_response(data=TuyaCommand(status=0, tsn=129, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd8\x00\x00\x00', *payload=216))]))
2023-01-04 17:03:19.774 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=27, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:19.774 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:19.774 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=27, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1b\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:19.775 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=27, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1B\x0B\x02\x00')
2023-01-04 17:03:19.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851799.77297, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:19.776 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851799.77297, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:19.777 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:19.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:19.777 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 216))
2023-01-04 17:03:19.778 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 216)) completed
2023-01-04 17:03:19.778 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:19.778 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:19.791 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:19.821 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=27)
2023-01-04 17:03:19.996 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0x0006] Sending Tuya Cluster Command... Cluster Command is 1, Arguments are ()
2023-01-04 17:03:19.996 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] tuya_mcu_command: cluster_data=TuyaClusterData(endpoint_id=1, cluster_attr='on_off', attr_value=1, expect_reply=True)
2023-01-04 17:03:19.996 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] get_dp_mapping --> found DP: 103
2023-01-04 17:03:19.996 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] from_cluster_data: {103: DPToAttributeMapping(ep_attribute='on_off', attribute_name='on_off', dp_type=<TuyaDPType.BOOL: 1>, converter=None, dp_converter=None, endpoint_id=None)}
2023-01-04 17:03:19.996 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] ztype: Bool.true
2023-01-04 17:03:19.996 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] from_value: [1, 1]
2023-01-04 17:03:19.996 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] raw: b'\x01'
2023-01-04 17:03:19.996 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] tuya_commands: [TuyaCommand(status=0, tsn=16, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x01', *payload=<Bool.true: 1>))])]
2023-01-04 17:03:19.997 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x8EF3:1:0x0006]: executed 'on' command with args: '()' kwargs: '{}' result: Default_Response(command_id=1, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:19.997 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0x0006] no such attribute: 0
2023-01-04 17:03:19.997 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=True, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), manufacturer=4417, tsn=17, command_id=0, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
2023-01-04 17:03:19.997 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending request: set_data(data=TuyaCommand(status=0, tsn=16, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x01', *payload=<Bool.true: 1>))]))
2023-01-04 17:03:19.998 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=17, profile_id=260, cluster_id=61184, data=Serialized[b'\x05A\x11\x11\x00\x00\x10g\x01\x00\x01\x01'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:19.998 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=17, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK: 32>, Radius=0, Data=b'\x05\x41\x11\x11\x00\x00\x10\x67\x01\x00\x01\x01')
2023-01-04 17:03:20.016 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:20.020 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=17)
2023-01-04 17:03:20.040 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=198, SecurityUse=<Bool.false: 0>, TimeStamp=3059880, TSN=0, Data=b'\x18\x11\x0B\x00\x83', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:20.040 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x11\x0b\x00\x83'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=198, rssi=None)
2023-01-04 17:03:20.041 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\x18\x11\x0b\x00\x83'
2023-01-04 17:03:20.041 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=17, command_id=11, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:20.041 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:Default_Response(command_id=0, status=<Status.UNSUP_MANUF_CLUSTER_COMMAND: 131>)
2023-01-04 17:03:20.041 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851800.041106, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:20.042 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851800.041106, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:20.042 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:20.042 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:20.772 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=99, SecurityUse=<Bool.false: 0>, TimeStamp=3105516, TSN=0, Data=b'\x09\x1C\x02\x00\x82\x09\x02\x00\x04\x00\x00\x00\xD9', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 17:03:20.772 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1c\x02\x00\x82\t\x02\x00\x04\x00\x00\x00\xd9'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=99, rssi=None)
2023-01-04 17:03:20.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x1c\x02\x00\x82\t\x02\x00\x04\x00\x00\x00\xd9'
2023-01-04 17:03:20.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=28, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:20.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=130, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd9\x00\x00\x00', *payload=217))]))
2023-01-04 17:03:20.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 28): set_data_response(data=TuyaCommand(status=0, tsn=130, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd9\x00\x00\x00', *payload=217))]))
2023-01-04 17:03:20.774 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=28, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:20.774 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:20.774 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=28, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1c\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:20.774 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=28, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1C\x0B\x02\x00')
2023-01-04 17:03:20.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851800.772447, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:20.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851800.772447, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:20.776 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:20.776 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:20.776 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 217))
2023-01-04 17:03:20.776 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 217)) completed
2023-01-04 17:03:20.777 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:20.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:20.780 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:20.813 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=28)
2023-01-04 17:03:21.316 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=195, SecurityUse=<Bool.false: 0>, TimeStamp=3139604, TSN=0, Data=b'\x09\x57\x02\x00\x24\x01\x04\x00\x01\x01', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:21.317 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\tW\x02\x00$\x01\x04\x00\x01\x01'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=195, rssi=None)
2023-01-04 17:03:21.317 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\tW\x02\x00$\x01\x04\x00\x01\x01'
2023-01-04 17:03:21.317 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=87, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.317 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=36, datapoints=[TuyaDatapointData(dp=1, data=TuyaData(dp_type=<TuyaDPType.ENUM: 4>, function=0, raw=b'\x01', *payload=<enum8.undefined_0x01: 1>))]))
2023-01-04 17:03:21.318 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 87): set_data_response(data=TuyaCommand(status=0, tsn=36, datapoints=[TuyaDatapointData(dp=1, data=TuyaData(dp_type=<TuyaDPType.ENUM: 4>, function=0, raw=b'\x01', *payload=<enum8.undefined_0x01: 1>))]))
2023-01-04 17:03:21.318 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=87, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.319 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.319 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=87, profile_id=260, cluster_id=61184, data=Serialized[b'\x18W\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:21.319 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=87, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x57\x0B\x02\x00')
2023-01-04 17:03:21.319 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.317328, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:21.321 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.317328, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:21.321 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.321 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.322 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 1030, 0, <enum8.undefined_0x01: 1>))
2023-01-04 17:03:21.322 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 1030, 0, <enum8.undefined_0x01: 1>)) completed
2023-01-04 17:03:21.322 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.323 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.342 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.357 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=87)
2023-01-04 17:03:21.386 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=201, SecurityUse=<Bool.false: 0>, TimeStamp=3143240, TSN=0, Data=b'\x09\x58\x02\x00\x24\x65\x02\x00\x04\x00\x00\x00\x3C', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:21.387 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\tX\x02\x00$e\x02\x00\x04\x00\x00\x00<'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=201, rssi=None)
2023-01-04 17:03:21.387 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\tX\x02\x00$e\x02\x00\x04\x00\x00\x00<'
2023-01-04 17:03:21.387 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=88, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.387 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=36, datapoints=[TuyaDatapointData(dp=101, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'<\x00\x00\x00', *payload=60))]))
2023-01-04 17:03:21.388 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 88): set_data_response(data=TuyaCommand(status=0, tsn=36, datapoints=[TuyaDatapointData(dp=101, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'<\x00\x00\x00', *payload=60))]))
2023-01-04 17:03:21.388 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=88, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.388 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.389 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=88, profile_id=260, cluster_id=61184, data=Serialized[b'\x18X\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:21.389 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=88, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x58\x0B\x02\x00')
2023-01-04 17:03:21.389 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.387293, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:21.390 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.387293, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:21.390 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.391 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.391 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61285, 60))
2023-01-04 17:03:21.392 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61285, 60)) completed
2023-01-04 17:03:21.392 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.392 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.406 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.428 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=88)
2023-01-04 17:03:21.445 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=201, SecurityUse=<Bool.false: 0>, TimeStamp=3147616, TSN=0, Data=b'\x09\x59\x02\x00\x24\x66\x02\x00\x04\x00\x00\x00\x00', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:21.445 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\tY\x02\x00$f\x02\x00\x04\x00\x00\x00\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=201, rssi=None)
2023-01-04 17:03:21.446 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\tY\x02\x00$f\x02\x00\x04\x00\x00\x00\x00'
2023-01-04 17:03:21.446 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=89, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.446 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=36, datapoints=[TuyaDatapointData(dp=102, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]))
2023-01-04 17:03:21.446 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 89): set_data_response(data=TuyaCommand(status=0, tsn=36, datapoints=[TuyaDatapointData(dp=102, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]))
2023-01-04 17:03:21.447 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=89, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.447 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.447 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=89, profile_id=260, cluster_id=61184, data=Serialized[b'\x18Y\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:21.448 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=89, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x59\x0B\x02\x00')
2023-01-04 17:03:21.448 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.445976, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:21.448 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.445976, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:21.449 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.449 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.450 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61286, 0))
2023-01-04 17:03:21.450 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61286, 0)) completed
2023-01-04 17:03:21.450 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.450 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.464 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.484 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=89)
2023-01-04 17:03:21.501 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=195, SecurityUse=<Bool.false: 0>, TimeStamp=3151166, TSN=0, Data=b'\x09\x5A\x02\x00\x24\x67\x01\x00\x01\x00', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:21.502 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\tZ\x02\x00$g\x01\x00\x01\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=195, rssi=None)
2023-01-04 17:03:21.502 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\tZ\x02\x00$g\x01\x00\x01\x00'
2023-01-04 17:03:21.502 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=90, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.502 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=36, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 17:03:21.503 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 90): set_data_response(data=TuyaCommand(status=0, tsn=36, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 17:03:21.503 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=90, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.503 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.504 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=90, profile_id=260, cluster_id=61184, data=Serialized[b'\x18Z\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:21.504 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=90, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x5A\x0B\x02\x00')
2023-01-04 17:03:21.504 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.502324, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:21.505 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.502324, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:21.505 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.505 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.506 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>))
2023-01-04 17:03:21.506 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>)) completed
2023-01-04 17:03:21.506 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.506 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.521 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.542 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=90)
2023-01-04 17:03:21.770 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=99, SecurityUse=<Bool.false: 0>, TimeStamp=3167936, TSN=0, Data=b'\x09\x1D\x02\x00\x83\x09\x02\x00\x04\x00\x00\x00\xDB', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 17:03:21.771 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1d\x02\x00\x83\t\x02\x00\x04\x00\x00\x00\xdb'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=99, rssi=None)
2023-01-04 17:03:21.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x1d\x02\x00\x83\t\x02\x00\x04\x00\x00\x00\xdb'
2023-01-04 17:03:21.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=29, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=131, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xdb\x00\x00\x00', *payload=219))]))
2023-01-04 17:03:21.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 29): set_data_response(data=TuyaCommand(status=0, tsn=131, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xdb\x00\x00\x00', *payload=219))]))
2023-01-04 17:03:21.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=29, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:21.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.773 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=29, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1d\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:21.773 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=29, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1D\x0B\x02\x00')
2023-01-04 17:03:21.773 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.771283, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:21.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851801.771283, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:21.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 219))
2023-01-04 17:03:21.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 219)) completed
2023-01-04 17:03:21.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:21.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:21.790 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:21.808 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=29)
2023-01-04 17:03:22.482 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0x0006] Sending Tuya Cluster Command... Cluster Command is 1, Arguments are ()
2023-01-04 17:03:22.482 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] tuya_mcu_command: cluster_data=TuyaClusterData(endpoint_id=1, cluster_attr='on_off', attr_value=1, expect_reply=True)
2023-01-04 17:03:22.482 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] get_dp_mapping --> found DP: 103
2023-01-04 17:03:22.482 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] from_cluster_data: {103: DPToAttributeMapping(ep_attribute='on_off', attribute_name='on_off', dp_type=<TuyaDPType.BOOL: 1>, converter=None, dp_converter=None, endpoint_id=None)}
2023-01-04 17:03:22.482 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] ztype: Bool.true
2023-01-04 17:03:22.482 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] from_value: [1, 1]
2023-01-04 17:03:22.483 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] raw: b'\x01'
2023-01-04 17:03:22.483 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] tuya_commands: [TuyaCommand(status=0, tsn=18, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x01', *payload=<Bool.true: 1>))])]
2023-01-04 17:03:22.483 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x8EF3:1:0x0006]: executed 'on' command with args: '()' kwargs: '{}' result: Default_Response(command_id=1, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:22.483 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0x0006] no such attribute: 0
2023-01-04 17:03:22.483 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=True, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), manufacturer=4417, tsn=19, command_id=0, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
2023-01-04 17:03:22.484 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending request: set_data(data=TuyaCommand(status=0, tsn=18, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x01', *payload=<Bool.true: 1>))]))
2023-01-04 17:03:22.484 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=19, profile_id=260, cluster_id=61184, data=Serialized[b'\x05A\x11\x13\x00\x00\x12g\x01\x00\x01\x01'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:22.484 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=19, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK: 32>, Radius=0, Data=b'\x05\x41\x11\x13\x00\x00\x12\x67\x01\x00\x01\x01')
2023-01-04 17:03:22.503 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:22.508 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=19)
2023-01-04 17:03:22.528 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=195, SecurityUse=<Bool.false: 0>, TimeStamp=3215379, TSN=0, Data=b'\x18\x13\x0B\x00\x83', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:22.528 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x13\x0b\x00\x83'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=195, rssi=None)
2023-01-04 17:03:22.529 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\x18\x13\x0b\x00\x83'
2023-01-04 17:03:22.529 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=19, command_id=11, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:22.529 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:Default_Response(command_id=0, status=<Status.UNSUP_MANUF_CLUSTER_COMMAND: 131>)
2023-01-04 17:03:22.529 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851802.528989, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:22.530 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851802.528989, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:22.530 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:22.530 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:22.770 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=102, SecurityUse=<Bool.false: 0>, TimeStamp=3230434, TSN=0, Data=b'\x09\x1E\x02\x00\x84\x09\x02\x00\x04\x00\x00\x00\xD4', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 17:03:22.770 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1e\x02\x00\x84\t\x02\x00\x04\x00\x00\x00\xd4'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=102, rssi=None)
2023-01-04 17:03:22.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x1e\x02\x00\x84\t\x02\x00\x04\x00\x00\x00\xd4'
2023-01-04 17:03:22.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=30, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:22.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=132, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd4\x00\x00\x00', *payload=212))]))
2023-01-04 17:03:22.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 30): set_data_response(data=TuyaCommand(status=0, tsn=132, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xd4\x00\x00\x00', *payload=212))]))
2023-01-04 17:03:22.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=30, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:22.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:22.772 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=30, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1e\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:22.773 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=30, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1E\x0B\x02\x00')
2023-01-04 17:03:22.773 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851802.771024, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:22.773 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851802.771024, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:22.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:22.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:22.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 212))
2023-01-04 17:03:22.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 212)) completed
2023-01-04 17:03:22.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:22.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:22.778 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:22.814 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=30)
2023-01-04 17:03:23.713 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x7560](lumi.airmonitor.acn01): Device seen - marking the device available and resetting counter
2023-01-04 17:03:23.713 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x7560](lumi.airmonitor.acn01): Update device availability -  device available: True - new availability: True - changed: False
2023-01-04 17:03:23.770 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=102, SecurityUse=<Bool.false: 0>, TimeStamp=3292938, TSN=0, Data=b'\x09\x1F\x02\x00\x85\x09\x02\x00\x04\x00\x00\x00\xCC', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 17:03:23.771 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\x1f\x02\x00\x85\t\x02\x00\x04\x00\x00\x00\xcc'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=102, rssi=None)
2023-01-04 17:03:23.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t\x1f\x02\x00\x85\t\x02\x00\x04\x00\x00\x00\xcc'
2023-01-04 17:03:23.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=31, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:23.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=133, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xcc\x00\x00\x00', *payload=204))]))
2023-01-04 17:03:23.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 31): set_data_response(data=TuyaCommand(status=0, tsn=133, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xcc\x00\x00\x00', *payload=204))]))
2023-01-04 17:03:23.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=31, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:23.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:23.773 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=31, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\x1f\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:23.773 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=31, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x1F\x0B\x02\x00')
2023-01-04 17:03:23.773 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851803.771184, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:23.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851803.771184, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:23.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:23.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:23.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 204))
2023-01-04 17:03:23.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 204)) completed
2023-01-04 17:03:23.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:23.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:23.779 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:23.812 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=31)
2023-01-04 17:03:24.771 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x84BB, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=99, SecurityUse=<Bool.false: 0>, TimeStamp=3355475, TSN=0, Data=b'\x09\x20\x02\x00\x86\x09\x02\x00\x04\x00\x00\x00\xC1', MacSrcAddr=0x84BB, MsgResultRadius=29)
2023-01-04 17:03:24.771 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t \x02\x00\x86\t\x02\x00\x04\x00\x00\x00\xc1'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=99, rssi=None)
2023-01-04 17:03:24.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received ZCL frame: b'\t \x02\x00\x86\t\x02\x00\x04\x00\x00\x00\xc1'
2023-01-04 17:03:24.771 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=32, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:24.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Decoded ZCL frame: TuyaMmwRadarCluster:set_data_response(data=TuyaCommand(status=0, tsn=134, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xc1\x00\x00\x00', *payload=193))]))
2023-01-04 17:03:24.772 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Received command 0x02 (TSN 32): set_data_response(data=TuyaCommand(status=0, tsn=134, datapoints=[TuyaDatapointData(dp=9, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xc1\x00\x00\x00', *payload=193))]))
2023-01-04 17:03:24.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=32, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:24.773 DEBUG (MainThread) [zigpy.zcl] [0x84BB:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:24.773 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x84BB), dst_ep=1, source_route=None, extended_timeout=False, tsn=32, profile_id=260, cluster_id=61184, data=Serialized[b'\x18 \x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:24.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851804.771677, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:24.774 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=32, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x20\x0B\x02\x00')
2023-01-04 17:03:24.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851804.771677, 'ieee': dc:8e:95:ff:fe:59:b8:95, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:24.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:24.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:24.776 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 193))
2023-01-04 17:03:24.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (dc:8e:95:ff:fe:59:b8:95, 1, 12, 85, 193)) completed
2023-01-04 17:03:24.777 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:24.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:24.791 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:24.810 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=32)
2023-01-04 17:03:24.826 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=198, SecurityUse=<Bool.false: 0>, TimeStamp=3358980, TSN=0, Data=b'\x09\x5B\x02\x00\x26\x01\x04\x00\x01\x01', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:24.827 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t[\x02\x00&\x01\x04\x00\x01\x01'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=198, rssi=None)
2023-01-04 17:03:24.827 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\t[\x02\x00&\x01\x04\x00\x01\x01'
2023-01-04 17:03:24.827 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=91, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:24.827 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=38, datapoints=[TuyaDatapointData(dp=1, data=TuyaData(dp_type=<TuyaDPType.ENUM: 4>, function=0, raw=b'\x01', *payload=<enum8.undefined_0x01: 1>))]))
2023-01-04 17:03:24.827 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 91): set_data_response(data=TuyaCommand(status=0, tsn=38, datapoints=[TuyaDatapointData(dp=1, data=TuyaData(dp_type=<TuyaDPType.ENUM: 4>, function=0, raw=b'\x01', *payload=<enum8.undefined_0x01: 1>))]))
2023-01-04 17:03:24.828 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=91, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:24.828 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:24.828 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=91, profile_id=260, cluster_id=61184, data=Serialized[b'\x18[\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:24.829 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=91, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x5B\x0B\x02\x00')
2023-01-04 17:03:24.829 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851804.82713, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:24.830 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851804.82713, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:24.830 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:24.830 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:24.830 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 1030, 0, <enum8.undefined_0x01: 1>))
2023-01-04 17:03:24.830 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 1030, 0, <enum8.undefined_0x01: 1>)) completed
2023-01-04 17:03:24.832 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:24.832 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:24.845 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:24.867 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=91)
2023-01-04 17:03:24.885 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=198, SecurityUse=<Bool.false: 0>, TimeStamp=3362611, TSN=0, Data=b'\x09\x5C\x02\x00\x26\x65\x02\x00\x04\x00\x00\x00\x3C', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:24.885 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t\\\x02\x00&e\x02\x00\x04\x00\x00\x00<'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=198, rssi=None)
2023-01-04 17:03:24.885 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\t\\\x02\x00&e\x02\x00\x04\x00\x00\x00<'
2023-01-04 17:03:24.886 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=92, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:24.886 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=38, datapoints=[TuyaDatapointData(dp=101, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'<\x00\x00\x00', *payload=60))]))
2023-01-04 17:03:24.886 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 92): set_data_response(data=TuyaCommand(status=0, tsn=38, datapoints=[TuyaDatapointData(dp=101, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'<\x00\x00\x00', *payload=60))]))
2023-01-04 17:03:24.887 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=92, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:24.887 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:24.887 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=92, profile_id=260, cluster_id=61184, data=Serialized[b'\x18\\\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:24.887 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=92, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x5C\x0B\x02\x00')
2023-01-04 17:03:24.888 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851804.885868, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:24.889 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851804.885868, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:24.889 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:24.890 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:24.891 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61285, 60))
2023-01-04 17:03:24.892 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61285, 60)) completed
2023-01-04 17:03:24.892 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:24.893 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:24.904 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:24.925 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=92)
2023-01-04 17:03:24.942 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=198, SecurityUse=<Bool.false: 0>, TimeStamp=3366208, TSN=0, Data=b'\x09\x5D\x02\x00\x26\x66\x02\x00\x04\x00\x00\x00\x00', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:24.943 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t]\x02\x00&f\x02\x00\x04\x00\x00\x00\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=198, rssi=None)
2023-01-04 17:03:24.943 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\t]\x02\x00&f\x02\x00\x04\x00\x00\x00\x00'
2023-01-04 17:03:24.943 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=93, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:24.943 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=38, datapoints=[TuyaDatapointData(dp=102, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]))
2023-01-04 17:03:24.944 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 93): set_data_response(data=TuyaCommand(status=0, tsn=38, datapoints=[TuyaDatapointData(dp=102, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]))
2023-01-04 17:03:24.944 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=93, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:24.944 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:24.944 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=93, profile_id=260, cluster_id=61184, data=Serialized[b'\x18]\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:24.945 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=93, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x5D\x0B\x02\x00')
2023-01-04 17:03:24.945 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851804.943257, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:24.946 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851804.943257, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:24.946 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:24.946 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:24.947 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61286, 0))
2023-01-04 17:03:24.947 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 61184, 61286, 0)) completed
2023-01-04 17:03:24.948 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:24.948 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:24.962 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:24.983 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=93)
2023-01-04 17:03:25.000 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0x8EF3, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=201, SecurityUse=<Bool.false: 0>, TimeStamp=3369844, TSN=0, Data=b'\x09\x5E\x02\x00\x26\x67\x01\x00\x01\x00', MacSrcAddr=0x8EF3, MsgResultRadius=29)
2023-01-04 17:03:25.000 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=61184, data=Serialized[b'\t^\x02\x00&g\x01\x00\x01\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=29, non_member_radius=0, lqi=201, rssi=None)
2023-01-04 17:03:25.001 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received ZCL frame: b'\t^\x02\x00&g\x01\x00\x01\x00'
2023-01-04 17:03:25.001 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=94, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:25.001 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Decoded ZCL frame: MmwRadarManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=38, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 17:03:25.001 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Received command 0x02 (TSN 94): set_data_response(data=TuyaCommand(status=0, tsn=38, datapoints=[TuyaDatapointData(dp=103, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]))
2023-01-04 17:03:25.002 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=94, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2023-01-04 17:03:25.002 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2023-01-04 17:03:25.002 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x8EF3), dst_ep=1, source_route=None, extended_timeout=False, tsn=94, profile_id=260, cluster_id=61184, data=Serialized[b'\x18^\x0b\x02\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-01-04 17:03:25.003 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=94, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=0, Data=b'\x18\x5E\x0B\x02\x00')
2023-01-04 17:03:25.003 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851805.001089, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0})
2023-01-04 17:03:25.003 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'UPDATE devices_v11\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_last_seen_delta', {'ts': 1672851805.001089, 'ieee': a4:c1:38:da:1f:4b:bb:28, 'min_last_seen_delta': 30.0}) completed
2023-01-04 17:03:25.004 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:25.004 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:25.004 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>))
2023-01-04 17:03:25.005 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7fbdab4a4840>, 'INSERT INTO attributes_cache_v11 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster, attrid)\n                    DO UPDATE SET\n                        value=excluded.value WHERE value != excluded.value', (a4:c1:38:da:1f:4b:bb:28, 1, 6, 0, <Bool.false: 0>)) completed
2023-01-04 17:03:25.005 DEBUG (Thread-11) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>)
2023-01-04 17:03:25.005 DEBUG (Thread-11) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7fbdab4a4840>) completed
2023-01-04 17:03:25.019 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2023-01-04 17:03:25.039 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=94)

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

to be 100% clear, I toggle the button, and after a few seconds it slides back again with no results.

@javicalle
Copy link
Collaborator

Another try:
I have replaced the TuyaOnOff references for TuyaOnOffNM (3 in total).
Could you try with the new version?

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

Another try: I have replaced the TuyaOnOff references for TuyaOnOffNM (3 in total). Could you try with the new version?

Genius, thats the switch working :) now to just add those values to HA!

@javicalle
Copy link
Collaborator

Are you able to edit the HA classes? As custom components or editing directly the container?

I'll come back later to see how can be done.
Do you confirm that these DP values are time in minutes, right?

@jimmyeao
Copy link
Author

jimmyeao commented Jan 4, 2023

Are you able to edit the HA classes? As custom components or editing directly the container?

I'll come back later to see how can be done. Do you confirm that these DP values are time in minutes, right?

Yes they are minutes - not sure how to edit the classes?

@jimmyeao
Copy link
Author

jimmyeao commented Jan 23, 2023 via email

@alexvaltchev
Copy link

Thanks. Does it work out of the box with ZHA? No need for additional quirks and device handles are extra steps?

@javicalle
Copy link
Collaborator

The attributes can be 'exposed' in HA creating a new ZHA sensor like this:

@MULTI_MATCH(
    channel_names="tuya_manufacturer",
    manufacturers={
        "_TZE200_0u3bj3rc",
        "_TZE200_mx6u6l4y",
        "_TZE200_v6ossqfy",
    },
)
class AttendanceTime(Sensor, id_suffix="duration_of_attendance"):
    """Sensor that displays the attendance time."""

    SENSOR_ATTR = "duration_of_attendance"
    _attr_device_class: SensorDeviceClass = SensorDeviceClass.DURATION
    _attr_icon = "mdi:timer"
    _attr_name: str = "Attendance time"
    _attr_native_unit_of_measurement = UnitOfTime.MINUTES

It's just the same approach that is already implemented here:
https://github.com/home-assistant/core/blob/7d1dec8d315702020c5bb23bf0505bac7d584257/homeassistant/components/zha/sensor.py#L878-L891

Edit to add the code in the zha/sensor.py file or configure as a custom_component in HA.
The duration_of_absence can be done the same way.

PS: probably sensor names can get proper names.

@alexvaltchev
Copy link

@javicalle this what is this new code above? Should I replace those lines in my original ts0601_sensor_custom.py ? I am getting confused. Can you please explain in simple English what does this do, and how to implement it. I do not see ZHA directory with a sensor.py file. Sorry for being lame, I am just very new and need step by step guide. Thank you.

@javicalle
Copy link
Collaborator

what is this new code above?

Jimmy was asking me how to expose the cluster attributes in HA, and that code shows how can be done.

Should I replace those lines in my original ts0601_sensor_custom.py ?

No, that code is for update the ZHA integration.

Can you please explain in simple English what does this do, and how to implement it. I do not see ZHA directory with a sensor.py file. Sorry for being lame, I am just very new and need step by step guide.

Most of the code is untested and prone to bugs, so it needs to be tested by someone who knows what they're doing so we can focus on the code.
If you're not familiar with HA terminology and code, I think it's best to wait for the final version to be available on HA.

@alexvaltchev
Copy link

Yes, I have very basic knowledge, and agree would be better to wait until is implemented into HA. How long does it take for something like that to get official support, as I see you guys have been working already for a while. Thank you.

@alexvaltchev
Copy link

Guys I got a problem. The sensor was working it was taking about 1-2 second to change from "clear" to "detected" and about 65 seconds to from "detected" to "clear" and in Home Assistant. I then paired it with Smart Home app to check how is there and to see the other options available, and it got stuck on "detected" and now it never changes" I removed it from Smart Life and re-added, but does not work. I removed it and added into Home Assistant and still does not work. All it shoes is "detected" and even after 1 hour in the closet alone, still shows that. I tried to press fast the reset button 10 times, or to keep it on for 10s or other methods and nothing helps. How can I reboot the sensor to start working again ? Please help

@javicalle
Copy link
Collaborator

Sorry for the late response.
Could you attach the diagnosis info from the device?

@skycryer
Copy link

skycryer commented Mar 2, 2023

Does that still work for you with zha in Home Assistant 2023.3.0? Seems to have a problem with the TuyaDPType stuff what I read in a different post.

@besiktas97
Copy link

Does that still work for you with zha in Home Assistant 2023.3.0? Seems to have a problem with the TuyaDPType stuff what I read in a different post.

I've got the same thing and isnt working for me. Even after I have deleted the lines for it.

@javicalle
Copy link
Collaborator

Check this:
#2250 (comment)

@besiktas97
Copy link

Check this:

#2250 (comment)

I did exactly the same like you are commenting, but didnt work. I will try this again and let you know. Thanks.

@skycryer
Copy link

skycryer commented Mar 8, 2023

I updated the file like this and it works again. I have my Sensor back working and aha still works like expected.
ts0601_sensor_custom.txt

@besiktas97
Copy link

I updated the file like this and it works again. I have my Sensor back working and aha still works like expected.

ts0601_sensor_custom.txt

Thanks Sky. Can you repost it in plain text, so I can copy it easily? Will gonna try it tonight. I appreciate it.

@skycryer
Copy link

skycryer commented Mar 8, 2023

"""Human Presence Sensor 24GHz."""

from typing import Dict

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
import zigpy.types as t
from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time
from zigpy.zcl.clusters.measurement import OccupancySensing

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import TuyaLocalCluster
from zhaquirks.tuya.mcu import (
    DPToAttributeMapping,
    TuyaMCUCluster,
    TuyaOnOffNM,
)


class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster):
    """Tuya local OccupancySensing cluster."""


class MmwRadarManufCluster(TuyaMCUCluster):
    """Human Presence Sensor 24GHz."""

    attributes = TuyaMCUCluster.attributes.copy()
    attributes.update(
        {
            # ramdom attribute IDs
            0xEF65: ("duration_of_attendance", t.uint32_t, True),
            0xEF66: ("duration_of_absence", t.uint32_t, True),
        }
    )

    dp_to_attribute: Dict[int, DPToAttributeMapping] = {
        1: DPToAttributeMapping(
            TuyaOccupancySensing.ep_attribute,
            "occupancy"
        ),
        101: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "duration_of_attendance"
        ),
        102: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "duration_of_absence"
        ),
        103: DPToAttributeMapping(
            TuyaOnOffNM.ep_attribute,
            "on_off"
        ),
    }

    data_point_handlers = {
        1: "_dp_2_attr_update",
        101: "_dp_2_attr_update",
        102: "_dp_2_attr_update",
        103: "_dp_2_attr_update",
    }


class MmwRadarMotion_var03(CustomDevice):
    """Millimeter wave occupancy sensor."""

    signature = {
        #  endpoint=1, profile=260, device_type=81, device_version=1,
        #  input_clusters=[4, 5, 61184, 0], output_clusters=[25, 10])
        MODELS_INFO: [
            ("_TZE200_0u3bj3rc", "TS0601"),
            ("_TZE200_mx6u6l4y", "TS0601"),
            ("_TZE200_v6ossqfy", "TS0601"),
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaMCUCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
                # input_clusters=[]
                # output_clusters=[33]
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    MmwRadarManufCluster,
                    TuyaOccupancySensing,
                    TuyaOnOffNM,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        }
    }

@besiktas97
Copy link


"""Human Presence Sensor 24GHz."""



from typing import Dict



from zigpy.profiles import zha

from zigpy.quirks import CustomDevice

import zigpy.types as t

from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time

from zigpy.zcl.clusters.measurement import OccupancySensing



from zhaquirks.const import (

    DEVICE_TYPE,

    ENDPOINTS,

    INPUT_CLUSTERS,

    MODELS_INFO,

    OUTPUT_CLUSTERS,

    PROFILE_ID,

)

from zhaquirks.tuya import TuyaLocalCluster

from zhaquirks.tuya.mcu import (

    DPToAttributeMapping,

    TuyaMCUCluster,

    TuyaOnOffNM,

)





class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster):

    """Tuya local OccupancySensing cluster."""





class MmwRadarManufCluster(TuyaMCUCluster):

    """Human Presence Sensor 24GHz."""



    attributes = TuyaMCUCluster.attributes.copy()

    attributes.update(

        {

            # ramdom attribute IDs

            0xEF65: ("duration_of_attendance", t.uint32_t, True),

            0xEF66: ("duration_of_absence", t.uint32_t, True),

        }

    )



    dp_to_attribute: Dict[int, DPToAttributeMapping] = {

        1: DPToAttributeMapping(

            TuyaOccupancySensing.ep_attribute,

            "occupancy"

        ),

        101: DPToAttributeMapping(

            TuyaMCUCluster.ep_attribute,

            "duration_of_attendance"

        ),

        102: DPToAttributeMapping(

            TuyaMCUCluster.ep_attribute,

            "duration_of_absence"

        ),

        103: DPToAttributeMapping(

            TuyaOnOffNM.ep_attribute,

            "on_off"

        ),

    }



    data_point_handlers = {

        1: "_dp_2_attr_update",

        101: "_dp_2_attr_update",

        102: "_dp_2_attr_update",

        103: "_dp_2_attr_update",

    }





class MmwRadarMotion_var03(CustomDevice):

    """Millimeter wave occupancy sensor."""



    signature = {

        #  endpoint=1, profile=260, device_type=81, device_version=1,

        #  input_clusters=[4, 5, 61184, 0], output_clusters=[25, 10])

        MODELS_INFO: [

            ("_TZE200_0u3bj3rc", "TS0601"),

            ("_TZE200_mx6u6l4y", "TS0601"),

            ("_TZE200_v6ossqfy", "TS0601"),

        ],

        ENDPOINTS: {

            1: {

                PROFILE_ID: zha.PROFILE_ID,

                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,

                INPUT_CLUSTERS: [

                    Basic.cluster_id,

                    Groups.cluster_id,

                    Scenes.cluster_id,

                    TuyaMCUCluster.cluster_id,

                ],

                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],

            },

            242: {

                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97

                # input_clusters=[]

                # output_clusters=[33]

                PROFILE_ID: 41440,

                DEVICE_TYPE: 97,

                INPUT_CLUSTERS: [],

                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],

            },

        },

    }



    replacement = {

        ENDPOINTS: {

            1: {

                PROFILE_ID: zha.PROFILE_ID,

                DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR,

                INPUT_CLUSTERS: [

                    Basic.cluster_id,

                    Groups.cluster_id,

                    Scenes.cluster_id,

                    MmwRadarManufCluster,

                    TuyaOccupancySensing,

                    TuyaOnOffNM,

                ],

                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],

            },

            242: {

                PROFILE_ID: 41440,

                DEVICE_TYPE: 97,

                INPUT_CLUSTERS: [],

                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],

            },

        }

    }

Thanks!

@Chreece
Copy link

Chreece commented Mar 8, 2023

Thank you guys! Just got mine and added it with the custom quirk. The Led fortunatelly goes off with the switch and the occupancy sensor seems to work. Is there anything I can do to minimum the delay from on to off? It stays on some time with no occupancy

@javicalle
Copy link
Collaborator

You need to update the cluster attribute duration_of_absence (or duration_of_attendance) from the device cluster management.

@Chreece
Copy link

Chreece commented Mar 8, 2023

I have already done that, both are 0 but aren't the values populated from the sensor (how many minutes did detect presence...)?

@javicalle
Copy link
Collaborator

I have already done that, both are 0 but aren't the values populated from the sensor (how many minutes did detect presence...)?

Yes that's true 😓

Then there is no configuration for that property.

@alexvaltchev
Copy link

alexvaltchev commented Mar 17, 2023


"""Human Presence Sensor 24GHz."""



from typing import Dict



from zigpy.profiles import zha

from zigpy.quirks import CustomDevice

import zigpy.types as t

from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time

from zigpy.zcl.clusters.measurement import OccupancySensing



from zhaquirks.const import (

    DEVICE_TYPE,

    ENDPOINTS,

    INPUT_CLUSTERS,

    MODELS_INFO,

    OUTPUT_CLUSTERS,

    PROFILE_ID,

)

from zhaquirks.tuya import TuyaLocalCluster

from zhaquirks.tuya.mcu import (

    DPToAttributeMapping,

    TuyaMCUCluster,

    TuyaOnOffNM,

)





class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster):

    """Tuya local OccupancySensing cluster."""





class MmwRadarManufCluster(TuyaMCUCluster):

    """Human Presence Sensor 24GHz."""



    attributes = TuyaMCUCluster.attributes.copy()

    attributes.update(

        {

            # ramdom attribute IDs

            0xEF65: ("duration_of_attendance", t.uint32_t, True),

            0xEF66: ("duration_of_absence", t.uint32_t, True),

        }

    )



    dp_to_attribute: Dict[int, DPToAttributeMapping] = {

        1: DPToAttributeMapping(

            TuyaOccupancySensing.ep_attribute,

            "occupancy"

        ),

        101: DPToAttributeMapping(

            TuyaMCUCluster.ep_attribute,

            "duration_of_attendance"

        ),

        102: DPToAttributeMapping(

            TuyaMCUCluster.ep_attribute,

            "duration_of_absence"

        ),

        103: DPToAttributeMapping(

            TuyaOnOffNM.ep_attribute,

            "on_off"

        ),

    }



    data_point_handlers = {

        1: "_dp_2_attr_update",

        101: "_dp_2_attr_update",

        102: "_dp_2_attr_update",

        103: "_dp_2_attr_update",

    }





class MmwRadarMotion_var03(CustomDevice):

    """Millimeter wave occupancy sensor."""



    signature = {

        #  endpoint=1, profile=260, device_type=81, device_version=1,

        #  input_clusters=[4, 5, 61184, 0], output_clusters=[25, 10])

        MODELS_INFO: [

            ("_TZE200_0u3bj3rc", "TS0601"),

            ("_TZE200_mx6u6l4y", "TS0601"),

            ("_TZE200_v6ossqfy", "TS0601"),

        ],

        ENDPOINTS: {

            1: {

                PROFILE_ID: zha.PROFILE_ID,

                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,

                INPUT_CLUSTERS: [

                    Basic.cluster_id,

                    Groups.cluster_id,

                    Scenes.cluster_id,

                    TuyaMCUCluster.cluster_id,

                ],

                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],

            },

            242: {

                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97

                # input_clusters=[]

                # output_clusters=[33]

                PROFILE_ID: 41440,

                DEVICE_TYPE: 97,

                INPUT_CLUSTERS: [],

                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],

            },

        },

    }



    replacement = {

        ENDPOINTS: {

            1: {

                PROFILE_ID: zha.PROFILE_ID,

                DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR,

                INPUT_CLUSTERS: [

                    Basic.cluster_id,

                    Groups.cluster_id,

                    Scenes.cluster_id,

                    MmwRadarManufCluster,

                    TuyaOccupancySensing,

                    TuyaOnOffNM,

                ],

                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],

            },

            242: {

                PROFILE_ID: 41440,

                DEVICE_TYPE: 97,

                INPUT_CLUSTERS: [],

                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],

            },

        }

    }

Thanks!

I put this into my my configuration.yaml file

zha:
enable_quirks: true
custom_quirks_path: /config/custom_zha_quirks/

Then inside I made file "ts0601_sensor_custom.py" and I put the code above from besiktas97

I can toggle the light ON and OFF but the status ALWAYS stays at "DETECTED". Why? I tried to remove the sensor from HA and added back again and restarted, nothing helps. It is always "detected" no matter what. Please help, why is it stuck like that? Thanks

Here is the diagnostic.
zha-1be608adfd5dabaaecaf06df5a0aa201-_TZE200_v6ossqfy TS0601-790f4895d61d2335b9e2a7b1783801ec.json.txt

@monstergubl
Copy link

so my model is the TZE204_qasjif9e does this work ?

@Wemmy0
Copy link

Wemmy0 commented Aug 9, 2023

Looks like this has been updated to the TZE204_qasjif9e
I've tried adding to to MODELS_INFO:

MODELS_INFO: [
            ("_TZE200_0u3bj3rc", "TS0601"),
            ("_TZE200_mx6u6l4y", "TS0601"),
            ("_TZE200_v6ossqfy", "TS0601"),
            ("_TZE204_qasjif9e", "TS0601"),
        ],

But I couldn't get it showing up correctly. I bought it from https://www.aliexpress.com/item/1005005709438307.html
image

@Wemmy0
Copy link

Wemmy0 commented Aug 9, 2023

My bad, I got it working for _TZE204_qasjif9e:

"""Human Presence Sensor 24GHz."""

from typing import Dict

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
import zigpy.types as t
from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time
from zigpy.zcl.clusters.measurement import OccupancySensing

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import TuyaLocalCluster
from zhaquirks.tuya.mcu import (
    DPToAttributeMapping,
    TuyaMCUCluster,
    TuyaOnOffNM,
)


class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster):
    """Tuya local OccupancySensing cluster."""


class MmwRadarManufCluster(TuyaMCUCluster):
    """Human Presence Sensor 24GHz."""

    attributes = TuyaMCUCluster.attributes.copy()
    attributes.update(
        {
            # ramdom attribute IDs
            0xEF65: ("duration_of_attendance", t.uint32_t, True),
            0xEF66: ("duration_of_absence", t.uint32_t, True),
        }
    )

    dp_to_attribute: Dict[int, DPToAttributeMapping] = {
        1: DPToAttributeMapping(
            TuyaOccupancySensing.ep_attribute,
            "occupancy"
        ),
        101: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "duration_of_attendance"
        ),
        102: DPToAttributeMapping(
            TuyaMCUCluster.ep_attribute,
            "duration_of_absence"
        ),
        103: DPToAttributeMapping(
            TuyaOnOffNM.ep_attribute,
            "on_off"
        ),
    }

    data_point_handlers = {
        1: "_dp_2_attr_update",
        101: "_dp_2_attr_update",
        102: "_dp_2_attr_update",
        103: "_dp_2_attr_update",
    }


class MmwRadarMotion_var03(CustomDevice):
    """Millimeter wave occupancy sensor."""

    signature = {
        #  endpoint=1, profile=260, device_type=81, device_version=1,
        #  input_clusters=[4, 5, 61184, 0], output_clusters=[25, 10])
        MODELS_INFO: [
            ("_TZE200_0u3bj3rc", "TS0601"),
            ("_TZE200_mx6u6l4y", "TS0601"),
            ("_TZE200_v6ossqfy", "TS0601"),
            ("_TZE204_qasjif9e", "TS0601"),
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaMCUCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
                # input_clusters=[]
                # output_clusters=[33]
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    MmwRadarManufCluster,
                    TuyaOccupancySensing,
                    TuyaOnOffNM,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        }
    }

@jimmyeao
Copy link
Author

im going to close this off, as I've since abandoned ZHA in favour of Zigbee2mqtt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom quirk available A custom quirk is available to solve the issue, but it's not merged in the repo yet Tuya Request/PR regarding a Tuya device
Projects
None yet
Development

No branches or pull requests