zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
720 stars 669 forks source link

[Device Support Request] _TZE200_v6ossqfy mmwave sensor #2059

Closed jimmyeao closed 10 months ago

jimmyeao commented 1 year ago

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=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=, *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 ```yaml { "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=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=, *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 commented 1 year ago

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 commented 1 year ago

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

jimmyeao commented 1 year ago

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 commented 1 year ago

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

switch: Toggle the onboard LED On/Off

jimmyeao commented 1 year ago

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

javicalle commented 1 year ago

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

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:

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.

jimmyeao commented 1 year ago
  • 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 commented 1 year ago

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

(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 ```python """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: { #

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 commented 1 year ago

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 commented 1 year ago

logs are here

jimmyeao commented 1 year ago

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 commented 1 year ago

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: { #
javicalle commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

After looking at Z2M my final proposal would be:

24Ghz mmWave radar ```python """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: { #

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

jimmyeao commented 1 year ago

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 commented 1 year ago

I have updated the import statement for the DPToAttributeMapping class.

jimmyeao commented 1 year ago

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 "", line 548, in _check_name_wrapper File "", line 1063, in load_module File "", line 888, in load_module File "", line 290, in _load_module_shim File "", line 719, in _load File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_zha_quirks/ts0601_mmwave.py", line 31, in 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 commented 1 year ago

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

jimmyeao commented 1 year ago

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

javicalle commented 1 year ago

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

jimmyeao commented 1 year ago
``` 2023-01-04 16:35:51.715 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:51.731 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=195, SecurityUse=, 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=, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=25, command_id=2, *direction=, *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=, function=0, raw=b'\x00', *payload=))])) 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=, function=0, raw=b'\x00', *payload=))])) 2023-01-04 16:35:51.750 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=25, command_id=, *direction=, *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=) 2023-01-04 16:35:51.750 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=25, Options=, Radius=0, Data=b'\x18\x19\x0B\x02\x00') 2023-01-04 16:35:51.751 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:51.752 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:51.752 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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, )) 2023-01-04 16:35:51.752 DEBUG (Thread-10) [aiosqlite] operation functools.partial(, '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, )) completed 2023-01-04 16:35:51.753 DEBUG (Thread-10) [aiosqlite] executing functools.partial() 2023-01-04 16:35:51.753 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:51.761 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:51.776 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, converter=None, dp_converter=None, endpoint_id=None)} 2023-01-04 16:35:53.351 WARNING (MainThread) [zigpy.util] Error calling listener > 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 > 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=) 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=, LQI=99, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=125, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=125, command_id=, *direction=, *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=) 2023-01-04 16:35:53.867 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=125, Options=, Radius=0, Data=b'\x18\x7D\x0B\x02\x00') 2023-01-04 16:35:53.868 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:53.869 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:53.869 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:53.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:53.879 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:53.894 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=99, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=126, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=126, command_id=, *direction=, *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=) 2023-01-04 16:35:54.867 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=126, Options=, Radius=0, Data=b'\x18\x7E\x0B\x02\x00') 2023-01-04 16:35:54.868 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:54.869 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:54.870 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:54.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:54.878 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:54.891 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=198, SecurityUse=, 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=, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=26, command_id=2, *direction=, *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=, function=0, raw=b'\x01', *payload=))])) 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=, function=0, raw=b'\x01', *payload=))])) 2023-01-04 16:35:55.122 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=26, command_id=, *direction=, *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=) 2023-01-04 16:35:55.122 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, radius=0, non_member_radius=0, lqi=None, rssi=None) 2023-01-04 16:35:55.122 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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=, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=26, Options=, Radius=0, Data=b'\x18\x1A\x0B\x02\x00') 2023-01-04 16:35:55.123 DEBUG (Thread-10) [aiosqlite] operation functools.partial(, '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() 2023-01-04 16:35:55.124 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.124 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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, )) 2023-01-04 16:35:55.125 DEBUG (Thread-10) [aiosqlite] operation functools.partial(, '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, )) completed 2023-01-04 16:35:55.125 DEBUG (Thread-10) [aiosqlite] executing functools.partial() 2023-01-04 16:35:55.125 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.134 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:55.149 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=195, SecurityUse=, 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=, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=27, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=27, command_id=, *direction=, *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=) 2023-01-04 16:35:55.169 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=27, Options=, Radius=0, Data=b'\x18\x1B\x0B\x02\x00') 2023-01-04 16:35:55.170 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:55.170 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.171 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:55.171 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.180 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:55.194 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=195, SecurityUse=, 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=, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=28, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=28, command_id=, *direction=, *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=) 2023-01-04 16:35:55.214 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=28, Options=, Radius=0, Data=b'\x18\x1C\x0B\x02\x00') 2023-01-04 16:35:55.215 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:55.216 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.216 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:55.217 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.226 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:55.240 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=198, SecurityUse=, 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=, address=0x9D67), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=29, command_id=2, *direction=, *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=, function=0, raw=b'\x00', *payload=))])) 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=, function=0, raw=b'\x00', *payload=))])) 2023-01-04 16:35:55.259 DEBUG (MainThread) [zigpy.zcl] [0x9D67:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=29, command_id=, *direction=, *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=) 2023-01-04 16:35:55.259 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x9D67), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=29, Options=, Radius=0, Data=b'\x18\x1D\x0B\x02\x00') 2023-01-04 16:35:55.260 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:55.261 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.262 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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, )) 2023-01-04 16:35:55.262 DEBUG (Thread-10) [aiosqlite] operation functools.partial(, '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, )) completed 2023-01-04 16:35:55.263 DEBUG (Thread-10) [aiosqlite] executing functools.partial() 2023-01-04 16:35:55.263 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.270 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:55.286 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=99, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=127, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=127, command_id=, *direction=, *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=) 2023-01-04 16:35:55.868 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=127, Options=, Radius=0, Data=b'\x18\x7F\x0B\x02\x00') 2023-01-04 16:35:55.869 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:55.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.870 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:55.873 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:55.880 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:55.893 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, converter=None, dp_converter=None, endpoint_id=None)} 2023-01-04 16:35:55.912 WARNING (MainThread) [zigpy.util] Error calling listener > 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 > 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=) 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=, LQI=102, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=0, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=0, command_id=, *direction=, *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=) 2023-01-04 16:35:56.868 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=0, Options=, Radius=0, Data=b'\x18\x00\x0B\x02\x00') 2023-01-04 16:35:56.868 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:56.870 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:56.871 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:56.872 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:56.878 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:56.892 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=105, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=1, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=1, command_id=, *direction=, *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=) 2023-01-04 16:35:57.868 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=1, Options=, Radius=0, Data=b'\x18\x01\x0B\x02\x00') 2023-01-04 16:35:57.869 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:57.871 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:57.871 DEBUG (Thread-10) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 16:35:57.872 DEBUG (Thread-10) [aiosqlite] operation functools.partial() completed 2023-01-04 16:35:57.880 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 16:35:57.893 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, Endpoint=1, TSN=1) ```
javicalle commented 1 year ago

Arrrrrgh! Already fixed the TuyaDPType import.

jimmyeao commented 1 year ago

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=, LQI=99, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=25, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=25, command_id=, *direction=, *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=) 2023-01-04 17:03:17.773 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=25, Options=, Radius=0, Data=b'\x18\x19\x0B\x02\x00') 2023-01-04 17:03:17.773 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:17.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:17.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:17.776 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:17.790 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 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=, LQI=201, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=83, command_id=2, *direction=, *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=, function=0, raw=b'\x01', *payload=))])) 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=, function=0, raw=b'\x01', *payload=))])) 2023-01-04 17:03:17.808 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=83, command_id=, *direction=, *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=) 2023-01-04 17:03:17.809 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=83, Options=, Radius=0, Data=b'\x18\x53\x0B\x02\x00') 2023-01-04 17:03:17.809 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:17.810 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:17.810 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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, )) 2023-01-04 17:03:17.810 DEBUG (Thread-11) [aiosqlite] operation functools.partial(, '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, )) completed 2023-01-04 17:03:17.811 DEBUG (Thread-11) [aiosqlite] executing functools.partial() 2023-01-04 17:03:17.811 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:17.818 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, Endpoint=1, TSN=25) 2023-01-04 17:03:17.830 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:17.851 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=198, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=84, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=84, command_id=, *direction=, *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=) 2023-01-04 17:03:17.870 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=84, Options=, Radius=0, Data=b'\x18\x54\x0B\x02\x00') 2023-01-04 17:03:17.870 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:17.871 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:17.872 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:17.873 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:17.887 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:17.908 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=201, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=85, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=85, command_id=, *direction=, *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=) 2023-01-04 17:03:17.927 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=85, Options=, Radius=0, Data=b'\x18\x55\x0B\x02\x00') 2023-01-04 17:03:17.927 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:17.929 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:17.929 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:17.930 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:17.944 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:17.965 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=198, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=86, command_id=2, *direction=, *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=, function=0, raw=b'\x00', *payload=))])) 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=, function=0, raw=b'\x00', *payload=))])) 2023-01-04 17:03:17.984 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=86, command_id=, *direction=, *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=) 2023-01-04 17:03:17.985 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=86, Options=, Radius=0, Data=b'\x18\x56\x0B\x02\x00') 2023-01-04 17:03:17.986 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:17.986 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:17.987 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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, )) 2023-01-04 17:03:17.987 DEBUG (Thread-11) [aiosqlite] operation functools.partial(, '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, )) completed 2023-01-04 17:03:17.987 DEBUG (Thread-11) [aiosqlite] executing functools.partial() 2023-01-04 17:03:17.987 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:18.002 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:18.022 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=99, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=26, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=26, command_id=, *direction=, *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=) 2023-01-04 17:03:18.774 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=26, Options=, Radius=0, Data=b'\x18\x1A\x0B\x02\x00') 2023-01-04 17:03:18.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:18.776 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:18.777 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:18.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:18.791 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:18.812 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=99, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=27, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=27, command_id=, *direction=, *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=) 2023-01-04 17:03:19.774 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=27, Options=, Radius=0, Data=b'\x18\x1B\x0B\x02\x00') 2023-01-04 17:03:19.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:19.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:19.777 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:19.778 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:19.791 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:19.821 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, 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=, function=0, raw=b'\x01', *payload=))])] 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=) 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=, is_manufacturer_specific=True, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), manufacturer=4417, tsn=17, command_id=0, *direction=, *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=, function=0, raw=b'\x01', *payload=))])) 2023-01-04 17:03:19.998 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=17, Options=, 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=) 2023-01-04 17:03:20.020 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=198, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=17, command_id=11, *direction=, *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=) 2023-01-04 17:03:20.041 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:20.042 DEBUG (Thread-11) [aiosqlite] operation functools.partial() 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=, LQI=99, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=28, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=28, command_id=, *direction=, *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=) 2023-01-04 17:03:20.774 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=28, Options=, Radius=0, Data=b'\x18\x1C\x0B\x02\x00') 2023-01-04 17:03:20.775 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:20.776 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:20.776 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:20.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:20.780 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:20.813 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=195, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=87, command_id=2, *direction=, *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=, function=0, raw=b'\x01', *payload=))])) 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=, function=0, raw=b'\x01', *payload=))])) 2023-01-04 17:03:21.318 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=87, command_id=, *direction=, *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=) 2023-01-04 17:03:21.319 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=87, Options=, Radius=0, Data=b'\x18\x57\x0B\x02\x00') 2023-01-04 17:03:21.319 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:21.321 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.322 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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, )) 2023-01-04 17:03:21.322 DEBUG (Thread-11) [aiosqlite] operation functools.partial(, '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, )) completed 2023-01-04 17:03:21.322 DEBUG (Thread-11) [aiosqlite] executing functools.partial() 2023-01-04 17:03:21.323 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.342 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:21.357 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=201, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=88, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=88, command_id=, *direction=, *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=) 2023-01-04 17:03:21.389 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=88, Options=, Radius=0, Data=b'\x18\x58\x0B\x02\x00') 2023-01-04 17:03:21.389 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:21.391 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.391 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:21.392 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.406 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:21.428 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=201, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=89, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=89, command_id=, *direction=, *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=) 2023-01-04 17:03:21.447 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=89, Options=, Radius=0, Data=b'\x18\x59\x0B\x02\x00') 2023-01-04 17:03:21.448 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:21.449 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.450 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:21.450 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.464 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:21.484 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=195, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=90, command_id=2, *direction=, *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=, function=0, raw=b'\x00', *payload=))])) 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=, function=0, raw=b'\x00', *payload=))])) 2023-01-04 17:03:21.503 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=90, command_id=, *direction=, *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=) 2023-01-04 17:03:21.504 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=90, Options=, Radius=0, Data=b'\x18\x5A\x0B\x02\x00') 2023-01-04 17:03:21.504 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:21.505 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.506 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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, )) 2023-01-04 17:03:21.506 DEBUG (Thread-11) [aiosqlite] operation functools.partial(, '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, )) completed 2023-01-04 17:03:21.506 DEBUG (Thread-11) [aiosqlite] executing functools.partial() 2023-01-04 17:03:21.506 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.521 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:21.542 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=99, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=29, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=29, command_id=, *direction=, *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=) 2023-01-04 17:03:21.773 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=29, Options=, Radius=0, Data=b'\x18\x1D\x0B\x02\x00') 2023-01-04 17:03:21.773 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:21.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:21.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:21.790 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:21.808 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, 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=, function=0, raw=b'\x01', *payload=))])] 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=) 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=, is_manufacturer_specific=True, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), manufacturer=4417, tsn=19, command_id=0, *direction=, *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=, function=0, raw=b'\x01', *payload=))])) 2023-01-04 17:03:22.484 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=19, Options=, 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=) 2023-01-04 17:03:22.508 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=195, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=19, command_id=11, *direction=, *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=) 2023-01-04 17:03:22.529 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:22.530 DEBUG (Thread-11) [aiosqlite] operation functools.partial() 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=, LQI=102, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=30, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=30, command_id=, *direction=, *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=) 2023-01-04 17:03:22.772 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=30, Options=, Radius=0, Data=b'\x18\x1E\x0B\x02\x00') 2023-01-04 17:03:22.773 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:22.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:22.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:22.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:22.778 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:22.814 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=102, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=31, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=31, command_id=, *direction=, *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=) 2023-01-04 17:03:23.773 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=31, Options=, Radius=0, Data=b'\x18\x1F\x0B\x02\x00') 2023-01-04 17:03:23.773 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:23.774 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:23.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:23.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:23.779 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:23.812 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=99, SecurityUse=, 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=, address=0x84BB), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=32, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=32, command_id=, *direction=, *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=) 2023-01-04 17:03:24.773 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, radius=0, non_member_radius=0, lqi=None, rssi=None) 2023-01-04 17:03:24.774 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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=, address=0x84BB), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=32, Options=, Radius=0, Data=b'\x18\x20\x0B\x02\x00') 2023-01-04 17:03:24.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial(, '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() 2023-01-04 17:03:24.775 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:24.776 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:24.777 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:24.791 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:24.810 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=198, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=91, command_id=2, *direction=, *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=, function=0, raw=b'\x01', *payload=))])) 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=, function=0, raw=b'\x01', *payload=))])) 2023-01-04 17:03:24.828 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=91, command_id=, *direction=, *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=) 2023-01-04 17:03:24.828 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=91, Options=, Radius=0, Data=b'\x18\x5B\x0B\x02\x00') 2023-01-04 17:03:24.829 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:24.830 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:24.830 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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, )) 2023-01-04 17:03:24.830 DEBUG (Thread-11) [aiosqlite] operation functools.partial(, '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, )) completed 2023-01-04 17:03:24.832 DEBUG (Thread-11) [aiosqlite] executing functools.partial() 2023-01-04 17:03:24.832 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:24.845 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:24.867 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=198, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=92, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=92, command_id=, *direction=, *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=) 2023-01-04 17:03:24.887 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=92, Options=, Radius=0, Data=b'\x18\x5C\x0B\x02\x00') 2023-01-04 17:03:24.888 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:24.890 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:24.891 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:24.893 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:24.904 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:24.925 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=198, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=93, command_id=2, *direction=, *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=, 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=, 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=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=93, command_id=, *direction=, *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=) 2023-01-04 17:03:24.944 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=93, Options=, Radius=0, Data=b'\x18\x5D\x0B\x02\x00') 2023-01-04 17:03:24.945 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:24.946 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:24.947 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:24.948 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:24.962 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:24.983 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, 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=, LQI=201, SecurityUse=, 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=, address=0x8EF3), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=94, command_id=2, *direction=, *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=, function=0, raw=b'\x00', *payload=))])) 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=, function=0, raw=b'\x00', *payload=))])) 2023-01-04 17:03:25.002 DEBUG (MainThread) [zigpy.zcl] [0x8EF3:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=94, command_id=, *direction=, *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=) 2023-01-04 17:03:25.002 DEBUG (MainThread) [zigpy_znp.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=, 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=, 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=, address=0x8EF3), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=94, Options=, Radius=0, Data=b'\x18\x5E\x0B\x02\x00') 2023-01-04 17:03:25.003 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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(, '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() 2023-01-04 17:03:25.004 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:25.004 DEBUG (Thread-11) [aiosqlite] executing functools.partial(, '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, )) 2023-01-04 17:03:25.005 DEBUG (Thread-11) [aiosqlite] operation functools.partial(, '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, )) completed 2023-01-04 17:03:25.005 DEBUG (Thread-11) [aiosqlite] executing functools.partial() 2023-01-04 17:03:25.005 DEBUG (Thread-11) [aiosqlite] operation functools.partial() completed 2023-01-04 17:03:25.019 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=) 2023-01-04 17:03:25.039 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=, Endpoint=1, TSN=94) ```
jimmyeao commented 1 year ago

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

javicalle commented 1 year ago

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

jimmyeao commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Any luck with exposes those two values @javicalle ?

Sakul85 commented 1 year ago

I also got this sensor and would be very happy about an integration into ZHA as well.

Unfortunately my knowledge is very limited but I could support with testing and providing logs :-)

javicalle commented 1 year ago

Any luck with exposes those two values @javicalle ?

I haven't had time to check that (or any other) part.

TheJulianJES commented 1 year ago

Is the quirk from this comment still the latest (and ready to be merged into zha-quirks)?

alexvaltchev commented 1 year ago

I am new here and I have the same sensor. I use ZHA, how do I manage to make it work, or there is still no work at this time? I am new here and new to HA and dont know programing. How do I apply a fix and make it work? thanks

TheJulianJES commented 1 year ago

Paste the content from this comment into a file called ts0601_sensor_custom.py for example.

Then, create a folder called custom_zha_quirks in your /config directory for Home Assistant and put the file in that folder. Register that folder in your configuration.yaml and restart HA.

See https://github.com/zigpy/zha-device-handlers/discussions/693#discussioncomment-857274 for how to register that folder. Also, follow this issue as this will (hopefully) be merged into HA in the future and you'd want to remove the custom quirk at that point.

jimmyeao commented 1 year ago

That quirk doesnt expose all the sensors though - there is no "time occupied" for, for example. Only presence.

alexvaltchev commented 1 year ago

Paste the content from this comment into a file called ts0601_sensor_custom.py for example.

Then, create a folder called custom_zha_quirks in your /config directory for Home Assistant and put the file in that folder. Register that folder in your configuration.yaml and restart HA.

See #693 (comment) for how to register that folder. Also, follow this issue as this will (hopefully) be merged into HA in the future and you'd want to remove the custom quirk at that point.

I created a directory called "custom_zha_quirks" inside the "config" folder, and created a file called "ts0601_sensor_custom.py" and pasted all the code from the comment. The only thing left is to register the folder inside the configuartion.yaml file. What is the code I need to put there to register it. I cant find it online. Sorry I am newbie...

jimmyeao commented 1 year ago

Paste the content from this comment into a file called ts0601_sensor_custom.py for example. Then, create a folder called custom_zha_quirks in your /config directory for Home Assistant and put the file in that folder. Register that folder in your configuration.yaml and restart HA. See #693 (comment) for how to register that folder. Also, follow this issue as this will (hopefully) be merged into HA in the future and you'd want to remove the custom quirk at that point.

I created a directory called "custom_zha_quirks" inside the "config" folder, and created a file called "ts0601_sensor_custom.py" and pasted all the code from the comment. The only thing left is to register the folder inside the configuartion.yaml file. What is the code I need to put there to register it. I cant find it online. Sorry I am newbie...

zha:
  enable_quirks: true
  custom_quirks_path: /config/custom_zha_quirks/ 
alexvaltchev commented 1 year ago

Thank you. I restarted home assistant and now shows this: https://prnt.sc/uKTN2BueFis0 Is this what is supposed to happen? It shows as a switch (on) possibly when there is a person in the room and (off) when can't detect anything?

What is the other sensor that you are talking about that are not exposed? Time value (how long is On or OFF) I guess? And how far to be able to detect (as in the original Smart Life app?) Thank you all!

jimmyeao commented 1 year ago

That looks correct, the switch is turn the LED off This device also exposes how long a room has been occupied or unoccupied for (0-60minutes) but the quirk doesn't capture that yet

alexvaltchev commented 1 year ago

OK OK, I get it. It is great workaround for the time being. I hope a full implementation will be done in the next few months. How do I know when to remove the quirk from the configuration.yaml ? I just need to keep checking here, I guess?

What else can be implemented to this sensor? I guess how far the sensor to reach like (distance: 5 meters for example) I don't remember what else was in the original Smart Life app, but this does the job for the time being. I am very appreciative of everyone here involved in this post. Thank you all!!!

javicalle commented 1 year ago

The quirk is managing the values but they aren't exposed in HA. You can manage it as cluster attributes.

jimmyeao commented 1 year ago

The quirk is managing the values but they aren't exposed in HA. You can manage it as cluster attributes.

I haven't had to do that before, can you give me some pointers please?

alexvaltchev commented 1 year ago

What does "not exposed to HA" means? HA can't see when the sensor report occupancy "detected" vs "not detected" and I cannot automate this? OR I am getting it wrong? I don't know what is cluster attributes. I think someone mentioned it in my original post. Will go to read now, but if simple explanation is possible, I would greatly appreciate it.

MattWestb commented 1 year ago

From the device card right from reconfigure ... and manage zigbee device select cluster and command / attribute and read / write. If sleeper wake it up then sending to the device.

"not exposed to HA" is wrong its exposed but ZHA have not getting any GUI entries for it.

jimmyeao commented 1 year ago

From the device card right from reconfigure ... and manage zigbee device select cluster and command / attribute and read / write. If sleeper wake it up then sending to the device.

"not exposed to HA" is wrong its exposed but ZHA have not getting any GUI entries for it.

Ok, it would be nicer if they were exposed as sensors as Z2M does...

alexvaltchev commented 1 year ago

I also wonder when I get into the room, it changes from "clear to detected" in about 1-2 seconds. But when I walked out of the room, it takes about 60-65 seconds. Why is this? Can it be done to be faster or immediate? I don't know if I am mistaken, but I think in Home Smart app, both were right on the spot, no delay. I can check now and report back.

jimmyeao commented 1 year ago

I also wonder when I get into the room, it changes from "clear to detected" in about 1-2 seconds. But when I walked out of the room, it takes about 60-65 seconds. Why is this? Can it be done to be faster or immediate? I don't know if I am mistaken, but I think in Home Smart app, both were right on the spot, no delay. I can check now and report back.

MMWave sensors are not very good at reporting "clear" quickly - i have other sensors that have a configurable time, but this one does not appear to do so

alexvaltchev commented 1 year ago

Which one would that be? I have only seen this one, and Aqara FP1s. What would you recommend? Thanks.

jimmyeao commented 1 year ago

Which one would that be? I have only seen this one, and Aqara FP1s. What would you recommend? Thanks.

This One https://www.aliexpress.com/item/1005004704966668.html