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
719 stars 664 forks source link

[Device Support Request] Aqara Motion Sensor P1 (lumi.motion.ac02) #1498

Closed madface303 closed 2 years ago

madface303 commented 2 years ago

Is your feature request related to a problem? Please describe. The Sensor is recognized by ZHA but there is no motion sensor (only power, lqi and rssi, power and rssi have state unknown)

Link to product https://www.aqara.com/en/product/motion-sensor-p1

Describe the solution you'd like Use it with home assistant ;)

Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.

[0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_rsp: [<Status.SUCCESS: 0>]
[0x0000:zdo] No handler for ZDO request:ZDOCmd.Mgmt_Permit_Joining_rsp([<Status.SUCCESS: 0>])
[0x36FE:1:0x0400] Received ZCL frame: b'\x18\xE9\x0A\x00\x00\x21\x78\x53'
[0x36FE:1:0x0400] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=233, command_id=10, *is_reply=True)
[0x36FE:1:0x0400] Decoded ZCL frame: IlluminanceMeasurement:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=21368))])
[0x36FE:1:0x0400] Received command 0x0A (TSN 233): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=21368))])
[0x36FE:1:0x0400] Attribute report received: measured_value=21368
[0x8A98:1:0x0500]: Updated alarm state: 0
New device 0x703f (54:ef:44:10:00:43:e9:2c) joined the network
[0x703f] Scheduling initialization
Received frame on uninitialized device <Device model=None manuf=None nwk=0x703F ieee=54:ef:44:10:00:43:e9:2c is_initialized=False> from ep 0 to ep 0, cluster 19: b'f?p,\xe9C\x00\x10D\xefT\x80'
[0x703f:zdo] ZDO request ZDOCmd.Device_annce: [0x703F, 54:ef:44:10:00:43:e9:2c, 128]
Tries remaining: 3
[0x703f] Requesting 'Node Descriptor'
Tries remaining: 2
[0x703f] Extending timeout for 0x50 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0x703F ieee=54:ef:44:10:00:43:e9:2c is_initialized=False> from ep 0 to ep 0, cluster 32770: b'P\x00?p\x02@\x80_\x11\x7fd\x00\x00,d\x00\x00'
[0x703f] Got 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=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, 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)
[0x703f] Discovering endpoints
Tries remaining: 3
[0x703f] Extending timeout for 0x51 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0x703F ieee=54:ef:44:10:00:43:e9:2c is_initialized=False> from ep 0 to ep 0, cluster 32773: b'Q\x00?p\x01\x01'
[0x703f] Discovered endpoints: [1]
[0x703f] Initializing endpoints [<Endpoint id=1 in=[] out=[] status=<Status.NEW: 0>>]
[0x703f:1] Discovering endpoint information
Tries remaining: 3
[0x703f] Extending timeout for 0x52 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0x703F ieee=54:ef:44:10:00:43:e9:2c is_initialized=False> from ep 0 to ep 0, cluster 32772: b'R\x00?p\x16\x01\x04\x01\x07\x01\x01\x04\x00\x00\x01\x00\x03\x00\xc0\xfc\x03\x03\x00\x19\x00\xc0\xfc'
[0x703f:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=263, device_version=1, input_clusters=[0, 1, 3, 64704], output_clusters=[3, 25, 64704])
[0x703F:1:0x0000] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, is_reply=0, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=83, command_id=<GeneralCommand.Read_Attributes: 0>, *is_reply=False)
[0x703F:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4, 5])
[0x703f] Extending timeout for 0x53 request
[0x703F:1:0x0000] Received ZCL frame: b'\x18\x00\x0A\x01\x00\x20\x05\x05\x00\x42\x10\x6C\x75\x6D\x69\x2E\x6D\x6F\x74\x69\x6F\x6E\x2E\x61\x63\x30\x32'
[0x703F:1:0x0000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=0, command_id=10, *is_reply=True)
[0x703F:1:0x0000] Decoded ZCL frame: Basic:Report_Attributes(attribute_reports=[Attribute(attrid=0x0001, value=TypeValue(type=uint8_t, value=5)), Attribute(attrid=0x0005, value=TypeValue(type=CharacterString, value='lumi.motion.ac02'))])
[0x703F:1:0x0000] Received command 0x0A (TSN 0): Report_Attributes(attribute_reports=[Attribute(attrid=0x0001, value=TypeValue(type=uint8_t, value=5)), Attribute(attrid=0x0005, value=TypeValue(type=CharacterString, value='lumi.motion.ac02'))])
[0x703F:1:0x0000] Attribute report received: app_version=5, model='lumi.motion.ac02'
Error handling '_save_attribute' event with (54:ef:44:10:00:43:e9:2c, 1, 0, 1, 5) params: FOREIGN KEY constraint failed
[0x703F:1:0x0000] Received ZCL frame: b'\x18\x53\x01\x04\x00\x00\x42\x04\x4C\x55\x4D\x49\x05\x00\x00\x42\x10\x6C\x75\x6D\x69\x2E\x6D\x6F\x74\x69\x6F\x6E\x2E\x61\x63\x30\x32'
[0x703F:1:0x0000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=83, command_id=1, *is_reply=True)
[0x703F:1:0x0000] Decoded ZCL frame: Basic:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0004, status=<Status.SUCCESS: 0>, value=TypeValue(type=CharacterString, value='LUMI')), ReadAttributeRecord(attrid=0x0005, status=<Status.SUCCESS: 0>, value=TypeValue(type=CharacterString, value='lumi.motion.ac02'))])
[0x703f] Read model 'lumi.motion.ac02' and manufacturer 'LUMI' from <Endpoint id=1 in=[basic:0x0000, power:0x0001, identify:0x0003, manufacturer_specific:0xFCC0] out=[identify:0x0003, ota:0x0019, manufacturer_specific:0xFCC0] status=<Status.ZDO_INIT: 1>>
[0x703f] Discovered basic device information for <Device model='lumi.motion.ac02' manuf='LUMI' nwk=0x703F ieee=54:ef:44:10:00:43:e9:2c is_initialized=True>
Device is initialized <Device model='lumi.motion.ac02' manuf='LUMI' nwk=0x703F ieee=54:ef:44:10:00:43:e9:2c is_initialized=True>
Checking quirks for LUMI lumi.motion.ac02 (54:ef:44:10:00:43:e9:2c)
Considering <class 'zhaquirks.xbee.xbee_io.XBeeSensor'>
Fail because endpoint list mismatch: {232, 230} {1}
Considering <class 'zhaquirks.xbee.xbee3_io.XBee3Sensor'>
Fail because endpoint list mismatch: {232, 230} {1}
Considering <class 'zhaquirks.smartthings.tag_v4.SmartThingsTagV4'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.smartthings.multi.SmartthingsMultiPurposeSensor'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.netvox.z308e3ed.Z308E3ED'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'>
Fail because endpoint list mismatch: {11, 13} {1}
Considering <class 'bellows.zigbee.application.EZSPCoordinator'>
Fail because device_type mismatch on at least one endpoint
Error handling '_save_attribute' event with (54:ef:44:10:00:43:e9:2c, 1, 0, 5, 'lumi.motion.ac02') params: FOREIGN KEY constraint failed
'button' component -> 'ZHAIdentifyButton' using ['identify']
'sensor' component -> 'Battery' using ['power']
'sensor' component -> 'RSSISensor' using ['basic']
'sensor' component -> 'LQISensor' using ['basic']
device - 0x703F:54:ef:44:10:00:43:e9:2c entering async_device_initialized - is_new_join: True
device - 0x703F:54:ef:44:10:00:43:e9:2c has joined the ZHA zigbee network
[0x703F](lumi.motion.ac02): started configuration
[0x703F:ZDO](lumi.motion.ac02): 'async_configure' stage succeeded
Error handling '_save_attribute' event with (54:ef:44:10:00:43:e9:2c, 1, 0, 4, 'LUMI') params: FOREIGN KEY constraint failed
[0x703f] Extending timeout for 0x54 request
[0x703F:1:0x0003]: finished channel configuration
[0x703F:1:0x0000]: finished channel configuration
[0x703f] Extending timeout for 0x55 request
[0x703F:1:0x0019]: finished channel configuration
Error handling '_save_attribute' event with (54:ef:44:10:00:43:e9:2c, 1, 0, 5, 'lumi.motion.ac02') params: FOREIGN KEY constraint failed
[0x703F:1:0x0001]: bound 'power' cluster: Status.SUCCESS
[0x703F:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, is_reply=0, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=86, command_id=<GeneralCommand.Configure_Reporting: 6>, *is_reply=False)
[0x703F:1:0x0001] Sending request: Configure_Reporting(config_records=[AttributeReportingConfig(direction=0, attrid=0x0020, datatype=32, min_interval=3600, max_interval=10800, reportable_change=1), AttributeReportingConfig(direction=0, attrid=0x0021, datatype=32, min_interval=3600, max_interval=10800, reportable_change=1)])
[0x703f] Extending timeout for 0x56 request
[0x703F:1:0xfcc0]: bound 'manufacturer_specific' cluster: Status.SUCCESS
[0x703F:1:0xfcc0]: finished channel configuration
[0x703F:1:0x0001] Received ZCL frame: b'\x18\x56\x07\x8C\x00\x20\x00\x86\x00\x21\x00'
[0x703F:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=86, command_id=7, *is_reply=True)
[0x703F:1:0x0001] Decoded ZCL frame: PowerConfiguration:Configure_Reporting_rsp(status_records=[ConfigureReportingResponseRecord(status=140, direction=0, attrid=32), ConfigureReportingResponseRecord(status=134, direction=0, attrid=33)])
[0x703F:1:0x0001]: Successfully configured reporting for 'set()' on 'power' cluster
[0x703F:1:0x0001]: Failed to configure reporting for '['battery_voltage', 'battery_percentage_remaining']' on 'power' cluster: [ConfigureReportingResponseRecord(status=140, direction=0, attrid=32), ConfigureReportingResponseRecord(status=134, direction=0, attrid=33)]
[0x703F:1:0x0001]: finished channel configuration
[0x703F:1:0x0001]: 'async_configure' stage succeeded
[0x703F:1:0x0003]: 'async_configure' stage succeeded
[0x703F:1:0x0000]: 'async_configure' stage succeeded
[0x703F:1:0xfcc0]: 'async_configure' stage succeeded
[0x703F:1:0x0019]: 'async_configure' stage succeeded
[0x703F](lumi.motion.ac02): completed configuration
[0x703F](lumi.motion.ac02): stored in registry: ZhaDeviceEntry(name='LUMI lumi.motion.ac02', ieee='54:ef:44:10:00:43:e9:2c', last_seen=1650036917.3284822)
[0x703F:1:0x0003] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=False, is_reply=0, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False), tsn=87, command_id=64, *is_reply=False)
[0x703F:1:0x0003] Sending request: trigger_effect(effect_id=<EffectIdentifier.Okay: 2>, effect_variant=<EffectVariant.Default: 0>)
[0x703f] Extending timeout for 0x57 request
[0x703F:1:0x0003] Received ZCL frame: b'\x18\x57\x0B\x40\x00'
[0x703F:1:0x0003] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=87, command_id=11, *is_reply=True)
[0x703F:1:0x0003] Decoded ZCL frame: Identify:Default_Response(command_id=64, status=<Status.SUCCESS: 0>)
[0x703F:1:0x0003]: executed 'trigger_effect' command with args: '(2, 0)' kwargs: '{}' result: Default_Response(command_id=64, status=<Status.SUCCESS: 0>)
[0x703F](lumi.motion.ac02): started initialization
[0x703F:ZDO](lumi.motion.ac02): 'async_initialize' stage succeeded
[0x703F:1:0x0001]: initializing channel: from_cache: False
[0x703F:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, is_reply=0, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=88, command_id=<GeneralCommand.Read_Attributes: 0>, *is_reply=False)
[0x703F:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33])
[0x703f] Extending timeout for 0x58 request
[0x703F:1:0x0003]: initializing channel: from_cache: False
[0x703F:1:0x0003]: finished channel initialization
[0x703F:1:0x0000]: initializing channel: from_cache: False
[0x703F:1:0x0000]: finished channel initialization
[0x703F:1:0xfcc0]: initializing channel: from_cache: False
[0x703F:1:0xfcc0]: finished channel initialization
[0x703F:1:0x0019]: initializing channel: from_cache: False
[0x703F:1:0x0019]: finished channel initialization
[0x703F:1:0x0001] Received ZCL frame: b'\x18\x58\x01\x20\x00\x00\x20\x1F\x21\x00\x86'
[0x703F:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=88, command_id=1, *is_reply=True)
[0x703F:1:0x0001] Decoded ZCL frame: PowerConfiguration:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0020, status=<Status.SUCCESS: 0>, value=TypeValue(type=uint8_t, value=31)), ReadAttributeRecord(attrid=0x0021, status=<Status.UNSUPPORTED_ATTRIBUTE: 134>)])
[0x703F:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, is_reply=0, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=89, command_id=<GeneralCommand.Read_Attributes: 0>, *is_reply=False)
[0x703F:1:0x0001] Sending request: Read_Attributes(attribute_ids=[49, 51])
[0x703f] Extending timeout for 0x59 request
[0x703F:1:0x0001] Received ZCL frame: b'\x18\x59\x01\x31\x00\x86\x33\x00\x86'
[0x703F:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=89, command_id=1, *is_reply=True)
[0x703F:1:0x0001] Decoded ZCL frame: PowerConfiguration:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0031, status=<Status.UNSUPPORTED_ATTRIBUTE: 134>), ReadAttributeRecord(attrid=0x0033, status=<Status.UNSUPPORTED_ATTRIBUTE: 134>)])
[0x703F:1:0x0001]: finished channel initialization
[0x703F:1:0x0001]: 'async_initialize' stage succeeded
[0x703F:1:0x0003]: 'async_initialize' stage succeeded
[0x703F:1:0x0000]: 'async_initialize' stage succeeded
[0x703F:1:0xfcc0]: 'async_initialize' stage succeeded
[0x703F:1:0x0019]: 'async_initialize' stage succeeded
[0x703F](lumi.motion.ac02): power source: Battery or Unknown
[0x703F](lumi.motion.ac02): completed initialization
[0x36FE:1:0x0400] Received ZCL frame: b'\x18\x08\x0A\x00\x00\x21\xD6\x52'
[0x36FE:1:0x0400] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=8, command_id=10, *is_reply=True)
[0x36FE:1:0x0400] Decoded ZCL frame: IlluminanceMeasurement:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=21206))])
[0x36FE:1:0x0400] Received command 0x0A (TSN 8): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=21206))])
[0x36FE:1:0x0400] Attribute report received: measured_value=21206
SkyDroVV commented 5 months ago

I can't connect Aqara P1 (new version) with ZHA in HA with Conbee III.

Feeding watchdog
Received a packet: ZigbeePacket(timestamp=datetime.datetime(2024, 4, 4, 18, 35, 51, 960322, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x6D6F), src_ep=0, dst=AddrModeAddress(addr_mode=<AddrMode.Broadcast: 15>, address=<BroadcastAddress.ALL_DEVICES: 65535>), dst_ep=0, source_route=None, extended_timeout=False, tsn=None, profile_id=0, cluster_id=19, data=Serialized[b'<omJ*\xb6\x00\x10D\xefT\x80'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=197, rssi=-59)
New device 0x6d6f (54:ef:44:10:00:b6:2a:4a) joined the network
[0x6d6f] Scheduling initialization
Received frame on uninitialized device <Device model=None manuf=None nwk=0x6D6F ieee=54:ef:44:10:00:b6:2a:4a is_initialized=False> from ep 0 to ep 0, cluster 19: Serialized[b'<omJ*\xb6\x00\x10D\xefT\x80']
[0x6d6f:zdo] ZDO request ZDOCmd.Device_annce: [0x6D6F, 54:ef:44:10:00:b6:2a:4a, 128]
Tries remaining: 5
[0x6d6f] Requesting 'Node Descriptor'
[0x6d6f] Extending timeout for 0x01 request
Feeding watchdog
Tries remaining: 4
[0x6d6f] Requesting 'Node Descriptor'
[0x6d6f] Extending timeout for 0x02 request
Tries remaining: 3
[0x6d6f] Requesting 'Node Descriptor'
[0x6d6f] Extending timeout for 0x03 request
Tries remaining: 2
[0x6d6f] Requesting 'Node Descriptor'
[0x6d6f] Extending timeout for 0x04 request
[0xFDF7](TS0202): Attempting to checkin with device - missed checkins: 1
[0xFDF7:1:0x0000] Sending request header: ZCLHeader(frame_control=FrameControl<0x00>(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=1, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Client_to_Server: 0>)
[0xFDF7:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4])
[0xfdf7] Extending timeout for 0x01 request
Tries remaining: 1
[0x6d6f] Requesting 'Node Descriptor'
[0x6d6f] Extending timeout for 0x05 request
Feeding watchdog
[0x2886](TS130F): Device seen - marking the device available and resetting counter
[0x2886](TS130F): Update device availability -  device available: True - new availability: True - changed: False
[0xB4A7](50131): Device seen - marking the device available and resetting counter
[0xB4A7](50131): Update device availability -  device available: True - new availability: True - changed: False
Feeding watchdog
[0xFDF7](TS0202): Attempting to checkin with device - missed checkins: 2
[0xFDF7:1:0x0000] Sending request header: ZCLHeader(frame_control=FrameControl<0x00>(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=2, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Client_to_Server: 0>)
[0xFDF7:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4])
[0xfdf7] Extending timeout for 0x02 request
Feeding watchdog
Feeding watchdog
[0x2886](TS130F): Device seen - marking the device available and resetting counter
[0x2886](TS130F): Update device availability -  device available: True - new availability: True - changed: False
[0xB4A7](50131): Device seen - marking the device available and resetting counter
[0xB4A7](50131): Update device availability -  device available: True - new availability: True - changed: False
[0xFDF7](TS0202): last_seen is 100188.31617498398 seconds ago and ping attempts have been exhausted, marking the device unavailable
[0xFDF7](TS0202): Update device availability -  device available: False - new availability: False - changed: False
Feeding watchdog
Feeding watchdog
Received a packet: ZigbeePacket(timestamp=datetime.datetime(2024, 4, 4, 18, 39, 12, 529634, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xB4A7), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=None, profile_id=260, cluster_id=8, data=Serialized[b'\x08,\n\x00\x00 \x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=197, rssi=-59)
[0xB4A7:1:0x0008] Received ZCL frame: b'\x08,\n\x00\x00 \x00'
[0xB4A7:1:0x0008] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl<0x08>(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Server_to_Client: 1>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=44, command_id=10, *direction=<Direction.Server_to_Client: 1>)
[0xB4A7:1:0x0008] Decoded ZCL frame: LevelControl:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint8_t, value=0))])
[0xB4A7:1:0x0008] Received command 0x0A (TSN 44): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint8_t, value=0))])
[0xB4A7:1:0x0008] Attribute report received: current_level=0
[0xB4A7:1:0x0008]: received attribute: 0 update with value: 0
[0xB4A7:1:0x0008] Sending reply header: ZCLHeader(frame_control=FrameControl<0x10>(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 0>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=44, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 0>)
[0xB4A7:1:0x0008] Sending reply: Default_Response(command_id=10, status=<Status.SUCCESS: 0>)
[0x2886](TS130F): Device seen - marking the device available and resetting counter
[0x2886](TS130F): Update device availability -  device available: True - new availability: True - changed: False
[0xFDF7](TS0202): last_seen is 100248.31722521782 seconds ago and ping attempts have been exhausted, marking the device unavailable
[0xFDF7](TS0202): Update device availability -  device available: False - new availability: False - changed: False
Feeding watchdog
[0xB4A7](50131): Device seen - marking the device available and resetting counter
[0xB4A7](50131): Update device availability -  device available: True - new availability: True - changed: False

Can someone help?