Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Quirk for TS0003 by Zemismart not working [BUG] #2527

Closed
airtonac opened this issue Aug 15, 2023 · 4 comments
Closed

Quirk for TS0003 by Zemismart not working [BUG] #2527

airtonac opened this issue Aug 15, 2023 · 4 comments
Labels
likely easy fix It's likely that this issue is easily fixable stale Issue is inactivate and might get closed soon Tuya Request/PR regarding a Tuya device

Comments

@airtonac
Copy link

airtonac commented Aug 15, 2023

@TheJulianJES

Bug description

Hello,

So I bought both TS0003 (shown as TS0013 on HA) and TS0004 from the Zemismart store on Ali Express. I managed to make the TS0004 work perfectly using the quirk given as example here. I added a TS0004.py to the custom_zha_quirks folder and it worked.

I tried to do the same process to the 3-gang version, but the switches are still all grouped on HA. I even tried a TS000X.py file that contained instructions for both devices and still only the 4-gang one works as expected.

PS: running ZHA on embedded Zigbee coordinator from Home Assistant Yellow. I tried the Sonoff Dongle P for a while, but decided to use it as a repeater and make use of the zigbee embedded module which works very well.

Steps to reproduce

  1. Add this lines to configuration. yaml:
    zha: custom_quirks_path: /config/custom_zha_quirks/ enable_quirks: true

  2. Add the quirk below (TS0003_custom_quirk.py) to /config/custom_zha_quirks/: (Everything below is supposed to be shown here as code but for some reason the beginning of the code is shown as text)

Custom quirk test code (click to exapnd)
"""tuya TS000X Switches (CUSTOM QUIRK TEST: https://github.com/zigpy/zha-device-handlers/issues/2443)."""

from zigpy.profiles import zgp, zha
from zigpy.zcl.clusters.general import (
    Basic,
    GreenPowerProxy,
    Groups,
    Identify,
    OnOff,
    Ota,
    Scenes,
    Time,
)

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODEL,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import (
    TuyaZBE000Cluster,
    TuyaZBExternalSwitchTypeCluster,
    TuyaZBOnOffAttributeCluster,
)
from zhaquirks.tuya.mcu import EnchantedDevice


class Switch_3G_GPP_Var2(EnchantedDevice):
    """Tuya 3 gang switch module with."""

    signature = {
        MODEL: "TS0003",
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    0xE000,
                    0xE001,
                ],
                OUTPUT_CLUSTERS: [
                    Time.cluster_id,
                    Ota.cluster_id,
                ],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    0xE000,
                    0xE001,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    0xE000,
                    0xE001,
                ],
                OUTPUT_CLUSTERS: [],
            },
            4: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    0xE000,
                    0xE001,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: zgp.PROFILE_ID,
                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [
                    GreenPowerProxy.cluster_id,
                ],
            },
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBE000Cluster,
                    TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [
                    Time.cluster_id,
                    Ota.cluster_id,
                ],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBE000Cluster,
                    TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBE000Cluster,
                    TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            4: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBE000Cluster,
                    TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: zgp.PROFILE_ID,
                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [
                    GreenPowerProxy.cluster_id,
                ],
            },
        },
    }

Expected behavior

The 3 switches provided by the device are still all grouped on HA.
They work fine when I press the physical buttons, but whenever I turn on or off one of the switches in HA, all 3 behave the same way. i.e: turn on the stairs light and the corridor light + living room light all follow the same command.

Screenshots/Video

Screenshots/Video

[Paste/upload you
3-gang switches grouped
r media here]

Device signature

Device signature
{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": "0x0104",
      "device_type": "0x0100",
      "input_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006"
      ],
      "output_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "2": {
      "profile_id": "0x0104",
      "device_type": "0x0100",
      "input_clusters": [
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006"
      ],
      "output_clusters": []
    },
    "3": {
      "profile_id": "0x0104",
      "device_type": "0x0100",
      "input_clusters": [
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006"
      ],
      "output_clusters": []
    }
  },
  "manufacturer": "_TZ3000_lrgccsxm",
  "model": "TS0013",
  "class": "zigpy.device.Device"
}

Diagnostic information

Diagnostic information
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.8.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.4",
    "docker": true,
    "arch": "aarch64",
    "timezone": "America/Sao_Paulo",
    "os_name": "Linux",
    "os_version": "6.1.21-v8",
    "supervisor": "2023.08.1",
    "host_os": "Home Assistant OS 10.4",
    "docker_version": "23.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.32.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "sonoff": {
      "version": "3.5.2",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "spotcast": {
      "version": "v3.6.30",
      "requirements": []
    },
    "auto_backup": {
      "version": "1.4.1",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "after_dependencies": [
      "onboarding",
      "usb"
    ],
    "codeowners": [
      "@dmulcahey",
      "@adminiuga",
      "@puddly"
    ],
    "config_flow": true,
    "dependencies": [
      "file_upload"
    ],
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "iot_class": "local_polling",
    "loggers": [
      "aiosqlite",
      "bellows",
      "crccheck",
      "pure_pcapy3",
      "zhaquirks",
      "zigpy",
      "zigpy_deconz",
      "zigpy_xbee",
      "zigpy_zigate",
      "zigpy_znp"
    ],
    "requirements": [
      "bellows==0.35.9",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.102",
      "zigpy-deconz==0.21.0",
      "zigpy==0.56.4",
      "zigpy-xbee==0.18.1",
      "zigpy-zigate==0.11.0",
      "zigpy-znp==0.11.4"
    ],
    "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"
        ]
      }
    ],
    "zeroconf": [
      {
        "type": "_esphomelib._tcp.local.",
        "name": "tube*"
      },
      {
        "type": "_zigate-zigbee-gateway._tcp.local.",
        "name": "*zigate*"
      },
      {
        "type": "_zigstar_gw._tcp.local.",
        "name": "*zigstar*"
      },
      {
        "type": "_slzb-06._tcp.local.",
        "name": "slzb-06*"
      }
    ],
    "is_built_in": true
  },
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 61187,
    "manufacturer": "_TZ3000_lrgccsxm",
    "model": "TS0013",
    "name": "_TZ3000_lrgccsxm TS0013",
    "quirk_applied": false,
    "quirk_class": "zigpy.device.Device",
    "manufacturer_code": 4098,
    "power_source": "Battery or Unknown",
    "lqi": 160,
    "rssi": -60,
    "last_seen": "2023-08-15T06:58:50",
    "available": true,
    "device_type": "EndDevice",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x0000",
            "0x0003",
            "0x0004",
            "0x0005",
            "0x0006"
          ],
          "output_clusters": [
            "0x000a",
            "0x0019"
          ]
        },
        "2": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x0003",
            "0x0004",
            "0x0005",
            "0x0006"
          ],
          "output_clusters": []
        },
        "3": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x0003",
            "0x0004",
            "0x0005",
            "0x0006"
          ],
          "output_clusters": []
        }
      },
      "manufacturer": "_TZ3000_lrgccsxm",
      "model": "TS0013"
    },
    "active_coordinator": false,
    "entities": [
      {
        "entity_id": "button.interruptor_do_andar_superior_identify",
        "name": "_TZ3000_lrgccsxm TS0013"
      },
      {
        "entity_id": "light.andar_superior_light_trigger",
        "name": "_TZ3000_lrgccsxm TS0013"
      },
      {
        "entity_id": "light.corredor_andar_cima",
        "name": "_TZ3000_lrgccsxm TS0013"
      },
      {
        "entity_id": "light.teto_alto_andar_cima",
        "name": "_TZ3000_lrgccsxm TS0013"
      }
    ],
    "neighbors": [],
    "routes": [],
    "endpoint_names": [
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "ON_OFF_LIGHT"
      }
    ],
    "user_given_name": "interruptor do andar superior",
    "device_reg_id": "c2c75c92fb8f26f4717707e87c72732b",
    "area_id": "corredor_do_segundo_andar",
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "_TZ3000_lrgccsxm"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "TS0013"
              }
            },
            "unsupported_attributes": {}
          },
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {
              "0x0000": {
                "attribute_name": "on_off",
                "value": 0
              }
            },
            "unsupported_attributes": {
              "0x4003": {
                "attribute_name": "start_up_on_off"
              }
            }
          }
        },
        "out_clusters": {
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x000a": {
            "endpoint_attribute": "time",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      },
      "2": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {
              "0x0000": {
                "attribute_name": "on_off",
                "value": 0
              }
            },
            "unsupported_attributes": {
              "0x4003": {
                "attribute_name": "start_up_on_off"
              }
            }
          }
        },
        "out_clusters": {}
      },
      "3": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {
              "0x0000": {
                "attribute_name": "on_off",
                "value": 0
              }
            },
            "unsupported_attributes": {
              "0x4003": {
                "attribute_name": "start_up_on_off"
              }
            }
          }
        },
        "out_clusters": {}
      }
    }
  }
}

Logs

Logs
2023-08-15 06:57:40.284 WARNING (MainThread) [zhaquirks] Loaded custom quirks. Please contribute them to https://github.com/zigpy/zha-device-handlers
2023-08-15 06:58:15.131 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x775F:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:15.637 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x072F:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:15.723 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xA2BA:1:0x0300]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:15.745 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xA2BA:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:15.867 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x51FE:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:15.891 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xA2BA:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:16.699 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x162B:1:0x0300]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:16.732 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x162B:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:16.762 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x51FE:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:17.254 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x46BD:1:0x0300]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:17.348 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x51FE:1:0x0300]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:17.368 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x345E:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:17.485 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x46BD:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:17.683 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x775F:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:18.314 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x46BD:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:18.364 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x345E:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:18.387 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x775F:1:0x0300]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:18.870 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x162B:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:18.970 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x46BD:1:0x0b04]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:18.983 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x46BD:1:0x000f]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:19.102 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x345E:1:0x0300]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:19.299 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x46BD:1:0x0002]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:19.933 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0FE1:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:19.999 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x46BD:1:0x0702]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:20.010 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0FE1:1:0x0300]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 06:58:20.486 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0FE1:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
2023-08-15 07:16:38.994 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x1A4E](lumi.sensor_magnet.aq2): Device seen - marking the device available and resetting counter
2023-08-15 07:16:38.995 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x1A4E](lumi.sensor_magnet.aq2): Update device availability -  device available: True - new availability: True - changed: False
2023-08-15 07:16:39.688 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'65a9b1a90d2a1efee592d3db55e421bde8f72666616ad07e'
2023-08-15 07:16:39.692 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'87009f7e'
2023-08-15 07:16:39.695 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received incomingRouteRecordHandler: [0x4c0b, f4:b3:b1:ff:fe:99:06:bc, 116, -71, [0x8ccd]]
2023-08-15 07:16:39.695 DEBUG (MainThread) [bellows.zigbee.application] Received incomingRouteRecordHandler frame with [0x4c0b, f4:b3:b1:ff:fe:99:06:bc, 116, -71, [0x8ccd]]
2023-08-15 07:16:39.695 DEBUG (MainThread) [bellows.zigbee.application] Processing route record request: (0x4c0b, f4:b3:b1:ff:fe:99:06:bc, 116, -71, [0x8ccd])
2023-08-15 07:16:39.701 DEBUG (Thread-2) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f83c57880>, 'INSERT INTO relays_v12 VALUES (:ieee, :relays)\n                        ON CONFLICT (ieee)\n                        DO UPDATE SET relays=excluded.relays WHERE relays != :relays', {'ieee': f4:b3:b1:ff:fe:99:06:bc, 'relays': b'\x01\xcd\x8c'})
2023-08-15 07:16:39.704 DEBUG (Thread-2) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f83c57880>, 'INSERT INTO relays_v12 VALUES (:ieee, :relays)\n                        ON CONFLICT (ieee)\n                        DO UPDATE SET relays=excluded.relays WHERE relays != :relays', {'ieee': f4:b3:b1:ff:fe:99:06:bc, 'relays': b'\x01\xcd\x8c'}) completed
2023-08-15 07:16:39.705 DEBUG (Thread-2) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f83c57880>)
2023-08-15 07:16:39.706 DEBUG (Thread-2) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f83c57880>) completed
2023-08-15 07:16:39.744 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'75a9b1a9112a15b658914e24ab1593499cc55312e6829874f5ce7d83fc7e1ea3fec9ccb47e'
2023-08-15 07:16:39.744 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'8070787e'
2023-08-15 07:16:39.745 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received incomingMessageHandler: [<EmberIncomingMessageType.INCOMING_UNICAST: 0>, EmberApsFrame(profileId=260, clusterId=1029, sourceEndpoint=1, destinationEndpoint=1, options=<EmberApsOption.APS_OPTION_RETRY|APS_OPTION_ENABLE_ROUTE_DISCOVERY: 320>, groupId=0, sequence=139), 116, -71, 0x4c0b, 255, 255, b'\x08\x1e\n\x00\x00!\x04\x15']
2023-08-15 07:16:39.745 DEBUG (MainThread) [bellows.zigbee.application] Received incomingMessageHandler frame with [<EmberIncomingMessageType.INCOMING_UNICAST: 0>, EmberApsFrame(profileId=260, clusterId=1029, sourceEndpoint=1, destinationEndpoint=1, options=<EmberApsOption.APS_OPTION_RETRY|APS_OPTION_ENABLE_ROUTE_DISCOVERY: 320>, groupId=0, sequence=139), 116, -71, 0x4c0b, 255, 255, b'\x08\x1e\n\x00\x00!\x04\x15']
2023-08-15 07:16:39.746 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x4C0B), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=139, profile_id=260, cluster_id=1029, data=Serialized[b'\x08\x1e\n\x00\x00!\x04\x15'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=116, rssi=-71)
2023-08-15 07:16:39.748 DEBUG (MainThread) [zigpy.zcl] [0x4C0B:1:0x0405] Received ZCL frame: b'\x08\x1e\n\x00\x00!\x04\x15'
2023-08-15 07:16:39.749 DEBUG (MainThread) [zigpy.zcl] [0x4C0B:1:0x0405] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=30, command_id=10, *direction=<Direction.Client_to_Server: 1>)
2023-08-15 07:16:39.751 DEBUG (MainThread) [zigpy.zcl] [0x4C0B:1:0x0405] Decoded ZCL frame: RelativeHumidity:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=5380))])
2023-08-15 07:16:39.752 DEBUG (MainThread) [zigpy.zcl] [0x4C0B:1:0x0405] Received command 0x0A (TSN 30): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=5380))])
2023-08-15 07:16:39.752 DEBUG (MainThread) [zigpy.zcl] [0x4C0B:1:0x0405] Attribute report received: measured_value=5380
2023-08-15 07:16:39.753 DEBUG (MainThread) [zigpy.zcl] [0x4C0B:1:0x0405] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=30, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>)
2023-08-15 07:16:39.754 DEBUG (MainThread) [zigpy.zcl] [0x4C0B:1:0x0405] Sending reply: Default_Response(command_id=10, status=<Status.SUCCESS: 0>)
2023-08-15 07:16:39.755 DEBUG (MainThread) [bellows.zigbee.application] Sending packet ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x4C0B), dst_ep=1, source_route=None, extended_timeout=False, tsn=30, profile_id=260, cluster_id=1029, data=Serialized[b'\x18\x1e\x0b\n\x00'], tx_options=<TransmitOptions.ACK: 1>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-08-15 07:16:39.755 DEBUG (MainThread) [bellows.ezsp.protocol] Send command sendUnicast: (<EmberOutgoingMessageType.OUTGOING_DIRECT: 0>, 0x4c0b, EmberApsFrame(profileId=260, clusterId=1029, sourceEndpoint=1, destinationEndpoint=1, options=<EmberApsOption.APS_OPTION_RETRY|APS_OPTION_ENABLE_ROUTE_DISCOVERY: 320>, groupId=0, sequence=30), 43, b'\x18\x1e\x0b\n\x00')
2023-08-15 07:16:39.756 DEBUG (Thread-2) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f83c57880>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1692094599.74822, 'ieee': f4:b3:b1:ff:fe:99:06:bc, 'min_update_delta': 30.0})
2023-08-15 07:16:39.757 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'50ae21a9602a15b915904b20ae5493099d4e27b5c6cb7f95f6cc63b3ba7e'
2023-08-15 07:16:39.758 DEBUG (Thread-2) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f83c57880>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1692094599.74822, 'ieee': f4:b3:b1:ff:fe:99:06:bc, 'min_update_delta': 30.0}) completed
2023-08-15 07:16:39.759 DEBUG (Thread-2) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f83c57880>)
2023-08-15 07:16:39.760 DEBUG (Thread-2) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f83c57880>) completed
2023-08-15 07:16:39.762 DEBUG (Thread-2) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f83c57880>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': f4:b3:b1:ff:fe:99:06:bc, 'endpoint_id': 1, 'cluster_id': 1029, 'attrid': 0, 'value': 5380, 'timestamp': 1692094599.752491, 'min_update_delta': 30.0})
2023-08-15 07:16:39.763 DEBUG (Thread-2) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f83c57880>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': f4:b3:b1:ff:fe:99:06:bc, 'endpoint_id': 1, 'cluster_id': 1029, 'attrid': 0, 'value': 5380, 'timestamp': 1692094599.752491, 'min_update_delta': 30.0}) completed
2023-08-15 07:16:39.765 DEBUG (Thread-2) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f83c57880>)
2023-08-15 07:16:39.765 DEBUG (Thread-2) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f83c57880>) completed
2023-08-15 07:16:39.768 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'06aea1a9602a157c3baa7e'
2023-08-15 07:16:39.768 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'8160597e'
2023-08-15 07:16:39.769 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received sendUnicast: [<EmberStatus.SUCCESS: 0>, 206]
2023-08-15 07:16:39.950 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'16aeb1a90d2a1efee592d3db55e421bde8f726666114f27e'
2023-08-15 07:16:39.950 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'82503a7e'
2023-08-15 07:16:39.953 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received incomingRouteRecordHandler: [0x4c0b, f4:b3:b1:ff:fe:99:06:bc, 116, -71, [0x8ccd]]
2023-08-15 07:16:39.953 DEBUG (MainThread) [bellows.zigbee.application] Received incomingRouteRecordHandler frame with [0x4c0b, f4:b3:b1:ff:fe:99:06:bc, 116, -71, [0x8ccd]]
2023-08-15 07:16:39.954 DEBUG (MainThread) [bellows.zigbee.application] Processing route record request: (0x4c0b, f4:b3:b1:ff:fe:99:06:bc, 116, -71, [0x8ccd])
2023-08-15 07:16:39.956 DEBUG (Thread-2) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f83c57880>, 'INSERT INTO relays_v12 VALUES (:ieee, :relays)\n                        ON CONFLICT (ieee)\n                        DO UPDATE SET relays=excluded.relays WHERE relays != :relays', {'ieee': f4:b3:b1:ff:fe:99:06:bc, 'relays': b'\x01\xcd\x8c'})
2023-08-15 07:16:39.958 DEBUG (Thread-2) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f83c57880>, 'INSERT INTO relays_v12 VALUES (:ieee, :relays)\n                        ON CONFLICT (ieee)\n                        DO UPDATE SET relays=excluded.relays WHERE relays != :relays', {'ieee': f4:b3:b1:ff:fe:99:06:bc, 'relays': b'\x01\xcd\x8c'}) completed
2023-08-15 07:16:39.961 DEBUG (Thread-2) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f83c57880>)
2023-08-15 07:16:39.962 DEBUG (Thread-2) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f83c57880>) completed
2023-08-15 07:16:40.003 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'26aeb1a96b2a15b915904b20ae5493099d4e2765c6ce6772077e'
2023-08-15 07:16:40.003 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'83401b7e'
2023-08-15 07:16:40.007 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received messageSentHandler: [<EmberOutgoingMessageType.OUTGOING_DIRECT: 0>, 19467, EmberApsFrame(profileId=260, clusterId=1029, sourceEndpoint=1, destinationEndpoint=1, options=<EmberApsOption.APS_OPTION_RETRY|APS_OPTION_ENABLE_ROUTE_DISCOVERY: 320>, groupId=0, sequence=206), 43, <EmberStatus.SUCCESS: 0>, b'']
2023-08-15 07:16:40.008 DEBUG (MainThread) [bellows.zigbee.application] Received messageSentHandler frame with [<EmberOutgoingMessageType.OUTGOING_DIRECT: 0>, 19467, EmberApsFrame(profileId=260, clusterId=1029, sourceEndpoint=1, destinationEndpoint=1, options=<EmberApsOption.APS_OPTION_RETRY|APS_OPTION_ENABLE_ROUTE_DISCOVERY: 320>, groupId=0, sequence=206), 43, <EmberStatus.SUCCESS: 0>, b'']
2023-08-15 07:16:41.034 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x3C1A](lumi.sensor_magnet.aq2): Device seen - marking the device available and resetting counter
2023-08-15 07:16:41.035 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x3C1A](lumi.sensor_magnet.aq2): Update device availability -  device available: True - new availability: True - changed: False
2023-08-15 07:16:41.060 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x1794](lumi.weather): Device seen - marking the device available and resetting counter
2023-08-15 07:16:41.060 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x1794](lumi.weather): Update device availability -  device available: True - new availability: True - changed: False
2023-08-15 07:16:41.277 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x4C0B](SNZB-02D): Device seen - marking the device available and resetting counter
2023-08-15 07:16:41.277 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x4C0B](SNZB-02D): Update device availability -  device available: True - new availability: True - changed: False
2023-08-15 07:16:46.183 DEBUG (MainThread) [bellows.ezsp.protocol] Send command readCounters: ()
2023-08-15 07:16:46.186 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'63af21a9a52ad5217e'
2023-08-15 07:16:46.203 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'37afa1a9a52a2bb65e958424c65595499c4e25abefce2f8ad7c611898b7e11a7eccdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5ca658a459a4d9e4f9ff7c3d9d46a35a251904824c13e7e'
2023-08-15 07:16:46.203 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'8430fc7e'
2023-08-15 07:16:46.206 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received readCounters: [[1086, 263, 462, 108, 7, 0, 2, 2, 328, 42, 114, 119, 46, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
2023-08-15 07:16:46.210 DEBUG (MainThread) [bellows.ezsp.protocol] Send command getValue: (<EzspValueId.VALUE_FREE_BUFFERS: 3>,)
2023-08-15 07:16:46.213 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'74ac21a9fe2a1686cf7e'
2023-08-15 07:16:46.219 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'40aca1a9fe2a15b3271c027e'
2023-08-15 07:16:46.219 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'8520dd7e'
2023-08-15 07:16:46.222 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received getValue: [<EzspStatus.SUCCESS: 0>, b'~']
2023-08-15 07:16:46.222 DEBUG (MainThread) [bellows.zigbee.application] Free buffers status EzspStatus.SUCCESS, value: 126

Additional information

I have tried the file TS000X.py which contained info for plenty of devices including the TS0003. It didn't work.

I have also edited the TS0003.py replacing TS0003 for TS0013 (The model that appears on HA), whenever applicable, but still no success.

I had to cut part of the logs out because github said my text was too long.
Any help will be appreciated.

Thanks,
Airton

@airtonac airtonac changed the title Quirk for TS0003 by Zemismart nit working [BUG] Quirk for TS0003 by Zemismart not working [BUG] Aug 15, 2023
@TheJulianJES TheJulianJES added Tuya Request/PR regarding a Tuya device likely easy fix It's likely that this issue is easily fixable labels Aug 17, 2023
@airtonac
Copy link
Author

airtonac commented Sep 6, 2023

Nobody had the same issue / tried to find a solution for this?

@airtonac
Copy link
Author

airtonac commented Sep 7, 2023

@TheJulianJES
Hi!
Just a quick update: the device which has its entities “grouped” on HA now appears on the ZHA integration as:

TS0013
by _TZ3000_lrgccsxm

The official model was TS0003.

The other similar switch plate with 4 switches (working with the quirk) still appears as TS0004. To be more specific:

TS0004
by _TZ3000_a37eix1s

Just so you know their brand is Zemismart, but this name does not appear on the devices page.

@MattWestb
Copy link
Contributor

Brands is not important for the system then tuya is selling there devices to many companies and they is putting there names on them like MOES, Zemismart LIDL and so on and its the same device and working the same way.

Copy link

github-actions bot commented Mar 5, 2024

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Issue is inactivate and might get closed soon label Mar 5, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
likely easy fix It's likely that this issue is easily fixable stale Issue is inactivate and might get closed soon Tuya Request/PR regarding a Tuya device
Projects
None yet
Development

No branches or pull requests

3 participants